From 0ef78192eaa1f98275787340e6feff4392fa8748 Mon Sep 17 00:00:00 2001 From: lideqin <694785430@qq.com> Date: Fri, 31 May 2024 09:38:04 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E4=BC=81=E6=A0=87=E7=AB=8B=E9=A1=B9?= =?UTF-8?q?=E5=8F=98=E6=9B=B4=E6=B5=81=E7=A8=8B-=E5=88=B6=E5=AE=9A?= =?UTF-8?q?=E6=9C=80=E5=90=8E=E4=B8=80=E4=B8=AA=E8=8A=82=E7=82=B9=E4=BC=81?= =?UTF-8?q?=E6=A0=87=E7=BC=96=E5=8F=B7=E5=8F=98=E4=B8=BA=E5=8F=AF=E7=BC=96?= =?UTF-8?q?=E8=BE=91=EF=BC=8C=E4=B8=94=E4=B8=8D=E5=92=8C=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E8=81=94=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PlanApprovalChangeFlow.vue | 27 +++++++++++++++++++ .../modules/ApprovalBaseInfo.vue | 7 ++++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/src/views/workCenter/enterpriseStandardInitChange/PlanApprovalChangeFlow.vue b/src/views/workCenter/enterpriseStandardInitChange/PlanApprovalChangeFlow.vue index 29a41f6d..ca59f02b 100644 --- a/src/views/workCenter/enterpriseStandardInitChange/PlanApprovalChangeFlow.vue +++ b/src/views/workCenter/enterpriseStandardInitChange/PlanApprovalChangeFlow.vue @@ -1061,6 +1061,8 @@ export default { if (!this.approvalInfoForm.getFieldValue('commitText')) { this.approvalInfoForm.setFieldsValue({ commitText: '同意' }) } + let haveErr = false + const arr = [] const param = {} // 需要传给后端的数据 this.approvalInfoForm.validateFields((err, values) => { if (this.formInline.projectType === this.ProjectType.RESPONSIBLE_DEPT_CHANGE.value && this.currentNode === 6) { @@ -1074,12 +1076,37 @@ export default { param.flowUser = { newMainDraftUserLeaderLeader: this.$refs.changeBaseInfo.formInline.newMainDraftingUnitResponsiblePerson } } }) + } else if (this.formInline.projectType === this.ProjectType.ENACT.value && this.currentNode === 6) { + // 是立项-制定,并且是最后一个节点(标准化审批) + this.$refs.approvalBaseInfo.$refs.ruleForm.validate(approvalBaseValid => { + if (approvalBaseValid && !err) { + const params = Object.assign({}, this.formInline, this.$refs.approvalBaseInfo.formInline) + // 企标体系处理成逗号分隔 + params.enStandardSystem = params.enStandardSystem.map(item => item.value).join(',') + // 处理隶属工作组 + if (params.workGroup) { + params.workGroup_dictText = params.workGroup.label + params.workGroup = params.workGroup.value + } + arr.push(params) + param.dataList = arr + param.common = Object.assign({}, values) + param.common.taskId = this.$route.query.taskId + haveErr = false + } else { + haveErr = true + } + }) } else { if (!err) { param.common = Object.assign({}, values) param.common.taskId = this.$route.query.taskId } } + if (haveErr) { + this.switchValue = 'base' + return + } this.loading = true enterprisePlanApprovalAgree(param).then(res => { if (res.success) { diff --git a/src/views/workCenter/enterpriseStandardInitChange/modules/ApprovalBaseInfo.vue b/src/views/workCenter/enterpriseStandardInitChange/modules/ApprovalBaseInfo.vue index 11f510ca..d4aea810 100644 --- a/src/views/workCenter/enterpriseStandardInitChange/modules/ApprovalBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardInitChange/modules/ApprovalBaseInfo.vue @@ -26,7 +26,7 @@ @@ -644,6 +644,11 @@ export default { type: Boolean, required: false, default: false + }, + currentNode: { + type: Number, + required: false, + default: 1 } }, watch: {