From bbb7bdabe5bc133e24d876e559b59cda16290e51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E4=BC=9F=E4=BD=B3?= <2797716443@qq.com> Date: Tue, 2 Nov 2021 09:13:38 +0800 Subject: [PATCH] commit --- .../pages/creatProcess/cywbbzzxd/step1.vue | 62 +-- .../pages/creatProcess/cywbbzzxd/step2.vue | 98 ++-- .../pages/creatProcess/cywbbzzxd/step3.vue | 175 ++++--- .../pages/creatProcess/cywbbzzxd/step4.vue | 477 ++++++++++++++++++ .../pages/creatProcess/jrbzhxh/step1.vue | 4 +- .../pages/creatProcess/wbsm/step1.vue | 114 +++-- .../tabComponents/processCenter/index.vue | 37 ++ src/router/index.js | 9 + 8 files changed, 810 insertions(+), 166 deletions(-) create mode 100644 src/pages/processCenter/pages/creatProcess/cywbbzzxd/step4.vue diff --git a/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step1.vue b/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step1.vue index 84c7e41dc..d2f7884cf 100644 --- a/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step1.vue @@ -36,7 +36,7 @@
+ @click.native="choiceZRR('dockUser', '选择责任部门对接人', roleForm.dockUser)">
@@ -60,12 +60,12 @@ - + + + + + + 0) { - this.nodeList2 = this.roleForm.dockUser.split(","); - } - this.modalshowflag2 = true; - }, + // choiceZRRS() { + // this.nodeList2 = []; + // if (this.roleForm.dockUser.length > 0) { + // this.nodeList2 = this.roleForm.dockUser.split(","); + // } + // this.modalshowflag2 = true; + // }, checkedRole(data) { if (this.type === "dockUser") { - this.roleForm.dockUser = this.roleRow.id; - this.roleForm.dockUserName = this.roleRow.name; + this.roleForm.dockUser = data[0].id; + this.roleForm.dockUserName = data[0].name; } else if (this.type === "directorUser") { this.roleForm.directorUser = data[0].id; this.roleForm.directorUserName = data[0].name; } this.modalshowflag = false; }, - checkedRole2(data) { - var idList = ""; - var nameList = ""; - data.forEach(item => { - if (nameList.length > 0) { - nameList += ","; - idList += ","; - } - idList += item.id; - nameList += item.name; - }); - this.roleForm.dockUser = idList; - this.roleForm.dockUserName = nameList; - }, + // checkedRole2(data) { + // var idList = ""; + // var nameList = ""; + // data.forEach(item => { + // if (nameList.length > 0) { + // nameList += ","; + // idList += ","; + // } + // idList += item.id; + // nameList += item.name; + // }); + // this.roleForm.dockUser = idList; + // this.roleForm.dockUserName = nameList; + // }, handleSubmit(){ var json = this.roleForm this.$refs["Form"].validate((valid) => { if (valid) { this.isSubmit = true - this.$http.get("lawss/activiti/startProcess", {type: "15"}, { + this.$http.get("lawss/activiti/startProcess", {type: "14"}, { _this: this }, res => { if (res.ok) { diff --git a/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step2.vue b/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step2.vue index 4b989be1a..92aaecb9b 100644 --- a/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step2.vue +++ b/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step2.vue @@ -50,7 +50,7 @@
+ @click.native="choiceZRR('workPeople', '选择责任工程师', roleForm.workPeople)">
@@ -103,6 +103,7 @@ import ProcessHeader from "../../components/ProcessHeader"; import ProcessTitle from "process/components/ProcessTitle"; import ProcessFooter from "process/components/ProcessFooter"; +import { inboundLiaisonDetail } from "api/process"; export default { name: "cywbbzzxdStep2", @@ -131,19 +132,44 @@ export default { directorUserName: "" }, roleFormRules: { - dockUserName: [ - {required: true, message: "请选择标准化员", trigger: "change"} - ], - workPeopleName: [ - {required: true, message: '请选择责任工程师', trigger: "change"} - ], - directorUserName: [ - {required: true, message: "请选择标准法规部部长", trigger: "change"} - ] + // dockUserName: [ + // {required: true, message: "请选择标准化员", trigger: "change"} + // ], + // workPeopleName: [ + // {required: true, message: '请选择责任工程师', trigger: "change"} + // ], + // directorUserName: [ + // {required: true, message: "请选择标准法规部部长", trigger: "change"} + // ] }, }; }, + mounted() { + this.getData(); + }, methods:{ + getData() { + return new Promise((resolve, reject) => { + inboundLiaisonDetail({ + taskIds: this.$route.query.taskIds, + pId: this.$route.query.prcId + }).then(res => { + if (res) { + const processForm = JSON.parse(res.mesg); + this.getFormFieldList(processForm); + } + }).catch(e => { + }); + }); + }, + /** + * @description: 动态表单读取 + */ + getFormFieldList(item) { + this.$nextTick(() => { + this.roleForm = item + }); + }, choiceZRR(type, title, id) { this.nodeList = []; this.nodeList.push(id); @@ -186,33 +212,31 @@ export default { this.roleForm.workPeopleName = nameList; }, handleSubmit(){ - var json = this.roleForm - this.$refs["Form"].validate((valid) => { - if (valid) { - this.isSubmit = true - this.$http.get("lawss/activiti/startProcess", {type: "15"}, { - _this: this - }, res => { - if (res.ok) { - this.$http.post("lawss/activiti/completeTask", { - taskIds: res.data, - userId: this.$store.getters.userInfo.userId, - json: JSON.stringify(json) - }, { - _this: this - }, res => { - if (res.success) { - this.$message.success(res.message); - this.$router.push("/processCenter"); - } - this.isSubmit = false - }); - } - }); - } else { - return this.$message.warning("请完善人员信息"); - } - }); + if(this.roleForm.workPeople !== undefined){ + var json = this.roleForm + this.$refs["Form"].validate((valid) => { + if (valid) { + this.isSubmit = true + this.$http.post("lawss/activiti/completeTask", { + taskIds: this.$route.query.taskIds, + userId: this.$store.getters.userInfo.userId, + json: JSON.stringify(json) + }, { + _this: this + }, res => { + if (res.success) { + this.$message.success(res.message); + this.$router.push("/processCenter"); + } + this.isSubmit = false + }); + } else { + return this.$message.warning("请完善人员信息"); + } + }); + }else{ + this.$message.warning('请选择责任工程师') + } }, handleSave(){ diff --git a/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step3.vue b/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step3.vue index 0f07d0d97..8025f3886 100644 --- a/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step3.vue +++ b/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step3.vue @@ -38,9 +38,9 @@ clearable> - +
- +
- + - + - + @@ -80,9 +81,9 @@ clearable> - +
- +
- +
- +
- +
- {{ foldFormFlag ? '隐藏基础信息' : '展开基础信息' }} + {{ foldFormFlag ? "隐藏基础信息" : "展开基础信息" }} + @@ -134,17 +138,17 @@ fontWeight: 'bold', height: '48px'}" @selection-change="handleSelectionChange1" row-key="id"> - + @@ -283,34 +290,44 @@ export default { active: "1", foldFormFlag: true, isSubmit: false, + recordLoading: false, saveLoading: false, loading: false, detailData: [], //审批历史信息 wbbzform: { - reportingUnit:'', - associationName: '', - committee:'', - workingGroup:'', - personnelRole:'', - membershipTime:'', + reportingUnit: "", + standNumber: "", + hostOrTask: "", + participants: "", + standMechanism: "", + partakeTime: "", + standName: "", + standType: "", + standRevise: "", + releaseTime: "" }, - formRules: {}, - participantsData: [{ - projectNumber: '', - projectName: '', - expenses: '', - costBudget:'', - }], //参与人表格信息 + formRules: { + reportingUnit: [ + { required: true, message: "请输入提报单位", trigger: "change" } + ] + }, + participantsData: [], + // participantsData: [{ + // projectNumber: '', + // projectName: '', + // expenses: '', + // costBudget:'', + // }], //参与人表格信息 associationOptions: [{ - value: '选项1', - label: '1' + value: "选项1", + label: "1" }, { - value: '选项2', - label: '2' - },{ - value: '选项3', - label: '3' - }], + value: "选项2", + label: "2" + }, { + value: "选项3", + label: "3" + }] }; }, methods: { @@ -332,35 +349,73 @@ export default { this.active = type; }, foldForm() { - this.foldFormFlag = !this.foldFormFlag + this.foldFormFlag = !this.foldFormFlag; + }, + handleSave() { + }, + //不备案 + handleRecord(){ + }, - handleSave() {}, handleSubmit() { - console.log(this.wbbzform); + if (this.participantsData.length < 1) { + this.$message.warning("项目信息不能为空"); + } else { + this.participantsData.forEach(item => { + if (item.projectNumber === undefined) { + this.$message.warning("请完善项目信息"); + } + }); + this.wbbzform.commentText = this.commentText; + let json = { + participantsData: this.participantsData, + wbbzform: this.wbbzform, + dlFlag: '1', + }; + this.$refs["wbbzForm"].validate((valid) => { + if (valid) { + this.$http.post("lawss/activiti/completeTask", { + taskIds: this.$route.query.taskIds, + userId: this.$store.getters.userInfo.userId, + json: JSON.stringify(json) + }, { + _this: this + }, res => { + if (res.success) { + this.$message.success(res.message); + this.$router.push("/processCenter"); + } + this.isSubmit = false + }); + } else { + return this.$message.warning("请完善基础信息"); + } + }); + } }, //添加按鈕事件 - addProject(){ - var list = { - projectNumber: this.projectNumber, - projectName: this.projectName, - expenses: this.expenses, - costBudget: this.costBudget - } - this.participantsData.push(list) + addProject() { + var list = { + projectNumber: this.projectNumber, + projectName: this.projectName, + expenses: this.expenses, + costBudget: this.costBudget + }; + this.participantsData.push(list); }, //批量刪除按鈕事件 - deleteProject(){ + deleteProject() { }, - handleSelectionChange1(data){ + handleSelectionChange1(data) { - }, + } }, computed: { listNoDataText() { return this.processType === 1 ? "暂无待办流程" : "暂无已办流程"; } - }, + } }; @@ -368,15 +423,18 @@ export default { .wbbz-step1 { height: 100%; position: relative; + .content { display: flex; flex-direction: column; justify-content: space-between; height: calc(~'100% - 103px'); overflow: auto; - .form-select{ + + .form-select { display: flex; } + .tableTitle { margin-bottom: 10px; height: 30px; @@ -392,6 +450,7 @@ export default { } } } + .headerTabs { display: flex; align-items: center; diff --git a/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step4.vue b/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step4.vue new file mode 100644 index 000000000..48690df4b --- /dev/null +++ b/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step4.vue @@ -0,0 +1,477 @@ + + + + + + diff --git a/src/pages/processCenter/pages/creatProcess/jrbzhxh/step1.vue b/src/pages/processCenter/pages/creatProcess/jrbzhxh/step1.vue index b56fdd7dd..4e2e244b3 100644 --- a/src/pages/processCenter/pages/creatProcess/jrbzhxh/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/jrbzhxh/step1.vue @@ -157,8 +157,8 @@ export default { }, checkedRole(data) { if (this.type === "dockUser") { - this.roleForm.dockUser = this.roleRow.id; - this.roleForm.dockUserName = this.roleRow.name; + this.roleForm.dockUser = data[0].id; + this.roleForm.dockUserName = data[0].name; } else if (this.type === "directorUser") { this.roleForm.directorUser = data[0].id; this.roleForm.directorUserName = data[0].name; diff --git a/src/pages/processCenter/pages/creatProcess/wbsm/step1.vue b/src/pages/processCenter/pages/creatProcess/wbsm/step1.vue index f34b1c8a3..190d4a4b2 100644 --- a/src/pages/processCenter/pages/creatProcess/wbsm/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/wbsm/step1.vue @@ -634,46 +634,84 @@ export default { }, // 提交按钮 handleSubmit() { - if (this.dataList.length < 1) { - this.$message.warning("标准不能为空"); - } else { - this.dataList.forEach(item => { - if( item.workPeople === ''){ - this.$message.warning('请选择推荐署名人及单位') - } - }) - let json = { - commentText: this.commentText, - roleForm: this.roleForm, - dataList: this.dataList, - } - this.$refs["Form"].validate((valid) => { - if (valid) { - this.isSubmit = true - this.$http.get("lawss/activiti/startProcess", {type: "16"}, { - _this: this - }, res => { - if (res.ok) { - this.$http.post("lawss/activiti/completeTask", { - taskIds: res.data, - userId: this.$store.getters.userInfo.userId, - json: JSON.stringify(json) - }, { - _this: this - }, res => { - if (res.success) { - this.$message.success(res.message); - this.$router.push("/processCenter"); - } - this.isSubmit = false - }); - } - }); - } else { - return this.$message.warning("请完善人员信息"); + if(this.$route.query.prcNum === undefined){ + if (this.dataList.length < 1) { + this.$message.warning("标准不能为空"); + } else { + this.dataList.forEach(item => { + if( item.workPeople === ''){ + this.$message.warning('请选择推荐署名人及单位') + } + }) + let json = { + commentText: this.commentText, + roleForm: this.roleForm, + dataList: this.dataList, } - }); + this.$refs["Form"].validate((valid) => { + if (valid) { + this.isSubmit = true + this.$http.get("lawss/activiti/startProcess", {type: "16"}, { + _this: this + }, res => { + if (res.ok) { + this.$http.post("lawss/activiti/completeTask", { + taskIds: res.data, + userId: this.$store.getters.userInfo.userId, + json: JSON.stringify(json) + }, { + _this: this + }, res => { + if (res.success) { + this.$message.success(res.message); + this.$router.push("/processCenter"); + } + this.isSubmit = false + }); + } + }); + } else { + return this.$message.warning("请完善人员信息"); + } + }); + } + }else{ + if (this.dataList.length < 1) { + this.$message.warning("标准不能为空"); + } else { + this.dataList.forEach(item => { + if( item.workPeople === ''){ + this.$message.warning('请选择推荐署名人及单位') + } + }) + let json = { + commentText: this.commentText, + roleForm: this.roleForm, + dataList: this.dataList, + } + this.$refs["Form"].validate((valid) => { + if (valid) { + this.isSubmit = true + this.$http.post("lawss/activiti/completeTask", { + taskIds: this.$route.query.taskIds, + userId: this.$store.getters.userInfo.userId, + json: JSON.stringify(json) + }, { + _this: this + }, res => { + if (res.success) { + this.$message.success(res.message); + this.$router.push("/processCenter"); + } + this.isSubmit = false + }); + } else { + return this.$message.warning("请完善人员信息"); + } + }); + } } + }, // 流程阶段负责人选择 choiceZRR(type, title, id) { diff --git a/src/pages/processCenter/pages/processList/tabComponents/processCenter/index.vue b/src/pages/processCenter/pages/processList/tabComponents/processCenter/index.vue index b6b603dcc..858fdbfa5 100644 --- a/src/pages/processCenter/pages/processList/tabComponents/processCenter/index.vue +++ b/src/pages/processCenter/pages/processList/tabComponents/processCenter/index.vue @@ -894,6 +894,43 @@ export default { }) } break + case '14': + //参与外部标准制修订信息提报 + if (row.taskInfo === '下发责任工程师') { + this.$router.push({ + name: 'cywbbzzxdStep2', + query: { + taskIds: row.taskIds, + prcId: row.prcId, + prcNum: row.prcNum, + prcName: row.prcName, + prcType: row.prcType + } + }) + } else if(row.taskInfo === '填写备案信息'){ + this.$router.push({ + name: 'cywbbzzxdStep3', + query: { + taskIds: row.taskIds, + prcId: row.prcId, + prcNum: row.prcNum, + prcName: row.prcName, + prcType: row.prcType + } + }) + } else if(row.taskInfo === '责任部门对接人审核'){ + this.$router.push({ + name: 'cywbbzzxdStep4', + query: { + taskIds: row.taskIds, + prcId: row.prcId, + prcNum: row.prcNum, + prcName: row.prcName, + prcType: row.prcType + } + }) + } + break case '15': //加入标准化协会信息备案流程 if (row.taskInfo === '填写入会信息') { diff --git a/src/router/index.js b/src/router/index.js index fc987487f..6660689ad 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1177,6 +1177,15 @@ const routes = [ title: '参与外部标准制修订信息提报流程' } }, + { + path: '/cywbbzzxdStep4', + name: 'cywbbzzxdStep4', + component: () => import('@/pages/processCenter/pages/creatProcess/cywbbzzxd/step4.vue'), + meta: { + requireAuth: true, + title: '参与外部标准制修订信息提报流程' + } + }, { path: '/jrbzhxhStep1', name: 'jrbzhxhStep1',