| | |
| | | <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"> |
| | | <h4>库存明细</h4> |
| | | <el-table :data="selectedLocation.details" border size="small" max-height="400"> |
| | | <el-table-column prop="materielName" label="物料名称" min-width="140" show-overflow-tooltip /> |
| | | <el-table-column prop="serialNumber" label="电芯条码" min-width="160" show-overflow-tooltip /> |
| | | <el-table-column prop="materielName" label="物料名称" min-width="90" show-overflow-tooltip /> |
| | | <el-table-column prop="serialNumber" label="电芯条码" min-width="180" show-overflow-tooltip /> |
| | | <el-table-column prop="inboundOrderRowNo" label="通道号" min-width="100" show-overflow-tooltip /> |
| | | </el-table> |
| | | </div> |
| | |
| | | } |
| | | |
| | | function hasCargo(location) { |
| | | // 如果LocationStatus=100,即使没有库存信息也显示货位 |
| | | if (location.locationStatus === 100) { |
| | | return true |
| | | } |
| | | return Number(location.stockQuantity || 0) > 0 || ((location.details && location.details.length > 0) || false) |
| | | } |
| | | |
| | |
| | | |
| | | 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 |
| | |
| | | } |
| | | |
| | | .detail-content { |
| | | padding: 20px; |
| | | padding: 10px; |
| | | } |
| | | |
| | | .detail-table { |