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

78 lines
1.6 KiB
TypeScript
Raw Normal View History

2025-07-04 19:56:28 +08:00
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { MaterialIssueVO, MaterialIssueForm, MaterialIssueQuery } from '@/api/materials/materialIssue/types';
/**
*
* @param query
* @returns {*}
*/
export const listMaterialIssue = (query?: MaterialIssueQuery): AxiosPromise<MaterialIssueVO[]> => {
return request({
url: '/materials/materialIssue/list',
method: 'get',
params: query
});
};
/**
*
* @param id
*/
export const getMaterialIssue = (id: string | number): AxiosPromise<MaterialIssueVO> => {
return request({
url: '/materials/materialIssue/' + id,
method: 'get'
});
};
/**
*
* @param data
*/
export const addMaterialIssue = (data: MaterialIssueForm) => {
return request({
url: '/materials/materialIssue',
method: 'post',
data: data
});
};
/**
*
* @param data
*/
export const updateMaterialIssue = (data: MaterialIssueForm) => {
return request({
url: '/materials/materialIssue',
method: 'put',
data: data
});
};
/**
*
* @param id
*/
export const delMaterialIssue = (id: string | number | Array<string | number>) => {
return request({
url: '/materials/materialIssue/' + id,
method: 'delete'
});
};
2025-08-23 09:13:54 +08:00
//获取一起名称
export const getMaterialName = (id: any) => {
return request({
url: '/materials/materials/inventoryNumber/' + id,
method: 'get'
});
};
2025-08-28 23:32:17 +08:00
//获取出库记录
export const inventoryList = (id: any) => {
return request({
url: '/materials/materialIssue/inventory/list/' + id,
method: 'get'
});
};