zhaohuanhuan hai 1 ano
pai
achega
8152682081
Modificáronse 1 ficheiros con 20 adicións e 7 borrados
  1. 20 7
      src/views/outbound/picking/list/index.vue

+ 20 - 7
src/views/outbound/picking/list/index.vue

@@ -385,7 +385,7 @@ const validate = (data) => {
     showToast({duration:5000,message:'请先扫描库位'})
     return false;
   }
-  if(data.quantity!==0 && scanType.value === 3){
+  if(data.quantity!==0){
     showToast({duration:5000,message:'请先扫描条码'})
     return false;
   }
@@ -413,12 +413,12 @@ const onCount=(item,type)=>{
   const data=JSON.parse(JSON.stringify(item))
   data.container=containerNo.value
   data.operationTime=formatDateTime(new Date())
+  const params=[data]
   if(type==0){
     data.quantity=data.count
   }else {
     data.quantity=0
   }
-  const params=[data]
   // 验证数据的有效性
   if (!validate(data)) return;
   if(type!==0){
@@ -449,10 +449,6 @@ const onCount=(item,type)=>{
       }
       selectTask.value.push(task)
       locationList.value[activeIndex.value].list[0].operationTime=params[0].operationTime
-      if(type==1 && activeIndex.value!=locationList.value.length-1){
-        activeIndex.value=activeIndex.value+1
-        onScan(2)
-      }
     }
     //验证库位里的所有商品是否都存在拣货时间
     const allOperationTimeExist = locationList.value[activeIndex.value].list.every(item => item.operationTime);
@@ -461,6 +457,13 @@ const onCount=(item,type)=>{
     }else {
       onScan(3)
     }
+    if(type==1){
+      locationList.value[activeIndex.value].list.forEach(items=>{
+        if(items.line==item.line){
+          items.count=0
+        }
+      })
+    }
     scanSuccess()
     if(selectTask.value.length===taskItem.value.length){
       showConfirmDialog({
@@ -495,7 +498,17 @@ const result=()=>{
 }
 // 跳过拣货
 const jump=(item)=>{
-  onCount(item,1)
+  item.quantity=0
+  if (!validate(item)) return;
+  showConfirmDialog({
+    title:'温馨提示',
+    message:'您正在进行缺货跳过操作,是否继续'
+  }).then(() => {
+    onCount(item,1)
+  }).catch(() => {
+
+  })
+
 }
 
 //切换模式