diff --git a/src/main/resources/templates/admin/business/process-edit.ftl b/src/main/resources/templates/admin/business/process-edit.ftl index ac0d5ec..e583a4b 100644 --- a/src/main/resources/templates/admin/business/process-edit.ftl +++ b/src/main/resources/templates/admin/business/process-edit.ftl @@ -944,7 +944,13 @@ } if (containsEmpty(item)) { - this.$message.error("供应商比选材料第'" + idx + "'行有数据未填写,请检查表单") + // 单独检查附件 + if (isEmpty(item.attachment)) { + this.$message.error("供应商比选材料第'" + idx + "'行未上传附件") + } + else { + this.$message.error("供应商比选材料第'" + idx + "'行有数据未填写,请检查表单") + } return false } } @@ -1292,6 +1298,24 @@ this.applyDeptSectorOptions = JSON.parse('${applyDeptSectorOptions}') }, + watch: { + // 每当 question 改变时,这个函数就会执行 + procurementDetails(newValue, oldValue) { + if (this.processType === procurementContract) { + let contractAmount = 0 + for (let element of newValue) { + const children = element['children'] || [] + contractAmount = newValue['totalTaxInclude'] || 0 + for (let child of children) { + contractAmount = contractAmount + child['contractAmount'] || 0 + } + } + + this.contractAmount = contractAmount + } + } + }, + filters: { ellipsis(value, limit = 40) { if (!value) return '' diff --git a/src/main/resources/templates/admin/business/process-new.ftl b/src/main/resources/templates/admin/business/process-new.ftl index 976b8f7..1131ea0 100644 --- a/src/main/resources/templates/admin/business/process-new.ftl +++ b/src/main/resources/templates/admin/business/process-new.ftl @@ -255,8 +255,7 @@ - {{processForm.contractAmount}}元 - 0元 + {{processForm.contractAmount}}元 未选择项目 @@ -1100,7 +1099,13 @@ } if (containsEmpty(item)) { - this.$message.error("供应商比选材料第'" + idx + "'行有数据未填写,请检查表单") + // 单独检查附件 + if (isEmpty(item.attachment)) { + this.$message.error("供应商比选材料第'" + idx + "'行未上传附件") + } + else { + this.$message.error("供应商比选材料第'" + idx + "'行有数据未填写,请检查表单") + } return false } } @@ -1470,6 +1475,24 @@ // this.handleSelectProject({ id: 135 }) this.applyDeptSectorOptions = JSON.parse('${applyDeptSectorOptions}') }, + watch: { + // 每当 question 改变时,这个函数就会执行 + procurementDetails(newValue, oldValue) { + if (this.processType === procurementContract) { + let contractAmount = 0 + for (let element of newValue) { + const children = element['children'] || [] + contractAmount = newValue['totalTaxInclude'] || 0 + for (let child of children) { + contractAmount = contractAmount + child['contractAmount'] || 0 + } + } + + this.processForm['contractAmount'] = contractAmount + } + } + }, + filters: { ellipsis(value, limit = 40) { if (!value) return ''