ysy hai 1 ano
pai
achega
b3a3c43cf3
Modificáronse 3 ficheiros con 53 adicións e 16 borrados
  1. BIN=BIN
      aps.rar
  2. BIN=BIN
      dist.zip
  3. 53 16
      src/views/productionPlan/index.vue

BIN=BIN
aps.rar


BIN=BIN
dist.zip


+ 53 - 16
src/views/productionPlan/index.vue

@@ -18,7 +18,7 @@
         ref="table"
         :key="activeName"
         :initLoad="false"
-        :columns="columns"
+        :columns="newColumns"
         :datasource="datasource"
         height="calc(100vh - 335px)"
         :cache-key="`${activeName}ProductionPlanTable`"
@@ -114,6 +114,12 @@ import productionPlanSearch from './components/productionPlan-search.vue';
 import { release } from '@/api/productionPlan/order.js';
 
 import { getCode } from '@/api/codeManagement';
+
+import {
+
+    fieldModel
+  } from '@/api/saleOrder'
+
 import { debounce } from 'lodash';
 export default {
   components: {
@@ -147,7 +153,9 @@ export default {
         { label: '内销计划', value: '1' },
         { label: '外销计划', value: '2' },
         { label: '预制计划', value: '3' }
-      ]
+      ],
+
+      newColumns: []
     };
   },
   computed: {
@@ -376,23 +384,13 @@ export default {
         //       }
         //     ]
         //   : []),
-        ...(this.activeName === 'first'
-          ? [
-              {
-                columnKey: 'action',
-                label: '操作',
-                width: 250,
-                align: 'center',
-                resizable: false,
-                fixed: 'right',
-                slot: 'action',
-                showOverflowTooltip: true
-              }
-            ]
-          : [])
+  
       ];
     }
   },
+  created() {
+    this.getFieldModel();
+  },
   methods: {
     statusFormatter(status) {
       const obj = this.statusOpt[this.activeName].find(
@@ -459,6 +457,45 @@ export default {
         }
       });
     },
+
+
+    
+    getFieldModel() {
+        fieldModel({ fieldModel: 't_main_category' }).then((res) => {
+        
+
+      
+          const privateColumn = [];
+          if (this.activeName == 'first') {
+            privateColumn.push(   {
+                columnKey: 'action',
+                label: '操作',
+                width: 250,
+                align: 'center',
+                resizable: false,
+                fixed: 'right',
+                slot: 'action',
+                showOverflowTooltip: true
+              });
+          } else {
+            privateColumn = [];
+          }
+
+          let newRes = res.map(m => {
+            return {
+              prop: 'extField.' + m.prop,
+              label: m.label,
+              align: 'center',
+              showOverflowTooltip: true
+            }
+          })
+
+          this.newColumns = [...this.columns, ...newRes, ...privateColumn];
+   
+          this.$forceUpdate();
+        });
+      },
+
     handleTabChange() {
       this.$refs.searchRef.reset();
     },