ysy 1 год назад
Родитель
Сommit
618afce076
1 измененных файлов с 107 добавлено и 2 удалено
  1. 107 2
      src/views/productionPlan/components/disassemblePlanPop.vue

+ 107 - 2
src/views/productionPlan/components/disassemblePlanPop.vue

@@ -56,7 +56,7 @@
           :selection.sync="selection"
           :selection.sync="selection"
           @update:selection="handleSelectionChange"
           @update:selection="handleSelectionChange"
           tool-class="ele-toolbar-actions"
           tool-class="ele-toolbar-actions"
-          height="360px"
+         max-height="360px"
 
 
         >
         >
           <template v-slot:toolbar>
           <template v-slot:toolbar>
@@ -74,6 +74,23 @@
             </div>
             </div>
           </template>
           </template>
         </ele-pro-table>
         </ele-pro-table>
+
+
+        <headerTitle title="计划列表" class="mt20"> </headerTitle>
+
+        <ele-pro-table
+          ref="table2"
+          :needPage="false"
+          :columns="jsColumns"
+          :datasource="jhList"
+          tool-class="ele-toolbar-actions"
+          max-height="360px"
+
+        >
+
+        </ele-pro-table>
+
+
       </el-form>
       </el-form>
     </div>
     </div>
     <div slot="footer">
     <div slot="footer">
@@ -82,6 +99,8 @@
     </div>
     </div>
 
 
     <EquipmentDialog ref="equipmentRefs" @choose="choose"></EquipmentDialog>
     <EquipmentDialog ref="equipmentRefs" @choose="choose"></EquipmentDialog>
+
+
   </ele-modal>
   </ele-modal>
 </template>
 </template>
 
 
@@ -107,6 +126,8 @@
 
 
         selection: [],
         selection: [],
 
 
+        jhList: [],
+
         rules: {},
         rules: {},
 
 
         columns: [
         columns: [
@@ -185,11 +206,74 @@
           }
           }
         ],
         ],
 
 
+
         statusOpt: {
         statusOpt: {
           '': '全部',
           '': '全部',
           0: '已停用',
           0: '已停用',
           1: '已发布'
           1: '已发布'
-        }
+        },
+
+        
+        jsColumns: [
+        {
+            prop: 'productCode',
+            label: '产品编码',
+            align: 'center',
+
+            minWidth: 140
+          },
+          {
+            prop: 'productName',
+            label: '产品名称',
+            align: 'center',
+            minWidth: 140
+          },
+
+          {
+            prop: 'brandNo',
+            label: '牌号',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+
+          {
+            prop: 'specification',
+            label: '规格',
+            align: 'center',
+            minWidth: 150,
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'model',
+            label: '型号',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+
+   
+          {
+            prop: 'produceRoutingName',
+            label: '工艺路线',
+            align: 'center',
+            minWidth: 120
+          },
+
+
+          {
+            prop: 'requiredFormingNum',
+            label: '要求生产数量',
+            align: 'center',
+            slot: 'requiredFormingNum'
+          },
+          {
+            prop: 'unit',
+            label: '计量单位',
+            showOverflowTooltip: true
+          },
+
+
+
+        ],
       };
       };
     },
     },
     methods: {
     methods: {
@@ -215,7 +299,28 @@
       },
       },
 
 
       handleSelectionChange() {
       handleSelectionChange() {
+
         console.log(this.selection);
         console.log(this.selection);
+        let  _arr = []
+        _arr = this.selection.map(m => {
+            let _num = this.formData.requiredFormingNum / this.baseCount * m.dosage;
+            _num = _num.toFixed(3);
+          return {
+             productCode: m.code,
+             productName: m.name,
+             brandNo: m.brandNo,
+             specification: m.specification,
+             model: m.model,
+             produceRoutingId: '',
+             produceRoutingName: '',
+             requiredFormingNum: _num,
+             unit: this.unit,
+
+     
+          }
+        })
+        this.jhList = _arr;
+    
       },
       },
 
 
       handleAdd() {
       handleAdd() {