fd5b1484e6
2、调整业务模块 3、调整客商模块
38 lines
1.8 KiB
JavaScript
38 lines
1.8 KiB
JavaScript
import request from '@/axios';
|
|
|
|
const baseUrl = '/blade-transport/transport-reconciliation';
|
|
|
|
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 getFormalOptions = (current, size, params) =>
|
|
request({
|
|
url: `${baseUrl}/formal-options`,
|
|
method: 'get',
|
|
params: { current, size, ...params },
|
|
});
|
|
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 match = id => request({ url: `${baseUrl}/match`, method: 'post', params: { id } });
|
|
export const manualMatch = data =>
|
|
request({ url: `${baseUrl}/manual-match`, method: 'post', data });
|
|
export const unmatch = internalId =>
|
|
request({ url: `${baseUrl}/unmatch`, method: 'post', params: { internalId } });
|
|
export const adjust = data => request({ url: `${baseUrl}/adjust`, method: 'post', data });
|
|
export const updateByMatch = id =>
|
|
request({ url: `${baseUrl}/update-by-match`, method: 'post', params: { id } });
|
|
export const complete = id =>
|
|
request({ url: `${baseUrl}/complete`, method: 'post', params: { id } });
|
|
export const template = mode =>
|
|
request({ url: `${baseUrl}/template`, method: 'get', params: { mode }, responseType: 'blob' });
|
|
|
|
const importFile = (url, id, file) => {
|
|
const data = new FormData();
|
|
data.append('id', id);
|
|
data.append('file', file);
|
|
return request({ url, method: 'post', data, responseType: 'blob', timeout: 60000 });
|
|
};
|
|
|
|
export const importVehicle = (id, file) => importFile(`${baseUrl}/import-vehicle`, id, file);
|
|
export const importCargo = (id, file) => importFile(`${baseUrl}/import-cargo`, id, file);
|