feat: 付款申请、开票申请、收票登记金蝶按钮增加防重复点击
This commit is contained in:
@@ -70,6 +70,7 @@
|
||||
v-if="hasPermission('invoice_receipt_sync')"
|
||||
type="primary"
|
||||
plain
|
||||
:loading="pushLoading"
|
||||
@click="handlePushKingdee"
|
||||
>批量同步</el-button
|
||||
>
|
||||
@@ -263,6 +264,7 @@ export default {
|
||||
rows: [],
|
||||
selection: [],
|
||||
loading: false,
|
||||
pushLoading: false,
|
||||
page: { current: 1, size: 10, total: 0 },
|
||||
flowDialog: { visible: false, loading: false, row: {}, records: [] },
|
||||
};
|
||||
@@ -364,6 +366,7 @@ export default {
|
||||
this.loadTable();
|
||||
},
|
||||
async handlePushKingdee() {
|
||||
if (this.pushLoading) return;
|
||||
const rows = this.selection.filter(row => row.approvalStatus === 'approved');
|
||||
if (!rows.length) {
|
||||
this.$message.warning('请选择至少一条审批通过的收票登记');
|
||||
@@ -372,9 +375,14 @@ export default {
|
||||
await this.$confirm(`确认将选中的 ${rows.length} 条收票登记同步至金蝶?`, '提示', {
|
||||
type: 'warning',
|
||||
});
|
||||
const summary = this.unwrapData(await api.pushKingdee(rows.map(row => row.id)));
|
||||
this.$alert(summary || '推送完成', '推送结果', { confirmButtonText: '知道了' });
|
||||
this.loadTable();
|
||||
this.pushLoading = true;
|
||||
try {
|
||||
const summary = this.unwrapData(await api.pushKingdee(rows.map(row => row.id)));
|
||||
this.$alert(summary || '推送完成', '推送结果', { confirmButtonText: '知道了' });
|
||||
this.loadTable();
|
||||
} finally {
|
||||
this.pushLoading = false;
|
||||
}
|
||||
},
|
||||
async handleExport() {
|
||||
const data = this.unwrapData(await api.getList(1, 100000, this.query));
|
||||
|
||||
Reference in New Issue
Block a user