Просмотр исходного кода

手持-拣货操作页面-同一个库位同品不同批次只能识别到第一条bug修复

zhaohuanhuan 1 год назад
Родитель
Сommit
c3a886c859
1 измененных файлов с 11 добавлено и 11 удалено
  1. 11 11
      src/views/outbound/picking/list/index.vue

+ 11 - 11
src/views/outbound/picking/list/index.vue

@@ -339,7 +339,6 @@ const _handlerScan=(code)=> {
   scanBarcode.value=code
   const modelLocative=locationList.value[activeIndex.value]
   if(scanType.value===2){
-
     if(containerNo.value == '') {
       showToast({duration:5000,message:'请先扫描容器号'})
       return
@@ -364,11 +363,17 @@ const _handlerScan=(code)=> {
     )]
     if (barcode.some(item => barcodeToUpperCase(item) ===  barcodeToUpperCase(code))) {
         //将匹配到的条码放到第一个
+        let count=0
         modelLocative.list=modelLocative.list.reduce((list, item) => {
-          if (barcodeToUpperCase(item.barcode) === barcodeToUpperCase(code)) {
-            list.unshift(item);
+          if (barcodeToUpperCase(item.barcode) === barcodeToUpperCase(code) && item.operationTime===null) {
+            count++
+            if (count==1) {
+              list.unshift(item)
+            }else {
+              list.push(item)
+            }
           } else {
-            list.push(item);
+            list.push(item)
           }
           return list;
         }, [])
@@ -547,11 +552,6 @@ const _setPickingDetail=(params,type)=>{
       if(activeIndex.value<locationList.value.length-1){
         nextLocation.value=locationList.value[activeIndex.value+1].location
         activeIndex.value+=1
-        // showNotify({
-        //   message: `当前库位商品已全部拣完,请扫描下一个库位${locationList.value[activeIndex.value+1].location}`,
-        //   duration: 5000,
-        //   type:'warning'
-        // });
       }
       if(type==2){
         const numberExist = list.every(({ expectedQuantity, quantity }) => expectedQuantity == quantity && quantity!=0); // 检查数量是否匹配
@@ -789,8 +789,8 @@ const onRefresh = () => {
         background: #72dc41
         color: #fff
       .nextActive
-        background: #ff8d29
-        color: #fff
+        //background: #ff8d29
+        //color: #fff
 
     .right
       height: 80vh