|
@@ -18,7 +18,7 @@
|
|
|
ref="table"
|
|
ref="table"
|
|
|
:key="activeName"
|
|
:key="activeName"
|
|
|
:initLoad="false"
|
|
:initLoad="false"
|
|
|
- :columns="columns"
|
|
|
|
|
|
|
+ :columns="newColumns"
|
|
|
:datasource="datasource"
|
|
:datasource="datasource"
|
|
|
height="calc(100vh - 335px)"
|
|
height="calc(100vh - 335px)"
|
|
|
:cache-key="`${activeName}ProductionPlanTable`"
|
|
:cache-key="`${activeName}ProductionPlanTable`"
|
|
@@ -114,6 +114,12 @@ import productionPlanSearch from './components/productionPlan-search.vue';
|
|
|
import { release } from '@/api/productionPlan/order.js';
|
|
import { release } from '@/api/productionPlan/order.js';
|
|
|
|
|
|
|
|
import { getCode } from '@/api/codeManagement';
|
|
import { getCode } from '@/api/codeManagement';
|
|
|
|
|
+
|
|
|
|
|
+import {
|
|
|
|
|
+
|
|
|
|
|
+ fieldModel
|
|
|
|
|
+ } from '@/api/saleOrder'
|
|
|
|
|
+
|
|
|
import { debounce } from 'lodash';
|
|
import { debounce } from 'lodash';
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
@@ -147,7 +153,9 @@ export default {
|
|
|
{ label: '内销计划', value: '1' },
|
|
{ label: '内销计划', value: '1' },
|
|
|
{ label: '外销计划', value: '2' },
|
|
{ label: '外销计划', value: '2' },
|
|
|
{ label: '预制计划', value: '3' }
|
|
{ label: '预制计划', value: '3' }
|
|
|
- ]
|
|
|
|
|
|
|
+ ],
|
|
|
|
|
+
|
|
|
|
|
+ newColumns: []
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
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: {
|
|
methods: {
|
|
|
statusFormatter(status) {
|
|
statusFormatter(status) {
|
|
|
const obj = this.statusOpt[this.activeName].find(
|
|
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() {
|
|
handleTabChange() {
|
|
|
this.$refs.searchRef.reset();
|
|
this.$refs.searchRef.reset();
|
|
|
},
|
|
},
|