huang_an 2 ani în urmă
părinte
comite
2a3385b820

+ 18 - 8
src/views/warehouseManagement/outgoingManagement/components/pickOrder.vue

@@ -121,15 +121,25 @@
           return;
         }
         const current = this.current.orderInfoList;
-        for (const key in current) {
-          if (
-            current[key].bomDetailDTOS.length == 0 &&
-            current[key].instanceList.length == 0
-          ) {
-            this.$message.warning('当前领料单数据为空');
-            return;
-          }
+        console.log('current====', current);
+        const findCurrent = current.filter(
+          (item) =>
+            item.bomDetailDTOS.length !== 0 || item.instanceList.length !== 0
+        );
+        console.log('findCurrent===', findCurrent);
+        if (findCurrent.length == 0) {
+          this.$message.warning('当前领料单数据为空');
+          return;
         }
+        // for (const key in current) {
+        //   if (
+        //     current[key].bomDetailDTOS.length == 0 &&
+        //     current[key].instanceList.length == 0
+        //   ) {
+        //     this.$message.warning('当前领料单数据为空');
+        //     return;
+        //   }
+        // }
         this.$emit('success', this.current);
         this.dialogVisible = false;
       },