feat: 汇票付款审批通过增加确认弹窗与表格遮罩防重复点击
This commit is contained in:
@@ -156,9 +156,17 @@ export default {
|
||||
});
|
||||
},
|
||||
async handleApprove(row) {
|
||||
await api.approve({ id: row.id });
|
||||
this.$message.success('审批通过');
|
||||
this.loadTable();
|
||||
await this.$confirm('确认审批通过该汇票付款?', '提示', { type: 'warning' });
|
||||
// 防止重复点击:请求期间表格遮罩,后续点击直接忽略
|
||||
if (this.loading) return;
|
||||
this.loading = true;
|
||||
try {
|
||||
await api.approve({ id: row.id });
|
||||
this.$message.success('审批通过');
|
||||
await this.loadTable();
|
||||
} finally {
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
async handleReturn(row) {
|
||||
const { value } = await this.$prompt('请输入驳回原因', '审批驳回');
|
||||
|
||||
Reference in New Issue
Block a user