From e9a0963c1f5273146c357e8526c88f0c48a0102d Mon Sep 17 00:00:00 2001 From: zyn Date: Thu, 2 Nov 2023 16:37:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=89=E9=92=AEloading-=E4=BA=A7=E5=93=81?= =?UTF-8?q?=E6=A0=87=E5=87=86=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/creatProcess/qbrk-product/step1.vue | 12 ++++++++---- .../pages/creatProcess/qbrk-product/step10.vue | 16 ++++++++++------ .../pages/creatProcess/qbrk-product/step11.vue | 16 ++++++++++------ .../pages/creatProcess/qbrk-product/step12.vue | 15 ++++++++++----- .../pages/creatProcess/qbrk-product/step13.vue | 17 ++++++++--------- .../pages/creatProcess/qbrk-product/step14.vue | 4 ++-- .../pages/creatProcess/qbrk-product/step2.vue | 9 +++++---- .../pages/creatProcess/qbrk-product/step3.vue | 14 ++++++++------ .../pages/creatProcess/qbrk-product/step4.vue | 9 ++++++--- .../pages/creatProcess/qbrk-product/step5.vue | 14 ++++++++------ .../pages/creatProcess/qbrk-product/step6-1.vue | 15 ++++++++------- .../pages/creatProcess/qbrk-product/step6.vue | 16 +++++++++------- .../pages/creatProcess/qbrk-product/step7.vue | 15 ++++++++------- .../pages/creatProcess/qbrk-product/step8.vue | 16 ++++++++++------ .../pages/creatProcess/qbrk-product/step9.vue | 16 ++++++++++------ .../pages/creatProcess/qbrk-product/stepC3.vue | 14 ++++++++------ .../pages/creatProcess/qbrk-product/stepC6.vue | 15 ++++++++------- 17 files changed, 136 insertions(+), 97 deletions(-) diff --git a/src/pages/processCenter/pages/creatProcess/qbrk-product/step1.vue b/src/pages/processCenter/pages/creatProcess/qbrk-product/step1.vue index 201f6736c..9f8abfdee 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk-product/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk-product/step1.vue @@ -2984,6 +2984,7 @@ // } this.saveLoading = true + this.isSubmit = true let _formData = new FormData() this.fileInfoHandle() _formData.append('id', this.bpnId || '') @@ -2998,11 +2999,11 @@ commentText: this.commentText })) saveTaskFirst(_formData).then(res => { - this.saveLoading = false this.$message.success('保存成功') this.bpnId = res.result - }).catch(e => { + }).finally(() => { this.saveLoading = false + this.isSubmit = false }) }, fileInfoHandle(){ @@ -3150,8 +3151,6 @@ }, res => { if (res.ok) { if (res.data === '操作成功') { - this.submitLoading = false - this.isSubmit = false if (this.$route.query.bpnId && this.$route.query.bpnId !== '') { let taskId = { id: this.$route.query.bpnId @@ -3166,7 +3165,12 @@ } else { this.$message.warning(res.data) } + this.submitLoading = false + this.isSubmit = false }) + } else { + this.submitLoading = false + this.isSubmit = false } }) } diff --git a/src/pages/processCenter/pages/creatProcess/qbrk-product/step10.vue b/src/pages/processCenter/pages/creatProcess/qbrk-product/step10.vue index 6afdce48c..5c94af0ed 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk-product/step10.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk-product/step10.vue @@ -1220,8 +1220,6 @@ assignee: data[0].id, // 被委托人 pId: this.$route.query.prcId, // 流程实例 }).then(res => { - this.isSubmit = false - this.saveLoading = false if (res.success) { this.drawerModal = false this.$message.success('调整成功') @@ -1230,6 +1228,9 @@ } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false + this.saveLoading = false }) }, checkedRole (data) { @@ -2090,6 +2091,7 @@ // } this.saveLoading = true + this.isSubmit = true let _formData = new FormData() // _formData.append('id', this.bpnId) _formData.append('createUser', this.$store.getters.userInfo.userId) @@ -2109,11 +2111,11 @@ commentText: this.commentText })) saveTaskFirst(_formData).then(res => { - this.saveLoading = false this.$message.success('保存成功') // this.bpnId = res.result - }).catch(e => { - this.saveLoading = false + }).finally(() => { + this.saveLoading = false + this.isSubmit = false }) }, fileInfoHandle(){ @@ -2235,6 +2237,7 @@ this.$refs['formTongGuo'].validate((valid) => { if (valid) { this.isSubmit = true + this.saveLoading = true this.form.commentText = this.formTongGuo.commentText this.form.approvalOpinion = this.formTongGuo.approvalOpinion const json = JSON.stringify(this.form); @@ -2253,12 +2256,13 @@ this.$message.success(res.message) // this.processCreateLaws(json) } - this.isSubmit = false // 流程提交之后,应该流转至待办任务页面 this.$router.push({path:'/processCenter?tabsName=ProcessCenter'}) }else { this.$message.success(res.message) } + this.isSubmit = false + this.saveLoading = false }) }}) }, diff --git a/src/pages/processCenter/pages/creatProcess/qbrk-product/step11.vue b/src/pages/processCenter/pages/creatProcess/qbrk-product/step11.vue index 9e587bd23..9aec619be 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk-product/step11.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk-product/step11.vue @@ -1220,8 +1220,6 @@ assignee: data[0].id, // 被委托人 pId: this.$route.query.prcId, // 流程实例 }).then(res => { - this.isSubmit = false - this.saveLoading = false if (res.success) { this.drawerModal = false this.$message.success('调整成功') @@ -1230,6 +1228,9 @@ } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false + this.saveLoading = false }) }, checkedRole (data) { @@ -2090,6 +2091,7 @@ // } this.saveLoading = true + this.isSubmit = true let _formData = new FormData() // _formData.append('id', this.bpnId) _formData.append('createUser', this.$store.getters.userInfo.userId) @@ -2109,11 +2111,11 @@ commentText: this.commentText })) saveTaskFirst(_formData).then(res => { - this.saveLoading = false this.$message.success('保存成功') // this.bpnId = res.result - }).catch(e => { - this.saveLoading = false + }).finally(() => { + this.saveLoading = false + this.isSubmit = false }) }, fileInfoHandle(){ @@ -2235,6 +2237,7 @@ this.$refs['formTongGuo'].validate((valid) => { if (valid) { this.isSubmit = true + this.saveLoading = true this.form.commentText = this.formTongGuo.commentText this.form.approvalOpinion = this.formTongGuo.approvalOpinion const json = JSON.stringify(this.form); @@ -2253,12 +2256,13 @@ this.$message.success(res.message) // this.processCreateLaws(json) } - this.isSubmit = false // 流程提交之后,应该流转至待办任务页面 this.$router.push({path:'/processCenter?tabsName=ProcessCenter'}) }else { this.$message.success(res.message) } + this.isSubmit = false + this.saveLoading = false }) }}) }, diff --git a/src/pages/processCenter/pages/creatProcess/qbrk-product/step12.vue b/src/pages/processCenter/pages/creatProcess/qbrk-product/step12.vue index 71fefda45..9b3ad3d03 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk-product/step12.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk-product/step12.vue @@ -1220,8 +1220,6 @@ assignee: data[0].id, // 被委托人 pId: this.$route.query.prcId, // 流程实例 }).then(res => { - this.isSubmit = false - this.saveLoading = false if (res.success) { this.drawerModal = false this.$message.success('调整成功') @@ -1230,6 +1228,9 @@ } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false + this.saveLoading = false }) }, checkedRole (data) { @@ -2090,6 +2091,7 @@ // } this.saveLoading = true + this.isSubmit = true let _formData = new FormData() // _formData.append('id', this.bpnId) _formData.append('createUser', this.$store.getters.userInfo.userId) @@ -2112,8 +2114,9 @@ this.saveLoading = false this.$message.success('保存成功') // this.bpnId = res.result - }).catch(e => { - this.saveLoading = false + }).finally(() => { + this.saveLoading = false + this.isSubmit = false }) }, fileInfoHandle(){ @@ -2235,6 +2238,7 @@ this.$refs['formTongGuo'].validate((valid) => { if (valid) { this.isSubmit = true + this.saveLoading = true this.form.commentText = this.formTongGuo.commentText this.form.approvalOpinion = this.formTongGuo.approvalOpinion const json = JSON.stringify(this.form); @@ -2253,12 +2257,13 @@ this.$message.success(res.message) // this.processCreateLaws(json) } - this.isSubmit = false // 流程提交之后,应该流转至待办任务页面 this.$router.push({path:'/processCenter?tabsName=ProcessCenter'}) }else { this.$message.success(res.message) } + this.isSubmit = false + this.saveLoading = false }) }}) }, diff --git a/src/pages/processCenter/pages/creatProcess/qbrk-product/step13.vue b/src/pages/processCenter/pages/creatProcess/qbrk-product/step13.vue index 39d32fd03..d9b1e3739 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk-product/step13.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk-product/step13.vue @@ -1182,8 +1182,6 @@ assignee: data[0].id, // 被委托人 pId: this.$route.query.prcId, // 流程实例 }).then(res => { - this.isSubmit = false - this.saveLoading = false if (res.success) { this.drawerModal = false this.$message.success('调整成功') @@ -1192,6 +1190,9 @@ } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false + this.saveLoading = false }) }, drawerCheckZRBM(data) { @@ -2419,13 +2420,11 @@ commentText: this.formTongGuo.commentText })) saveTaskForPub(_formData).then(res => { - this.isSubmit = false - this.saveLoading = false this.$message.success('保存成功') this.bpnId = res.result - }).catch(e => { - this.isSubmit = false - this.saveLoading = false + }).finally(() => { + this.saveLoading = false + this.isSubmit = false }) }, fileInfoHandle(){ @@ -2578,8 +2577,6 @@ if (res.success) { // this.$message.success(res.message) // 流程提交之后,应该流转至待办任务页面 - this.isSubmit = false - this.saveLoading = false this.processCreateBuss(json) // if(this.formTongGuo.approvalOpinion === '1'){ // this.$message.warning("驳回成功") @@ -2592,6 +2589,8 @@ }else { this.$message.success(res.message) } + this.isSubmit = false + this.saveLoading = false }) }, handleSubmit() { diff --git a/src/pages/processCenter/pages/creatProcess/qbrk-product/step14.vue b/src/pages/processCenter/pages/creatProcess/qbrk-product/step14.vue index f4ff164cc..139b82df6 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk-product/step14.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk-product/step14.vue @@ -2349,8 +2349,6 @@ if (res.success) { this.$message.success(res.message) // 流程提交之后,应该流转至待办任务页面 - this.isSubmit = false - this.saveLoading = false this.$router.push({path:'/processCenter?tabsName=ProcessCenter'}) // if(this.formTongGuo.approvalOpinion === '1'){ // this.$message.warning("驳回成功") @@ -2363,6 +2361,8 @@ }else { this.$message.success(res.message) } + this.isSubmit = false + this.saveLoading = false }) }}) } diff --git a/src/pages/processCenter/pages/creatProcess/qbrk-product/step2.vue b/src/pages/processCenter/pages/creatProcess/qbrk-product/step2.vue index 70141de07..766cd6ddc 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk-product/step2.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk-product/step2.vue @@ -1220,8 +1220,6 @@ assignee: data[0].id, // 被委托人 pId: this.$route.query.prcId, // 流程实例 }).then(res => { - this.isSubmit = false - this.saveLoading = false if (res.success) { this.drawerModal = false this.$message.success('调整成功') @@ -1230,6 +1228,9 @@ } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false + this.saveLoading = false }) }, checkedRole (data) { @@ -2342,8 +2343,6 @@ if (res.success) { this.$message.success(res.message) // 流程提交之后,应该流转至待办任务页面 - this.isSubmit = false - this.saveLoading = false this.$router.push({path:'/processCenter?tabsName=ProcessCenter'}) // if(this.formTongGuo.approvalOpinion === '1'){ // this.$message.warning("驳回成功") @@ -2356,6 +2355,8 @@ }else { this.$message.success(res.message) } + this.isSubmit = false + this.saveLoading = false }) }else { this.$message.warning('请先上传文件,再提交流程') diff --git a/src/pages/processCenter/pages/creatProcess/qbrk-product/step3.vue b/src/pages/processCenter/pages/creatProcess/qbrk-product/step3.vue index 3bb135bf6..2ee710a26 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk-product/step3.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk-product/step3.vue @@ -1207,8 +1207,6 @@ assignee: data[0].id, // 被委托人 pId: this.$route.query.prcId, // 流程实例 }).then(res => { - this.isSubmit = false - this.saveLoading = false if (res.success) { this.drawerModal = false this.$message.success('调整成功') @@ -1217,6 +1215,9 @@ } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false + this.saveLoading = false }) }, drawerCheckZRBM(data) { @@ -2467,6 +2468,7 @@ // } this.fileInfoHandle() this.saveLoading = true + this.isSubmit = true let _formData = new FormData() _formData.append('id', this.bpnId || '') _formData.append('createUser', this.$store.getters.userInfo.userId) @@ -2481,11 +2483,11 @@ commentText: this.formTongGuo.commentText })) saveTaskForPub(_formData).then(res => { - this.saveLoading = false this.$message.success('保存成功') this.bpnId = res.result - }).catch(e => { + }).finally(() => { this.saveLoading = false + this.isSubmit = false }) }, fileInfoHandle(){ @@ -2616,8 +2618,6 @@ if (res.success) { this.$message.success(res.message) // 流程提交之后,应该流转至待办任务页面 - this.isSubmit = false - this.saveLoading = false this.$router.push({path:'/processCenter?tabsName=ProcessCenter'}) // if(this.formTongGuo.approvalOpinion === '1'){ // this.$message.warning("驳回成功") @@ -2630,6 +2630,8 @@ }else { this.$message.success(res.message) } + this.isSubmit = false + this.saveLoading = false }) // this.processModelHisOneCount(this.pId) // .then(res => { diff --git a/src/pages/processCenter/pages/creatProcess/qbrk-product/step4.vue b/src/pages/processCenter/pages/creatProcess/qbrk-product/step4.vue index 89fcd951b..6ac63aaad 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk-product/step4.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk-product/step4.vue @@ -1219,8 +1219,6 @@ assignee: data[0].id, // 被委托人 pId: this.$route.query.prcId, // 流程实例 }).then(res => { - this.isSubmit = false - this.saveLoading = false if (res.success) { this.drawerModal = false this.$message.success('调整成功') @@ -1229,6 +1227,9 @@ } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false + this.saveLoading = false }) }, checkedRole (data) { @@ -2234,6 +2235,7 @@ this.$refs['formTongGuo'].validate((valid) => { if (valid) { this.isSubmit = true + this.saveLoading = true this.form.commentText = this.formTongGuo.commentText this.form.approvalOpinion = this.formTongGuo.approvalOpinion const json = JSON.stringify(this.form); @@ -2252,12 +2254,13 @@ this.$message.success(res.message) // this.processCreateLaws(json) } - this.isSubmit = false // 流程提交之后,应该流转至待办任务页面 this.$router.push({path:'/processCenter?tabsName=ProcessCenter'}) }else { this.$message.success(res.message) } + this.isSubmit = false + this.saveLoading = false }) }}) }, diff --git a/src/pages/processCenter/pages/creatProcess/qbrk-product/step5.vue b/src/pages/processCenter/pages/creatProcess/qbrk-product/step5.vue index 049410ec2..bf177238a 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk-product/step5.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk-product/step5.vue @@ -1635,8 +1635,6 @@ assignee: data[0].id, // 被委托人 pId: this.$route.query.prcId, // 流程实例 }).then(res => { - this.isSubmit = false - this.saveLoading = false if (res.success) { this.drawerModal = false this.$message.success('调整成功') @@ -1645,6 +1643,9 @@ } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false + this.saveLoading = false }) }, checkedRole (data) { @@ -2546,6 +2547,7 @@ // this.summaryName=this.summaryList.map(item => item.name).join(",") this.saveLoading = true + this.isSubmit = true let _formData = new FormData() _formData.append('id', this.bpnId || '') _formData.append('createUser', this.$store.getters.userInfo.userId) @@ -2563,11 +2565,11 @@ commentText: this.formTongGuo.commentText })) saveTaskForPub(_formData).then(res => { - this.saveLoading = false this.$message.success('保存成功') this.bpnId = res.result - }).catch(e => { + }).finally(() => { this.saveLoading = false + this.isSubmit = false }) }, fileInfoHandle(){ @@ -2737,12 +2739,12 @@ if (res.success) { this.$message.success(res.message) // 流程提交之后,应该流转至待办任务页面 - this.isSubmit = false - this.saveLoading = false this.$router.push({path:'/processCenter?tabsName=ProcessCenter'}) }else { this.$message.success(res.message) } + this.isSubmit = false + this.saveLoading = false }) } }) diff --git a/src/pages/processCenter/pages/creatProcess/qbrk-product/step6-1.vue b/src/pages/processCenter/pages/creatProcess/qbrk-product/step6-1.vue index 7a4a38194..71c91533b 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk-product/step6-1.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk-product/step6-1.vue @@ -1265,8 +1265,6 @@ assignee: data[0].id, // 被委托人 pId: this.$route.query.prcId, // 流程实例 }).then(res => { - this.isSubmit = false - this.saveLoading = false if (res.success) { this.drawerModal = false this.$message.success('调整成功') @@ -1275,6 +1273,9 @@ } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false + this.saveLoading = false }) }, drawerCheckZRBM(data) { @@ -2511,11 +2512,11 @@ commentText: this.formTongGuo.commentText })) saveTaskForPub(_formData).then(res => { - this.saveLoading = false this.$message.success('保存成功') this.bpnId = res.result - }).catch(e => { - this.saveLoading = false + }).finally(() => { + this.saveLoading = false + this.isSubmit = false }) }, fileInfoHandle(){ @@ -2645,8 +2646,6 @@ if (res.success) { this.$message.success(res.message) // 流程提交之后,应该流转至待办任务页面 - this.isSubmit = false - this.saveLoading = false this.$router.push({path:'/processCenter?tabsName=ProcessCenter'}) // if(this.formTongGuo.approvalOpinion === '1'){ // this.$message.warning("驳回成功") @@ -2659,6 +2658,8 @@ }else { this.$message.success(res.message) } + this.isSubmit = false + this.saveLoading = false }) // this.processModelHisOneCount(this.pId) // .then(res => { diff --git a/src/pages/processCenter/pages/creatProcess/qbrk-product/step6.vue b/src/pages/processCenter/pages/creatProcess/qbrk-product/step6.vue index 47070853a..c429347c5 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk-product/step6.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk-product/step6.vue @@ -1286,8 +1286,6 @@ assignee: data[0].id, // 被委托人 pId: this.$route.query.prcId, // 流程实例 }).then(res => { - this.isSubmit = false - this.saveLoading = false if (res.success) { this.drawerModal = false this.$message.success('调整成功') @@ -1296,6 +1294,9 @@ } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false + this.saveLoading = false }) }, drawerCheckZRBM(data) { @@ -2518,6 +2519,7 @@ // } this.fileInfoHandle() this.saveLoading = true + this.isSubmit = true let _formData = new FormData() _formData.append('id', this.bpnId || '') _formData.append('createUser', this.$store.getters.userInfo.userId) @@ -2532,11 +2534,11 @@ commentText: this.formTongGuo.commentText })) saveTaskForPub(_formData).then(res => { - this.saveLoading = false this.$message.success('保存成功') this.bpnId = res.result - }).catch(e => { - this.saveLoading = false + }).finally(() => { + this.saveLoading = false + this.isSubmit = false }) }, fileInfoHandle(){ @@ -2666,8 +2668,6 @@ if (res.success) { this.$message.success(res.message) // 流程提交之后,应该流转至待办任务页面 - this.isSubmit = false - this.saveLoading = false this.$router.push({path:'/processCenter?tabsName=ProcessCenter'}) // if(this.formTongGuo.approvalOpinion === '1'){ // this.$message.warning("驳回成功") @@ -2680,6 +2680,8 @@ }else { this.$message.success(res.message) } + this.isSubmit = false + this.saveLoading = false }) // this.processModelHisOneCount(this.pId) // .then(res => { diff --git a/src/pages/processCenter/pages/creatProcess/qbrk-product/step7.vue b/src/pages/processCenter/pages/creatProcess/qbrk-product/step7.vue index 020241a6f..b7363939e 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk-product/step7.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk-product/step7.vue @@ -2181,11 +2181,11 @@ commentText: this.commentText })) saveTaskFirst(_formData).then(res => { - this.saveLoading = false this.$message.success('保存成功') // this.bpnId = res.result - }).catch(e => { - this.saveLoading = false + }).finally(() => { + this.saveLoading = false + this.isSubmit = false }) }, fileInfoHandle(){ @@ -2289,8 +2289,6 @@ assignee: data[0].id, // 被委托人 pId: this.$route.query.prcId, // 流程实例 }).then(res => { - this.isSubmit = false - this.saveLoading = false if (res.success) { this.drawerModal = false this.$message.success('调整成功') @@ -2299,6 +2297,9 @@ } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false + this.saveLoading = false }) }, handleTransfer() { @@ -2344,8 +2345,6 @@ if (res.success) { this.$message.success(res.message) // 流程提交之后,应该流转至待办任务页面 - this.isSubmit = false - this.saveLoading = false this.$router.push({path:'/processCenter?tabsName=ProcessCenter'}) // if(this.formTongGuo.approvalOpinion === '1'){ // this.$message.warning("驳回成功") @@ -2358,6 +2357,8 @@ }else { this.$message.success(res.message) } + this.isSubmit = false + this.saveLoading = false }) }}) } diff --git a/src/pages/processCenter/pages/creatProcess/qbrk-product/step8.vue b/src/pages/processCenter/pages/creatProcess/qbrk-product/step8.vue index b74f69bc3..9ae0fa642 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk-product/step8.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk-product/step8.vue @@ -1220,8 +1220,6 @@ assignee: data[0].id, // 被委托人 pId: this.$route.query.prcId, // 流程实例 }).then(res => { - this.isSubmit = false - this.saveLoading = false if (res.success) { this.drawerModal = false this.$message.success('调整成功') @@ -1230,6 +1228,9 @@ } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false + this.saveLoading = false }) }, checkedRole (data) { @@ -2090,6 +2091,7 @@ // } this.saveLoading = true + this.isSubmit = true let _formData = new FormData() // _formData.append('id', this.bpnId) _formData.append('createUser', this.$store.getters.userInfo.userId) @@ -2109,11 +2111,11 @@ commentText: this.commentText })) saveTaskFirst(_formData).then(res => { - this.saveLoading = false this.$message.success('保存成功') // this.bpnId = res.result - }).catch(e => { - this.saveLoading = false + }).finally(() => { + this.saveLoading = false + this.isSubmit = false }) }, fileInfoHandle(){ @@ -2235,6 +2237,7 @@ this.$refs['formTongGuo'].validate((valid) => { if (valid) { this.isSubmit = true + this.saveLoading = true this.form.commentText = this.formTongGuo.commentText this.form.approvalOpinion = this.formTongGuo.approvalOpinion const json = JSON.stringify(this.form); @@ -2253,12 +2256,13 @@ this.$message.success(res.message) // this.processCreateLaws(json) } - this.isSubmit = false // 流程提交之后,应该流转至待办任务页面 this.$router.push({path:'/processCenter?tabsName=ProcessCenter'}) }else { this.$message.success(res.message) } + this.isSubmit = false + this.saveLoading = false }) }}) }, diff --git a/src/pages/processCenter/pages/creatProcess/qbrk-product/step9.vue b/src/pages/processCenter/pages/creatProcess/qbrk-product/step9.vue index ca0e2b674..413168c65 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk-product/step9.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk-product/step9.vue @@ -1220,8 +1220,6 @@ assignee: data[0].id, // 被委托人 pId: this.$route.query.prcId, // 流程实例 }).then(res => { - this.isSubmit = false - this.saveLoading = false if (res.success) { this.drawerModal = false this.$message.success('调整成功') @@ -1230,6 +1228,9 @@ } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false + this.saveLoading = false }) }, checkedRole (data) { @@ -2090,6 +2091,7 @@ // } this.saveLoading = true + this.isSubmit = true let _formData = new FormData() // _formData.append('id', this.bpnId) _formData.append('createUser', this.$store.getters.userInfo.userId) @@ -2109,11 +2111,11 @@ commentText: this.commentText })) saveTaskFirst(_formData).then(res => { - this.saveLoading = false this.$message.success('保存成功') // this.bpnId = res.result - }).catch(e => { - this.saveLoading = false + }).finally(() => { + this.saveLoading = false + this.isSubmit = false }) }, fileInfoHandle(){ @@ -2235,6 +2237,7 @@ this.$refs['formTongGuo'].validate((valid) => { if (valid) { this.isSubmit = true + this.saveLoading = true this.form.commentText = this.formTongGuo.commentText this.form.approvalOpinion = this.formTongGuo.approvalOpinion const json = JSON.stringify(this.form); @@ -2253,12 +2256,13 @@ this.$message.success(res.message) // this.processCreateLaws(json) } - this.isSubmit = false // 流程提交之后,应该流转至待办任务页面 this.$router.push({path:'/processCenter?tabsName=ProcessCenter'}) }else { this.$message.success(res.message) } + this.isSubmit = false + this.saveLoading = false }) }}) }, diff --git a/src/pages/processCenter/pages/creatProcess/qbrk-product/stepC3.vue b/src/pages/processCenter/pages/creatProcess/qbrk-product/stepC3.vue index 493f42dfa..e38a8a356 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk-product/stepC3.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk-product/stepC3.vue @@ -1186,8 +1186,6 @@ assignee: data[0].id, // 被委托人 pId: this.$route.query.prcId, // 流程实例 }).then(res => { - this.isSubmit = false - this.saveLoading = false if (res.success) { this.drawerModal = false this.$message.success('调整成功') @@ -1196,6 +1194,9 @@ } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false + this.saveLoading = false }) }, drawerCheckZRBM(data) { @@ -2400,6 +2401,7 @@ // } this.fileInfoHandle() this.saveLoading = true + this.isSubmit = true let _formData = new FormData() _formData.append('id', this.bpnId || '') _formData.append('createUser', this.$store.getters.userInfo.userId) @@ -2414,11 +2416,11 @@ commentText: this.formTongGuo.commentText })) saveTaskForPub(_formData).then(res => { - this.saveLoading = false this.$message.success('保存成功') this.bpnId = res.result - }).catch(e => { + }).finally(() => { this.saveLoading = false + this.isSubmit = false }) }, fileInfoHandle(){ @@ -2549,8 +2551,6 @@ if (res.success) { this.$message.success(res.message) // 流程提交之后,应该流转至待办任务页面 - this.isSubmit = false - this.saveLoading = false this.$router.push({path:'/processCenter?tabsName=ProcessCenter'}) // if(this.formTongGuo.approvalOpinion === '1'){ // this.$message.warning("驳回成功") @@ -2563,6 +2563,8 @@ }else { this.$message.success(res.message) } + this.isSubmit = false + this.saveLoading = false }) // this.processModelHisOneCount(this.pId) // .then(res => { diff --git a/src/pages/processCenter/pages/creatProcess/qbrk-product/stepC6.vue b/src/pages/processCenter/pages/creatProcess/qbrk-product/stepC6.vue index 4700b42d1..6353d79fe 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk-product/stepC6.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk-product/stepC6.vue @@ -1274,8 +1274,6 @@ assignee: data[0].id, // 被委托人 pId: this.$route.query.prcId, // 流程实例 }).then(res => { - this.isSubmit = false - this.saveLoading = false if (res.success) { this.drawerModal = false this.$message.success('调整成功') @@ -1284,6 +1282,9 @@ } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false + this.saveLoading = false }) }, drawerCheckZRBM(data) { @@ -2521,11 +2522,11 @@ commentText: this.formTongGuo.commentText })) saveTaskForPub(_formData).then(res => { - this.saveLoading = false this.$message.success('保存成功') this.bpnId = res.result - }).catch(e => { - this.saveLoading = false + }).finally(() => { + this.saveLoading = false + this.isSubmit = false }) }, fileInfoHandle(){ @@ -2655,8 +2656,6 @@ if (res.success) { this.$message.success(res.message) // 流程提交之后,应该流转至待办任务页面 - this.isSubmit = false - this.saveLoading = false this.$router.push({path:'/processCenter?tabsName=ProcessCenter'}) // if(this.formTongGuo.approvalOpinion === '1'){ // this.$message.warning("驳回成功") @@ -2669,6 +2668,8 @@ }else { this.$message.success(res.message) } + this.isSubmit = false + this.saveLoading = false }) // this.processModelHisOneCount(this.pId) // .then(res => {