124 lines
2.6 KiB
TypeScript
124 lines
2.6 KiB
TypeScript
import request from '@/utils/request';
|
|
import { AxiosPromise } from 'axios';
|
|
import { CailiaoshebeiVO, CailiaoshebeiForm, CailiaoshebeiQuery } from '@/api/materials/cailiaoshebei/types';
|
|
|
|
/**
|
|
* 查询物资-材料设备列表
|
|
* @param query
|
|
* @returns {*}
|
|
*/
|
|
|
|
export const listCailiaoshebei = (query?: any): AxiosPromise<CailiaoshebeiVO[]> => {
|
|
return request({
|
|
url: '/cailiaoshebei/materialbatchdemandplan/list',
|
|
method: 'get',
|
|
params: query
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 查询物资-材料设备详细
|
|
* @param id
|
|
*/
|
|
export const getCailiaoshebei = (id: string | number): AxiosPromise<CailiaoshebeiVO> => {
|
|
return request({
|
|
url: '/cailiaoshebei/cailiaoshebei/' + id,
|
|
method: 'get'
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 新增物资-材料设备
|
|
* @param data
|
|
*/
|
|
export const addCailiaoshebei = (data: CailiaoshebeiForm) => {
|
|
return request({
|
|
url: '/cailiaoshebei/materialbatchdemandplan',
|
|
method: 'post',
|
|
data: data
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 修改物资-材料设备
|
|
* @param data
|
|
*/
|
|
export const updateCailiaoshebei = (data: CailiaoshebeiForm) => {
|
|
return request({
|
|
url: '/cailiaoshebei/cailiaoshebei',
|
|
method: 'put',
|
|
data: data
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 删除物资-材料设备
|
|
* @param id
|
|
*/
|
|
export const delCailiaoshebei = (id: string | number | Array<string | number>) => {
|
|
return request({
|
|
url: '/cailiaoshebei/cailiaoshebei/remove/' + id,
|
|
method: 'delete'
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 查询物资-材料设备批次列表
|
|
* @param query
|
|
* @returns {*}
|
|
*/
|
|
export const listBatch = (query?: any): AxiosPromise => {
|
|
return request({
|
|
url: '/cailiaoshebei/materialbatchdemandplan/pcList',
|
|
method: 'get',
|
|
params: query
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 新增物资-材料设备批次
|
|
* @param data
|
|
*/
|
|
export const getBatch = (data: any) => {
|
|
return request({
|
|
url: '/cailiaoshebei/materialbatchdemandplan/pcAdd',
|
|
method: 'post',
|
|
data: data
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 删除物资-材料设备批次
|
|
* @param ids
|
|
*/
|
|
export const delBatch = (ids: string | number | Array<string | number>) => {
|
|
return request({
|
|
url: '/cailiaoshebei/materialbatchdemandplan/' + ids,
|
|
method: 'delete'
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 查询物资-材料设备批次详情
|
|
* @param id
|
|
*/
|
|
export const getPcDetail = (id: string | number): AxiosPromise<CailiaoshebeiVO> => {
|
|
return request({
|
|
url: '/cailiaoshebei/materialbatchdemandplan/spQuery/' + id,
|
|
method: 'get'
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 查询物资-材料设备选择列表
|
|
* @param query
|
|
* @returns {*}
|
|
*/
|
|
export const listSelectCailiaoshebei = (query?: any): AxiosPromise<CailiaoshebeiVO[]> => {
|
|
return request({
|
|
url: '/cailiaoshebei/materialbatchdemandplan/masterDataList',
|
|
method: 'get',
|
|
params: query
|
|
});
|
|
};
|