75 lines
1.7 KiB
TypeScript
75 lines
1.7 KiB
TypeScript
import requestGo from '@/utils/request-go';
|
|
import request from '@/utils/request';
|
|
import { AxiosPromise } from 'axios';
|
|
import { MaterialsInventoryForm, MaterialsInventoryQuery, MaterialsInventoryVO } from '@/api/materials/materialsInventory/types';
|
|
|
|
/**
|
|
* 查询材料出/入库列表
|
|
* @param query
|
|
* @returns {*}
|
|
*/
|
|
|
|
export const listMaterialsInventory = (query?: MaterialsInventoryQuery): AxiosPromise<MaterialsInventoryVO[]> => {
|
|
return requestGo({
|
|
url: '/zm/api/v1/system/busEquipmentMaterialsInventory/excellist',
|
|
method: 'get',
|
|
params: query
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 查询材料出/入库详细
|
|
* @param id
|
|
*/
|
|
export const getMaterialsInventory = (id: string | number): AxiosPromise<MaterialsInventoryVO> => {
|
|
return request({
|
|
url: '/materials/materialsInventory/' + id,
|
|
method: 'get'
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 新增材料出/入库
|
|
* @param data
|
|
*/
|
|
export const addMaterialsInventory = (data: MaterialsInventoryForm): AxiosPromise<string | number> => {
|
|
return request({
|
|
url: '/materials/materialsInventory',
|
|
method: 'post',
|
|
data: data
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 修改材料出/入库
|
|
* @param data
|
|
*/
|
|
export const updateMaterialsInventory = (data: MaterialsInventoryForm) => {
|
|
return request({
|
|
url: '/materials/materialsInventory',
|
|
method: 'put',
|
|
data: data
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 删除材料出/入库
|
|
* @param id
|
|
*/
|
|
export const delMaterialsInventory = (id: string | number | Array<string | number>) => {
|
|
return request({
|
|
url: '/materials/materialsInventory/' + id,
|
|
method: 'delete'
|
|
});
|
|
};
|
|
|
|
//获取新的列表数据
|
|
export const getLedgerList = (query?: any) => {
|
|
return request({
|
|
url: '/materials/materials/listUseDetail',
|
|
method: 'get',
|
|
params: query
|
|
});
|
|
};
|
|
//导出
|