| | |
| | | try { |
| | | const res = await proxy.http.get(`/api/StockInfo/Get3DLayout?warehouseId=${warehouseId}`) |
| | | if (res.Status && res.Data) { |
| | | locationData = res.Data |
| | | // 提取物料编号和批次列表 |
| | | const codes = new Set() |
| | | const batches = new Set() |
| | | res.Data.forEach(loc => { |
| | | if (loc.materielCode) codes.add(loc.materielCode) |
| | | if (loc.batchNo) batches.add(loc.batchNo) |
| | | }) |
| | | materielCodeList.value = Array.from(codes) |
| | | batchNoList.value = Array.from(batches) |
| | | const data = res.Data |
| | | locationData = data.Locations || [] |
| | | // 使用后端返回的筛选列表 |
| | | materielCodeList.value = data.MaterielCodeList || [] |
| | | batchNoList.value = data.BatchNoList || [] |
| | | // 渲染货位 |
| | | renderLocations() |
| | | } |