9b40800aab
# Conflicts: # src/api/payment/invoiceApplication.js # src/api/payment/invoiceReceipt.js # src/api/payment/paymentApplication.js # src/api/settlement/formalSettlement.js # src/views/payment/invoice-application.vue # src/views/payment/invoice-receipt.vue # src/views/payment/payment-application-form.vue # src/views/payment/payment-application.vue # src/views/settlement/formal-settlement.vue
49 lines
2.5 KiB
JavaScript
49 lines
2.5 KiB
JavaScript
import request from '@/axios';
|
|
|
|
const baseUrl = '/blade-transport/payment-application';
|
|
export const getList = (current, size, params) =>
|
|
request({ url: `${baseUrl}/list`, method: 'get', params: { current, size, ...params } });
|
|
export const getDetail = id => request({ url: `${baseUrl}/detail`, method: 'get', params: { id } });
|
|
export const getReferenceAmount = (paymentType, referenceId, excludeId) =>
|
|
request({
|
|
url: `${baseUrl}/reference-amount`,
|
|
method: 'get',
|
|
params: { paymentType, referenceId, excludeId: excludeId || undefined },
|
|
});
|
|
export const save = data => request({ url: `${baseUrl}/save`, method: 'post', data });
|
|
export const remove = id => request({ url: `${baseUrl}/remove`, method: 'post', params: { id } });
|
|
export const submit = data => request({ url: `${baseUrl}/submit`, method: 'post', data });
|
|
export const approve = data => request({ url: `${baseUrl}/approve`, method: 'post', data });
|
|
export const returnBill = data => request({ url: `${baseUrl}/return`, method: 'post', data });
|
|
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 } });
|
|
// 批量同步逐单单据级事务串行推送,耗时随单量线性增长
|
|
export const syncKingdeeBatch = ids =>
|
|
request({ url: `${baseUrl}/sync-kingdee-batch`, method: 'post', timeout: 30000, data: ids });
|
|
// 回写任务按 paymentNo 分批远程查询 A103-2/A103-4,同样可能超过全局超时
|
|
export const syncKingdeeResult = () =>
|
|
request({ url: `${baseUrl}/sync-kingdee-result`, method: 'post', timeout: 30000 });
|
|
|
|
export const paymentTypeOptions = [
|
|
{ label: '项目预付', value: 'project_advance' },
|
|
{ label: '进度预付', value: 'progress_advance' },
|
|
{ label: '尾款付款', value: 'settlement_payment' },
|
|
];
|
|
export const approvalStatusOptions = [
|
|
{ label: '草稿', value: 'draft' },
|
|
{ label: '审批中', value: 'reviewing' },
|
|
{ label: '审批通过', value: 'approved' },
|
|
{ label: '已驳回', value: 'returned' },
|
|
{ label: '已作废', value: 'voided' },
|
|
];
|
|
export const kingdeeStatusOptions = [
|
|
{ label: '未生成', value: 'unsynced' },
|
|
{ label: '已生成', value: 'synced' },
|
|
{ label: '付款中', value: 'paying' },
|
|
{ label: '已付款', value: 'paid' },
|
|
{ label: '已关闭', value: 'closed' },
|
|
{ label: '生成失败', value: 'failed' },
|
|
];
|