From 3f4b0f096ea080c92e8faede5976fe5f116f7aef Mon Sep 17 00:00:00 2001 From: kilo Date: Fri, 9 Dec 2022 18:23:26 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=B2=E6=AD=A2=E9=87=8D=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/ProcessMaterialWarehousingForm.vue | 54 +++--- .../form/ProcessMaterialsAllotForm.vue | 54 +++--- .../form/ProcessMaterialsDeliveryForm.vue | 56 +++--- .../ProcessPermissionAuthorizationForm.vue | 46 ++--- .../form/ProcessSmaterialsScrapForm.vue | 54 +++--- .../activiti/form/ProcessUdgetPlanForm.vue | 167 +++++++++--------- 6 files changed, 229 insertions(+), 202 deletions(-) diff --git a/src/views/activiti/form/ProcessMaterialWarehousingForm.vue b/src/views/activiti/form/ProcessMaterialWarehousingForm.vue index 9651e7c..945e0f5 100644 --- a/src/views/activiti/form/ProcessMaterialWarehousingForm.vue +++ b/src/views/activiti/form/ProcessMaterialWarehousingForm.vue @@ -504,19 +504,21 @@ formData.title = this.processData.title formData.processInstanceId = this.processData.id } - this.btndisabled = true - httpAction(url, formData, method).then((res) => { - if (res.success) { - this.$message.success('提交申请成功!') - //todo 将表单的数据传给父组件 - this.$emit('loadData') - this.close() - } else { - this.$message.error(res.message) - } - }).finally(() => { - this.btndisabled = false - }) + if(this.btndisabled === false){ + this.btndisabled = true + httpAction(url, formData, method).then((res) => { + if (res.success) { + this.$message.success('提交申请成功!') + //todo 将表单的数据传给父组件 + this.$emit('loadData') + this.close() + } else { + this.$message.error(res.message) + } + }).finally(() => { + this.btndisabled = false + }) + } } }) }) @@ -562,18 +564,20 @@ method = 'put' } console.log('格式化后的数据', formData) - this.btndisabled = true - httpAction(url, formData, method).then((res) => { - if (res.success) { - //this.$message.success('保存成功!') - //todo 将表单的数据传给父组件 - this.$emit('afterSubmit', formData) - } else { - this.$message.error(res.message) - } - }).finally(() => { - this.btndisabled = false - }) + if(this.btndisabled === false){ + this.btndisabled = true + httpAction(url, formData, method).then((res) => { + if (res.success) { + //this.$message.success('保存成功!') + //todo 将表单的数据传给父组件 + this.$emit('afterSubmit', formData) + } else { + this.$message.error(res.message) + } + }).finally(() => { + this.btndisabled = false + }) + } } }) }) diff --git a/src/views/activiti/form/ProcessMaterialsAllotForm.vue b/src/views/activiti/form/ProcessMaterialsAllotForm.vue index 3a23441..1dc8e31 100644 --- a/src/views/activiti/form/ProcessMaterialsAllotForm.vue +++ b/src/views/activiti/form/ProcessMaterialsAllotForm.vue @@ -811,19 +811,21 @@ } } console.log('提交方法', method) - this.btndisabled = true - httpAction(url, formData, method).then((res) => { - if (res.success) { - this.$message.success('提交申请成功!') - //todo 将表单的数据传给父组件 - this.$emit('loadData') - this.close() - } else { - this.$message.error(res.message) - } - }).finally(() => { - this.btndisabled = false - }) + if(this.btndisabled === false){ + this.btndisabled = true + httpAction(url, formData, method).then((res) => { + if (res.success) { + this.$message.success('提交申请成功!') + //todo 将表单的数据传给父组件 + this.$emit('loadData') + this.close() + } else { + this.$message.error(res.message) + } + }).finally(() => { + this.btndisabled = false + }) + } } }) }) @@ -870,18 +872,20 @@ method = 'put' } console.log('提交方法', method) - this.btndisabled = true - httpAction(url, formData, method).then((res) => { - if (res.success) { - this.$message.success('保存成功!') - //todo 将表单的数据传给父组件 - this.$emit('afterSubmit', formData) - } else { - this.$message.error(res.message) - } - }).finally(() => { - this.btndisabled = false - }) + if (this.btndisabled === false){ + this.btndisabled = true + httpAction(url, formData, method).then((res) => { + if (res.success) { + this.$message.success('保存成功!') + //todo 将表单的数据传给父组件 + this.$emit('afterSubmit', formData) + } else { + this.$message.error(res.message) + } + }).finally(() => { + this.btndisabled = false + }) + } } }) }) diff --git a/src/views/activiti/form/ProcessMaterialsDeliveryForm.vue b/src/views/activiti/form/ProcessMaterialsDeliveryForm.vue index bc581f0..ec02e44 100644 --- a/src/views/activiti/form/ProcessMaterialsDeliveryForm.vue +++ b/src/views/activiti/form/ProcessMaterialsDeliveryForm.vue @@ -1312,7 +1312,7 @@ }, /*提交申请*/ applySubmit(e) { - this.getAllTable().then(tables => { + this.getAllTable().then(tables => { return validateFormAndTables(this.form, tables) }).then(allValues => { @@ -1364,19 +1364,21 @@ formData.processInstanceId = this.processData.id } console.log('提交方法', method) - this.btndisabled = true - httpAction(url, formData, method).then((res) => { - if (res.success) { - this.$message.success('提交申请成功!') - //todo 将表单的数据传给父组件 - this.$emit('loadData') - this.close() - } else { - this.$message.error(res.message) - } - }).finally(() => { - this.btndisabled = false - }) + if(this.btndisabled === false){ + this.btndisabled = true + httpAction(url, formData, method).then((res) => { + if (res.success) { + this.$message.success('提交申请成功!') + //todo 将表单的数据传给父组件 + this.$emit('loadData') + this.close() + } else { + this.$message.error(res.message) + } + }).finally(() => { + this.btndisabled = false + }) + } } }) }) @@ -1429,18 +1431,20 @@ method = 'put' } console.log('提交方法', method) - this.btndisabled = true - httpAction(url, formData, method).then((res) => { - if (res.success) { - //this.$message.success("保存成功!") - //todo 将表单的数据传给父组件 - this.$emit('afterSubmit', formData) - } else { - this.$message.error(res.message) - } - }).finally(() => { - this.btndisabled = false - }) + if (this.btndisabled === false){ + this.btndisabled = true + httpAction(url, formData, method).then((res) => { + if (res.success) { + //this.$message.success("保存成功!") + //todo 将表单的数据传给父组件 + this.$emit('afterSubmit', formData) + } else { + this.$message.error(res.message) + } + }).finally(() => { + this.btndisabled = false + }) + } } }) }) diff --git a/src/views/activiti/form/ProcessPermissionAuthorizationForm.vue b/src/views/activiti/form/ProcessPermissionAuthorizationForm.vue index 68da35a..354be0b 100644 --- a/src/views/activiti/form/ProcessPermissionAuthorizationForm.vue +++ b/src/views/activiti/form/ProcessPermissionAuthorizationForm.vue @@ -322,17 +322,19 @@ this.$message.error("授权开始时间不能大于授权结束时间") return; } - this.btndisabled = true; - httpAction(httpurl,formData,method).then((res)=>{ - if(res.success){ - this.$emit('loadData') - this.close(); - }else{ - that.$message.warning(res.message); - } - }).finally(() => { - this.btndisabled = false; - }) + if(this.btndisabled === false){ + this.btndisabled = true; + httpAction(httpurl,formData,method).then((res)=>{ + if(res.success){ + this.$emit('loadData') + this.close(); + }else{ + that.$message.warning(res.message); + } + }).finally(() => { + this.btndisabled = false; + }) + } } }) @@ -365,16 +367,18 @@ this.$message.error("授权开始时间不能大于授权结束时间") return; } - this.btndisabled = true; - httpAction(httpurl,formData,method).then((res)=>{ - if(res.success){ - this.$emit('afterSubmit',formData) - }else{ - that.$message.warning(res.message); - } - }).finally(() => { - this.btndisabled = false; - }) + if (this.btndisabled === false){ + this.btndisabled = true; + httpAction(httpurl,formData,method).then((res)=>{ + if(res.success){ + this.$emit('afterSubmit',formData) + }else{ + that.$message.warning(res.message); + } + }).finally(() => { + this.btndisabled = false; + }) + } } }) diff --git a/src/views/activiti/form/ProcessSmaterialsScrapForm.vue b/src/views/activiti/form/ProcessSmaterialsScrapForm.vue index 9483528..024f759 100644 --- a/src/views/activiti/form/ProcessSmaterialsScrapForm.vue +++ b/src/views/activiti/form/ProcessSmaterialsScrapForm.vue @@ -580,19 +580,21 @@ } } console.log('提交方法', method) - this.btndisabled = true - httpAction(url, formData, method).then((res) => { - if (res.success) { - this.$message.success('提交申请成功!') - //todo 将表单的数据传给父组件 - this.$emit('loadData') - this.close(); - } else { - this.$message.error(res.message) - } - }).finally(() => { - this.btndisabled = false - }) + if(this.btndisabled === false){ + this.btndisabled = true + httpAction(url, formData, method).then((res) => { + if (res.success) { + this.$message.success('提交申请成功!') + //todo 将表单的数据传给父组件 + this.$emit('loadData') + this.close(); + } else { + this.$message.error(res.message) + } + }).finally(() => { + this.btndisabled = false + }) + } } }) }) @@ -632,18 +634,20 @@ method = 'put' } console.log('提交方法', method) - this.btndisabled = true - httpAction(url, formData, method).then((res) => { - if (res.success) { - this.$message.success('保存成功!') - //todo 将表单的数据传给父组件 - this.$emit('afterSubmit', formData) - } else { - this.$message.error(res.message) - } - }).finally(() => { - this.btndisabled = false - }) + if(this.btndisabled === false){ + this.btndisabled = true + httpAction(url, formData, method).then((res) => { + if (res.success) { + this.$message.success('保存成功!') + //todo 将表单的数据传给父组件 + this.$emit('afterSubmit', formData) + } else { + this.$message.error(res.message) + } + }).finally(() => { + this.btndisabled = false + }) + } } }) }) diff --git a/src/views/activiti/form/ProcessUdgetPlanForm.vue b/src/views/activiti/form/ProcessUdgetPlanForm.vue index 6b4f462..ea0868f 100644 --- a/src/views/activiti/form/ProcessUdgetPlanForm.vue +++ b/src/views/activiti/form/ProcessUdgetPlanForm.vue @@ -98,7 +98,7 @@ :isabled="isabled" :rowSelection="true" :actionButton="true" - @shifu="shifu" + @shifu = "shifu" @descriptionFetch="fetchMerchandiseNews" >