Commit 88f596c9 authored by Marcus's avatar Marcus

NG2318967L数据提交重复了

https://zentao.test.jdshangmen.com/bug-view-4224.html
入仓提交按钮加锁
parent c49d95a8
......@@ -445,7 +445,7 @@
<span slot="footer">
<template v-if="!isEditing">
<el-button @click="handleClose">{{ $t('关 闭') }}</el-button>
<el-button type="primary" @click="handleSubmit()">{{ edit ? $t('确认修改') : $t('提 交') }}</el-button>
<el-button type="primary" :loading="submitting" @click="handleSubmit()">{{ edit ? $t('确认修改') : $t('提 交') }}</el-button>
</template>
<template v-else>
<el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + formId)">{{ $t('审核中') }}</el-button>
......@@ -643,6 +643,7 @@ export default {
getDictDatas,
activeName: 'first',
visible: false,
submitting: false,
form: {
table: [],
brandType: undefined,
......@@ -829,6 +830,7 @@ export default {
if (!valid || !valid1) {
return
}
this.submitting = true
return orderWarehouseIn({
...this.form1,
brandType: this.warehousing.brandType,
......@@ -844,12 +846,15 @@ export default {
}
})
}).then(r => {
this.submitting = false
if (r.data) {
this.$message.success('新增入仓成功')
this.handleClose()
} else {
this.$message.success('新增入仓失败')
}
}).catch(() => {
this.submitting = false
})
})
})
......@@ -868,6 +873,7 @@ export default {
}
if (this.edit) {
// 入仓修改
this.submitting = true
return orderWarehouseInUpdateApply({
...this.form,
brandType: this.warehousing.brandType,
......@@ -888,15 +894,19 @@ export default {
}),
copyUserId: this.selectedUsers
}).then(r => {
this.submitting = false
if (r.data) {
this.$message.success(r.msg || '入仓修改发起成功')
this.handleClose()
} else {
this.$message.success(r.msg || '入仓修改发起失败')
}
}).catch(() => {
this.submitting = false
})
} else {
// 首次入仓、入仓补充
this.submitting = true
return orderWarehouseIn({
...this.form,
brandType: this.warehousing.brandType,
......@@ -913,12 +923,15 @@ export default {
}
}),
}).then(r => {
this.submitting = false
if (r.data) {
this.$message.success('入仓成功')
this.handleClose()
} else {
this.$message.success('入仓失败')
}
}).catch(() => {
this.submitting = false
})
}
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment