feat: 付款申请审批通过前增加确认弹框
This commit is contained in:
@@ -328,15 +328,17 @@ export default {
|
||||
this.refreshChange();
|
||||
},
|
||||
async handleApprove(row) {
|
||||
// 防止重复点击:请求进行中忽略后续点击
|
||||
// 防止重复点击:请求进行中忽略后续点击,避免重复审批和重复提示
|
||||
if (this.approveLoading) return;
|
||||
this.approveLoading = true;
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '审批处理中,请稍候…',
|
||||
background: 'rgba(255, 255, 255, 0.6)',
|
||||
});
|
||||
let loading = null;
|
||||
try {
|
||||
await this.$confirm('确认审批通过该付款申请?', '提示', { type: 'warning' });
|
||||
loading = this.$loading({
|
||||
lock: true,
|
||||
text: '审批处理中,请稍候…',
|
||||
background: 'rgba(255, 255, 255, 0.6)',
|
||||
});
|
||||
const res = await api.approve({ id: row.id });
|
||||
// data=false 表示审批已通过但自动同步金蝶失败,msg 带具体原因
|
||||
if (res.data.data === false) {
|
||||
@@ -346,7 +348,7 @@ export default {
|
||||
}
|
||||
this.refreshChange();
|
||||
} finally {
|
||||
loading.close();
|
||||
loading?.close();
|
||||
this.approveLoading = false;
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user