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() }