|
|
@@ -9,10 +9,11 @@
|
|
|
<!-- 数据表格 -->
|
|
|
<ele-pro-table
|
|
|
ref="table"
|
|
|
- :columns="columns"
|
|
|
+ :columns="newColumns"
|
|
|
:datasource="datasource"
|
|
|
cache-key="workOrderTable"
|
|
|
@sort-change="onSortChange"
|
|
|
+ height="calc(100vh - 380px)"
|
|
|
>
|
|
|
<template v-slot:code="{ row }">
|
|
|
{{ row.code }}
|
|
|
@@ -56,8 +57,12 @@
|
|
|
:underline="false"
|
|
|
icon="el-icon-truck"
|
|
|
@click="toRelease(row)"
|
|
|
- v-if="(clientEnvironmentId!='4'&&row.status == 8 )|| (clientEnvironmentId=='4'&&!row.productName.includes('板材')&&row.status == 8)"
|
|
|
-
|
|
|
+ v-if="
|
|
|
+ (clientEnvironmentId != '4' && row.status == 8) ||
|
|
|
+ (clientEnvironmentId == '4' &&
|
|
|
+ !row.productName.includes('板材') &&
|
|
|
+ row.status == 8)
|
|
|
+ "
|
|
|
>
|
|
|
下达
|
|
|
</el-link>
|
|
|
@@ -91,6 +96,9 @@
|
|
|
} from '@/api/workOrder/index.js';
|
|
|
import { teamPage } from '@/api/mainData/index.js';
|
|
|
import OrderSearch from './components/order-search.vue';
|
|
|
+
|
|
|
+ import { fieldModel } from '@/api/saleOrder';
|
|
|
+
|
|
|
import { debounce } from 'lodash';
|
|
|
export default {
|
|
|
components: {
|
|
|
@@ -112,13 +120,15 @@
|
|
|
{ label: '待下达', value: 8 }
|
|
|
],
|
|
|
|
|
|
+ newColumns: [],
|
|
|
+
|
|
|
current: null
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
clientEnvironmentId() {
|
|
|
- return this.$store.state.user.info.clientEnvironmentId;
|
|
|
- },
|
|
|
+ return this.$store.state.user.info.clientEnvironmentId;
|
|
|
+ },
|
|
|
// 表格列配置
|
|
|
columns() {
|
|
|
return [
|
|
|
@@ -175,7 +185,6 @@
|
|
|
label: '型号',
|
|
|
align: 'center'
|
|
|
},
|
|
|
-
|
|
|
|
|
|
{
|
|
|
prop: 'priority',
|
|
|
@@ -187,17 +196,16 @@
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- prop: 'produceRoutingName',
|
|
|
- label: '工艺路线',
|
|
|
- align: 'center',
|
|
|
- minWidth: 120,
|
|
|
- sortable: 'custom'
|
|
|
- },
|
|
|
-
|
|
|
+ prop: 'produceRoutingName',
|
|
|
+ label: '工艺路线',
|
|
|
+ align: 'center',
|
|
|
+ minWidth: 120,
|
|
|
+ sortable: 'custom'
|
|
|
+ },
|
|
|
|
|
|
{
|
|
|
prop: 'formingNum',
|
|
|
- label: '要求生产数量'+this.clientEnvironmentId==4?'(方)':'',
|
|
|
+ label: '要求生产数量' + this.clientEnvironmentId == 4 ? '(方)' : '',
|
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
|
minWidth: 110
|
|
|
@@ -255,22 +263,13 @@
|
|
|
label: '客户简称',
|
|
|
align: 'center',
|
|
|
showOverflowTooltip: true
|
|
|
- },
|
|
|
-
|
|
|
- {
|
|
|
- columnKey: 'action',
|
|
|
- label: '操作',
|
|
|
- width: 90,
|
|
|
- align: 'center',
|
|
|
- resizable: false,
|
|
|
- fixed: 'right',
|
|
|
- slot: 'action',
|
|
|
- showOverflowTooltip: true
|
|
|
}
|
|
|
];
|
|
|
}
|
|
|
},
|
|
|
- created() {},
|
|
|
+ created() {
|
|
|
+ this.getFieldModel();
|
|
|
+ },
|
|
|
methods: {
|
|
|
statusFormatter(status) {
|
|
|
const obj = this.statusOpt.find((i) => i.value == status);
|
|
|
@@ -298,6 +297,37 @@
|
|
|
|
|
|
this.teamList = res.list;
|
|
|
},
|
|
|
+
|
|
|
+ getFieldModel() {
|
|
|
+ fieldModel({ fieldModel: 't_main_category' }).then((res) => {
|
|
|
+ const privateColumn = [
|
|
|
+ {
|
|
|
+ columnKey: 'action',
|
|
|
+ label: '操作',
|
|
|
+ width: 90,
|
|
|
+ align: 'center',
|
|
|
+ resizable: false,
|
|
|
+ fixed: 'right',
|
|
|
+ slot: 'action',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ }
|
|
|
+ ];
|
|
|
+
|
|
|
+ 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();
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
// 下达
|
|
|
toRelease(row) {
|
|
|
this.current = row;
|
|
|
@@ -336,11 +366,10 @@
|
|
|
onSortChange(e) {
|
|
|
let sort = {
|
|
|
orderBy: e.order,
|
|
|
- sortName: e.prop,
|
|
|
- }
|
|
|
- this.sort = sort
|
|
|
- this.reload()
|
|
|
-
|
|
|
+ sortName: e.prop
|
|
|
+ };
|
|
|
+ this.sort = sort;
|
|
|
+ this.reload();
|
|
|
},
|
|
|
|
|
|
sortTop(row) {
|