优化仓库和库区管理功能,将状态字段类型从number改为string,移除编辑表单中的状态选择项,在列表页面将状态标签改为开关组件支持直接切换状态,新增updateWarehouseStatus和updateZoneStatus接口用于批量更新状态,同时在操作列新增日志按钮并集成操作日志对话框组件,在列表中添加修改时间列,优化查询参数将name改为keyword统一搜索字段命名

This commit is contained in:
WUSIJIAN
2026-01-29 11:20:13 +08:00
parent 23cc5b22f8
commit 5864db37d8
9 changed files with 683 additions and 50 deletions

View File

@@ -0,0 +1,77 @@
import { newService } from '/@/utils/request';
// 库位查询参数
export interface LocationQueryParams {
keyword?: string;
warehouseId?: string;
zoneId?: string;
status?: string;
pageNum?: number;
pageSize?: number;
}
// 库位数据接口
export interface LocationData {
id?: string;
locationName: string;
locationCode?: string;
locationType?: string;
warehouseId?: string;
zoneId: string;
maxCapacity?: number;
remark?: string;
}
// 获取库位列表
export function listLocations(params?: LocationQueryParams) {
return newService({
url: '/assets/location/listLocations',
method: 'get',
params,
});
}
// 获取库位详情
export function getLocation(id: string) {
return newService({
url: '/assets/location/getLocation',
method: 'get',
params: { id },
});
}
// 创建库位
export function createLocation(data: LocationData) {
return newService({
url: '/assets/location/createLocation',
method: 'post',
data,
});
}
// 更新库位
export function updateLocation(data: LocationData) {
return newService({
url: '/assets/location/updateLocation',
method: 'put',
data,
});
}
// 删除库位
export function deleteLocation(id: string) {
return newService({
url: '/assets/location/deleteLocation',
method: 'delete',
params: { id },
});
}
// 更新库位状态
export function updateLocationStatus(data: { id: string[]; status: string }) {
return newService({
url: '/assets/location/updateLocationStatus',
method: 'put',
data,
});
}