ysy 1 жил өмнө
parent
commit
4df4a5e681

+ 29 - 30
src/views/produce/components/feeding/index.vue

@@ -13,7 +13,7 @@
 
           <div class="rx-bc">
             <el-button type="text" size="mini">出库单</el-button>
-            <el-button type="text" size="mini">添加物料</el-button>
+            <el-button type="text" size="mini"  @click="openPicking(item.workOrderId, item)">添加物料</el-button>
             <el-button type="text" size="mini">清空缓存</el-button>
             <el-button type="text" size="mini">缓存</el-button>
           </div>
@@ -27,17 +27,31 @@
         ></paramBom>
       </div>
     </div>
+
+
+    <pickingList
+      isType="feed"
+      ref="pickingListRef"
+      @allSelection="allSelection"
+    ></pickingList>
+
   </div>
 </template>
 
 <script>
   import { workorderList } from '@/api/produce/workOrder';
 
+
+  import pickingList from '../picking/pickingList.vue'
+
   import workOrderBom from './components/workOrderBom.vue';
   import paramBom from './components/paramBom.vue';
   export default {
     name: 'feeding',
     components: {
+      pickingList,
+
+
       workOrderBom,
       paramBom
     },
@@ -81,34 +95,6 @@
           this.List = res.map((m) => {
             m.workOrderId = m.id;
             m.paramDetailList = [
-              {
-                id: '1787807095306399746',
-                parentId: '1747889385528365058',
-                sort: '',
-                code: 'GYCS20240507255',
-                name: '重量',
-                versions: '',
-                status: '',
-                description: '',
-                defaultValue: '20.14',
-                unitName: '摄氏度',
-                minValue: '',
-                maxValue: '',
-                textType: '1',
-                categoryType: 0,
-                notNull: 0,
-                remark: '',
-                workCenterId: null,
-                workCenterName: '',
-                controlName: '',
-                produceList: [],
-                qualityParam: [],
-                beatParam: null,
-                normalHours: null,
-                materialQuota: [],
-                resource: [],
-                replaceMaterial: []
-              }
             ];
 
             m.instanceList = []; // 物料
@@ -163,7 +149,20 @@
         });
 
         this.$forceUpdate();
-      }
+      },
+
+      openPicking(id, item) {
+        this.$refs.pickingListRef.open(id, item);
+      },
+
+      allSelection(id, list) {
+        this.List.forEach((e) => {
+          if (e.workOrderId == id) {
+           console.log(88,list)
+          }
+        });
+      },
+
     }
   };
 </script>

+ 5 - 0
src/views/produce/components/picking/pickingList.vue

@@ -454,6 +454,7 @@
 
       handleClose() {
         this.clearChoose();
+        this.allSelection = [];
         this.visible = false;
       },
       selected() {
@@ -472,6 +473,10 @@
     created() {
       if (this.isType == 'pick') {
         this.treeIds = '1, 5, 7, 8, 10, 13, 14, 23, 26, 9, 28';
+      } else if (this.isType == 'feed') {
+        this.treeIds = '1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 26, 9, 28';
+      } else if(this.isType == 'job') {
+        this.treeIds = '4, 7'
       }
     }
   };