Browse Source

修改bug

695593266@qq.com 8 months ago
parent
commit
2c907bff39
2 changed files with 43 additions and 3 deletions
  1. 6 2
      pages/pda/feeding/components/workOrderBom.vue
  2. 37 1
      pages/pda/feeding/details.vue

+ 6 - 2
pages/pda/feeding/components/workOrderBom.vue

@@ -133,8 +133,13 @@ export default {
       handler(newVal) {
         // this.deviceList = newVal
         //设备下拉框数据来源
-        console.log(newVal, "11111");
         this.getByCode();
+        // this.$set(this.item, "executorTime", this.currentExecutorTime);
+        // this.$set(
+        //   this.item.workReportInfo,
+        //   "executorTime",
+        //   this.currentExecutorTime
+        // );
       },
     },
   },
@@ -153,7 +158,6 @@ export default {
         this.currentExecutorTime = `${e}00:00:00`;
       }
       this.item.executorTime = this.currentExecutorTime;
-      console.log("executorTime", this.item.executorTime);
     },
     async getByCode() {
       console.log("11111");

+ 37 - 1
pages/pda/feeding/details.vue

@@ -330,7 +330,42 @@ export default {
     },
 
     async save(type) {
-      console.log(this.List);
+      console.log(this.List, "1231");
+
+      if (this.clientEnvironmentId == 3) {
+        for (let it of this.List) {
+          if (
+            it.currentTaskDiagram.isFirstTask == 1 &&
+            it.instanceList.length == 0 &&
+            it.semiProductList.length == 0
+          ) {
+            uni.showToast({
+              title: `请先去领料`,
+              icon: "none",
+            });
+            console.log("1234");
+            return false;
+          }
+        }
+        // this.List.forEach((it) => {
+        //   console.log(
+        //     it.currentTaskDiagram.isFirstTask,
+        //     it.instanceList.length,
+        //     "ititit"
+        //   );
+        //   if (
+        //     it.currentTaskDiagram.isFirstTask == 1 &&
+        //     it.instanceList.length == 0
+        //   ) {
+        //     uni.showToast({
+        //       title: `请先领料`,
+        //       icon: "none",
+        //     });
+        //     console.log("1234");
+        //     return false;
+        //   }
+        // });
+      }
 
       for (let i = 0; i < this.List.length; i++) {
         if (
@@ -341,6 +376,7 @@ export default {
             title: `请先选择投料时间`,
             icon: "none",
           });
+
           return;
         }
       }