feat(wms): WMS新增物料大类相关接口和页面
- 新增 WMS 物料大类相关接口,包括列表、详情、新增、修改、删除等 - 更新多个页面,使用新的 WMS 物料大类接口(InWMS)替代 MES 物料大类接口 - 优化物料大类下拉框的数据获取逻辑master
parent
ea88772e71
commit
474f4f28e7
@ -0,0 +1,77 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import { AxiosPromise } from 'axios';
|
||||||
|
import { BaseMaterialCategoryVO, BaseMaterialCategoryForm, BaseMaterialCategoryQuery } from '@/api/wms/baseMaterialCategory/types';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询物料大类信息列表
|
||||||
|
* @param query
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
|
||||||
|
export const listBaseMaterialCategoryInWMS = (query?: BaseMaterialCategoryQuery): AxiosPromise<BaseMaterialCategoryVO[]> => {
|
||||||
|
return request({
|
||||||
|
url: '/wms/baseMaterialCategory/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询物料大类信息详细
|
||||||
|
* @param materialCategoryId
|
||||||
|
*/
|
||||||
|
export const getBaseMaterialCategoryInWMS = (materialCategoryId: string | number): AxiosPromise<BaseMaterialCategoryVO> => {
|
||||||
|
return request({
|
||||||
|
url: '/wms/baseMaterialCategory/' + materialCategoryId,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增物料大类信息
|
||||||
|
* @param data
|
||||||
|
*/
|
||||||
|
export const addBaseMaterialCategoryInWMS = (data: BaseMaterialCategoryForm) => {
|
||||||
|
return request({
|
||||||
|
url: '/wms/baseMaterialCategory',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改物料大类信息
|
||||||
|
* @param data
|
||||||
|
*/
|
||||||
|
export const updateBaseMaterialCategoryInWMS = (data: BaseMaterialCategoryForm) => {
|
||||||
|
return request({
|
||||||
|
url: '/wms/baseMaterialCategory',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除物料大类信息
|
||||||
|
* @param materialCategoryId
|
||||||
|
*/
|
||||||
|
export const delBaseMaterialCategoryInWMS = (materialCategoryId: string | number | Array<string | number>) => {
|
||||||
|
return request({
|
||||||
|
url: '/wms/baseMaterialCategory/' + materialCategoryId,
|
||||||
|
method: 'delete'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下拉框查询物料大类信息列表
|
||||||
|
* @param query
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
export function getBaseMaterialCategoryListInWMS (query) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/baseMaterialCategory/getBaseMaterialCategoryList',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
@ -0,0 +1,77 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import { AxiosPromise } from 'axios';
|
||||||
|
import { BaseMaterialInfoVO, BaseMaterialInfoForm, BaseMaterialInfoQuery } from '@/api/wms/baseMaterialInfo/types';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询物料信息列表
|
||||||
|
* @param query
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
|
||||||
|
export const listBaseMaterialInfoInWMS = (query?: BaseMaterialInfoQuery): AxiosPromise<BaseMaterialInfoVO[]> => {
|
||||||
|
return request({
|
||||||
|
url: '/wms/baseMaterialInfo/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询物料信息详细
|
||||||
|
* @param materialId
|
||||||
|
*/
|
||||||
|
export const getBaseMaterialInfoInWMS = (materialId: string | number): AxiosPromise<BaseMaterialInfoVO> => {
|
||||||
|
return request({
|
||||||
|
url: '/wms/baseMaterialInfo/' + materialId,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增物料信息
|
||||||
|
* @param data
|
||||||
|
*/
|
||||||
|
export const addBaseMaterialInfoInWMS = (data: BaseMaterialInfoForm) => {
|
||||||
|
return request({
|
||||||
|
url: '/wms/baseMaterialInfo',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改物料信息
|
||||||
|
* @param data
|
||||||
|
*/
|
||||||
|
export const updateBaseMaterialInfoInWMS = (data: BaseMaterialInfoForm) => {
|
||||||
|
return request({
|
||||||
|
url: '/wms/baseMaterialInfo',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除物料信息
|
||||||
|
* @param materialId
|
||||||
|
*/
|
||||||
|
export const delBaseMaterialInfoInWMS = (materialId: string | number | Array<string | number>) => {
|
||||||
|
return request({
|
||||||
|
url: '/wms/baseMaterialInfo/' + materialId,
|
||||||
|
method: 'delete'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下拉框查询物料信息列表
|
||||||
|
* @param query
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
export function getBaseMaterialInfoListInWMS (query) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/baseMaterialInfo/getBaseMaterialInfoList',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
Loading…
Reference in New Issue