longfenglin 1 жил өмнө
parent
commit
fc08874552

+ 18 - 4
src/views/produce/components/feeding/components/semiProductBom.vue

@@ -27,11 +27,11 @@
           {{ row.code }}
         </template>
       </el-table-column>
-      <el-table-column label="批次号" type="code" minWidth="110">
+      <!-- <el-table-column label="批次号" type="code" minWidth="110">
         <template slot-scope="{ row, $index }">
           {{ row.batchNo }}
         </template>
-      </el-table-column>
+      </el-table-column> -->
       <el-table-column label="序列号" type="productSequence" minWidth="110">
         <template slot-scope="{ row, $index }">
           {{ row.extInfo.productSequence }}
@@ -84,9 +84,17 @@
         width="120"
       >
         <template slot-scope="{ row, $index }">
-          <div v-if="currentTaskDiagram.isFirstTask == 1">
+          <!-- <div v-if="currentTaskDiagram.isFirstTask == 1">
             {{ row.extInfo.weight || 0 }} {{ row.extInfo.weightUnit }}</div
-          >
+          > -->
+          <div v-if="currentTaskDiagram.isFirstTask == 1" class="flex-div">
+            <el-input v-model="row.extInfo.weight" size="mini" :disabled="isDetails" style="width: 100%">
+                  <template slot="append">
+                    <div> {{ row.weightUnit }}</div>
+                  </template>
+            </el-input>
+          </div>
+          
           <div v-if="currentTaskDiagram.isFirstTask == 0">
             {{ row.extInfo.newWeight || 0 }}
             {{ row.extInfo.weightUnit }}</div
@@ -308,4 +316,10 @@
   .content_num{
     --input-background-color: #f0f8f2;
   }
+  .flex-div{
+    display: flex;
+  }
+  ::v-deep .el-input-group__append{
+    padding: 0 10px !important;
+  }
 </style>

+ 3 - 8
src/views/produce/components/jobBooking/index.vue

@@ -231,12 +231,6 @@ export default {
     }
   },
 
-  computed: {
-    taskObj() {
-      return this.$store.state.user.taskObj;
-    }
-  },
-
   data() {
     return {
       List: [],
@@ -335,10 +329,11 @@ export default {
                 };
               });
             }
-
-            if ((this.taskObj.type == 6 && obj.singleReport ==1)|| (this.clientEnvironmentId == 3 && obj.singleReport ==0)) {
+console.log('agasgasgs',this.taskObj.type)
+            if ((this.taskObj.type == 6 && obj.singleReport ==1)|| (this.clientEnvironmentId == 3 && obj.singleReport ==0 && this.taskObj.type == 6)) {
               obj.semiProductList = obj.pickOutInList;
               obj.pickOutInList=[]
+              
               console.log('赋值了')
             }
 

+ 44 - 23
src/views/produce/components/warehousing/index.vue

@@ -214,19 +214,31 @@ export default {
         const workOrderMap = new Map(res.map((it) => [it.workOrderId, it]));
 
         // 更新List中的每个项目
-        this.List.forEach((item,index) => {
-          if (workOrderMap.has(item.workOrderId)) {
-            // 直接从映射中获取数据,避免嵌套循环
-            this.$set(item, 'toWarehouseList', [
-              JSON.parse(JSON.stringify(workOrderMap.get(item.workOrderId)))
-            ]);
-          
-          } else {
-            this.$set(item, 'toWarehouseList', []);
-          }
+        // this.List.forEach((item,index) => {
+        //   if (workOrderMap.has(item.workOrderId)) {
+        //     // 直接从映射中获取数据,避免嵌套循环
+        //     this.$set(item, 'toWarehouseList', [
+        //       JSON.parse(JSON.stringify(workOrderMap.get(item.workOrderId)))
+        //     ]);
+             
+        //   } else {
+        //     this.$set(item, 'toWarehouseList', []);
+        //   }
          
           
-        });
+        // });
+
+        this.List.forEach((item,index) => {
+          let arr=[]
+          res.map(titem=>{
+            if(item.workOrderId==titem.workOrderId){
+              arr.push(titem)
+            }
+            this.$set(item, 'toWarehouseList', arr);
+          })
+
+        })
+
       });
 
 
@@ -248,25 +260,34 @@ export default {
 
         console.log(workOrderMap, '99');
         // 更新List中的每个项目
-        this.List.map((item) => {
-          if (workOrderMap.has(item.workOrderId)) {
-            console.log(1);
-            // 直接从映射中获取数据,避免嵌套循环
-            this.$set(item, 'toWarehouseList', [
-              JSON.parse(JSON.stringify(workOrderMap.get(item.workOrderId)))
-            ]);
+        // this.List.map((item) => {
+        //   if (workOrderMap.has(item.workOrderId)) {
+        //     console.log(1);
+        //     // 直接从映射中获取数据,避免嵌套循环
+        //     this.$set(item, 'toWarehouseList', [
+        //       JSON.parse(JSON.stringify(workOrderMap.get(item.workOrderId)))
+        //     ]);
+            
 
-            console.log(item, '5555');
+        //   } else {
 
-          } else {
+        //     this.$set(item, 'toWarehouseList', []);
 
-            this.$set(item, 'toWarehouseList', []);
+        //   }
 
-          }
 
 
+        // });
+        this.List.forEach((item,index) => {
+          let arr=[]
+          res.map(titem=>{
+            if(item.workOrderId==titem.workOrderId){
+              arr.push(titem)
+            }
+            this.$set(item, 'toWarehouseList', arr);
+          })
 
-        });
+        })
 
         console.log(this.List, '6666666666');
       });