|
|
@@ -117,6 +117,7 @@ import { useStore } from '@/store/modules/user'
|
|
|
import { finishTask, getRecommendedLocation, getWaitPutawayList, setBindAllocateWall } from '@/api/haikang'
|
|
|
import { barcodeToUpperCase } from '@/utils/dataType'
|
|
|
import { closeLoading, showLoading } from '@/utils/loading'
|
|
|
+import { getWaitPutawayListNew } from '@/api/putaway'
|
|
|
try {
|
|
|
getHeader()
|
|
|
androidFocus()
|
|
|
@@ -171,14 +172,32 @@ const setBarcode = (code) => {
|
|
|
_handlerScan(code)
|
|
|
return
|
|
|
}
|
|
|
- const params = { warehouse, container: code, page: 1, size: 1000, status: false }
|
|
|
- getWaitPutawayList(params).then(res => {
|
|
|
- if (res.data.records.length == 0) {
|
|
|
+ const params = { warehouseId:warehouse, containerId: code }
|
|
|
+ getWaitPutawayListNew(params).then(res => {
|
|
|
+ if (res.data.asnToShelfList.length==0 && res.data.noAsnToShelfList.length==0 ) {
|
|
|
scanError()
|
|
|
inputBarcodeRef.value?.show('', '请扫描收货容器号', '暂未查询到待上架任务,请切换容器')
|
|
|
} else {
|
|
|
scanSuccess()
|
|
|
- dataMap.value = groupedData(res.data.records)
|
|
|
+ bin.value = ''
|
|
|
+ searchBarcode.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)
|
|
|
scanType.value = 3
|
|
|
containerNo.value = code
|
|
|
}
|
|
|
@@ -292,7 +311,7 @@ const setLocation = (item) => {
|
|
|
container: containerNo.value,
|
|
|
barcode: barcodeActive.value.barcode,
|
|
|
barcodeAS: barcodeActive.value.barcodeAs,
|
|
|
- asnCode:barcodeActive.value.asnNo,
|
|
|
+ asnCode:barcodeActive.value.docNo,
|
|
|
sku: barcodeActive.value.sku,
|
|
|
location: locationActive.value[0].location,
|
|
|
lotNum: barcodeActive.value.lotNumber,
|
|
|
@@ -318,10 +337,7 @@ const loadData = () => {
|
|
|
inputBarcodeRef.value?.show('', '请扫描收货容器号', '')
|
|
|
return
|
|
|
} else {
|
|
|
- const params = { warehouse, container: containerNo.value, page: 1, size: 1000, status: false }
|
|
|
- getWaitPutawayList(params).then(res => {
|
|
|
- dataMap.value = groupedData(res.data.records)
|
|
|
- })
|
|
|
+ setBarcode(containerNo.value)
|
|
|
}
|
|
|
}
|
|
|
//根据条码批次分组数据
|