fix: 收票管理/开票管理/正式结算单/预结算单/结算调整通过按钮增加表格遮罩防重复点击
This commit is contained in:
@@ -409,14 +409,21 @@ export default {
|
|||||||
},
|
},
|
||||||
async handleApprove(row) {
|
async handleApprove(row) {
|
||||||
await this.$confirm('确认审批通过该开票申请?', '提示', { type: 'warning' });
|
await this.$confirm('确认审批通过该开票申请?', '提示', { type: 'warning' });
|
||||||
const res = await api.approve({ id: row.id });
|
// 防止重复点击:请求期间表格遮罩,后续点击直接忽略
|
||||||
// data=false 表示审批已通过但自动同步金蝶失败,msg 带具体原因
|
if (this.loading) return;
|
||||||
if (res.data.data === false) {
|
this.loading = 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 || '审批通过');
|
||||||
|
}
|
||||||
|
await this.loadTable();
|
||||||
|
} finally {
|
||||||
|
this.loading = false;
|
||||||
}
|
}
|
||||||
this.loadTable();
|
|
||||||
},
|
},
|
||||||
async handleReturn(row) {
|
async handleReturn(row) {
|
||||||
const { value } = await this.$prompt('请输入驳回原因', '审批驳回');
|
const { value } = await this.$prompt('请输入驳回原因', '审批驳回');
|
||||||
|
|||||||
@@ -366,14 +366,21 @@ export default {
|
|||||||
},
|
},
|
||||||
async handleApprove(row) {
|
async handleApprove(row) {
|
||||||
await this.$confirm('确认审批通过该收票登记?', '提示', { type: 'warning' });
|
await this.$confirm('确认审批通过该收票登记?', '提示', { type: 'warning' });
|
||||||
const res = await api.approve({ id: row.id });
|
// 防止重复点击:请求期间表格遮罩,后续点击直接忽略
|
||||||
// data=false 表示审批已通过但自动同步金蝶失败,msg 带具体原因
|
if (this.loading) return;
|
||||||
if (res.data.data === false) {
|
this.loading = 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 || '审批通过');
|
||||||
|
}
|
||||||
|
await this.loadTable();
|
||||||
|
} finally {
|
||||||
|
this.loading = false;
|
||||||
}
|
}
|
||||||
this.loadTable();
|
|
||||||
},
|
},
|
||||||
async handleReturn(row) {
|
async handleReturn(row) {
|
||||||
const { value } = await this.$prompt('请输入驳回原因', '审批驳回');
|
const { value } = await this.$prompt('请输入驳回原因', '审批驳回');
|
||||||
|
|||||||
@@ -458,14 +458,21 @@ export default {
|
|||||||
'提示',
|
'提示',
|
||||||
{ type: 'warning' }
|
{ type: 'warning' }
|
||||||
);
|
);
|
||||||
const res = await api.approve({ id: row.id });
|
// 防止重复点击:请求期间表格遮罩,后续点击直接忽略
|
||||||
// data=false 表示审批已通过但自动同步金蝶失败,msg 带具体原因
|
if (this.loading) return;
|
||||||
if (res.data.data === false) {
|
this.loading = 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 || '审批通过');
|
||||||
|
}
|
||||||
|
await this.loadTable();
|
||||||
|
} finally {
|
||||||
|
this.loading = false;
|
||||||
}
|
}
|
||||||
this.loadTable();
|
|
||||||
},
|
},
|
||||||
async handleReturn(row) {
|
async handleReturn(row) {
|
||||||
const { value } = await this.$prompt('请输入驳回原因', '审批驳回', {
|
const { value } = await this.$prompt('请输入驳回原因', '审批驳回', {
|
||||||
|
|||||||
@@ -692,9 +692,16 @@ export default {
|
|||||||
},
|
},
|
||||||
async handleApprove(row) {
|
async handleApprove(row) {
|
||||||
await this.$confirm('确认审批通过该预付结算单?', '提示', { type: 'warning' });
|
await this.$confirm('确认审批通过该预付结算单?', '提示', { type: 'warning' });
|
||||||
await approve({ id: row.id });
|
// 防止重复点击:请求期间表格遮罩,后续点击直接忽略
|
||||||
this.$message.success('审批通过');
|
if (this.loading) return;
|
||||||
this.loadTable();
|
this.loading = true;
|
||||||
|
try {
|
||||||
|
await 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('请输入驳回原因', '审批驳回', {
|
||||||
|
|||||||
@@ -317,11 +317,18 @@ export default {
|
|||||||
},
|
},
|
||||||
async handleApprove(row) {
|
async handleApprove(row) {
|
||||||
await this.$confirm('审批通过后将更新关联正式结算单,确认继续?', '提示');
|
await this.$confirm('审批通过后将更新关联正式结算单,确认继续?', '提示');
|
||||||
const res = await api.approve(row.id);
|
// 防止重复点击:请求期间表格遮罩,后续点击直接忽略
|
||||||
// data=false:自动同步金蝶失败;data=true 且 msg 带已推送场景的手工冲销提示
|
if (this.loading) return;
|
||||||
if (res.data.data === true || res.data.data === false) this.$message.warning(res.data.msg);
|
this.loading = true;
|
||||||
else this.$message.success(res.data.msg || '审批通过');
|
try {
|
||||||
this.loadTable();
|
const res = await api.approve(row.id);
|
||||||
|
// data=false:自动同步金蝶失败;data=true 且 msg 带已推送场景的手工冲销提示
|
||||||
|
if (res.data.data === true || res.data.data === false) this.$message.warning(res.data.msg);
|
||||||
|
else this.$message.success(res.data.msg || '审批通过');
|
||||||
|
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