From 80ba3fb53fe5202d3aebec913f80371a8687ecd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E5=BC=BA=E5=BC=BA?= <787203167> Date: Wed, 25 Oct 2023 16:30:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E9=87=8D=E7=82=B9=E8=AE=A4?= =?UTF-8?q?=E8=AF=81=E6=A0=87=E5=87=86/=E6=94=BF=E7=AD=96=E5=90=88?= =?UTF-8?q?=E8=A7=84=E6=80=A7=E9=A1=B9=E7=9B=AE=E5=AE=A1=E6=9F=A5=E6=B5=81?= =?UTF-8?q?=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/personnelInformation.vue | 3 + .../components/productPlanningList.vue | 5 +- .../policyComplianceReview/index.vue | 103 +++++++++++++----- .../creatProcess/policyConsultation/index.vue | 29 +++++ 4 files changed, 112 insertions(+), 28 deletions(-) diff --git a/src/pages/processCenter/pages/creatProcess/policyComplianceReview/components/personnelInformation.vue b/src/pages/processCenter/pages/creatProcess/policyComplianceReview/components/personnelInformation.vue index 2f3247888..0797710ad 100644 --- a/src/pages/processCenter/pages/creatProcess/policyComplianceReview/components/personnelInformation.vue +++ b/src/pages/processCenter/pages/creatProcess/policyComplianceReview/components/personnelInformation.vue @@ -284,6 +284,9 @@ } }) }, + save(callback){ + callback && callback(this.roleForm) + }, getData(item) { let row = item ? JSON.parse(JSON.stringify(item)) : {} this.roleForm = { diff --git a/src/pages/processCenter/pages/creatProcess/policyComplianceReview/components/productPlanningList.vue b/src/pages/processCenter/pages/creatProcess/policyComplianceReview/components/productPlanningList.vue index 98c29e9db..592968139 100644 --- a/src/pages/processCenter/pages/creatProcess/policyComplianceReview/components/productPlanningList.vue +++ b/src/pages/processCenter/pages/creatProcess/policyComplianceReview/components/productPlanningList.vue @@ -340,7 +340,7 @@ getData(row) { this.infoTableDatas = row.infoTableDatas || [] this.infoTableDatas = [...this.infoTableDatas] - this.multipleTableData = row.productPlanningList || [] + this.multipleTableData = row.cpghDataList || [] this.multipleTableData = [...this.multipleTableData] }, submit(callback) { @@ -350,6 +350,9 @@ this.$message.warning('请至少添加一条数据') } }, + save(callback) { + callback && callback(this.multipleTableData) + }, } } diff --git a/src/pages/processCenter/pages/creatProcess/policyComplianceReview/index.vue b/src/pages/processCenter/pages/creatProcess/policyComplianceReview/index.vue index 2829e54e1..12ab1263f 100644 --- a/src/pages/processCenter/pages/creatProcess/policyComplianceReview/index.vue +++ b/src/pages/processCenter/pages/creatProcess/policyComplianceReview/index.vue @@ -351,6 +351,7 @@ if (this.taskKey == 'PolicyComplianceProgramReviewProcessKey2' || this.taskKey == 'PolicyComplianceProgramReviewProcessKey4' || this.taskKey == 'PolicyComplianceProgramReviewProcessKey5' || + this.taskKey == 'PolicyComplianceProgramReviewProcessKey9' || this.taskKey == 'PolicyComplianceProgramReviewProcessKey10' || this.taskKey == 'PolicyComplianceProgramReviewProcessKey11' || this.taskKey == 'PolicyComplianceProgramReviewProcessKey12' || @@ -454,17 +455,52 @@ this.openButtonLoading() if (!this.taskKey || this.taskKey == 'PolicyComplianceProgramReviewProcessKey1') { this.draftSaving() + } else if (this.taskKey == 'PolicyComplianceProgramReviewProcessKey3') { + let _formData = new FormData(); + this.$refs.personnelInformationRef.save((row) => { + const data = Object.assign(this.dataForm, row); + data.infoTableDatas = this.$refs.fetchListRef.infoTableDatas + _formData.append("taskIds", this.$route.query.taskIds); + _formData.append("json", JSON.stringify({ + form: data, + commentText: this.commentText, + currentUserId: this.$store.getters.userInfo.userId + })); + saveTaskForPub(_formData).then(res => { + this.closeButtonLoading() + this.$message.success("保存成功"); + this.$refs.solicitationListRef.getData() + }).catch(e => { + this.closeButtonLoading() + }); + }) + } else if (this.taskKey == 'PolicyComplianceProgramReviewProcessKey7') { + let _formData = new FormData(); + let dataForm = JSON.parse(JSON.stringify(this.dataForm)) + _formData.append("taskIds", this.$route.query.taskIds); + _formData.append("json", JSON.stringify({ + form: dataForm, + commentText: this.commentText, + currentUserId: this.$store.getters.userInfo.userId + })); + saveTaskForPub(_formData).then(res => { + this.closeButtonLoading() + this.$message.success("保存成功"); + this.$refs.solicitationListRef.getData() + }).catch(e => { + this.closeButtonLoading() + }); } else if (this.taskKey == 'PolicyComplianceProgramReviewProcessKey8' || this.taskKey == 'PolicyComplianceProgramReviewProcessKey9') { - if (this.dataForm.departmentType == 'undertaking') {//事业部提交 + if (this.dataForm.departmentType == 'undertaking') {//事业部保存 let _formData = new FormData(); - this.$refs.solicitationListRef.save((row, ids) => { + let dataForm = JSON.parse(JSON.stringify(this.dataForm)) + this.$refs.businessDivisionListRef.submit((row) => { _formData.append("taskIds", this.$route.query.taskIds); + dataForm.sybDataList = row _formData.append("json", JSON.stringify({ - form: this.dataForm, + form: dataForm, commentText: this.commentText, - policySolicitOpinionEOList: row, - removeIds: ids, currentUserId: this.$store.getters.userInfo.userId })); saveTaskForPub(_formData).then(res => { @@ -475,14 +511,15 @@ this.closeButtonLoading() }); }) - } else if (this.data.departmentType == 'productPlanning') {//产品规划部提交 + } else if (this.data.departmentType == 'productPlanning') {//产品规划部保存 let _formData = new FormData(); + let dataForm = JSON.parse(JSON.stringify(this.dataForm)) this.$refs.solicitationListRef.save((row, ids) => { _formData.append("taskIds", this.$route.query.taskIds); + dataForm.cpghDataList = row _formData.append("json", JSON.stringify({ form: this.dataForm, commentText: this.commentText, - policySolicitOpinionEOList: row, removeIds: ids, currentUserId: this.$store.getters.userInfo.userId })); @@ -571,9 +608,9 @@ } } if (productPlanning) { - this.dataForm.departmentType = 'productPlanning' + this.dataForm.departmentType = 'productPlanning' //产品规划 } else if (undertaking) { - this.dataForm.departmentType = 'undertaking' + this.dataForm.departmentType = 'undertaking' //事业 } else { this.$message.warning("请选择责任人"); return @@ -590,6 +627,7 @@ this.closeButtonLoading() this.$refs.personnelInformationRef.submit((row) => { const json = Object.assign(this.dataForm, row); + json.infoTableDatas = this.$refs.fetchListRef.infoTableDatas json.commentText = this.commentText json.approvalFlag = 0 let query = { @@ -625,7 +663,7 @@ this.$refs.productPlanningListRef.submit((row) => { const json = Object.assign(this.dataForm); json.commentText = this.commentText - json.productPlanningList = row + json.cpghDataList = row json.approvalFlag = 0 let query = { form: json, @@ -654,23 +692,34 @@ handleReject() { // approvalFlag value:0通过 1驳回 this.openButtonLoading() - if (this.taskKey == 'PolicySolicitOpinionProcessKey10' || - this.taskKey == 'PolicySolicitOpinionProcessKey11' || - this.taskKey == 'PolicySolicitOpinionProcessKey12' || - this.taskKey == 'PolicySolicitOpinionProcessKey13' || - this.taskKey == 'PolicySolicitOpinionProcessKey14') { - this.$refs.solicitationListRef.submit((row, ids) => { - const json = Object.assign(this.dataForm); - json.commentText = this.commentText - json.approvalFlag = 1 - let query = { - form: json, - policySolicitOpinionEOList: row, - removeIds: ids, - commentText: this.commentText - } - this.completeTask(this.$route.query.taskIds, query) - }) + if (this.taskKey == 'PolicySolicitOpinionProcessKey9') { + if (this.dataForm.departmentType == 'undertaking') {//事业部驳回 + this.$refs.businessDivisionListRef.submit((row) => { + const json = Object.assign(this.dataForm); + json.commentText = this.commentText + json.sybDataList = row + json.approvalFlag = 1 + let query = { + form: json, + commentText: this.commentText + } + this.openButtonLoading() + this.completeTask(this.$route.query.taskIds, query) + }) + } else if (this.data.departmentType == 'productPlanning') {//产品规划部驳回 + this.$refs.productPlanningListRef.save((row) => { + const json = Object.assign(this.dataForm); + json.commentText = this.commentText + json.cpghDataList = row + json.approvalFlag = 1 + let query = { + form: json, + commentText: this.commentText + } + this.openButtonLoading() + this.completeTask(this.$route.query.taskIds, query) + }) + } } else { const json = Object.assign(this.dataForm); json.commentText = this.commentText diff --git a/src/pages/processCenter/pages/creatProcess/policyConsultation/index.vue b/src/pages/processCenter/pages/creatProcess/policyConsultation/index.vue index 1fbe08490..198cd01db 100644 --- a/src/pages/processCenter/pages/creatProcess/policyConsultation/index.vue +++ b/src/pages/processCenter/pages/creatProcess/policyConsultation/index.vue @@ -507,6 +507,35 @@ this.openButtonLoading() if (!this.taskKey || this.taskKey == 'PolicySolicitOpinionProcessKey1') { this.draftSaving() + } else if (this.taskKey == 'PolicySolicitOpinionProcessKey3') { + let _formData = new FormData(); + _formData.append("taskIds", this.$route.query.taskIds); + let data = Object.assign(this.dataForm, this.$refs.personnelInformationRef.roleForm); + _formData.append("json", JSON.stringify({ + form: data, + commentText: this.commentText, + currentUserId: this.$store.getters.userInfo.userId + })); + saveTaskForPub(_formData).then(res => { + this.closeButtonLoading() + this.$message.success("保存成功"); + }).catch(e => { + this.closeButtonLoading() + }); + } else if (this.taskKey == 'PolicySolicitOpinionProcessKey7') { + let _formData = new FormData(); + _formData.append("taskIds", this.$route.query.taskIds); + _formData.append("json", JSON.stringify({ + form: this.dataForm, + commentText: this.commentText, + currentUserId: this.$store.getters.userInfo.userId + })); + saveTaskForPub(_formData).then(res => { + this.closeButtonLoading() + this.$message.success("保存成功"); + }).catch(e => { + this.closeButtonLoading() + }); } else if (this.taskKey == 'PolicySolicitOpinionProcessKey8' || this.taskKey == 'PolicySolicitOpinionProcessKey9' || this.taskKey == 'PolicySolicitOpinionProcessKey12') {