import type { IDS, PageQuery, PageResult } from '#/api/common';
|
import type { SpareInoutVO } from '#/api/eims/spare-inout/model';
|
|
import { commonExport } from '#/api/helper';
|
import { requestClient } from '#/api/request';
|
|
enum Api {
|
root = '/eims/spareInout',
|
spareInoutExport = '/eims/spareInout/export',
|
spareInoutList = '/eims/spareInout/list'
|
}
|
|
/**
|
* 查询【备件台账】列表
|
* @param query
|
* @returns {*}
|
*/
|
|
export function listSpareInout(params?: PageQuery) {
|
return requestClient.get<PageResult<SpareInoutVO>>(Api.spareInoutList, { params });
|
}
|
|
/**
|
* 查询【备件台账】详细
|
* @param spareInoutId
|
*/
|
export function getSpareInout(spareInoutId: any) {
|
return requestClient.get<SpareInoutVO>(`${Api.root}/${spareInoutId}`);
|
}
|
|
/**
|
* 新增【备件台账】
|
* @param data
|
*/
|
export function addSpareInout(data: any) {
|
return requestClient.postWithMsg<void>(Api.root, data);
|
}
|
|
/**
|
* 修改【备件台账】
|
* @param data
|
*/
|
export function updateSpareInout(data: any) {
|
return requestClient.putWithMsg<void>(Api.root, data);
|
}
|
|
/**
|
* 删除【备件台账】
|
* @param spareInoutIds
|
*/
|
export function delSpareInout(spareInoutIds: IDS) {
|
return requestClient.deleteWithMsg<void>(`${Api.root}/${spareInoutIds}`);
|
}
|
|
/**
|
* 导出【备件台账】
|
* @param data
|
*/
|
export function spareInoutExport(data: any) {
|
return commonExport(Api.spareInoutExport, data);
|
}
|