From 6b39a40e20bf45ab13d69104cb60b37ce7651654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E4=BC=9F=E4=BD=B3?= <2797716443@qq.com> Date: Thu, 2 Dec 2021 19:22:34 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=B8=85=E5=8D=95=E7=A1=AE?= =?UTF-8?q?=E8=AE=A4=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/home2/components/todoList/index.vue | 13 +- .../pages/creatProcess/xmqdqr/step2.vue | 30 +- .../pages/creatProcess/xmqdqr/step3.vue | 127 ++- .../pages/creatProcess/xmqdqr/step4.vue | 912 +++++++++++++----- .../tabComponents/processCenter/index.vue | 13 +- 5 files changed, 766 insertions(+), 329 deletions(-) diff --git a/src/pages/home2/components/todoList/index.vue b/src/pages/home2/components/todoList/index.vue index a5db7bae9..644525388 100644 --- a/src/pages/home2/components/todoList/index.vue +++ b/src/pages/home2/components/todoList/index.vue @@ -625,7 +625,7 @@ export default { prcType: row.prcType } }) - } else if (row.taskInfo === '标准法规部经理审批') { + } else if (row.taskInfo === '确认人确认') { this.$router.push({ name: 'xmqdqrStep3', query: { @@ -636,6 +636,17 @@ export default { prcType: row.prcType } }) + }else if(row.taskInfo === '产品工程经理汇总清单'){ + this.$router.push({ + name: 'xmqdqrStep4', + query: { + taskIds: row.taskIds, + prcId: row.prcId, + prcNum: row.prcNum, + prcName: row.prcName, + prcType: row.prcType + } + }) } break case '14': diff --git a/src/pages/processCenter/pages/creatProcess/xmqdqr/step2.vue b/src/pages/processCenter/pages/creatProcess/xmqdqr/step2.vue index 21c7f9d79..b4d4fd058 100644 --- a/src/pages/processCenter/pages/creatProcess/xmqdqr/step2.vue +++ b/src/pages/processCenter/pages/creatProcess/xmqdqr/step2.vue @@ -146,32 +146,6 @@ width="180px" > - - - - - - - -
@@ -653,8 +627,8 @@ @pageChange="handleSelectPageChange" @pageSizeChange="handleSelectPageSizeChange">
diff --git a/src/pages/processCenter/pages/creatProcess/xmqdqr/step3.vue b/src/pages/processCenter/pages/creatProcess/xmqdqr/step3.vue index d9a30164e..2180eccc0 100644 --- a/src/pages/processCenter/pages/creatProcess/xmqdqr/step3.vue +++ b/src/pages/processCenter/pages/creatProcess/xmqdqr/step3.vue @@ -2,7 +2,7 @@
- +
基础信息
@@ -60,7 +60,7 @@ :data="dataList" border ref="selection" - height="65%" + height="59%" @selection-change="selectStandChange" style="width: 100%; border:1px solid #ccc" :header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px', @@ -139,31 +139,34 @@ > + label="标准是否涉及"> + - - - - + width="180" + label="备注"> + +
@@ -645,8 +648,8 @@ @pageChange="handleSelectPageChange" @pageSizeChange="handleSelectPageSizeChange">
@@ -678,13 +681,6 @@ - - { if(item.form === undefined){ this.qdform = JSON.parse(JSON.stringify(item)); this.qdform.prcNum = this.prcNum; this.qdform.prcName = this.prcName; this.qdform["id"] = item.id; - this.projectId = item.projectId; - //获取清单id 查询对应清单下的标准 - this.detailedId = item.detailedListId; - this.getStandData(); + this.dataList = item.dataList + this.dataList.forEach(item => { + this.$set(item, 'involve', 'involve') + this.$set(item, 'remarks', '') + }) + // this.projectId = item.projectId; + // //获取清单id 查询对应清单下的标准 + // this.detailedId = item.detailedListId; + // this.getStandData(); }else{ this.qdform = item.form this.dataList =item.form.dataList @@ -985,26 +987,43 @@ export default { this.saveLoading = false; }); }, + handleRemark(){ + this.dataList.map(item => { + if(item.involve === 'noInvolve'){ + comFlag + } + }) + }, //提交事件 handleSubmit() { - this.isSubmit = true; - this.qdform.commentText = this.commentText; - this.qdform.dataList = this.dataList - const json = JSON.stringify(this.qdform); - 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"); + let comFlag = 0 + this.dataList.map(item => { + if(item.involve === 'noInvolve' && item.remarks === ''){ + comFlag++ } - this.isSubmit = false; - }, e => { - }); + }) + if(comFlag > 0){ + this.$message.warning('请填写不涉及的备注信息') + }else{ + this.isSubmit = true; + this.qdform.commentText = this.commentText; + this.qdform.dataList = this.dataList + const json = JSON.stringify(this.qdform); + 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 => { + }); + } }, addList() { this.searchLawBtn() @@ -1181,6 +1200,10 @@ export default { this.dataList.push(item) } }) + this.dataList.forEach(item => { + this.$set(item, 'involve', 'involve') + this.$set(item, 'remarks', '') + }) this.standModel = false } }, diff --git a/src/pages/processCenter/pages/creatProcess/xmqdqr/step4.vue b/src/pages/processCenter/pages/creatProcess/xmqdqr/step4.vue index 7c4768cf9..59f3abd9b 100644 --- a/src/pages/processCenter/pages/creatProcess/xmqdqr/step4.vue +++ b/src/pages/processCenter/pages/creatProcess/xmqdqr/step4.vue @@ -2,7 +2,7 @@
- +
基础信息
@@ -60,7 +60,7 @@ :data="dataList" border ref="selection" - height="65%" + height="59%" @selection-change="selectStandChange" style="width: 100%; border:1px solid #ccc" :header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px', @@ -139,31 +139,34 @@ > + label="标准是否涉及"> + - - - - + width="180" + label="备注"> + +
@@ -252,163 +255,432 @@
-
-
-
- - - - - - - - - - - - - - - - - - - 查询 - - 清空 - - - -
- + + + + + + + + + + + + + + + + + + + + + + 查询 + + + + + 清空 + + + + 数据获取中 + + + + + +
+ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + +
- +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + +
- - - - - - - - - - - - - - + + + + + + + + + + + + + + + { if(item.form === undefined){ this.qdform = JSON.parse(JSON.stringify(item)); this.qdform.prcNum = this.prcNum; this.qdform.prcName = this.prcName; this.qdform["id"] = item.id; + this.dataList = item.dataList + this.dataList.forEach(item => { + this.$set(item, 'involve', 'involve') + this.$set(item, 'remarks', '') + }) // this.projectId = item.projectId; - //获取清单id 查询对应清单下的标准 - this.detailedId = item.detailedListId; + // //获取清单id 查询对应清单下的标准 + // this.detailedId = item.detailedListId; // this.getStandData(); - this.getStand(); }else{ this.qdform = item.form this.dataList =item.form.dataList this.detailedId = item.form.detailedListId; - this.getStand(); } }); }, //查询清单下的标准 - // getStandData() { - // this.$http.get("sarStandProjectLibrary/queryStandInfo", { id: this.projectId, cars: '1', }, { - // _this: this - // }, res => { - // this.dataList = res.data.records; - // this.dataList.forEach(item => { - // // 责任部门转换 - // if (item.zrbm !== null || item.zrbm !== "") { - // let k = (item.zrbm || "").split(","); - // for (let i in this.zrbmOptions) { - // for (let m = 0; m < k.length; m++) { - // if (this.zrbmOptions[i].value === k[m]) { - // k[m] = this.zrbmOptions[i].label; - // } - // item.zrbm = k.join(","); - // } - // } - // } - // }); - // }); - // }, + getStandData() { + this.$http.get("sarStandProjectLibrary/queryStandInfo", { id: this.projectId, cars: '1', }, { + _this: this + }, res => { + this.dataList = res.data.records; + this.dataList.forEach(item => { + // 责任部门转换 + if (item.zrbm !== null || item.zrbm !== "" ) { + let k = (item.zrbm || "").split(","); + for (let i in this.zrbmOptions) { + for (let m = 0; m < k.length; m++) { + if (this.zrbmOptions[i].value === k[m]) { + k[m] = this.zrbmOptions[i].label; + } + item.zrbm = k.join(","); + } + } + } + }); + this.dataList.map(item => { + if(item.zrbm === '[]'){ + item.zrbm = '' + } + }) + }); + }, // 接受按钮 handleAccept(){ this.isSubmit = true @@ -677,28 +987,46 @@ export default { this.saveLoading = false; }); }, + handleRemark(){ + this.dataList.map(item => { + if(item.involve === 'noInvolve'){ + comFlag + } + }) + }, //提交事件 handleSubmit() { - this.isSubmit = true; - this.qdform.commentText = this.commentText; - this.qdform.dataList = this.dataList - const json = JSON.stringify(this.qdform); - 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"); + let comFlag = 0 + this.dataList.map(item => { + if(item.involve === 'noInvolve' && item.remarks === ''){ + comFlag++ } - this.isSubmit = false; - }, e => { - }); + }) + if(comFlag > 0){ + this.$message.warning('请填写不涉及的备注信息') + }else{ + this.isSubmit = true; + this.qdform.commentText = this.commentText; + this.qdform.dataList = this.dataList + const json = JSON.stringify(this.qdform); + 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 => { + }); + } }, addList() { + this.searchLawBtn() this.standModel = true; }, //批量删除 @@ -726,8 +1054,9 @@ export default { } }, //添加标准勾选框数据 - selectStand(data) { - this.standList = data; + handleSelectTableChange (data) { + this.handleSelectTableList = data + console.log(this.handleSelectTableList); }, selectStandChange(data){ this.projectStand = data @@ -764,52 +1093,141 @@ export default { } }, + //手动查找的清空按钮 + clearLawBtn(){ + this.lawInfoTableLoading = true + this.handleSelectForm.lawNumber = '' + this.handleSelectForm.standNumber = '' + this.handleSelectForm.lawsNumber = '' + this.handleSelectForm.standCode = '' + //清空标准名称/政策名称的查询 + this.handleSelectForm.lawName = '' + this.handleSelectForm.standName = '' + this.handleSelectForm.numberName = '' + this.searchLawBtn() + }, //添加标准的查询按钮 - search() { - this.page = 1; - this.getStand(); - }, - clearSearch() { - this.standCommonlySearch = { - standSort: "", - standNumber: "", - standType: "" - }; - this.getStand(); - }, - pageChange(page) { - this.page = page; - this.getStand(); - }, - pageSizeChange(pageSize) { - this.pageSize = pageSize; - this.getStand(); - }, - //查询清单下的标准 - getStand() { - this.$http.get("sarLawsAttrDetailedList/sar-laws-attr-detailed-list/selectLawsById", { - id: this.detailedId, - page: this.page, - Size: this.pageSize, - ...this.standCommonlySearch - }, { - _this: this - }, res => { - if (res.data === null) { - this.standardData = ""; - this.totalDo = ""; - } - this.standardData = res.data.records; - this.standardData.forEach(item => { - if (item.zccssrqgj === "-" || item.zccssrqgj === 'null' || item.zccssrqgj === 'undefined') { - item.zccssrqgj = ""; + searchLawBtn(){ + this.lawInfoTableLoading = true + if (this.handleSelectForm.dataSource === 'INLAND'){ + this.$http.get('sarStandardsInfo/sar-standards-info/getSarStandardsInfoPage',this.handleSelectForm,{ + _this: this + },res=>{ + console.log('国内标准库数据',res) + if (res.ok){ + this.lawInfoTable = res.data.list + this.handleSelectForm.total = res.data.count + if ((this.lawInfoTable.length === 0 || this.lawInfoTable === []) && this.handleSelectForm.page !== 1) { + this.lawInfoTableLoading = true + this.handleSelectPageChange(1) + }else { + this.lawInfoTableLoading = false + this.lawInfoTableLoading = false + } + }else { + this.$message.error(res.message) } - if (item.xcxssrqgj === "-" || item.xcxssrqgj === 'null' || item.xcxssrqgj === 'undefined' ) { - item.xcxssrqgj = ""; + },e=>{ + this.lawInfoTable = [] + this.handleSelectForm.total = 0 + }) + }else if(this.handleSelectForm.dataSource === 'FOREIGN'){ + this.$http.get('sarStandardsInfo/sar-standards-info/getSarStandardsInfoPage',this.handleSelectForm,{ + _this: this + },res=>{ + if (res.ok){ + this.lawInfoTable = res.data.list + this.handleSelectForm.total = res.data.count + if ((this.lawInfoTable.length === 0 || this.lawInfoTable === []) && this.handleSelectForm.page !== 1) { + this.lawInfoTableLoading = true + this.handleSelectPageChange(1) + }else { + this.lawInfoTableLoading = false + } + }else { + this.$message.error(res.message) + this.lawInfoTableLoading = false } - }); - this.total = res.data.total; - }); + },e=>{ + this.lawInfoTable = [] + this.handleSelectForm.total = 0 + }) + }else if(this.handleSelectForm.dataSource === 'BUSINESS_STAND'){ + this.$http.get('lawss/sarBussionessStand/getSarBussionStandPage',this.handleSelectForm,{ + _this: this + },res=>{ + if (res.ok){ + this.lawInfoTable = res.data.list + this.handleSelectForm.total = res.data.count + if ((this.lawInfoTable.length === 0 || this.lawInfoTable === []) && this.handleSelectForm.page !== 1) { + this.lawInfoTableLoading = true + this.handleSelectPageChange(1) + }else { + this.lawInfoTableLoading = false + } + }else { + this.$message.error(res.message) + this.lawInfoTableLoading = false + } + },e=>{ + this.lawInfoTable = [] + this.handleSelectForm.total = 0 + }) + }else { + this.$message.warning('请先选择标准/政策来源') + } + }, + handleSelectConfirm(){ + if(this.handleSelectTableList.length < 1){ + this.$message.warning('请至少选择一条数据进行添加') + }else{ + this.standList.forEach(item =>{ + if(item.ssrq === "-"){ + item.ssrq = '' + } + if(item.zrbm === '[]'){ + item.zrbm ='' + } + }) + this.handleSelectTableList.map(item => { + let addIndex + addIndex = this.dataList.findIndex(items =>{ + return items.id === item.id + }) + if(addIndex > -1){ + this.$message.warning('请勿重复添加数据') + }else{ + this.dataList.push(item) + } + }) + this.dataList.forEach(item => { + this.$set(item, 'involve', 'involve') + this.$set(item, 'remarks', '') + }) + this.standModel = false + } + }, + dataSourceChange() { + this.handleSelectForm.page = 1 + this.lawInfoTableLoading = true + this.handleSelectForm.standType = this.handleSelectForm.dataSource + this.searchLawBtn() + }, + //根据标准编号的查询 + lawNumberSearch() { + this.handleSelectForm.standNumber = this.handleSelectForm.lawNumber + this.handleSelectForm.lawsNumber = this.handleSelectForm.lawNumber + this.handleSelectForm.standCode = this.handleSelectForm.lawNumber + }, + handleSelectPageChange(page){ + this.lawInfoTableLoading = true + this.handleSelectForm.page = page + this.searchLawBtn() + }, + handleSelectPageSizeChange(pageSize){ + this.lawInfoTableLoading = true + this.handleSelectForm.pageSize = pageSize + this.searchLawBtn() }, }, computed: { diff --git a/src/pages/processCenter/pages/processList/tabComponents/processCenter/index.vue b/src/pages/processCenter/pages/processList/tabComponents/processCenter/index.vue index 9ff4aa477..a5e03bd72 100644 --- a/src/pages/processCenter/pages/processList/tabComponents/processCenter/index.vue +++ b/src/pages/processCenter/pages/processList/tabComponents/processCenter/index.vue @@ -879,7 +879,7 @@ export default { prcType: row.prcType } }) - } else if(row.taskInfo === '标准法规部经理审批'){ + } else if(row.taskInfo === '确认人确认'){ this.$router.push({ name: 'xmqdqrStep3', query: { @@ -890,6 +890,17 @@ export default { prcType: row.prcType } }) + }else if(row.taskInfo === '产品工程经理汇总清单'){ + this.$router.push({ + name: 'xmqdqrStep4', + query: { + taskIds: row.taskIds, + prcId: row.prcId, + prcNum: row.prcNum, + prcName: row.prcName, + prcType: row.prcType + } + }) } break case 'laws2':