|
|
@@ -363,6 +363,34 @@ const onScan = (type) => {
|
|
|
const barcodeCombineRef=ref(null)
|
|
|
//扫描条码监听
|
|
|
const _handlerScan=(code)=> {
|
|
|
+ // 如果数量弹框正在显示,检查是否需要自动确认
|
|
|
+ if (countTrueFalseBy.value) {
|
|
|
+ const modelLocative = locationList.value[activeIndex.value]
|
|
|
+
|
|
|
+ // 检查是否扫描到当前数据内的库位
|
|
|
+ let scannedLocation = code
|
|
|
+ if (locationContainerMap.value[barcodeToUpperCase(code)]) {
|
|
|
+ scannedLocation = locationContainerMap.value[barcodeToUpperCase(code)]
|
|
|
+ }
|
|
|
+ if (taskMap.value[barcodeToUpperCase(scannedLocation)]) {
|
|
|
+ // 扫描到当前任务中的库位,自动确认
|
|
|
+ onSubmitCount()
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ // 检查是否扫描到当前库位内的商品条码
|
|
|
+ const barcodeList = [...new Set(
|
|
|
+ modelLocative.list
|
|
|
+ .flatMap(item => [item.barcode, item.barcodeAs])
|
|
|
+ .filter(value => value !== null)
|
|
|
+ )]
|
|
|
+ if (barcodeList.some(item => barcodeToUpperCase(item) === barcodeToUpperCase(code))) {
|
|
|
+ // 扫描到当前库位内的条码,自动确认
|
|
|
+ onSubmitCount()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if(scanType.value===1){
|
|
|
if(code.split('-')[0]!=='JH'){
|
|
|
showToast({duration:5000,message:'请使用标准拣货容器'})
|