From bd84dc2db094f2cfc54c8aa9494241adb9d76b49 Mon Sep 17 00:00:00 2001 From: Harry Yang Date: Tue, 3 Jan 2023 10:42:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=9D=E5=AD=98=E6=B5=81=E7=A8=8B=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E4=B8=8A=E4=B8=80=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/admin/business/process-edit.ftl | 17 ++++----- .../templates/admin/business/process-new.ftl | 36 ++++++++----------- 2 files changed, 22 insertions(+), 31 deletions(-) diff --git a/src/main/resources/templates/admin/business/process-edit.ftl b/src/main/resources/templates/admin/business/process-edit.ftl index ec05950..bae3caf 100644 --- a/src/main/resources/templates/admin/business/process-edit.ftl +++ b/src/main/resources/templates/admin/business/process-edit.ftl @@ -354,7 +354,6 @@ - 返回上一级 保存并返回上一级 @@ -450,7 +449,6 @@ - 返回上一级 保存并返回上一级 @@ -587,13 +585,10 @@ return true }, /** - * 保存 业务采购合同清单明细,并验证表单是否填写完整, - * 如果完整就到流程表单界面 + * 保存 业务采购合同清单明细,返回上一级的表单界面 */ saveProcurementContractDetail() { - if (this.checkProcurementDetails()) { - this.goToProcurementContract() - } + this.goToProcurementContract() }, goToContractDetail() { @@ -936,10 +931,12 @@ this.$message({ showClose: true, message: processForm.status === 'draft' ? '草稿保存成功' : "提交成功", - type: 'success' + type: 'success', + onClose: () => { + this.resetForm() + this.backLastPage() + } }) - this.resetForm() - this.backLastPage() }).catch(({ response }) => { const defaultMessage = () => { return processForm.status === 'draft' ? '草稿保存失败' : "项目提交失败" diff --git a/src/main/resources/templates/admin/business/process-new.ftl b/src/main/resources/templates/admin/business/process-new.ftl index d153771..8226f55 100644 --- a/src/main/resources/templates/admin/business/process-new.ftl +++ b/src/main/resources/templates/admin/business/process-new.ftl @@ -472,8 +472,7 @@ - 返回上一级 - 保存并返回上一级 + 保存并返回上一级 @@ -570,7 +569,6 @@ - 返回上一级 保存并返回上一级 @@ -746,16 +744,12 @@ this.processType = saleContract }, - goToProcurementContract() { - this.changeMode(procurementContractProcess) - this.processType = procurementContract - }, - /** * 校验不通过提示 * @returns {boolean} 校验通过否 */ checkProcurementDetails() { + // TODO FIXME 修改为提示第几行数据有问题 const emptyRows = this.procurementDetails.filter(detail => { return isNotEmpty(procurementDetailProperties.filter(property => isBlank(detail[property]))) }) @@ -772,13 +766,11 @@ return true }, /** - * 保存 业务采购合同清单明细,并验证表单是否填写完整, - * 如果完整就到流程表单界面 + * 保存 业务采购合同清单明细 */ saveProcurementContractDetail() { - if (this.checkProcurementDetails()) { - this.goToProcurementContract() - } + this.changeMode(procurementContractProcess) + this.processType = procurementContract }, goToContractDetail() { @@ -1097,10 +1089,12 @@ this.$message({ showClose: true, message: processForm.status === 'draft' ? '草稿保存成功' : "提交成功", - type: 'success' + type: 'success', + onClose: () => { + this.resetForm() + this.goToHome() + } }) - this.resetForm() - this.goToHome() }).catch(({ response }) => { const defaultMessage = () => { return processForm.status === 'draft' ? '草稿保存失败' : "项目提交失败" @@ -1126,11 +1120,11 @@ } return true }, - submitToSaleContractProcess() { - // 做校验 - if (this.checkExpirationDate()) { - this.goToSaleContractProcess() - } + /** + * 保存销售合同详情数据,并返回表单界面 + */ + saveAndGoToSaleContractProcess() { + this.goToSaleContractProcess() }, handleRemove(file, fileList) {