Files
td_official/src/api/materials/materialsInventory/index.ts

74 lines
1.7 KiB
TypeScript
Raw Normal View History

2025-08-02 16:45:51 +08:00
import request from '@/utils/request-go';
2025-05-21 11:24:53 +08:00
import { AxiosPromise } from 'axios';
import { MaterialsInventoryForm, MaterialsInventoryQuery, MaterialsInventoryVO } from '@/api/materials/materialsInventory/types';
/**
* /
* @param query
* @returns {*}
*/
export const listMaterialsInventory = (query?: MaterialsInventoryQuery): AxiosPromise<MaterialsInventoryVO[]> => {
return request({
2025-08-02 16:45:51 +08:00
url: '/zm/api/v1/system/busEquipmentMaterialsInventory/excellist',
2025-05-21 11:24:53 +08:00
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'
});
};
2025-09-06 17:38:25 +08:00
//获取新的列表数据
export const getLedgerList = (query?: any) => {
return request({
url: '/materials/materials/listUseDetail',
method: 'get',
params: query
});
};
//导出