perf: 库位选择器改为按需懒加载——新增 /warehouse/children 接口,WarehouseSelector 移除全量树依赖

This commit is contained in:
yueli
2026-09-04 10:51:49 +08:00
parent 0535cd8bd7
commit 7cdc0bc3a1
6 changed files with 124 additions and 139 deletions

View File

@ -8,6 +8,15 @@ export function getWarehouseTree() {
})
}
// 懒加载获取指定库位的直接子节点parentId 省略/为空 = 顶层)
export function getWarehouseChildren(parentId?: number | null) {
return request({
url: '/v1/warehouse/children',
method: 'get',
params: parentId != null ? { parent_id: parentId } : {}
})
}
// 创建库位
export function createWarehouse(data: any) {
return request({