ysy il y a 1 an
Parent
commit
9cf9563735

+ 15 - 5
src/views/pick/pickApply/components/addPick.vue

@@ -40,6 +40,8 @@
         </el-col>
       </el-row>
     </el-form>
+
+    {{ workList}}
     <div v-for="(item, idx) in workList" :key="idx">
       <el-form
         :ref="`formRef${idx}`"
@@ -221,7 +223,7 @@
 
     <!-- <pickingList @allSelection="allSelection"></pickingList> -->
 
-    <produceOrder v-if="orderShow" :taskId="taskId"></produceOrder>
+    <produceOrder v-if="orderShow" :taskId="taskId"   @workSelect="workSelect"></produceOrder>
   </el-dialog>
 </template>
 
@@ -276,10 +278,10 @@
         });
       },
 
-      getList() {
+      getList(ids) {
         let param = {
-          ids: this.workListIds,
-          taskId: this.taskObj.id
+          ids:ids,
+          taskId: this.taskId
         };
         workorderList(param).then((res) => {
           let arr = res.map((e) => {
@@ -287,9 +289,12 @@
             e.bomDetailDTOS = [];
             return e;
           });
+          console.log(111,this.workList)
           this.workList = arr;
 
           this.$forceUpdate();
+        }).finally(() => {
+            this.orderShow = false;
         });
       },
 
@@ -406,7 +411,12 @@
         }
 
         this.orderShow = true;
-      }
+      },
+
+      workSelect(ids) {
+        this.getList(ids);
+      
+      },
     },
 
     created() {

+ 12 - 4
src/views/pick/pickApply/components/produceOrder.vue

@@ -15,7 +15,7 @@
       width="100%"
       :datasource="datasource"
       :selection.sync="selection"
-      @selection-change="handleSelectionChange"
+     
       cache-key="produceOrderZ"
       highlight-current-row
       @row-click="rowClick"
@@ -40,6 +40,12 @@
         <span> {{ row.formingNum }} {{ row.weightUnit }} </span>
       </template>
     </ele-pro-table>
+
+    <template slot="footer">
+      <el-button size="mini" @click="handleClose">取 消</el-button>
+      <el-button size="mini" type="primary" @click="handleSelect()">确 定</el-button>
+    </template>
+    
   </el-dialog>
 </template>
 
@@ -233,9 +239,9 @@
           this.$refs.table.reload({ page: 1, where });
         });
       },
-      handleSelectionChange(val) {
+      handleSelect() {
         let ids = [];
-        ids = val.map((item) => {
+        ids = this.selection.map((item) => {
           return item.id;
         });
 
@@ -244,7 +250,9 @@
 
       rowClick(e) {},
 
-      handleClose() {}
+      handleClose() {
+        this.$emit('close');
+      }
     }
   };
 </script>

+ 0 - 5
src/views/pick/pickApply/index.vue

@@ -82,11 +82,6 @@
             align: 'center'
           },
 
-          {
-            prop: 'joinWarehouseName',
-            label: '关联仓库名称',
-            align: 'center'
-          },
 
           {
             prop: 'joinReviewerName',