<template>
|
<ProDialog title="文件列表" v-model="visible" @close="onDialogClose" destroy-on-close draggable>
|
<ProForm :model="form" ref="dialogForm" label-width="110px" is-read class="audit-file-form">
|
<ProFormItemV2
|
label="平台审批凭证:"
|
prop="selfAuditFileUrl"
|
v-if="form?.selfAuditFileUrl?.length > 0"
|
>
|
<ProFormUpload
|
v-model:file-url="form.selfAuditFileUrl"
|
:limitFileSize="50"
|
accept="doc,docx,pdf,xls,xlsx,jpg/jpeg,png"
|
></ProFormUpload>
|
</ProFormItemV2>
|
<ProFormItemV2
|
label="出账审批凭证:"
|
prop="payAuditFileUrl"
|
v-if="form?.payAuditFileUrl?.length > 0"
|
>
|
<ProFormUpload
|
v-model:file-url="form.payAuditFileUrl"
|
:limitFileSize="50"
|
accept="doc,docx,pdf,xls,xlsx,jpg/jpeg,png"
|
></ProFormUpload>
|
</ProFormItemV2>
|
<ProFormItemV2
|
label="财政审批凭证:"
|
prop="financeAuditFileUrl"
|
v-if="form?.financeAuditFileUrl?.length > 0"
|
>
|
<ProFormUpload
|
v-model:file-url="form.financeAuditFileUrl"
|
:limitFileSize="50"
|
accept="doc,docx,pdf,xls,xlsx,jpg/jpeg,png"
|
></ProFormUpload>
|
</ProFormItemV2>
|
<ProFormItemV2 label="出账凭证:" prop="payFileUrl" v-if="form?.payFileUrl?.length > 0">
|
<ProFormUpload
|
v-model:file-url="form.payFileUrl"
|
:limitFileSize="50"
|
accept="doc,docx,pdf,xls,xlsx,jpg/jpeg,png"
|
></ProFormUpload>
|
</ProFormItemV2>
|
<ProFormItemV2 label="保单文件:" prop="insureBillUrl" v-if="form?.insureBillUrl?.length > 0">
|
<ProFormUpload
|
v-model:file-url="form.insureBillUrl"
|
:limitFileSize="50"
|
accept="doc,docx,pdf,xls,xlsx,jpg/jpeg,png"
|
></ProFormUpload>
|
</ProFormItemV2>
|
</ProForm>
|
<template #footer>
|
<span class="dialog-footer">
|
<el-button @click="emit('onCancel')">取 消</el-button>
|
<el-button type="primary" @click="handleConfirm">确 定</el-button>
|
</span>
|
</template>
|
</ProDialog>
|
</template>
|
|
<script setup lang="ts">
|
import { FormInstance } from 'element-plus';
|
import {
|
ProDialog,
|
ProForm,
|
ProFormItemV2,
|
ProFormText,
|
UploadUserFile,
|
ProFormUpload,
|
} from '@bole-core/components';
|
|
defineOptions({
|
name: 'ParkBountyTradeDetailFileDialog',
|
});
|
|
// type Props = {};
|
|
// const props = withDefaults(defineProps<Props>(), {});
|
|
const visible = defineModel({ type: Boolean });
|
|
type Form = {
|
title?: string;
|
payAuditFileUrl: UploadUserFile[];
|
financeAuditFileUrl: UploadUserFile[];
|
selfAuditFileUrl: UploadUserFile[];
|
payFileUrl: UploadUserFile[];
|
insureBillUrl: UploadUserFile[];
|
};
|
|
const form = defineModel<Form>('form');
|
|
const emit = defineEmits<{
|
(e: 'onConfirm'): void;
|
(e: 'onCancel'): void;
|
}>();
|
|
const dialogForm = ref<FormInstance>();
|
|
function onDialogClose() {
|
if (!dialogForm.value) return;
|
dialogForm.value.resetFields();
|
}
|
|
function handleConfirm() {
|
if (!dialogForm.value) return;
|
dialogForm.value.validate((valid) => {
|
if (valid) {
|
emit('onConfirm');
|
} else {
|
return;
|
}
|
});
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.audit-file-form {
|
.el-form-item {
|
margin-bottom: 22px;
|
}
|
}
|
</style>
|