From 7932299cb3bdacb0e6a365ed46d40fec62ea1cf1 Mon Sep 17 00:00:00 2001 From: Harry Yang Date: Thu, 5 Jan 2023 19:06:27 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=AD=E5=90=88=E5=90=8C=E5=90=88?= =?UTF-8?q?=E5=90=8C=E9=87=91=E9=A2=9D=20=E8=81=94=E5=8A=A8=EF=BC=8C?= =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E6=9D=90=E6=96=99=E9=99=84=E4=BB=B6?= =?UTF-8?q?=E4=B8=AA=E6=80=A7=E5=8C=96=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/admin/business/process-edit.ftl | 26 ++++++++++++++++- .../templates/admin/business/process-new.ftl | 29 +++++++++++++++++-- 2 files changed, 51 insertions(+), 4 deletions(-) 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 ''