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') {