|
|
@@ -12,6 +12,7 @@
|
|
|
<el-tabs v-model="activeName" type="card">
|
|
|
<el-tab-pane label="未发布" name="first"></el-tab-pane>
|
|
|
<el-tab-pane label="已发布" name="second"></el-tab-pane>
|
|
|
+ <el-tab-pane label="已变更" name="change"></el-tab-pane>
|
|
|
</el-tabs>
|
|
|
<!-- 数据表格 -->
|
|
|
<ele-pro-table
|
|
|
@@ -109,140 +110,142 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import { getList, del, updatePriority } from '@/api/productionPlan/index.js';
|
|
|
- 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: {
|
|
|
- productionPlanSearch
|
|
|
- },
|
|
|
- data() {
|
|
|
- return {
|
|
|
- activeName: 'first',
|
|
|
-
|
|
|
- // 加载状态
|
|
|
- loading: false,
|
|
|
- pageType: 'add',
|
|
|
- dialogTitle: '',
|
|
|
- isBindPlan: false,
|
|
|
- statusOpt: {
|
|
|
- first: [
|
|
|
- { label: '所有状态', value: '3,2' },
|
|
|
- { label: '待发布', value: '2' },
|
|
|
- { label: '发布失败', value: '3' }
|
|
|
- ],
|
|
|
- second: [
|
|
|
- { label: '所有状态', value: '7,4,5,6' },
|
|
|
- { label: '待生产', value: '4' },
|
|
|
- { label: '生产中', value: '5' },
|
|
|
- { label: '已完成', value: '6' },
|
|
|
- { label: '已延期', value: '7' }
|
|
|
- ]
|
|
|
- },
|
|
|
- planType: [
|
|
|
- { label: '所有计划类型', value: null },
|
|
|
- { label: '内销计划', value: '1' },
|
|
|
- { label: '外销计划', value: '2' },
|
|
|
- { label: '预制计划', value: '3' }
|
|
|
+import { getList, del, updatePriority } from '@/api/productionPlan/index.js';
|
|
|
+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: {
|
|
|
+ productionPlanSearch
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ activeName: 'first',
|
|
|
+
|
|
|
+ // 加载状态
|
|
|
+ loading: false,
|
|
|
+ pageType: 'add',
|
|
|
+ dialogTitle: '',
|
|
|
+ isBindPlan: false,
|
|
|
+ statusOpt: {
|
|
|
+ first: [
|
|
|
+ { label: '所有状态', value: '3,2' },
|
|
|
+ { label: '待发布', value: '2' },
|
|
|
+ { label: '发布失败', value: '3' }
|
|
|
],
|
|
|
-
|
|
|
- newColumns: []
|
|
|
- };
|
|
|
- },
|
|
|
- computed: {
|
|
|
- clientEnvironmentId() {
|
|
|
- return this.$store.state.user.info.clientEnvironmentId;
|
|
|
+ second: [
|
|
|
+ { label: '所有状态', value: '7,4,5,6' },
|
|
|
+ { label: '待生产', value: '4' },
|
|
|
+ { label: '生产中', value: '5' },
|
|
|
+ { label: '已完成', value: '6' },
|
|
|
+ { label: '已延期', value: '7' }
|
|
|
+ ], change: [
|
|
|
+ { label: '已变更', value: '9' },
|
|
|
+
|
|
|
+ ]
|
|
|
},
|
|
|
- // 表格列配置
|
|
|
- columns() {
|
|
|
- const opt = {
|
|
|
- first: [
|
|
|
- // {
|
|
|
- // prop: 'deliveryTime',
|
|
|
- // label: '预测交货日期',
|
|
|
- // align: 'center',
|
|
|
- // showOverflowTooltip: true,
|
|
|
- // minWidth: 110
|
|
|
- // }
|
|
|
- ],
|
|
|
- second: [
|
|
|
- // {
|
|
|
- // prop: 'formingTime',
|
|
|
- // label: '实际生产日期',
|
|
|
- // align: 'center',
|
|
|
- // showOverflowTooltip: true,
|
|
|
- // minWidth: 110
|
|
|
- // },
|
|
|
- {
|
|
|
- prop: 'releaseTime',
|
|
|
- label: '工单发布日期',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 110
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'planFormingTime',
|
|
|
- label: '预测生产日期',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 110
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'deliveryTime',
|
|
|
- label: '预测交货日期',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 110
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'formingTime',
|
|
|
- label: '实际交货日期',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 110
|
|
|
- }
|
|
|
- ]
|
|
|
- };
|
|
|
-
|
|
|
- return [
|
|
|
+ planType: [
|
|
|
+ { label: '所有计划类型', value: null },
|
|
|
+ { label: '内销计划', value: '1' },
|
|
|
+ { label: '外销计划', value: '2' },
|
|
|
+ { label: '预制计划', value: '3' }
|
|
|
+ ], newColumns: []
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ clientEnvironmentId() {
|
|
|
+ return this.$store.state.user.info.clientEnvironmentId;
|
|
|
+ },
|
|
|
+ // 表格列配置
|
|
|
+ columns() {
|
|
|
+ const opt = {
|
|
|
+ first: [
|
|
|
+ // {
|
|
|
+ // prop: 'deliveryTime',
|
|
|
+ // label: '预测交货日期',
|
|
|
+ // align: 'center',
|
|
|
+ // showOverflowTooltip: true,
|
|
|
+ // minWidth: 110
|
|
|
+ // }
|
|
|
+ ],
|
|
|
+ second: [
|
|
|
+ // {
|
|
|
+ // prop: 'formingTime',
|
|
|
+ // label: '实际生产日期',
|
|
|
+ // align: 'center',
|
|
|
+ // showOverflowTooltip: true,
|
|
|
+ // minWidth: 110
|
|
|
+ // },
|
|
|
{
|
|
|
- columnKey: 'index',
|
|
|
- label: '序号',
|
|
|
- type: 'index',
|
|
|
- width: 55,
|
|
|
+ prop: 'releaseTime',
|
|
|
+ label: '工单发布日期',
|
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
|
- fixed: 'left'
|
|
|
+ minWidth: 110
|
|
|
},
|
|
|
{
|
|
|
- slot: 'code',
|
|
|
- prop: 'code',
|
|
|
- action: 'code',
|
|
|
- label: '计划编号',
|
|
|
+ prop: 'planFormingTime',
|
|
|
+ label: '预测生产日期',
|
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
|
- minWidth: 180
|
|
|
+ minWidth: 110
|
|
|
},
|
|
|
{
|
|
|
- prop: 'productCode',
|
|
|
- label: '产品编码',
|
|
|
+ prop: 'deliveryTime',
|
|
|
+ label: '预测交货日期',
|
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
|
- minWidth: 140
|
|
|
+ minWidth: 110
|
|
|
},
|
|
|
{
|
|
|
- prop: 'productName',
|
|
|
- label: '产品名称',
|
|
|
+ prop: 'formingTime',
|
|
|
+ label: '实际交货日期',
|
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
|
- minWidth: 140
|
|
|
- },
|
|
|
+ minWidth: 110
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ change:[]
|
|
|
+ };
|
|
|
+
|
|
|
+ return [
|
|
|
+ {
|
|
|
+ columnKey: 'index',
|
|
|
+ label: '序号',
|
|
|
+ type: 'index',
|
|
|
+ width: 55,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ fixed: 'left'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ slot: 'code',
|
|
|
+ prop: 'code',
|
|
|
+ action: 'code',
|
|
|
+ label: '计划编号',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 180
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'productCode',
|
|
|
+ label: '产品编码',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 140
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'productName',
|
|
|
+ label: '产品名称',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 140
|
|
|
+ },
|
|
|
|
|
|
{
|
|
|
prop: 'brandNo',
|
|
|
@@ -338,59 +341,65 @@
|
|
|
minWidth: 110
|
|
|
},
|
|
|
|
|
|
- ...opt[this.activeName],
|
|
|
+ ...opt[this.activeName],
|
|
|
|
|
|
- {
|
|
|
- prop: 'orderType',
|
|
|
- label: '计划类型',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- formatter: (row) => {
|
|
|
- const obj = this.planType.find((i) => i.value == row.planType);
|
|
|
- return obj && obj.label;
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'createTime',
|
|
|
- label: '创建时间',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 110
|
|
|
- },
|
|
|
- {
|
|
|
- columnKey: 'status',
|
|
|
- slot: 'status',
|
|
|
- label: '状态',
|
|
|
- align: 'center',
|
|
|
- formatter: (row) => {
|
|
|
- const obj = this.statusOpt[this.activeName].find(
|
|
|
- (i) => i.value == row.status
|
|
|
- );
|
|
|
- return obj && obj.label;
|
|
|
- }
|
|
|
+ {
|
|
|
+ prop: 'orderType',
|
|
|
+ label: '计划类型',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ formatter: (row) => {
|
|
|
+ const obj = this.planType.find((i) => i.value == row.planType);
|
|
|
+ return obj && obj.label;
|
|
|
}
|
|
|
- // ...(this.activeName === 'second'
|
|
|
- // ? [
|
|
|
- // {
|
|
|
- // prop: 'releaseTime',
|
|
|
- // label: '发布时间',
|
|
|
- // align: 'center',
|
|
|
- // showOverflowTooltip: true,
|
|
|
- // minWidth: 110
|
|
|
- // }
|
|
|
- // ]
|
|
|
- // : []),
|
|
|
- ];
|
|
|
- }
|
|
|
- },
|
|
|
- created() {
|
|
|
+ },{
|
|
|
+ prop: 'version',
|
|
|
+ label: '版本',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 80
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'createTime',
|
|
|
+ label: '创建时间',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ columnKey: 'status',
|
|
|
+ slot: 'status',
|
|
|
+ label: '状态',
|
|
|
+ align: 'center',
|
|
|
+ formatter: (row) => {
|
|
|
+ const obj = this.statusOpt[this.activeName].find(
|
|
|
+ (i) => i.value == row.status
|
|
|
+ );
|
|
|
+ return obj && obj.label;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // ...(this.activeName === 'second'
|
|
|
+ // ? [
|
|
|
+ // {
|
|
|
+ // prop: 'releaseTime',
|
|
|
+ // label: '发布时间',
|
|
|
+ // align: 'center',
|
|
|
+ // showOverflowTooltip: true,
|
|
|
+ // minWidth: 110
|
|
|
+ // }
|
|
|
+ // ]
|
|
|
+ // : []),
|
|
|
+ ];
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
this.getFieldModel();
|
|
|
},
|
|
|
- methods: {
|
|
|
- statusFormatter(status) {
|
|
|
- const obj = this.statusOpt[this.activeName].find(
|
|
|
- (i) => i.value == status
|
|
|
- );
|
|
|
+ methods: {
|
|
|
+ statusFormatter(status) {
|
|
|
+ const obj = this.statusOpt[this.activeName].find(
|
|
|
+ (i) => i.value == status
|
|
|
+ );
|
|
|
|
|
|
return obj && obj.label;
|
|
|
},
|