You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
1.4 KiB
TypeScript
64 lines
1.4 KiB
TypeScript
import request from '@/utils/request';
|
|
import { AxiosPromise } from 'axios';
|
|
import { ConfigurationVO, ConfigurationForm, ConfigurationQuery } from '@/api/wms/configuration/types';
|
|
|
|
/**
|
|
* 查询仓库模块配置列表
|
|
* @param query
|
|
* @returns {*}
|
|
*/
|
|
|
|
export const listConfiguration = (query?: ConfigurationQuery): AxiosPromise<ConfigurationVO[]> => {
|
|
return request({
|
|
url: '/wms/configuration/list',
|
|
method: 'get',
|
|
params: query
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 查询仓库模块配置详细
|
|
* @param configurationId
|
|
*/
|
|
export const getConfiguration = (configurationId: string | number): AxiosPromise<ConfigurationVO> => {
|
|
return request({
|
|
url: '/wms/configuration/' + configurationId,
|
|
method: 'get'
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 新增仓库模块配置
|
|
* @param data
|
|
*/
|
|
export const addConfiguration = (data: ConfigurationForm) => {
|
|
return request({
|
|
url: '/wms/configuration',
|
|
method: 'post',
|
|
data: data
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 修改仓库模块配置
|
|
* @param data
|
|
*/
|
|
export const updateConfiguration = (data: ConfigurationForm) => {
|
|
return request({
|
|
url: '/wms/configuration',
|
|
method: 'put',
|
|
data: data
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 删除仓库模块配置
|
|
* @param configurationId
|
|
*/
|
|
export const delConfiguration = (configurationId: string | number | Array<string | number>) => {
|
|
return request({
|
|
url: '/wms/configuration/' + configurationId,
|
|
method: 'delete'
|
|
});
|
|
};
|