新购编码确认时增加按钮loading 防止重复调用接口导致编码重复
This commit is contained in:
parent
b7a7bf1930
commit
25cdb4b077
|
|
@ -297,7 +297,11 @@
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<div slot="footer" class="dialog-footer" style="text-align: center">
|
<div slot="footer" class="dialog-footer" style="text-align: center">
|
||||||
<el-button type="primary" @click="submitForm" v-if="!isDetail"
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
@click="submitForm"
|
||||||
|
v-if="!isDetail"
|
||||||
|
:loading="codingLoading"
|
||||||
>确 定</el-button
|
>确 定</el-button
|
||||||
>
|
>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
|
@ -431,6 +435,7 @@ export default {
|
||||||
isDetail: false,
|
isDetail: false,
|
||||||
|
|
||||||
surplusNoBindNum: 0,
|
surplusNoBindNum: 0,
|
||||||
|
codingLoading: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -723,18 +728,23 @@ export default {
|
||||||
)
|
)
|
||||||
return // 停止提交流程
|
return // 停止提交流程
|
||||||
}
|
}
|
||||||
editPurchaseMacode(this.codeList).then((response) => {
|
this.codingLoading = true
|
||||||
if (response.data && response.data.length > 0) {
|
editPurchaseMacode(this.codeList)
|
||||||
this.codeList = response.data
|
.then((response) => {
|
||||||
this.$modal.msgError(
|
if (response.data && response.data.length > 0) {
|
||||||
'编码绑定失败,存在重复编码,请重新输入',
|
this.codeList = response.data
|
||||||
)
|
this.$modal.msgError(
|
||||||
} else {
|
'编码绑定失败,存在重复编码,请重新输入',
|
||||||
this.$modal.msgSuccess('编码绑定成功')
|
)
|
||||||
this.open = false
|
} else {
|
||||||
this.getList()
|
this.$modal.msgSuccess('编码绑定成功')
|
||||||
}
|
this.open = false
|
||||||
})
|
this.getList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
this.codingLoading = false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
hasDuplicateField(array, field) {
|
hasDuplicateField(array, field) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue