|
@@ -188,22 +188,7 @@ const setBarcode = (code) => {
|
|
|
bin.value = ''
|
|
bin.value = ''
|
|
|
searchBarcode.value=''
|
|
searchBarcode.value=''
|
|
|
wallNo.value=''
|
|
wallNo.value=''
|
|
|
- const noAsnToShelfList = res.data.noAsnToShelfList.map(item => {
|
|
|
|
|
- return {
|
|
|
|
|
- ...item,
|
|
|
|
|
- lotNumber: item.lotNum,
|
|
|
|
|
- lotAtt01: item.productDate,
|
|
|
|
|
- lotAtt02: item.expireDate,
|
|
|
|
|
- lotAtt04: item.productNum,
|
|
|
|
|
- lotAtt08: item.quality,
|
|
|
|
|
- quantity: item.remainShelfQty,
|
|
|
|
|
- docNo: item.businessNo,
|
|
|
|
|
- taskLineNo: item.id,
|
|
|
|
|
- owner: item.customer,
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- const list = [...res.data.asnToShelfList, ...noAsnToShelfList]
|
|
|
|
|
- dataMap.value = groupedData(list)
|
|
|
|
|
|
|
+ dataMap.value = processPutawayData(res.data)
|
|
|
scanType.value = 3
|
|
scanType.value = 3
|
|
|
containerNo.value = code
|
|
containerNo.value = code
|
|
|
locationActive.value=[]
|
|
locationActive.value=[]
|
|
@@ -477,7 +462,7 @@ const executeReleaseWall = (storedData, hasCache) => {
|
|
|
}
|
|
}
|
|
|
saveBinStorageData(storedData)
|
|
saveBinStorageData(storedData)
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 重置相关状态
|
|
// 重置相关状态
|
|
|
bin.value = ''
|
|
bin.value = ''
|
|
|
searchBarcode.value = ''
|
|
searchBarcode.value = ''
|
|
@@ -507,7 +492,7 @@ const handleReleaseWall = () => {
|
|
|
// 获取存储的数据并检查是否有该分拨墙的绑定数据
|
|
// 获取存储的数据并检查是否有该分拨墙的绑定数据
|
|
|
const storedData = getBinStorageData()
|
|
const storedData = getBinStorageData()
|
|
|
const containerList = []
|
|
const containerList = []
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
for (const container in storedData) {
|
|
for (const container in storedData) {
|
|
|
if (storedData[container][wallNo.value] && Object.keys(storedData[container][wallNo.value]).length > 0) {
|
|
if (storedData[container][wallNo.value] && Object.keys(storedData[container][wallNo.value]).length > 0) {
|
|
|
containerList.push(container)
|
|
containerList.push(container)
|
|
@@ -515,7 +500,7 @@ const handleReleaseWall = () => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const hasCache = containerList.length > 0
|
|
const hasCache = containerList.length > 0
|
|
|
- const message = hasCache
|
|
|
|
|
|
|
+ const message = hasCache
|
|
|
? `确定要释放分拨墙 ${wallNo.value} 吗?\n将会删除以下容器的分拨墙数据:\n${containerList.join(', ')}`
|
|
? `确定要释放分拨墙 ${wallNo.value} 吗?\n将会删除以下容器的分拨墙数据:\n${containerList.join(', ')}`
|
|
|
: `确定要释放分拨墙 ${wallNo.value} 吗?`
|
|
: `确定要释放分拨墙 ${wallNo.value} 吗?`
|
|
|
|
|
|
|
@@ -534,7 +519,18 @@ const loadData = () => {
|
|
|
inputBarcodeRef.value?.show('', '请扫描退货收货容器号', '')
|
|
inputBarcodeRef.value?.show('', '请扫描退货收货容器号', '')
|
|
|
return
|
|
return
|
|
|
} else {
|
|
} else {
|
|
|
- setBarcode(containerNo.value)
|
|
|
|
|
|
|
+ const params = { warehouseId:warehouse, containerId: containerNo.value }
|
|
|
|
|
+ getWaitPutawayListNew(params).then(res => {
|
|
|
|
|
+ if (res.data.asnToShelfList.length==0 && res.data.noAsnToShelfList.length==0 ) {
|
|
|
|
|
+ scanError()
|
|
|
|
|
+ inputBarcodeRef.value?.show('', '请扫描收货容器号', '暂未查询到待上架任务,请切换容器')
|
|
|
|
|
+ } else {
|
|
|
|
|
+ dataMap.value = processPutawayData(res.data)
|
|
|
|
|
+ }
|
|
|
|
|
+ }).catch(err => {
|
|
|
|
|
+ scanError()
|
|
|
|
|
+ inputBarcodeRef.value?.show('', '请扫描退货收货容器号', err.message)
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
//根据条码批次分组数据
|
|
//根据条码批次分组数据
|
|
@@ -550,6 +546,26 @@ const groupedData = (data) => {
|
|
|
}, {})
|
|
}, {})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+// 处理待上架数据并分组
|
|
|
|
|
+const processPutawayData = (responseData) => {
|
|
|
|
|
+ const noAsnToShelfList = responseData.noAsnToShelfList.map(item => {
|
|
|
|
|
+ return {
|
|
|
|
|
+ ...item,
|
|
|
|
|
+ lotNumber: item.lotNum,
|
|
|
|
|
+ lotAtt01: item.productDate,
|
|
|
|
|
+ lotAtt02: item.expireDate,
|
|
|
|
|
+ lotAtt04: item.productNum,
|
|
|
|
|
+ lotAtt08: item.quality,
|
|
|
|
|
+ quantity: item.remainShelfQty,
|
|
|
|
|
+ docNo: item.businessNo,
|
|
|
|
|
+ taskLineNo: item.id,
|
|
|
|
|
+ owner: item.customer,
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ const list = [...responseData.asnToShelfList, ...noAsnToShelfList]
|
|
|
|
|
+ return groupedData(list)
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
onUnmounted(() => {
|
|
onUnmounted(() => {
|
|
|
closeListener()
|
|
closeListener()
|
|
|
})
|
|
})
|