Parcourir la source

出入库输入为0时报错

wangcz il y a 7 ans
Parent
commit
81697e80c5
1 fichiers modifiés avec 7 ajouts et 1 suppressions
  1. 7 1
      components/mobile/center/outOfStorage/otherStorage.vue

+ 7 - 1
components/mobile/center/outOfStorage/otherStorage.vue

@@ -253,12 +253,14 @@
                 flag = 1
               } else if((val.erpReserve < val.qty) && this.switchType === 'OUTBOUND') {
                 flag = 2
+              } else if(val.qty && Number(val.qty) <= 0) {
+                flag = 3
               } else if(val.qty) {
                 val.price ?
                   arr.push({price: Number(val.price), productId: val.productId, qty:Number(val.qty)}) :
                   arr.push({productId: val.productId, qty:Number(val.qty)})
               } else {
-                flag = 3
+                flag = 4
               }
             }
           })
@@ -271,6 +273,10 @@
             return;
           }
           if(flag === 3) {
+            this.onRemind('填写的数量不能小于0!')
+            return;
+          }
+          if(flag === 4) {
             this.onRemind('请填写数量!')
             return;
           }