From 4ae2692b95c79beda0d543273174d862c23cd5c5 Mon Sep 17 00:00:00 2001 From: zengchenxi Date: Fri, 19 Jan 2024 15:07:08 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E3=80=91=E5=AE=8C=E5=96=84=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/heli/projectorder/detail.vue | 40 +++++++++++++++++-- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/mes-ui/mes-ui-admin-vue3/src/views/heli/projectorder/detail.vue b/mes-ui/mes-ui-admin-vue3/src/views/heli/projectorder/detail.vue index 8d082f51..71e34072 100644 --- a/mes-ui/mes-ui-admin-vue3/src/views/heli/projectorder/detail.vue +++ b/mes-ui/mes-ui-admin-vue3/src/views/heli/projectorder/detail.vue @@ -86,8 +86,8 @@ - - {{formatDate(formData.createTime, 'YYYY-MM-DD')}} + + {{formatDate(formData.orderTime, 'YYYY-MM-DD')}} @@ -620,7 +620,12 @@ const formData = ref({ operateLogs: [], contractNo: undefined, active: '', - activeOpinion: '' + activeOpinion: '', + isSnapshot: 0, + snapshotId: undefined, + snapshotCode: undefined, + orderTime: new Date(), + snapshotOrderTime: undefined, }) const formRules = reactive({ businessDeptId: [{ required: true, message: '提出部门不能为空', trigger: 'blur' }], @@ -832,6 +837,28 @@ const submitForm = async (active) => { } } + // 附件校验 + if('SUBMIT_AUDIT,ALTER'.indexOf(active) > -1){ + if(formData.value.hasContract){ + const hasContractFile = formData.value.attachments.some((file) => { + return file.businessFileType == 'CONTRACT'; + }) + if(!hasContractFile){ + message.error("请上传合同"); + return + } + } + if(formData.value.hasTechnologyProtocol){ + const hasProtocolFile = formData.value.attachments.some((file) => { + return file.businessFileType == 'TECHNOLOGY_PROTOCOL'; + }) + if(!hasProtocolFile){ + message.error("请上传技术协议"); + return + } + } + } + const orderId = await ProjectOrderApi.operateProjectOrder(data) message.success(t('common.operationSuccess')) // 上传附件 @@ -972,7 +999,12 @@ const resetForm = () => { attachments: [], contractNo: undefined, active: '', - activeOpinion: '' + activeOpinion: '', + isSnapshot: 0, + snapshotId: undefined, + snapshotCode: undefined, + orderTime: new Date(), + snapshotOrderTime: undefined, } formRef.value?.resetFields() }