From a903ce32eaf0f4a681a5de4426dc6617f85f6cad Mon Sep 17 00:00:00 2001 From: zyn Date: Mon, 19 Jun 2023 11:06:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=80=E6=9C=AF=E6=A0=87=E5=87=86/=E4=BA=A7?= =?UTF-8?q?=E5=93=81=E6=A0=87=E5=87=86=E6=8F=90=E4=BA=A4=E5=8A=A0=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../creatProcess/qbrk-product/step13.vue | 97 ++++++++++++------- .../pages/creatProcess/qbrk/step13.vue | 93 +++++++++++------- 2 files changed, 118 insertions(+), 72 deletions(-) diff --git a/src/pages/processCenter/pages/creatProcess/qbrk-product/step13.vue b/src/pages/processCenter/pages/creatProcess/qbrk-product/step13.vue index d69122888..3e249adb4 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk-product/step13.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk-product/step13.vue @@ -2539,6 +2539,55 @@ }) } }, + ifStandCodebyStandName(standCode,standName){ + return new Promise((resolve, reject)=>{ + this.$http._postData('lawss/sarBussionessStand/ifStandCodebyStandName',{standCode,standName}) + .then(res => resolve(res)) + .catch(e => { + throw new Error(e) + }) + }) + }, + completeTask(){ + this.isSubmit = true + this.saveLoading = true + this.form.commentText = this.formTongGuo.commentText + this.form.approvalOpinion = this.formTongGuo.approvalOpinion + this.form.topId = this.pId + this.form.reviseStatus = 'buss2_'+this.form.standStatus + this.form.textStatusBuss = '6jnqba2mby' + // 修订时 清空历史版本文件 + if(this.form.standStatus==='2') { + this.form.LSBBBUSSName = '' + this.form.LSBBBUSS = '' + } + const json = JSON.stringify(this.form); + 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.isSubmit = false + this.saveLoading = false + this.processCreateBuss(json) + // if(this.formTongGuo.approvalOpinion === '1'){ + // this.$message.warning("驳回成功") + // this.isSubmit = false + // // 流程提交之后,应该流转至待办任务页面 + // this.$router.push({path:'/processCenter?tabsName=ProcessCenter'}) + // }else{ + // this.processCreateLaws(json) + // } + }else { + this.$message.success(res.message) + } + }) + }, handleSubmit() { // this.getRule() // const val= this.form.country; @@ -2560,44 +2609,18 @@ if (valid) { 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 - this.form.topId = this.pId - this.form.reviseStatus = 'buss2_'+this.form.standStatus - this.form.textStatusBuss = '6jnqba2mby' - // 修订时 清空历史版本文件 - if(this.form.standStatus==='2') { - this.form.LSBBBUSSName = '' - this.form.LSBBBUSS = '' + if(this.form.standStatus === '1' || this.form.standStatus === '2'){ + this.ifStandCodebyStandName(this.form.standCode,this.form.standName) + .then((res)=>{ + if(res.ok){ + this.completeTask() + }else{ + this.$message.error(res.data) + } + }) + }else{ + this.completeTask() } - const json = JSON.stringify(this.form); - 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.isSubmit = false - this.saveLoading = false - this.processCreateBuss(json) - // if(this.formTongGuo.approvalOpinion === '1'){ - // this.$message.warning("驳回成功") - // this.isSubmit = false - // // 流程提交之后,应该流转至待办任务页面 - // this.$router.push({path:'/processCenter?tabsName=ProcessCenter'}) - // }else{ - // this.processCreateLaws(json) - // } - }else { - this.$message.success(res.message) - } - }) }}) }else{ this.$message.warning('请检查基础信息表单是否填写完整') diff --git a/src/pages/processCenter/pages/creatProcess/qbrk/step13.vue b/src/pages/processCenter/pages/creatProcess/qbrk/step13.vue index 18ec671e4..26dd6beb7 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk/step13.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk/step13.vue @@ -2647,6 +2647,52 @@ this.rules.commentText[0].required = true; } }, + ifStandCodebyStandName(standCode,standName){ + return new Promise((resolve, reject)=>{ + this.$http._postData('lawss/sarBussionessStand/ifStandCodebyStandName',{standCode,standName}) + .then(res => resolve(res)) + .catch(e => { + throw new Error(e) + }) + }) + }, + completeTask(){ + this.isSubmit = true + this.saveLoading = true + this.form.commentText = this.formTongGuo.commentText + this.form.approvalOpinion = this.formTongGuo.approvalOpinion + this.form.topId = this.pId + this.form.reviseStatus = 'buss1_'+this.form.reviseStatus + this.form.textStatusBuss = '6jnqba2mby' + const json = JSON.stringify(this.form); + 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.isSubmit = false + this.saveLoading = false + this.processCreateBuss(json) + // if(this.formTongGuo.approvalOpinion === '1'){ + // this.$message.warning("驳回成功") + // this.isSubmit = false + // // 流程提交之后,应该流转至待办任务页面 + // this.$router.push({path:'/processCenter?tabsName=ProcessCenter'}) + // }else{ + // this.processCreateLaws(json) + // } + }else { + this.isSubmit = false + this.saveLoading = false + this.$message.success(res.message) + } + }) + }, handleSubmit() { // this.getRule() // const val= this.form.country; @@ -2664,41 +2710,18 @@ if (valid) { 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 - this.form.topId = this.pId - this.form.reviseStatus = 'buss1_'+this.form.reviseStatus - this.form.textStatusBuss = '6jnqba2mby' - const json = JSON.stringify(this.form); - 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.isSubmit = false - this.saveLoading = false - this.processCreateBuss(json) - // if(this.formTongGuo.approvalOpinion === '1'){ - // this.$message.warning("驳回成功") - // this.isSubmit = false - // // 流程提交之后,应该流转至待办任务页面 - // this.$router.push({path:'/processCenter?tabsName=ProcessCenter'}) - // }else{ - // this.processCreateLaws(json) - // } - }else { - this.isSubmit = false - this.saveLoading = false - this.$message.success(res.message) - } - }) + if(this.form.reviseStatus === '1' || this.form.reviseStatus === '2'){ + this.ifStandCodebyStandName(this.form.standCode,this.form.standName) + .then((res)=>{ + if(res.ok){ + this.completeTask() + }else{ + this.$message.error(res.data) + } + }) + }else{ + this.completeTask() + } } }) }else{