From d9d11f5f609cc354609d703bd88f9388750fbb4b 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, 7 Apr 2022 15:12:06 +0800 Subject: [PATCH] =?UTF-8?q?=E9=81=BF=E5=85=8D=E5=BD=A2=E6=88=90=E4=BA=8C?= =?UTF-8?q?=E6=AC=A1=E8=8D=89=E7=A8=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/creatProcess/qbzxdjhgk/step1.vue | 48 ++++++++++--------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/src/pages/processCenter/pages/creatProcess/qbzxdjhgk/step1.vue b/src/pages/processCenter/pages/creatProcess/qbzxdjhgk/step1.vue index aeac07c9e..7c4f27e3f 100644 --- a/src/pages/processCenter/pages/creatProcess/qbzxdjhgk/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/qbzxdjhgk/step1.vue @@ -283,6 +283,7 @@ export default { qbfsForm: {}, formLoading: false, approvalFlag: false, + saveFlag: false, showFlag: true, taskIds: '', bpnId: '', @@ -333,6 +334,7 @@ export default { this.taskIds = this.$route.query.taskIds this.bpnId = this.$route.query.bpnId if (this.bpnId !== undefined) { + this.saveFlag = true this.getData() } if(this.taskIds){ @@ -387,6 +389,7 @@ export default { * @description: 动态表单读取 */ getFormFieldList(item) { + console.log(item); this.toggleType= item.type || item.qbfsForm.type this.$nextTick(() => { switch (this.toggleType){ @@ -440,28 +443,7 @@ export default { }, //流程保存 handleSave() { - if(!this.approvalFlag){ - //第一次正常保存 - let qbzxdFrom = this.$refs["childForm"].qbfsForm; - qbzxdFrom.type = this.toggleType - this.saveLoading = true - let _formData = new FormData() - _formData.append('createUser', this.$store.getters.userInfo.userId) - _formData.append('createUserName', this.$store.getters.userInfo.userName) - _formData.append('prcType', '25') - _formData.append('json', JSON.stringify({ - roleForm: this.roleForm, - qbfsForm: qbzxdFrom, - commentText: this.commentText - })) - saveTaskFirst(_formData).then(res => { - this.saveLoading = false - this.$message.success('保存成功') - this.bpnId = res.result - }).catch(e => { - this.saveLoading = false - }) - }else{ + if(this.approvalFlag || this.saveFlag){ //被驳回后的保存 this.saveLoading = true; let qbzxdFrom = this.$refs["childForm"].qbfsForm; @@ -484,7 +466,27 @@ export default { }).catch(e => { this.saveLoading = false; }); - + }else{ + //第一次正常保存 + let qbzxdFrom = this.$refs["childForm"].qbfsForm; + qbzxdFrom.type = this.toggleType + this.saveLoading = true + let _formData = new FormData() + _formData.append('createUser', this.$store.getters.userInfo.userId) + _formData.append('createUserName', this.$store.getters.userInfo.userName) + _formData.append('prcType', '25') + _formData.append('json', JSON.stringify({ + roleForm: this.roleForm, + qbfsForm: qbzxdFrom, + commentText: this.commentText + })) + saveTaskFirst(_formData).then(res => { + this.saveLoading = false + this.$message.success('保存成功') + this.bpnId = res.result + }).catch(e => { + this.saveLoading = false + }) } }, //流程提交