|
|
@@ -156,16 +156,8 @@
|
|
|
<span class="info-value">{{ currentLocation.id }}</span>
|
|
|
</div>
|
|
|
<div class="info-row">
|
|
|
- <span class="info-label">商品名称</span>
|
|
|
- <span class="info-value">{{ currentLocation.productName || '-' }}</span>
|
|
|
- </div>
|
|
|
- <div class="info-row">
|
|
|
- <span class="info-label">商品条码</span>
|
|
|
- <span class="info-value">{{ currentLocation.barcode || '-' }}</span>
|
|
|
- </div>
|
|
|
- <div class="info-row">
|
|
|
- <span class="info-label">库存数量</span>
|
|
|
- <span class="info-value">{{ currentLocation.qty || 0 }}</span>
|
|
|
+ <span class="info-label">SKU</span>
|
|
|
+ <span class="info-value">{{ currentLocation.sku || '-' }}</span>
|
|
|
</div>
|
|
|
<!-- 推荐库位列表 -->
|
|
|
<div class="recommend-section">
|
|
|
@@ -341,11 +333,11 @@ const onBarcodeEnter = async () => {
|
|
|
productInfo.stockQty = inventoryData.quantityAvailable || inventoryData.quantity || ''
|
|
|
productInfo.productName = inventoryData.productName || inventoryData.skuName || ''
|
|
|
productInfo.barcode = inventoryData.barcode || scanBarcode.value
|
|
|
- productInfo.qualityStatus = inventoryData.qualityStatus || ''
|
|
|
- productInfo.warehouseType = inventoryData.warehouseType || ''
|
|
|
- productInfo.batchNo = inventoryData.lotNum || ''
|
|
|
- productInfo.productionDate = inventoryData.productionDate || ''
|
|
|
- productInfo.expiryDate = inventoryData.expiryDate || ''
|
|
|
+ productInfo.qualityStatus = inventoryData.lotAtt08 || inventoryData.qualityStatus || ''
|
|
|
+ productInfo.warehouseType = inventoryData.lotAtt05 || inventoryData.warehouseType || ''
|
|
|
+ productInfo.batchNo = inventoryData.lotNumber || inventoryData.lotNum || ''
|
|
|
+ productInfo.productionDate = inventoryData.lotAtt01 || inventoryData.productionDate || ''
|
|
|
+ productInfo.expiryDate = inventoryData.lotAtt02 || inventoryData.expiryDate || ''
|
|
|
productInfo.moveQty = inventoryData.quantityAvailable || inventoryData.quantity || ''
|
|
|
|
|
|
showToast('商品信息获取成功')
|
|
|
@@ -465,7 +457,7 @@ const buildClickableLocationsMap = (boxDetailsList: BoxRelatedMergeDetailsVO[])
|
|
|
boxDetail.mergeDetails?.forEach((detail: LocationMergeDetails) => {
|
|
|
const sourceLocation = detail.sourceLocation
|
|
|
const targetLocation = detail.targetLocation
|
|
|
- const quantity = detail.quantity || 0
|
|
|
+ const moveQty = detail.moveQty || 0
|
|
|
|
|
|
// 处理源库位(推荐清空库位)
|
|
|
if (sourceLocation) {
|
|
|
@@ -473,9 +465,7 @@ const buildClickableLocationsMap = (boxDetailsList: BoxRelatedMergeDetailsVO[])
|
|
|
map.set(sourceLocation, {
|
|
|
recommendType: 'clear',
|
|
|
relatedLocations: [],
|
|
|
- productName: detail.productName || '',
|
|
|
- barcode: detail.barcode || '',
|
|
|
- qty: quantity
|
|
|
+ sku: detail.sku || ''
|
|
|
})
|
|
|
}
|
|
|
const sourceInfo = map.get(sourceLocation)!
|
|
|
@@ -483,9 +473,9 @@ const buildClickableLocationsMap = (boxDetailsList: BoxRelatedMergeDetailsVO[])
|
|
|
if (targetLocation) {
|
|
|
const existingIdx = sourceInfo.relatedLocations.findIndex(r => r.location === targetLocation)
|
|
|
if (existingIdx === -1) {
|
|
|
- sourceInfo.relatedLocations.push({ location: targetLocation, quantity })
|
|
|
+ sourceInfo.relatedLocations.push({ location: targetLocation, quantity: moveQty })
|
|
|
} else {
|
|
|
- sourceInfo.relatedLocations[existingIdx].quantity += quantity
|
|
|
+ sourceInfo.relatedLocations[existingIdx].quantity += moveQty
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -496,9 +486,7 @@ const buildClickableLocationsMap = (boxDetailsList: BoxRelatedMergeDetailsVO[])
|
|
|
map.set(targetLocation, {
|
|
|
recommendType: 'keep',
|
|
|
relatedLocations: [],
|
|
|
- productName: detail.productName || '',
|
|
|
- barcode: detail.barcode || '',
|
|
|
- qty: 0
|
|
|
+ sku: detail.sku || ''
|
|
|
})
|
|
|
}
|
|
|
const targetInfo = map.get(targetLocation)!
|
|
|
@@ -506,9 +494,9 @@ const buildClickableLocationsMap = (boxDetailsList: BoxRelatedMergeDetailsVO[])
|
|
|
if (sourceLocation) {
|
|
|
const existingIdx = targetInfo.relatedLocations.findIndex(r => r.location === sourceLocation)
|
|
|
if (existingIdx === -1) {
|
|
|
- targetInfo.relatedLocations.push({ location: sourceLocation, quantity })
|
|
|
+ targetInfo.relatedLocations.push({ location: sourceLocation, quantity: moveQty })
|
|
|
} else {
|
|
|
- targetInfo.relatedLocations[existingIdx].quantity += quantity
|
|
|
+ targetInfo.relatedLocations[existingIdx].quantity += moveQty
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -692,9 +680,7 @@ interface LocationRecommendInfo {
|
|
|
interface ClickableLocationInfo {
|
|
|
recommendType: 'clear' | 'keep' // clear=推荐清空库位(源), keep=推荐保留库位(目标)
|
|
|
relatedLocations: LocationRecommendInfo[] // 对应的推荐库位列表
|
|
|
- productName: string
|
|
|
- barcode: string
|
|
|
- qty: number
|
|
|
+ sku: string
|
|
|
}
|
|
|
|
|
|
// 可点击库位集合 Map<库位编码, 库位推荐信息>
|
|
|
@@ -707,9 +693,7 @@ const currentLocation = reactive({
|
|
|
boxId: '',
|
|
|
status: '' as 'empty' | 'filled',
|
|
|
recommendType: '' as 'clear' | 'keep',
|
|
|
- productName: '',
|
|
|
- barcode: '',
|
|
|
- qty: 0,
|
|
|
+ sku: '',
|
|
|
relatedLocations: [] as LocationRecommendInfo[]
|
|
|
})
|
|
|
|
|
|
@@ -735,9 +719,7 @@ const selectStation = (station: StationItem) => {
|
|
|
currentLocation.boxId = locationCode
|
|
|
currentLocation.status = station.status === 'filled' ? 'filled' : 'empty'
|
|
|
currentLocation.recommendType = locationInfo?.recommendType || 'keep'
|
|
|
- currentLocation.productName = locationInfo?.productName || ''
|
|
|
- currentLocation.barcode = locationInfo?.barcode || ''
|
|
|
- currentLocation.qty = locationInfo?.qty || 0
|
|
|
+ currentLocation.sku = locationInfo?.sku || ''
|
|
|
currentLocation.relatedLocations = locationInfo?.relatedLocations || []
|
|
|
showLocationPopup.value = true
|
|
|
}
|
|
|
@@ -759,9 +741,7 @@ const selectSubLocation = (station: StationItem, sub: SubLocation) => {
|
|
|
currentLocation.boxId = station.boxCode || ''
|
|
|
currentLocation.status = sub.status === 'filled' ? 'filled' : 'empty'
|
|
|
currentLocation.recommendType = locationInfo?.recommendType || 'keep'
|
|
|
- currentLocation.productName = locationInfo?.productName || ''
|
|
|
- currentLocation.barcode = locationInfo?.barcode || ''
|
|
|
- currentLocation.qty = locationInfo?.qty || 0
|
|
|
+ currentLocation.sku = locationInfo?.sku || ''
|
|
|
currentLocation.relatedLocations = locationInfo?.relatedLocations || []
|
|
|
showLocationPopup.value = true
|
|
|
}
|