合并
This commit is contained in:
70
src/api/materials/materialsUseRecord/index.ts
Normal file
70
src/api/materials/materialsUseRecord/index.ts
Normal file
@ -0,0 +1,70 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { MaterialsUseRecordVO, MaterialsUseRecordForm, MaterialsUseRecordQuery } from '@/api/materials/materialsUseRecord/types';
|
||||
|
||||
/**
|
||||
* 查询材料使用登记列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listMaterialsUseInventory = (query?: MaterialsUseRecordQuery): AxiosPromise<MaterialsUseRecordVO[]> => {
|
||||
return request({
|
||||
url: '/materials/materialsInventory/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
export const listMaterialsUseRecord = (query?: MaterialsUseRecordQuery): AxiosPromise<MaterialsUseRecordVO[]> => {
|
||||
return request({
|
||||
url: '/materials/materialsUseRecord/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询材料使用登记详细
|
||||
* @param id
|
||||
*/
|
||||
export const getMaterialsUseRecord = (id: string | number): AxiosPromise<MaterialsUseRecordVO> => {
|
||||
return request({
|
||||
url: '/materials/materialsUseRecord/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增材料使用登记
|
||||
* @param data
|
||||
*/
|
||||
export const addMaterialsUseRecord = (data: MaterialsUseRecordForm) => {
|
||||
return request({
|
||||
url: '/materials/materialsUseRecord',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改材料使用登记
|
||||
* @param data
|
||||
*/
|
||||
export const updateMaterialsUseRecord = (data: MaterialsUseRecordForm) => {
|
||||
return request({
|
||||
url: '/materials/materialsUseRecord',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除材料使用登记
|
||||
* @param id
|
||||
*/
|
||||
export const delMaterialsUseRecord = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/materials/materialsUseRecord/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
111
src/api/materials/materialsUseRecord/types.ts
Normal file
111
src/api/materials/materialsUseRecord/types.ts
Normal file
@ -0,0 +1,111 @@
|
||||
export interface MaterialsUseRecordVO {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
projectId: string | number;
|
||||
|
||||
/**
|
||||
* 库存ID
|
||||
*/
|
||||
inventoryId: string | number;
|
||||
|
||||
/**
|
||||
* 使用部位
|
||||
*/
|
||||
usePart: string;
|
||||
|
||||
/**
|
||||
* 使用数量
|
||||
*/
|
||||
useNumber: number;
|
||||
|
||||
/**
|
||||
* 剩余量
|
||||
*/
|
||||
residueNumber: string | number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
}
|
||||
|
||||
export interface MaterialsUseRecordForm extends BaseEntity {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 库存ID
|
||||
*/
|
||||
inventoryId?: string | number;
|
||||
|
||||
/**
|
||||
* 使用部位
|
||||
*/
|
||||
usePart?: string;
|
||||
|
||||
/**
|
||||
* 使用数量
|
||||
*/
|
||||
useNumber?: number;
|
||||
|
||||
/**
|
||||
* 剩余量
|
||||
*/
|
||||
residueNumber?: string | number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface MaterialsUseRecordQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 库存ID
|
||||
*/
|
||||
inventoryId?: string | number;
|
||||
|
||||
/**
|
||||
* 使用部位
|
||||
*/
|
||||
usePart?: string;
|
||||
|
||||
/**
|
||||
* 使用数量
|
||||
*/
|
||||
useNumber?: number;
|
||||
|
||||
/**
|
||||
* 剩余量
|
||||
*/
|
||||
residueNumber?: string | number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user