fix: 付款管理批量同步增加遮罩并统一金蝶接口30s超时常量
This commit is contained in:
@@ -27,13 +27,13 @@ export const returnBill = data => request({ url: `${baseUrl}/return`, method: 'p
|
||||
export const voidBill = data => request({ url: `${baseUrl}/void`, method: 'post', data });
|
||||
// 同步金蝶涉及多次金蝶远程接口调用(A103-2 预检 + A103-1/A103-3 推送),单笔可达 20s+,覆盖全局 10s 超时
|
||||
export const syncKingdee = id =>
|
||||
request({ url: `${baseUrl}/sync-kingdee`, method: 'post', timeout: 30000, params: { id } });
|
||||
request({ url: `${baseUrl}/sync-kingdee`, method: 'post', timeout: APPROVE_TIMEOUT, params: { id } });
|
||||
// 批量同步逐单单据级事务串行推送,耗时随单量线性增长
|
||||
export const syncKingdeeBatch = ids =>
|
||||
request({ url: `${baseUrl}/sync-kingdee-batch`, method: 'post', timeout: 30000, data: ids });
|
||||
request({ url: `${baseUrl}/sync-kingdee-batch`, method: 'post', timeout: APPROVE_TIMEOUT, data: ids });
|
||||
// 回写任务按 paymentNo 分批远程查询 A103-2/A103-4,同样可能超过全局超时
|
||||
export const syncKingdeeResult = () =>
|
||||
request({ url: `${baseUrl}/sync-kingdee-result`, method: 'post', timeout: 30000 });
|
||||
request({ url: `${baseUrl}/sync-kingdee-result`, method: 'post', timeout: APPROVE_TIMEOUT });
|
||||
|
||||
export const paymentTypeOptions = [
|
||||
{ label: '项目预付', value: 'project_advance' },
|
||||
|
||||
@@ -409,6 +409,12 @@ export default {
|
||||
return;
|
||||
}
|
||||
this.syncLoading = true;
|
||||
// 批量同步金蝶逐单串行推送耗时较长,加遮罩防重复操作(照审批通过遮罩)
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在批量同步金蝶,请稍候…',
|
||||
background: 'rgba(255, 255, 255, 0.6)',
|
||||
});
|
||||
try {
|
||||
const data = this.unwrapData(await api.syncKingdeeBatch(rows.map(row => row.id))) || [];
|
||||
const failedList = data.filter(item => String(item).includes('同步失败'));
|
||||
@@ -425,6 +431,7 @@ export default {
|
||||
this.warnAttachmentNotUploaded(rows.map(row => row.id));
|
||||
} finally {
|
||||
this.syncLoading = false;
|
||||
loading.close();
|
||||
}
|
||||
},
|
||||
// 附件联带同步提示:同步成功但附件未全部上传时追加 warning,重推即自动补传
|
||||
|
||||
Reference in New Issue
Block a user