diff --git a/src/pages/processCenter/pages/creatProcess/bzzqyj/step3.vue b/src/pages/processCenter/pages/creatProcess/bzzqyj/step3.vue index be51968b5..d1804f4a8 100644 --- a/src/pages/processCenter/pages/creatProcess/bzzqyj/step3.vue +++ b/src/pages/processCenter/pages/creatProcess/bzzqyj/step3.vue @@ -266,7 +266,7 @@ @checkedRole="checkedRole" > @@ -336,6 +336,8 @@ name: "bzzqyjStep3", data() { return { + modaltitle2: '', + addType: '', onlyKey: '', commentText3: '', itermsConditionsFlag: false, @@ -349,6 +351,10 @@ oldText: '', newText: '', reason: '', + id: '', + department: this.$store.getters.userInfo.upDeptName, + responUserName: this.$store.getters.userInfo.userName, + responUser: this.$store.getters.userInfo.userId }, drawerModal: false, todoId: '', @@ -426,7 +432,11 @@ } } }, + saveUserInfo2 () { + if (this.addType === 'add') { + this.data.push(this.editForm) + } for( let a = 0; a < this.data.length; a++) { if (this.data[a].id === this.itemId) { this.data[a].chapterNumber = this.editForm.chapterNumber @@ -438,10 +448,27 @@ } this.modalshowflag2 = false }, - cancleUserInfo2 () { - this.modalshowflag2 = false + addModal() { + var id = Number(Math.random().toString().substr(3, 3) + Date.now()).toString(36); + this.itemId = id + this.editForm = { + chapterNumber: '', + chapterName: '', + oldText: '', + newText: '', + reason: '', + id: id, + department: this.$store.getters.userInfo.upDeptName, + responUserName: this.$store.getters.userInfo.userName, + responUser: this.$store.getters.userInfo.userId + } + this.addType = 'add' + this.modaltitle2 = '新增' + this.modalshowflag2 = true }, itemEdit (row) { + this.addType = 'edit' + this.modaltitle2 = '编辑' this.itemId = row.id this.modalshowflag2 = true this.editForm = { @@ -452,6 +479,10 @@ reason: row.reason, } }, + + cancleUserInfo2 () { + this.modalshowflag2 = false + }, downloadFile (attId) { window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + attId }, @@ -529,31 +560,6 @@ this.$message.warning('请选择要删除的数据') } }, - addModal() { - var id = Number(Math.random().toString().substr(3, 3) + Date.now()).toString(36); - var json = { - chapterNumber: '', - chapterName: '', - commentText: '', - oldText: '', - newText: '', - reason: '', - id: id, - department: this.$store.getters.userInfo.upDeptName, - responUserName: this.$store.getters.userInfo.userName, - responUser: this.$store.getters.userInfo.userId - } - this.data.push(json) - this.itemId = id - this.editForm = { - chapterNumber: '', - chapterName: '', - oldText: '', - newText: '', - reason: '', - } - this.modalshowflag2 = true - }, handleTabs(name) { this.active = name }, diff --git a/src/pages/processCenter/pages/creatProcess/bzzqyj/step4.vue b/src/pages/processCenter/pages/creatProcess/bzzqyj/step4.vue index 7153ae16c..b48731a98 100644 --- a/src/pages/processCenter/pages/creatProcess/bzzqyj/step4.vue +++ b/src/pages/processCenter/pages/creatProcess/bzzqyj/step4.vue @@ -285,7 +285,7 @@ :nodeList="nodeList" > @@ -346,6 +346,8 @@ export default { name: "bzzqyjStep4", data() { return { + modaltitle2: '', + addType: '', commentText4: '', acceptShow: false, idList: [], @@ -450,31 +452,6 @@ export default { this.$message.warning('请选择要删除的数据') } }, - addModal() { - var id = Number(Math.random().toString().substr(3, 3) + Date.now()).toString(36); - var json = { - chapterNumber: '', - chapterName: '', - commentText: '', - oldText: '', - newText: '', - reason: '', - id: id, - department: this.$store.getters.userInfo.institutionName, - responUserName: this.$store.getters.userInfo.userName, - responUser: this.$store.getters.userInfo.userId - } - this.data.push(json) - this.itemId = id - this.editForm = { - chapterNumber: '', - chapterName: '', - oldText: '', - newText: '', - reason: '', - } - this.modalshowflag2 = true - }, getItemList (standId, fileType) { // 查询分解单条款数据 this.$http.get('SarStandItems/sar-stand-items/querySarItemAndInterpretation', { standId: standId, @@ -497,6 +474,9 @@ export default { } }, saveUserInfo2 () { + if (this.addType === 'add') { + this.data.push(this.editForm) + } for( let a = 0; a < this.data.length; a++) { if (this.data[a].id === this.itemId) { this.data[a].chapterNumber = this.editForm.chapterNumber @@ -508,10 +488,27 @@ export default { } this.modalshowflag2 = false }, - cancleUserInfo2 () { - this.modalshowflag2 = false + addModal() { + var id = Number(Math.random().toString().substr(3, 3) + Date.now()).toString(36); + this.itemId = id + this.editForm = { + chapterNumber: '', + chapterName: '', + oldText: '', + newText: '', + reason: '', + id: id, + department: this.$store.getters.userInfo.upDeptName, + responUserName: this.$store.getters.userInfo.userName, + responUser: this.$store.getters.userInfo.userId + } + this.addType = 'add' + this.modaltitle2 = '新增' + this.modalshowflag2 = true }, itemEdit (row) { + this.addType = 'edit' + this.modaltitle2 = '编辑' this.itemId = row.id this.modalshowflag2 = true this.editForm = { @@ -522,6 +519,9 @@ export default { reason: row.reason, } }, + cancleUserInfo2 () { + this.modalshowflag2 = false + }, checkedRole2(data) { this.form.spId = data[0].id this.form.spName = data[0].name diff --git a/src/pages/processCenter/pages/creatProcess/bzzqyj/step5.vue b/src/pages/processCenter/pages/creatProcess/bzzqyj/step5.vue index fc5ac8428..3e20e1aca 100644 --- a/src/pages/processCenter/pages/creatProcess/bzzqyj/step5.vue +++ b/src/pages/processCenter/pages/creatProcess/bzzqyj/step5.vue @@ -598,7 +598,8 @@ this.form.textType = data.form ? data.form.textType : data.textType this.form.cid = data.form ? data.form.cid : data.cid this.form.endTime = data.form ? data.form.endTime : data.endTime - data.info.forEach(item => { + let newArr = data.info ? data.info : data.form.data + newArr.forEach(item => { if (!item.source) { item.source = '1' } @@ -609,7 +610,7 @@ }); this.json = data; this.getItemList(data.standId,this.form.textValue) - this.data = data.info + this.data = newArr if (data.introduce) { } else { this.$http.get("slrs/sar-public-idea-all/getPublicIdea", { diff --git a/src/pages/processCenter/pages/creatProcess/bzzqyj/step6.vue b/src/pages/processCenter/pages/creatProcess/bzzqyj/step6.vue index 227a6eb41..5ea813a7b 100644 --- a/src/pages/processCenter/pages/creatProcess/bzzqyj/step6.vue +++ b/src/pages/processCenter/pages/creatProcess/bzzqyj/step6.vue @@ -340,8 +340,8 @@ user7Name: '' }, formRules: { - responUserList: [ - {required: true, message: "请选择责任人", trigger: "change"} + user7: [ + {required: true, message: "请选择审批领导", trigger: "change"} ] }, json: {} @@ -474,23 +474,29 @@ this.active = name; }, handleSubmit() { - this.isSubmit = true; - var json = this.json; - json.hqFlag = '0'; - json.commentText = this.commentText6; - json.user7 = this.form.user7; - json.user7Name = this.form.user7Name; - this.$http.post("lawss/activiti/completeTask", { - json: JSON.stringify(json), - taskId: this.taskIds, - userId: this.$store.getters.userInfo.userId - }, {}, res => { - if (res.success) { - this.$message.success("提交成功"); - this.$router.push("/processCenter"); + this.$refs['bzzqyjForm'].validate((valid) => { + if (valid) { + this.isSubmit = true; + var json = this.json; + json.hqFlag = '0'; + json.commentText = this.commentText6; + json.user7 = this.form.user7; + json.user7Name = this.form.user7Name; + this.$http.post("lawss/activiti/completeTask", { + json: JSON.stringify(json), + taskId: this.taskIds, + userId: this.$store.getters.userInfo.userId + }, {}, res => { + if (res.success) { + this.$message.success("提交成功"); + this.$router.push("/processCenter"); + } + this.isSubmit = false; + }); + } else { + this.$message.warning('请选择审批领导') } - this.isSubmit = false; - }); + }) }, handleSubmitNo() { if (this.commentText6) { diff --git a/src/pages/processCenter/pages/creatProcess/bzzqyj/step8.vue b/src/pages/processCenter/pages/creatProcess/bzzqyj/step8.vue index 623533ab4..d6834e855 100644 --- a/src/pages/processCenter/pages/creatProcess/bzzqyj/step8.vue +++ b/src/pages/processCenter/pages/creatProcess/bzzqyj/step8.vue @@ -249,7 +249,6 @@ show-submit :submitLoading="isSubmit" :saveLoading="saveLoading" - @save="handleSave" @submit="handleSubmit" show-back @back="handleSubmitNo"