quwangxin 2 lat temu
rodzic
commit
45b470ff09

+ 25 - 24
src/views/produceOrder/components/report/Common.vue

@@ -334,31 +334,32 @@
             );
           }
         }
+      },
+      infoData: {
+        immediate: true,
+        handler() {
+          if (
+            this.infoData.id &&
+            this.currentInfo.code == this.firstInfo.code &&
+            this.infoData.deviceCode
+          ) {
+            // 设备
+            this.workReportDeviceList = Object.assign(
+              {},
+              this.workReportDeviceList,
+              {
+                code: this.infoData.deviceCode,
+                name: this.infoData.deviceName,
+                rootCategoryLevelId: this.infoData.rootCategoryLevelId,
+                path: this.infoData.path[0]?.pathName,
+                model: this.infoData.model,
+                sourceInstanceId: this.infoData.sourceInstanceId,
+                specification: this.infoData.specification
+              }
+            );
+          }
+        }
       }
-      // infoData: {
-      //   immediate: true,
-      //   handler() {
-      //     if (
-      //       this.infoData.id &&
-      //       this.currentInfo.code == this.firstInfo.code
-      //     ) {
-      //       // 设备
-      //       this.workReportDeviceList = Object.assign(
-      //         {},
-      //         this.workReportDeviceList,
-      //         {
-      //           code: this.infoData.deviceCode,
-      //           name: this.infoData.deviceName,
-      //           rootCategoryLevelId: this.infoData.rootCategoryLevelId,
-      //           path: this.infoData.path[0]?.pathName,
-      //           model: this.infoData.model,
-      //           sourceInstanceId: this.infoData.sourceInstanceId,
-      //           specification: this.infoData.specification
-      //         }
-      //       );
-      //     }
-      //   }
-      // }
     },
     methods: {
       multiply,

+ 25 - 24
src/views/produceOrder/components/report/Extrusion.vue

@@ -416,31 +416,32 @@
             );
           }
         }
+      },
+      infoData: {
+        immediate: true,
+        handler() {
+          if (
+            this.infoData.id &&
+            this.currentInfo.code == this.firstInfo.code &&
+            this.infoData.deviceCode
+          ) {
+            // 设备
+            this.workReportDeviceList = Object.assign(
+              {},
+              this.workReportDeviceList,
+              {
+                code: this.infoData.deviceCode,
+                name: this.infoData.deviceName,
+                rootCategoryLevelId: this.infoData.rootCategoryLevelId,
+                path: this.infoData.path[0]?.pathName,
+                model: this.infoData.model,
+                sourceInstanceId: this.infoData.sourceInstanceId,
+                specification: this.infoData.specification
+              }
+            );
+          }
+        }
       }
-      // infoData: {
-      //   immediate: true,
-      //   handler() {
-      //     if (
-      //       this.infoData.id &&
-      //       this.currentInfo.code == this.firstInfo.code
-      //     ) {
-      //       // 设备
-      //       this.workReportDeviceList = Object.assign(
-      //         {},
-      //         this.workReportDeviceList,
-      //         {
-      //           code: this.infoData.deviceCode,
-      //           name: this.infoData.deviceName,
-      //           rootCategoryLevelId: this.infoData.rootCategoryLevelId,
-      //           path: this.infoData.path[0]?.pathName,
-      //           model: this.infoData.model,
-      //           sourceInstanceId: this.infoData.sourceInstanceId,
-      //           specification: this.infoData.specification
-      //         }
-      //       );
-      //     }
-      //   }
-      // }
     },
     created() {
       this.workReport.executorId = this.$store.state.user.info?.userId;

+ 25 - 21
src/views/produceOrder/components/report/Furnace.vue

@@ -177,28 +177,32 @@
             );
           }
         }
+      },
+      infoData: {
+        immediate: true,
+        handler() {
+          if (
+            this.infoData.id &&
+            this.currentInfo.code == this.firstInfo.code &&
+            this.infoData.deviceCode
+          ) {
+            // 设备
+            this.workReportDeviceList = Object.assign(
+              {},
+              this.workReportDeviceList,
+              {
+                code: this.infoData.deviceCode,
+                name: this.infoData.deviceName,
+                rootCategoryLevelId: this.infoData.rootCategoryLevelId,
+                path: this.infoData.path[0]?.pathName,
+                model: this.infoData.model,
+                sourceInstanceId: this.infoData.sourceInstanceId,
+                specification: this.infoData.specification
+              }
+            );
+          }
+        }
       }
-      // infoData: {
-      //   immediate: true,
-      //   handler () {
-      //     if (this.infoData.id&& this.currentInfo.code == this.firstInfo.code) {
-      //       // 设备
-      //       this.workReportDeviceList = Object.assign(
-      //         {},
-      //         this.workReportDeviceList,
-      //         {
-      //           code: this.infoData.deviceCode,
-      //           name: this.infoData.deviceName,
-      //           rootCategoryLevelId: this.infoData.rootCategoryLevelId,
-      //           path: this.infoData.path[0]?.pathName,
-      //           model: this.infoData.model,
-      //           sourceInstanceId: this.infoData.sourceInstanceId,
-      //           specification: this.infoData.specification
-      //         }
-      //       );
-      //     }
-      //   }
-      // }
     },
     created() {
       this.workReport.executorId = this.$store.state.user.info?.userId;

+ 25 - 24
src/views/produceOrder/components/report/HalfAdded.vue

@@ -345,30 +345,31 @@
           }
         }
       },
-      // infoData: {
-      //   immediate: true,
-      //   handler() {
-      //     if (
-      //       this.infoData.id &&
-      //       this.currentInfo.code == this.firstInfo.code
-      //     ) {
-      //       // 设备
-      //       this.workReportDeviceList = Object.assign(
-      //         {},
-      //         this.workReportDeviceList,
-      //         {
-      //           code: this.infoData.deviceCode,
-      //           name: this.infoData.deviceName,
-      //           rootCategoryLevelId: this.infoData.rootCategoryLevelId,
-      //           path: this.infoData.path[0]?.pathName,
-      //           model: this.infoData.model,
-      //           sourceInstanceId: this.infoData.sourceInstanceId,
-      //           specification: this.infoData.specification
-      //         }
-      //       );
-      //     }
-      //   }
-      // },
+      infoData: {
+        immediate: true,
+        handler() {
+          if (
+            this.infoData.id &&
+            this.currentInfo.code == this.firstInfo.code &&
+            this.infoData.deviceCode
+          ) {
+            // 设备
+            this.workReportDeviceList = Object.assign(
+              {},
+              this.workReportDeviceList,
+              {
+                code: this.infoData.deviceCode,
+                name: this.infoData.deviceName,
+                rootCategoryLevelId: this.infoData.rootCategoryLevelId,
+                path: this.infoData.path[0]?.pathName,
+                model: this.infoData.model,
+                sourceInstanceId: this.infoData.sourceInstanceId,
+                specification: this.infoData.specification
+              }
+            );
+          }
+        }
+      },
       formData: {
         immediate: true,
         handler() {

+ 25 - 24
src/views/produceOrder/components/report/Heating.vue

@@ -354,30 +354,31 @@
           }
         }
       },
-      // infoData: {
-      //   immediate: true,
-      //   handler() {
-      //     if (
-      //       this.infoData.id &&
-      //       this.currentInfo.code == this.firstInfo.code
-      //     ) {
-      //       // 设备
-      //       this.workReportDeviceList = Object.assign(
-      //         {},
-      //         this.workReportDeviceList,
-      //         {
-      //           code: this.infoData.deviceCode,
-      //           name: this.infoData.deviceName,
-      //           rootCategoryLevelId: this.infoData.rootCategoryLevelId,
-      //           path: this.infoData.path[0]?.pathName,
-      //           model: this.infoData.model,
-      //           sourceInstanceId: this.infoData.sourceInstanceId,
-      //           specification: this.infoData.specification
-      //         }
-      //       );
-      //     }
-      //   }
-      // },
+      infoData: {
+        immediate: true,
+        handler() {
+          if (
+            this.infoData.id &&
+            this.currentInfo.code == this.firstInfo.code &&
+            this.infoData.deviceCode
+          ) {
+            // 设备
+            this.workReportDeviceList = Object.assign(
+              {},
+              this.workReportDeviceList,
+              {
+                code: this.infoData.deviceCode,
+                name: this.infoData.deviceName,
+                rootCategoryLevelId: this.infoData.rootCategoryLevelId,
+                path: this.infoData.path[0]?.pathName,
+                model: this.infoData.model,
+                sourceInstanceId: this.infoData.sourceInstanceId,
+                specification: this.infoData.specification
+              }
+            );
+          }
+        }
+      },
       formData: {
         immediate: true,
         handler() {