fix: 付款管理审批通过按钮增加防重复点击

This commit is contained in:
刘泉佳
2026-10-19 01:36:52 +08:00
parent 912c1169a6
commit bbe71e340a
+15 -7
View File
@@ -163,6 +163,7 @@ export default {
rows: [], rows: [],
selection: [], selection: [],
loading: false, loading: false,
approveLoading: false,
syncLoading: false, syncLoading: false,
resultSyncing: false, resultSyncing: false,
query: {}, query: {},
@@ -327,14 +328,21 @@ export default {
this.refreshChange(); this.refreshChange();
}, },
async handleApprove(row) { async handleApprove(row) {
const res = await api.approve({ id: row.id }); // 防止重复点击:请求进行中忽略后续点击
// data=false 表示审批已通过但自动同步金蝶失败,msg 带具体原因 if (this.approveLoading) return;
if (res.data.data === false) { this.approveLoading = true;
this.$message.warning(res.data.msg); try {
} else { const res = await api.approve({ id: row.id });
this.$message.success(res.data.msg || '审批通过'); // data=false 表示审批已通过但自动同步金蝶失败,msg 带具体原因
if (res.data.data === false) {
this.$message.warning(res.data.msg);
} else {
this.$message.success(res.data.msg || '审批通过');
}
this.refreshChange();
} finally {
this.approveLoading = false;
} }
this.refreshChange();
}, },
handleMkAudit(row) { handleMkAudit(row) {
if (!row?.id) { if (!row?.id) {