feat: 付款申请审批通过前增加确认弹框

This commit is contained in:
刘泉佳
2026-10-28 16:11:29 +08:00
parent 358add743e
commit 4502881063
+9 -7
View File
@@ -328,15 +328,17 @@ export default {
this.refreshChange(); this.refreshChange();
}, },
async handleApprove(row) { async handleApprove(row) {
// 防止重复点击:请求进行中忽略后续点击 // 防止重复点击:请求进行中忽略后续点击,避免重复审批和重复提示
if (this.approveLoading) return; if (this.approveLoading) return;
this.approveLoading = true; this.approveLoading = true;
const loading = this.$loading({ let loading = null;
lock: true,
text: '审批处理中,请稍候…',
background: 'rgba(255, 255, 255, 0.6)',
});
try { 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 }); const res = await api.approve({ id: row.id });
// data=false 表示审批已通过但自动同步金蝶失败,msg 带具体原因 // data=false 表示审批已通过但自动同步金蝶失败,msg 带具体原因
if (res.data.data === false) { if (res.data.data === false) {
@@ -346,7 +348,7 @@ export default {
} }
this.refreshChange(); this.refreshChange();
} finally { } finally {
loading.close(); loading?.close();
this.approveLoading = false; this.approveLoading = false;
} }
}, },