feat: 封装下钻式库位选择器,并修复层级颜色识别问题

This commit is contained in:
DXC
2026-03-06 15:11:30 +08:00
parent 8aaf45468e
commit f9eb3e9646
5 changed files with 303 additions and 47 deletions

View File

@ -327,21 +327,10 @@
</el-col>
<el-col :span="6">
<el-form-item label="库位" prop="warehouse_location">
<el-tree-select
<WarehouseSelector
v-model="form.warehouse_location"
:data="warehouseOptions"
:props="{ label: 'full_path', value: 'full_path', children: 'children' }"
placeholder="请选择库位"
style="width: 100%"
clearable
filterable
check-strictly
:render-after-expand="false"
>
<template #default="{ data }">
<span>{{ data.name }}</span>
</template>
</el-tree-select>
:options="warehouseOptions"
/>
</el-form-item>
</el-col>
</el-row>
@ -660,6 +649,7 @@ import {
import {getLabelPreview, executePrint} from '@/api/common/print'
import { getWarehouseTree } from '@/api/common/warehouse'
import WebRtcCamera from '@/components/Camera/WebRtcCamera.vue'
import WarehouseSelector from '@/components/WarehouseSelector.vue'
import { useUserStore } from '@/stores/user'
// ------------------------------------