34 lines
1.5 KiB
Vue
34 lines
1.5 KiB
Vue
import { defHttp } from '/@/utils/http/axios';
|
|
|
|
enum Api {
|
|
list = '/xslmes/mesXslProductionOrder/list',
|
|
save = '/xslmes/mesXslProductionOrder/add',
|
|
edit = '/xslmes/mesXslProductionOrder/edit',
|
|
deleteOne = '/xslmes/mesXslProductionOrder/delete',
|
|
deleteBatch = '/xslmes/mesXslProductionOrder/deleteBatch',
|
|
queryById = '/xslmes/mesXslProductionOrder/queryById',
|
|
split = '/xslmes/mesXslProductionOrder/split',
|
|
splitBatch = '/xslmes/mesXslProductionOrder/splitBatch',
|
|
exportXls = '/xslmes/mesXslProductionOrder/exportXls',
|
|
}
|
|
|
|
export const list = (params) => defHttp.get({ url: Api.list, params });
|
|
|
|
export const deleteOne = (params, handleSuccess) =>
|
|
defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => handleSuccess());
|
|
|
|
export const batchDelete = (params, handleSuccess) =>
|
|
defHttp.delete({ url: Api.deleteBatch, params }, { joinParamsToUrl: true }).then(() => handleSuccess());
|
|
|
|
export const saveOrUpdate = (params, isUpdate) => defHttp.post({ url: isUpdate ? Api.edit : Api.save, params });
|
|
|
|
export const queryById = (params) => defHttp.get({ url: Api.queryById, params });
|
|
|
|
export const splitToMasterBatchPlan = (params, handleSuccess) =>
|
|
defHttp.post({ url: Api.split, params }, { joinParamsToUrl: true }).then(() => handleSuccess());
|
|
|
|
export const splitToMasterBatchPlanBatch = (params, handleSuccess) =>
|
|
defHttp.post({ url: Api.splitBatch, params }, { joinParamsToUrl: true }).then(() => handleSuccess());
|
|
|
|
export const getExportUrl = Api.exportXls;
|