| | |
| | | <template> |
| | | <div class="stock-chat-container"> |
| | | <el-tabs v-model="activeWarehouse" @tab-change="onWarehouseChange"> |
| | | <el-tab-pane |
| | | v-for="wh in warehouseList" |
| | | :key="wh.warehouseId || wh.id" |
| | | :label="wh.warehouseName" |
| | | :name="wh.warehouseId || wh.id" |
| | | /> |
| | | <el-tab-pane v-for="wh in warehouseList" :key="wh.warehouseId || wh.id" :label="wh.warehouseName" |
| | | :name="wh.warehouseId || wh.id" /> |
| | | </el-tabs> |
| | | |
| | | <div class="toolbar"> |
| | |
| | | <div v-if="selectedLocation" class="detail-content"> |
| | | <el-descriptions :column="2" border> |
| | | <el-descriptions-item label="货位编号">{{ selectedLocation.locationCode }}</el-descriptions-item> |
| | | <el-descriptions-item label="货位状态">{{ getLocationStatusText(selectedLocation.locationStatus) }}</el-descriptions-item> |
| | | <el-descriptions-item label="货位状态">{{ getLocationStatusText(selectedLocation.locationStatus) |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="托盘编号">{{ selectedLocation.palletCode || '无' }}</el-descriptions-item> |
| | | <el-descriptions-item label="库存状态">{{ getStockStatusText(selectedLocation.stockStatus) }}</el-descriptions-item> |
| | | <el-descriptions-item label="总库存">{{ selectedLocation.stockQuantity }}{{ selectedLocation.unit || '' }}</el-descriptions-item> |
| | | <el-descriptions-item label="出库日期">{{ selectedLocation.outboundDate }}{{ selectedLocation.unit || '' }}</el-descriptions-item> |
| | | <el-descriptions-item label="库存状态">{{ getStockStatusText(selectedLocation.stockStatus) |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="总库存">{{ selectedLocation.stockQuantity }}{{ selectedLocation.unit || '' |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="出库日期">{{ selectedLocation.outboundDate }}{{ selectedLocation.unit || '' |
| | | }}</el-descriptions-item> |
| | | </el-descriptions> |
| | | |
| | | <div v-if="selectedLocation.details && selectedLocation.details.length > 0" class="detail-table"> |
| | |
| | | |
| | | async function loadWarehouseData(warehouseId) { |
| | | try { |
| | | // 清除高亮框 |
| | | if (selectionOutline) { |
| | | selectionOutline.visible = false |
| | | } |
| | | selectedLocation.value = null |
| | | |
| | | // 清空筛选条件 |
| | | filterStockStatus.value = null |
| | | filterMaterielCode.value = null |
| | | filterBatchNo.value = null |
| | | const res = await proxy.http.get(`/api/StockInfo/Get3DLayout?warehouseId=${warehouseId}`) |
| | | if (res.status && res.data) { |
| | | const data = res.data |
| | |
| | | } |
| | | |
| | | async function onWarehouseChange(warehouseId) { |
| | | // 清除选中的高亮框 |
| | | if (selectionOutline) { |
| | | selectionOutline.visible = false |
| | | } |
| | | // 清除选中的货位数据 |
| | | selectedLocation.value = null |
| | | |
| | | // 清空所有筛选条件 |
| | | filterStockStatus.value = null |
| | | filterMaterielCode.value = null |
| | | filterBatchNo.value = null |
| | | |
| | | // 清空筛选选项列表 |
| | | materielCodeList.value = [] |
| | | batchNoList.value = [] |
| | | |
| | | // 加载新仓库数据 |
| | | await loadWarehouseData(warehouseId) |
| | | } |
| | | |
| | | function onWindowResize() { |
| | | if (!canvasContainer.value || !camera || !renderer) { |
| | | return |