From 7f22a313a03e5a85651ffeec9fa5db8abec97c53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E4=BC=9F=E4=BD=B3?= <2797716443@qq.com> Date: Wed, 1 Dec 2021 15:14:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E8=A7=84=E9=A1=B9=E5=A1=AB=E5=86=99?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=EF=BC=88z)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/creatProcess/xmpg/step4.vue | 307 ++++++++++-------- 1 file changed, 178 insertions(+), 129 deletions(-) diff --git a/src/pages/processCenter/pages/creatProcess/xmpg/step4.vue b/src/pages/processCenter/pages/creatProcess/xmpg/step4.vue index 877f1f555..3ab32b9d8 100644 --- a/src/pages/processCenter/pages/creatProcess/xmpg/step4.vue +++ b/src/pages/processCenter/pages/creatProcess/xmpg/step4.vue @@ -135,6 +135,11 @@
+
+ 批量编辑 + +
{{ scope.row.zCCSSRQ ? $moment(scope.row.zCCSSRQ).format("YYYY-MM-DD") : "" }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -525,6 +430,96 @@ @checkedRole="checkedTransferRole" :nodeList="nodeList" > + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
@@ -546,12 +541,24 @@ export default { return { //折叠的标志,true为折叠,false为不折叠 foldFormFlag: false, - comFlag: true, + comFlag: 0, nodeList:[], drawerTitle:'', isTransfer: false, // 调整处理人抽屉状态 drawerModal: false, + modalShowFlag: false, // 批量编辑开关 + batchEditForm: { + // 在研产品 + // 合规 + complianceReasons: "", + // 不合规 + noCompliance: "", + // 应对措施 + countermeasures: "", + // 完成时间 + completionTime: "", + }, detailData: [], sarProStateTableHeight: null, // 项目列表高度 // 当前流程类型(1待办/2已办) @@ -735,6 +742,12 @@ export default { item.implementer = this.$store.getters.userInfo.userName; }); this.dataList = item.step3DTOS; + this.dataList.forEach(item => { + this.$set(item,'complianceReasons', '') + this.$set(item,'noCompliance', '') + this.$set(item,'countermeasures', '') + this.$set(item,'completionTime', '') + }) } else { this.dataList = item.dataList; @@ -800,40 +813,76 @@ export default { }, handlePrice(row){ if(row.complianceReasons !== '' || (row.noCompliance !== '' && row.countermeasures !== '' && row.completionTime !== '') || (row.complianceReasons === '' && row.noCompliance === '' && row.countermeasures === '' && row.completionTime === '')){ - this.comFlag = true + this.comFlag = 0 }else{ - this.comFlag = false + this.comFlag = this.comFlag + 1 } }, //提交事件 handleSubmit() { - if(!this.comFlag) { + if(this.comFlag > 0) { this.$message.warning('请填写完整的不符合项信息') }else{ - this.listForm.prcCreateUser = this.$store.getters.userInfo.userId; - this.listForm.commentText = this.commentText; - this.listForm.approvalOpinion = ""; - this.listForm.signFlag = ""; - this.listForm.dataList = this.dataList; - const json = JSON.stringify(this.listForm); - this.isSubmit = true; - this.$http.post("lawss/activiti/completeTask", { - taskIds: this.taskIds, - userId: this.userId, - json: json - }, { - _this: this - }, res => { - if (res.success) { - this.$message.success(res.message); - this.$router.push("/processCenter"); - } - this.isSubmit = false; - }, e => { - - }); + // this.listForm.prcCreateUser = this.$store.getters.userInfo.userId; + // this.listForm.commentText = this.commentText; + // this.listForm.approvalOpinion = ""; + // this.listForm.signFlag = ""; + // this.listForm.dataList = this.dataList; + // const json = JSON.stringify(this.listForm); + // this.isSubmit = true; + // this.$http.post("lawss/activiti/completeTask", { + // taskIds: this.taskIds, + // userId: this.userId, + // json: json + // }, { + // _this: this + // }, res => { + // if (res.success) { + // this.$message.success(res.message); + // this.$router.push("/processCenter"); + // } + // this.isSubmit = false; + // }, e => { + // + // }); } }, + //批量编辑 + batchEdit() { + if (this.selectList.length > 0) { + //合规 + this.batchEditForm.complianceReasons = ""; + //不合规 + this.batchEditForm.noCompliance = ""; + //应对措施 + this.batchEditForm.countermeasures = ""; + //完成时间 + this.batchEditForm.completionTime = ""; + this.modalShowFlag = true; + } else { + this.$message.warning("请选择要编辑的数据"); + } + }, + //批量编辑确定按钮事件 + saveBatchEditForm() { + this.dataList.forEach(item => { + this.selectList.forEach(items => { + if (item.id === items) { + item.complianceReasons = this.batchEditForm.complianceReasons; + //不合规 + item.noCompliance = this.batchEditForm.noCompliance; + //应对措施 + item.countermeasures = this.batchEditForm.countermeasures; + //完成时间 + item.completionTime = this.batchEditForm.completionTime; + } + }); + }); + this.modalShowFlag = false; + }, + cancelBatchEditForm() { + this.modalShowFlag = false; + }, //标准表格选择框改变 selectStandChange(data) { this.selectList = [];