完成仓库模块
This commit is contained in:
63
src/api/system/TPurchaseIn/index.ts
Normal file
63
src/api/system/TPurchaseIn/index.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { StockInVO, StockInForm, StockInQuery } from './type';
|
||||
|
||||
/**
|
||||
* 查询入库主列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listStockIn = (query?: StockInQuery): AxiosPromise<StockInVO[]> => {
|
||||
return request({
|
||||
url: '/stockIn/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询入库主详细
|
||||
* @param id
|
||||
*/
|
||||
export const getStockIn = (id: string | number): AxiosPromise<StockInVO> => {
|
||||
return request({
|
||||
url: '/stockIn/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增入库主
|
||||
* @param data
|
||||
*/
|
||||
export const addStockIn = (data: StockInForm) => {
|
||||
return request({
|
||||
url: '/stockIn',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改入库主
|
||||
* @param data
|
||||
*/
|
||||
export const updateStockIn = (data: StockInForm) => {
|
||||
return request({
|
||||
url: '/stockIn',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除入库主
|
||||
* @param id
|
||||
*/
|
||||
export const delStockIn = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/stockIn/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user