diff --git a/src/pages/processCenter/pages/creatProcess/bzpg/step3.vue b/src/pages/processCenter/pages/creatProcess/bzpg/step3.vue index 9ead05378..c8b88baa9 100644 --- a/src/pages/processCenter/pages/creatProcess/bzpg/step3.vue +++ b/src/pages/processCenter/pages/creatProcess/bzpg/step3.vue @@ -1,4 +1,4 @@ - + @@ -341,7 +358,7 @@ import ProcessHeader from "process/components/ProcessHeader"; import ProcessFooter from "process/components/ProcessFooter"; import ProcessTitle from "process/components/ProcessTitle"; -import { changeAssigneeNew, inboundLiaisonDetail } from "api/process"; +import { changeAssigneeNew, inboundLiaisonDetail, saveTaskForPub } from "api/process"; export default { name: "bzpgStep3", @@ -352,7 +369,7 @@ export default { }, data(){ return { - active: '1', + active: "1", //折叠的标志,true为折叠,false为不折叠 foldFormFlag: false, drawerModal: false, @@ -360,33 +377,59 @@ export default { isTransfer: false, isSubmit: false, saveLoading: false, - ProjectModel: false, + projectModel: false, + modalshowflag: false, pageNo: 1, totalNo: 0, pageSizeNo: this.$store.getters.userInfo.configContent, - userId:this.$store.getters.userInfo.userId, + userId: this.$store.getters.userInfo.userId, taskIds: this.$route.query.taskIds, pId: this.$route.query.prcId, - commentText: '', - drawerTitle: '', - projectGroup: '', //用来查询项目 + commentText: "", + drawerTitle: "", + projectGroup: "", //用来查询项目 listForm: {}, dataList: [], + projectDataList: [], + // projectDataList: [ + // { + // managementHostName: '', //管理主体 + // developmentHostName: '', //开发主体 + // categoryName: '', //项目细分类 + // projectStatus: '', //项目状态 + // projectName: '', //项目名称 + // projectNumber: '', //项目编号 + // uname: '', //项目经理 + // } + // ], detailData: [], nodeList: [], + nodeList2: [], selectProjectList: [], selectProjectGroupList: [], productData: [], //项目群下的项目 projectStatus: [], //项目状态下拉框 projectSearch: { - projectStatus: "", //项目状态 - }, + projectStatus: "" //项目状态 + } } }, mounted() { - this.getData() - this.processTable() - this.getProductData() + this.getData(); + this.processTable(); + this.getProductData(); + /** + * 获取项目群筛选项的值 + */ + this.$http.post("sarStandProjectLibrary/querySelect", {}, { + _this: this + }, res => { + res.data.statusList.forEach(item => { + if (item) { + this.projectStatus.push(item); //项目状态 + } + }); + }); }, methods: { getData() { @@ -406,22 +449,29 @@ export default { /** * @description: 动态表单读取 */ - getFormFieldList (item) { + getFormFieldList(item) { this.$nextTick(() => { - this.listForm = JSON.parse(JSON.stringify(item)) - this.listForm.prcNum = this.prcNum - this.listForm.prcName = this.prcName - this.listForm['id'] = item.id - this.listForm.dataList = item.dataList - this.dataList = item.dataList - this.projectGroup = item.dataList[0].projectGroup - this.dataList.distributePerson = item.dataList[0].distributePerson - this.listForm.breakdownList = item.breakdownList - }) + this.listForm = JSON.parse(JSON.stringify(item)); + this.listForm.prcNum = this.prcNum; + this.listForm.prcName = this.prcName; + this.listForm["id"] = item.id; + this.projectGroup = item.dataList[0].projectGroup; + }); + }, + choiceZRRS(row, type, index) { + this.nodeList2 = []; + this.lsIndex = index; + this.lsType = type; + if (row.unameId) { + this.nodeList2 = row.unameId.split(","); + } else { + this.nodeList2.push(row); + } + this.modalshowflag = true; }, //查询项目群下的项目 - getProductData(){ - this.$http.get('sarStandProjectLibrary/queryProjects',{ + getProductData() { + this.$http.get("sarStandProjectLibrary/queryProjects", { projectGroup: this.projectGroup, current: this.pageNo, PageSize: this.pageSizeNo, @@ -429,9 +479,9 @@ export default { }, { _this: this }, res => { - this.productData = res.data.records - this.totalNo = res.data.count - }) + this.productData = res.data.records; + this.totalNo = res.data.count; + }); }, //查询项目按钮 getProductDataBtn(){ @@ -463,31 +513,83 @@ export default { cancelButtonText: "取消", type: "warning" }).then(() => { - + this.selectProjectGroupList.map(item => { + let index; + index = this.dataList.findIndex(items => { + return items.projectNumber === item.projectNumber; + }); + if (index > -1) { + this.dataList.splice(index, 1); + } + }); + this.selectProjectGroupList = []; + this.$refs.selection.clearSelection(); }).catch(() => { }); } }, - cancelStand(){ - this.projectModel = false + cancelStand() { + this.projectModel = false; }, - okProject(){ - if(this.selectProjectList.length){ - - }else{ - this.$message.warning('请至少选择一条数据进行添加') - } + okProject() { + if (this.selectProjectList.length) { + let addFlag = true; + let projectNumbers = ""; + this.selectProjectList.forEach(item => { + projectNumbers += item.projectNumber; + projectNumbers += ","; + }); + if(this.dataList.length){ + this.dataList.forEach(item => { + if (item.projectNumber === projectNumbers) { + addFlag = false; + } + }); + } + if (addFlag) { + this.projectDataList = []; + let projectNames = "", projectNumbers = ""; + this.selectProjectList.forEach(items => { + projectNames += items.projectName; + projectNames += ","; + projectNumbers += items.projectNumber; + projectNumbers += ","; + }); + this.$set(this.projectDataList, "projectName", projectNames); + this.$set(this.projectDataList, "projectNumber", projectNumbers); + this.$set(this.projectDataList, "managementHostName", this.selectProjectList[0].managementHostName); + this.$set(this.projectDataList, "developmentHostName", this.selectProjectList[0].developmentHostName); + this.$set(this.projectDataList, "categoryName", this.selectProjectList[0].categoryName); + this.$set(this.projectDataList, "projectStatus", this.selectProjectList[0].projectStatus); + this.$set(this.projectDataList, "uname", this.selectProjectList[0].uname); + this.dataList.push({ + projectName: this.projectDataList.projectName, + projectNumber: this.projectDataList.projectNumber, + managementHostName: this.projectDataList.managementHostName, + developmentHostName: this.projectDataList.developmentHostName, + categoryName: this.projectDataList.categoryName, + projectStatus: this.projectDataList.projectStatus, + uname: this.projectDataList.uname, + }) + } else { + this.$message.warning("请勿重复添加数据"); + } + this.projectModel = false; + this.$refs.projectTable.clearSelection(); + } else { + this.$message.warning("请至少选择一条数据进行添加"); + } }, - selectProject(data){ - this.selectProjectList = data + selectProject(data) { + this.selectProjectList = data; }, - pageChangeNo(page){ - this.pageNo = page - this.getProductData() + pageChangeNo(page) { + this.pageNo = page; + this.getProductData(); }, - pageSizeChangeNo(pageSize){ - this.pageSizeNo = pageSize - this.getProductData() + pageSizeChangeNo(pageSize) { + this.pageSizeNo = pageSize; + this.getProductData(); }, //tab发生变化 handleTabs(name) { @@ -495,7 +597,7 @@ export default { }, //折叠/展开基础信息方法 foldForm() { - this.foldFormFlag = !this.foldFormFlag + this.foldFormFlag = !this.foldFormFlag; }, // 点击查看 handlePreview(item) { @@ -509,28 +611,73 @@ export default { window.open(routeUrl.href, "_blank"); }, //提交 - handleSubmit(){ + handleSubmit() { + if (!this.dataList.length) { + this.$message.warning("请添加项目数据"); + } else if(this.dataList.length > 5) { + this.$message.warning('您最多只能选择五条数据') + }else{ + this.listForm.dataList = this.dataList; + this.listForm.commentText = this.commentText; + 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 => { + }); + } }, - //驳回 - beforeBack(){ - + //保存 + handleSave() { + this.saveLoading = true; + this.listForm.dataList = this.dataList; + let _formData = new FormData(); + _formData.append("id", this.bpnId || ""); + _formData.append("prcType", "5"); + _formData.append("taskIds", this.taskIds); + _formData.append("json", JSON.stringify({ + form: this.listForm, + commentText: this.commentText + })); + saveTaskForPub(_formData).then(res => { + this.saveLoading = false; + this.$message.success("保存成功"); + this.bpnId = res.result; + }).catch(e => { + this.saveLoading = false; + }); + }, + checkedRole2(data) { + this.dataList[this.lsIndex].unameId = data[0].id; + this.dataList[this.lsIndex].uname = data[0].name; + this.modalshowflag = false; }, //确认转办 - checkedRole (data) { - this.assigneeNewLoading = true + checkedRole(data) { + this.assigneeNewLoading = true; changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id assignee: data[0].id, // 被委托人 userId: this.$store.getters.userInfo.userId, // 委托人 pId: this.$route.query.prcId // 流程实例 }).then(res => { - this.isTransfer = false + this.isTransfer = false; if (res.success) { - this.drawerModal = false - this.$message.success('调整成功') + this.drawerModal = false; + this.$message.success("调整成功"); this.$router.push("/processCenter"); - this.processNum() + this.processNum(); } else { this.$message.warning(res.message) } diff --git a/src/pages/processCenter/pages/creatProcess/bzpg/step4.vue b/src/pages/processCenter/pages/creatProcess/bzpg/step4.vue new file mode 100644 index 000000000..505953b26 --- /dev/null +++ b/src/pages/processCenter/pages/creatProcess/bzpg/step4.vue @@ -0,0 +1,556 @@ + + + + + + diff --git a/src/router/index.js b/src/router/index.js index 5c112b253..91dc27b14 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -547,6 +547,15 @@ const routes = [ title: '标准合规评估流程' } }, + { + path: '/bzpgStep4', + name: 'bzpgStep4', + component: () => import('@/pages/processCenter/pages/creatProcess/bzpg/step4.vue'), + meta: { + requireAuth: true, + title: '标准合规评估流程' + } + }, { path: '/xmpgStep1', name: 'xmpgStep1',