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