import request from '../../utils/request';
|
import type { ApiResponse, PageRequest, PageResponse } from '../../types/api';
|
import type {
|
WarehouseInfo,
|
LocationInfo,
|
MaterielInfo,
|
} from '../../types/common';
|
|
/**
|
* 获取仓库列表
|
*/
|
export function getWarehouseList(data: PageRequest) {
|
return request<ApiResponse<PageResponse<WarehouseInfo>>>({
|
url: '/Warehouse/GetPageData',
|
method: 'post',
|
data,
|
});
|
}
|
|
/**
|
* 添加仓库
|
*/
|
export function addWarehouse(data: Partial<WarehouseInfo>) {
|
return request<ApiResponse<boolean>>({
|
url: '/Warehouse/Add',
|
method: 'post',
|
data,
|
});
|
}
|
|
/**
|
* 更新仓库
|
*/
|
export function updateWarehouse(data: Partial<WarehouseInfo>) {
|
return request<ApiResponse<boolean>>({
|
url: '/Warehouse/Update',
|
method: 'post',
|
data,
|
});
|
}
|
|
/**
|
* 删除仓库
|
*/
|
export function deleteWarehouse(ids: string[]) {
|
return request<ApiResponse<boolean>>({
|
url: '/Warehouse/Del',
|
method: 'post',
|
data: ids,
|
});
|
}
|
|
/**
|
* 获取货位列表
|
*/
|
export function getLocationList(data: PageRequest) {
|
return request<ApiResponse<PageResponse<LocationInfo>>>({
|
url: '/LocationInfo/GetPageData',
|
method: 'post',
|
data,
|
});
|
}
|
|
/**
|
* 添加货位
|
*/
|
export function addLocation(data: Partial<LocationInfo>) {
|
return request<ApiResponse<boolean>>({
|
url: '/LocationInfo/Add',
|
method: 'post',
|
data,
|
});
|
}
|
|
/**
|
* 更新货位
|
*/
|
export function updateLocation(data: Partial<LocationInfo>) {
|
return request<ApiResponse<boolean>>({
|
url: '/LocationInfo/Update',
|
method: 'post',
|
data,
|
});
|
}
|
|
/**
|
* 删除货位
|
*/
|
export function deleteLocation(ids: string[]) {
|
return request<ApiResponse<boolean>>({
|
url: '/LocationInfo/Del',
|
method: 'post',
|
data: ids,
|
});
|
}
|
|
/**
|
* 获取物料列表
|
*/
|
export function getMaterielList(data: PageRequest) {
|
return request<ApiResponse<PageResponse<MaterielInfo>>>({
|
url: '/MaterielInfo/GetPageData',
|
method: 'post',
|
data,
|
});
|
}
|
|
/**
|
* 添加物料
|
*/
|
export function addMateriel(data: Partial<MaterielInfo>) {
|
return request<ApiResponse<boolean>>({
|
url: '/MaterielInfo/Add',
|
method: 'post',
|
data,
|
});
|
}
|
|
/**
|
* 更新物料
|
*/
|
export function updateMateriel(data: Partial<MaterielInfo>) {
|
return request<ApiResponse<boolean>>({
|
url: '/MaterielInfo/Update',
|
method: 'post',
|
data,
|
});
|
}
|
|
/**
|
* 删除物料
|
*/
|
export function deleteMateriel(ids: string[]) {
|
return request<ApiResponse<boolean>>({
|
url: '/MaterielInfo/Del',
|
method: 'post',
|
data: ids,
|
});
|
}
|