From d93e194303090d4e3323056ed60818e06af87495 Mon Sep 17 00:00:00 2001 From: lideqin <694785430@qq.com> Date: Fri, 24 Nov 2023 15:41:33 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E4=BF=AE=E6=94=B9=E4=BC=81=E6=A0=87?= =?UTF-8?q?=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RevisionPlanActivelyReportFlow.vue | 42 +++++++++++-------- .../RevisionPlanStandardizationInitFlow.vue | 42 +++++++++++-------- .../EnterpriseStandardAnnulFlow.vue | 2 + .../EnterpriseStandardChangeFlow.vue | 7 +++- .../PlanApprovalChangeFlow.vue | 1 + .../EnterpriseStandardRecheckFlow.vue | 6 ++- .../EnterpriseStandardRevisionFlow.vue | 2 + .../EnterpriseStandardSealSaveFlow.vue | 2 + .../EnterpriseStandardStartUseFlow.vue | 2 + 9 files changed, 68 insertions(+), 38 deletions(-) diff --git a/src/views/workCenter/annualRevisionPlanActivelyReport/RevisionPlanActivelyReportFlow.vue b/src/views/workCenter/annualRevisionPlanActivelyReport/RevisionPlanActivelyReportFlow.vue index e99608ed..c83570da 100644 --- a/src/views/workCenter/annualRevisionPlanActivelyReport/RevisionPlanActivelyReportFlow.vue +++ b/src/views/workCenter/annualRevisionPlanActivelyReport/RevisionPlanActivelyReportFlow.vue @@ -527,6 +527,7 @@ export default { // 同意(节点4,6有同意) handleAgree () { if (this.loading) return + this.validatorRules.commitText.rules[0].required = false this.approvalInfoForm.validateFields((err, values) => { if (!err) { this.loading = true @@ -549,23 +550,30 @@ export default { // 驳回(节点4,6有驳回) handleReject () { if (this.loading) return - this.approvalInfoForm.validateFields((err, values) => { - if (!err) { - this.loading = true - const param = {} - param.common = Object.assign({}, values) - param.common.taskId = this.$route.query.taskId - activelyReportReject(param).then(res => { - if (res.success) { - this.$message.success(res.message) - this.goBack() - } else { - this.$message.warning(res.message) - } - }).finally(() => { - this.loading = false - }) - } + this.validatorRules.commitText.rules[0].required = true + if (!this.approvalInfoForm.getFieldValue('commitText')) { + this.$message.warning(this.$t('pleaseEnterRemarks')) + return + } + this.$nextTick(() => { + this.approvalInfoForm.validateFields((err, values) => { + if (!err) { + this.loading = true + const param = {} + param.common = Object.assign({}, values) + param.common.taskId = this.$route.query.taskId + activelyReportReject(param).then(res => { + if (res.success) { + this.$message.success(res.message) + this.goBack() + } else { + this.$message.warning(res.message) + } + }).finally(() => { + this.loading = false + }) + } + }) }) } } diff --git a/src/views/workCenter/annualRevisionPlanStandardizationInit/RevisionPlanStandardizationInitFlow.vue b/src/views/workCenter/annualRevisionPlanStandardizationInit/RevisionPlanStandardizationInitFlow.vue index 54156972..c751175d 100644 --- a/src/views/workCenter/annualRevisionPlanStandardizationInit/RevisionPlanStandardizationInitFlow.vue +++ b/src/views/workCenter/annualRevisionPlanStandardizationInit/RevisionPlanStandardizationInitFlow.vue @@ -429,6 +429,7 @@ export default { // 同意(节点2,3,6有同意) handleAgree () { if (this.loading) return + this.validatorRules.commitText.rules[0].required = false this.approvalInfoForm.validateFields((err, values) => { const data = this.$refs.baseInfoFormRef.getDataValidate() if (!err && data) { @@ -453,23 +454,30 @@ export default { // 驳回(节点2,3,6有驳回) handleReject () { if (this.loading) return - this.approvalInfoForm.validateFields((err, values) => { - if (!err) { - this.loading = true - const param = {} - param.commom = Object.assign({}, values) - param.taskId = this.$route.query.taskId - standardizationInitReject(param).then(res => { - if (res.success) { - this.$message.success(res.message) - this.goBack() - } else { - this.$message.warning(res.message) - } - }).finally(() => { - this.loading = false - }) - } + this.validatorRules.commitText.rules[0].required = true + if (!this.approvalInfoForm.getFieldValue('commitText')) { + this.$message.warning(this.$t('pleaseEnterRemarks')) + return + } + this.$nextTick(() => { + this.approvalInfoForm.validateFields((err, values) => { + if (!err) { + this.loading = true + const param = {} + param.commom = Object.assign({}, values) + param.common.taskId = this.$route.query.taskId + standardizationInitReject(param).then(res => { + if (res.success) { + this.$message.success(res.message) + this.goBack() + } else { + this.$message.warning(res.message) + } + }).finally(() => { + this.loading = false + }) + } + }) }) } } diff --git a/src/views/workCenter/enterpriseStandardAnnul/EnterpriseStandardAnnulFlow.vue b/src/views/workCenter/enterpriseStandardAnnul/EnterpriseStandardAnnulFlow.vue index 9ab111c6..fcd74d19 100644 --- a/src/views/workCenter/enterpriseStandardAnnul/EnterpriseStandardAnnulFlow.vue +++ b/src/views/workCenter/enterpriseStandardAnnul/EnterpriseStandardAnnulFlow.vue @@ -398,6 +398,7 @@ export default { // 同意 handleAgree () { if (this.loading) return + this.validatorRules.commitText.rules[0].required = false this.approvalInfoForm.validateFields((err, values) => { if (!err) { this.loading = true @@ -423,6 +424,7 @@ export default { this.validatorRules.commitText.rules[0].required = true if (!this.approvalInfoForm.getFieldValue('commitText')) { this.$message.warning(this.$t('pleaseEnterRemarks')) + return } this.$nextTick(() => { this.approvalInfoForm.validateFields((err, values) => { diff --git a/src/views/workCenter/enterpriseStandardChange/EnterpriseStandardChangeFlow.vue b/src/views/workCenter/enterpriseStandardChange/EnterpriseStandardChangeFlow.vue index 543a4124..ccda004e 100644 --- a/src/views/workCenter/enterpriseStandardChange/EnterpriseStandardChangeFlow.vue +++ b/src/views/workCenter/enterpriseStandardChange/EnterpriseStandardChangeFlow.vue @@ -411,6 +411,7 @@ export default { // 同意 handleAgree () { if (this.loading) return + this.validatorRules.commitText.rules[0].required = false this.approvalInfoForm.validateFields((err, values) => { if (!err) { this.loading = true @@ -435,13 +436,15 @@ export default { this.validatorRules.commitText.rules[0].required = true if (!this.approvalInfoForm.getFieldValue('commitText')) { this.$message.warning(this.$t('pleaseEnterRemarks')) + return } this.$nextTick(() => { this.approvalInfoForm.validateFields((err, values) => { if (!err) { this.loading = true - const param = Object.assign({}, values) - param.taskId = this.$route.query.id + const param = {} + param.common = Object.assign({}, values) + param.common.taskId = this.$route.query.taskId enStandardChangeReject(param).then(res => { if (res.success) { this.$message.success(res.message) diff --git a/src/views/workCenter/enterpriseStandardInitChange/PlanApprovalChangeFlow.vue b/src/views/workCenter/enterpriseStandardInitChange/PlanApprovalChangeFlow.vue index 8ae925c2..f5a41ec1 100644 --- a/src/views/workCenter/enterpriseStandardInitChange/PlanApprovalChangeFlow.vue +++ b/src/views/workCenter/enterpriseStandardInitChange/PlanApprovalChangeFlow.vue @@ -891,6 +891,7 @@ export default { // 同意 handleAgree () { if (this.loading) return + this.validatorRules.commitText.rules[0].required = false const param = {} // 需要传给后端的数据 this.approvalInfoForm.validateFields((err, values) => { if (this.formInline.projectType === this.ProjectType.RESPONSIBLE_DEPT_CHANGE.value && this.currentNode === 6) { diff --git a/src/views/workCenter/enterpriseStandardRecheck/EnterpriseStandardRecheckFlow.vue b/src/views/workCenter/enterpriseStandardRecheck/EnterpriseStandardRecheckFlow.vue index fd6f6bc3..3c5417a8 100644 --- a/src/views/workCenter/enterpriseStandardRecheck/EnterpriseStandardRecheckFlow.vue +++ b/src/views/workCenter/enterpriseStandardRecheck/EnterpriseStandardRecheckFlow.vue @@ -87,14 +87,14 @@
-