695593266@qq.com 4 miesięcy temu
rodzic
commit
cd4463cc6e

+ 16 - 5
src/views/produce/components/feeding/details.vue

@@ -185,13 +185,24 @@
     },
 
     watch: {
+      // curTaskObj: {
+      //   handler(obj) {
+      //     console.log(obj, '1131313');
+      //     if (obj && obj.taskId != -2) {
+      //       console.log(obj, '777777');
+      //       this.getList(obj.taskId);
+      //     }
+      //   },
+      //   deep: true,
+      //   immediate: true
+      // }
       curTaskObj: {
         handler(obj) {
-          console.log(obj, '1131313');
-          if (obj && obj.taskId != -2) {
-            console.log(obj, '777777');
-            this.getList(obj.taskId);
-          }
+          if (!obj || !obj.taskId) return;
+
+          if (obj.taskId === -2) return;
+
+          this.getList(obj.taskId);
         },
         deep: true,
         immediate: true

+ 2 - 1
src/views/produce/components/workPlan/components/inspectionTemplateDialog.vue

@@ -12,13 +12,14 @@
       ref="table"
       :columns="columns"
       :datasource="datasource"
-      height="calc(100vh - 605px)"
+      height="calc(100vh - 420px)"
       full-height="calc(100vh -120px)"
       tool-class="ele-toolbar-form"
       row-key="qualityLevelId"
       v-if="equipmentdialog"
       :current.sync="current"
       :initLoad="false"
+      :pageSize="20"
       @current-change="handleCurrentChange"
     >
       <template v-slot:current="{ row, _index }">

+ 18 - 14
src/views/produceOrder/components/details/index.vue

@@ -48,21 +48,22 @@
         </el-steps>
 
         <el-tabs type="border-card">
-          <el-tab-pane label="领料详情">
+          <el-tab-pane label="领料详情" name="pick">
             <pickDetails
               :isDetails="true"
-              :workOrderInfo="workOrderInfo"
+              :routeObj="routeObj"
+              :curTaskObj="curTaskObj"
             ></pickDetails>
           </el-tab-pane>
 
-          <el-tab-pane label="投料详情">
+          <el-tab-pane label="投料详情" name="feed">
             <feedDetails
               :routeObj="routeObj"
               :curTaskObj="curTaskObj"
             ></feedDetails
           ></el-tab-pane>
 
-          <el-tab-pane label="报工详情">
+          <el-tab-pane label="报工详情" name="job">
             <jobDetails
               :routeObj="routeObj"
               :curTaskObj="curTaskObj"
@@ -70,7 +71,7 @@
             ></jobDetails>
           </el-tab-pane>
 
-          <el-tab-pane label="生产明细">
+          <el-tab-pane label="生产明细" name="production">
             <productionDetails
               :workOrderInfo="workOrderInfo"
             ></productionDetails>
@@ -81,6 +82,7 @@
 
           <el-tab-pane
             label="记录详情"
+            name="record"
             v-if="
               sourceTaskId &&
               workOrderInfo &&
@@ -93,13 +95,11 @@
               :workOrderInfo="workOrderInfo"
             ></recordRules>
           </el-tab-pane>
-          <el-tab-pane
-            label="放行单"
-          >
-           <checkList
-             :isDetails="true"
-            :workOrderInfo="workOrderInfo"
-           ></checkList>
+          <el-tab-pane label="放行单" name="check">
+            <checkList
+              :isDetails="true"
+              :workOrderInfo="workOrderInfo"
+            ></checkList>
           </el-tab-pane>
         </el-tabs>
       </div>
@@ -116,7 +116,7 @@
   import productionDetails from '@/views//workOrderList/components/productionDetails.vue';
   import pickDetails from '../../details.vue';
   import recordRules from '../recordRules/recordRules.vue';
-  import checkList from '@/views/checklistManagement/checklist.vue'
+  import checkList from '@/views/checklistManagement/checklist.vue';
 
   export default {
     components: {
@@ -186,7 +186,11 @@
           this.sourceTaskId = this.routeList[this.desIndex]?.sourceTaskId || '';
 
           if (this.workOrderInfo.taskId != -2) {
-            this.curTaskObj = JSON.parse(JSON.stringify(this.routeObj));
+            // this.curTaskObj = JSON.parse(JSON.stringify(this.routeObj));
+            this.curTaskObj = {
+              taskId: this.workOrderInfo.taskId,
+              id: this.routeObj.id
+            };
           } else {
             this.curTaskObj = JSON.parse(JSON.stringify(this.routeList[0]));
             // this.desIndex = 0;

+ 44 - 7
src/views/produceOrder/details.vue

@@ -79,9 +79,22 @@
       },
       workTaskId: {},
       taskId: {},
-      workOrderInfo: {
+      // workOrderInfo: {
+      //   type: Object,
+      //   default: {}
+      // },
+      routeObj: {
         type: Object,
-        default: {}
+        default() {
+          return {};
+        }
+      },
+
+      curTaskObj: {
+        type: Object,
+        default() {
+          return () => {};
+        }
       }
     },
     data() {
@@ -97,6 +110,30 @@
       };
     },
 
+    watch: {
+      // 'workOrderInfo.id': {
+      //   immediate: true,
+      //   handler(val) {
+      //     if (val) {
+      //       this.getList([val]);
+      //     }
+      //   }
+      // },
+
+      curTaskObj: {
+        handler(obj) {
+          console.log(obj, '1131313');
+          if (obj && obj.taskId != -2) {
+            console.log(obj, '777777');
+            // this.getList(obj.taskId);
+            this.getList([this.routeObj.id]);
+          }
+        },
+        deep: true,
+        immediate: true
+      }
+    },
+
     computed: {
       // 表格列配置
       columns() {
@@ -176,11 +213,11 @@
       }
     },
 
-    mounted() {
-      const ids = [];
-      ids.push(this.workOrderInfo.id);
-      this.getList(ids);
-    },
+    // mounted() {
+    //   const ids = [];
+    //   ids.push(this.workOrderInfo.id);
+    //   this.getList(ids);
+    // },
 
     methods: {
       getList(workListIds) {