|
|
@@ -1,7 +1,13 @@
|
|
|
<template>
|
|
|
<div class="ele-body">
|
|
|
<el-card shadow="never" v-loading="loading">
|
|
|
- <productionPlan-search @search="reload" ref="searchRef">
|
|
|
+ <productionPlan-search
|
|
|
+ @search="reload"
|
|
|
+ ref="searchRef"
|
|
|
+ :statusOpt="statusOpt"
|
|
|
+ :planType="planType"
|
|
|
+ :activeName="activeName"
|
|
|
+ >
|
|
|
</productionPlan-search>
|
|
|
<el-tabs v-model="activeName" type="card" @tab-click="handleTabChange">
|
|
|
<el-tab-pane label="未发布" name="first"></el-tab-pane>
|
|
|
@@ -41,6 +47,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import { getList } from '@/api/productionPlan/index.js';
|
|
|
import productionPlanSearch from './components/productionPlan-search.vue';
|
|
|
export default {
|
|
|
components: {
|
|
|
@@ -54,12 +61,74 @@
|
|
|
loading: false,
|
|
|
pageType: 'add',
|
|
|
dialogTitle: '',
|
|
|
- isBindPlan: false
|
|
|
+ isBindPlan: false,
|
|
|
+ statusOpt: {
|
|
|
+ first: [
|
|
|
+ { label: '所有状态', value: '1,2' },
|
|
|
+ { label: '待发布', value: '1' },
|
|
|
+ { label: '发布状态', value: '2' }
|
|
|
+ ],
|
|
|
+ second: [
|
|
|
+ { label: '所有状态', value: '0,3,4,5,6' },
|
|
|
+ { label: '待排产', value: '0' },
|
|
|
+ { label: '待生产', value: '3' },
|
|
|
+ { label: '生产中', value: '4' },
|
|
|
+ { label: '已完成', value: '5' },
|
|
|
+ { label: '已延期', value: '6' }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ planType: [
|
|
|
+ { label: '所有计划类型', value: '0,1' },
|
|
|
+ { label: '内销计划', value: '0' },
|
|
|
+ { label: '外销计划', value: '1' }
|
|
|
+ ]
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
// 表格列配置
|
|
|
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: 'deliveryTime',
|
|
|
+ label: '预测交货日期',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'formingTime',
|
|
|
+ label: '实际交货日期',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ };
|
|
|
+
|
|
|
return [
|
|
|
{
|
|
|
columnKey: 'index',
|
|
|
@@ -71,129 +140,119 @@
|
|
|
fixed: 'left'
|
|
|
},
|
|
|
{
|
|
|
+ slot: 'code',
|
|
|
prop: 'code',
|
|
|
+ action: 'code',
|
|
|
label: '计划编号',
|
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
|
minWidth: 110
|
|
|
},
|
|
|
{
|
|
|
- prop: 'planCode',
|
|
|
+ prop: 'productCode',
|
|
|
label: '产品编号',
|
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
|
minWidth: 110
|
|
|
},
|
|
|
{
|
|
|
- prop: 'planName',
|
|
|
+ prop: 'brandNo',
|
|
|
label: '牌号',
|
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
|
minWidth: 110
|
|
|
},
|
|
|
{
|
|
|
- prop: 'equiCode',
|
|
|
+ prop: 'model',
|
|
|
label: '型号',
|
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
|
minWidth: 110
|
|
|
},
|
|
|
{
|
|
|
- prop: 'equiName',
|
|
|
+ prop: 'productNum',
|
|
|
label: '计划数量',
|
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
|
minWidth: 110
|
|
|
},
|
|
|
{
|
|
|
- prop: 'executeUserName',
|
|
|
+ prop: 'productWeight',
|
|
|
label: '计划重量',
|
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
|
minWidth: 110
|
|
|
},
|
|
|
{
|
|
|
- prop: 'planFinishTime',
|
|
|
+ prop: 'requiredFormingNum',
|
|
|
label: '要求成型数量',
|
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
|
minWidth: 110
|
|
|
},
|
|
|
+ // {
|
|
|
+ // prop: '',
|
|
|
+ // label: '已成型数量',
|
|
|
+ // align: 'center',
|
|
|
+ // showOverflowTooltip: true,
|
|
|
+ // minWidth: 110
|
|
|
+ // },
|
|
|
{
|
|
|
- prop: 'acceptTime',
|
|
|
- label: '已成型数量',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 110
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'finishTime',
|
|
|
+ prop: 'requiredFormingTime',
|
|
|
label: '要求成型日期',
|
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
|
minWidth: 110
|
|
|
},
|
|
|
{
|
|
|
- prop: 'sj',
|
|
|
+ prop: 'planFormingTime',
|
|
|
label: '预测成型日期',
|
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
|
minWidth: 110
|
|
|
},
|
|
|
+ ...opt[this.activeName],
|
|
|
+
|
|
|
{
|
|
|
- prop: 'status',
|
|
|
- label: '实际成型日期',
|
|
|
+ prop: 'orderType',
|
|
|
+ label: '计划类型',
|
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
|
- minWidth: 110
|
|
|
+ formatter: (row) => {
|
|
|
+ const obj = this.planType.find((i) => i.value == row.orderType);
|
|
|
+ return obj && obj.label;
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
- prop: 'status',
|
|
|
- label: '交货日期',
|
|
|
+ prop: 'createTime',
|
|
|
+ label: '创建时间',
|
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
|
minWidth: 110
|
|
|
},
|
|
|
{
|
|
|
- prop: 'status',
|
|
|
- label: '预测交货日期',
|
|
|
+ prop: 'planStatus',
|
|
|
+ label: '状态',
|
|
|
align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 110
|
|
|
+ minWidth: 110,
|
|
|
+ formatter: (row) => {
|
|
|
+ const obj = this.statusOpt[this.activeName].find(
|
|
|
+ (i) => i.value == row.orderType
|
|
|
+ );
|
|
|
+ return obj && obj.label;
|
|
|
+ }
|
|
|
},
|
|
|
...(this.activeName === 'second'
|
|
|
? [
|
|
|
{
|
|
|
- prop: 'code',
|
|
|
- label: '实际交货日期',
|
|
|
+ prop: 'releaseTime',
|
|
|
+ label: '发布时间',
|
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
|
minWidth: 110
|
|
|
}
|
|
|
]
|
|
|
: []),
|
|
|
- {
|
|
|
- prop: 'status',
|
|
|
- label: '计划类型',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 110
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'status',
|
|
|
- label: '创建时间',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 110
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'status',
|
|
|
- label: '状态',
|
|
|
- fixed: this.activeName === 'second' ? 'right' : false,
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 110
|
|
|
- },
|
|
|
...(this.activeName === 'first'
|
|
|
? [
|
|
|
{
|
|
|
@@ -213,14 +272,12 @@
|
|
|
},
|
|
|
methods: {
|
|
|
/* 表格数据源 */
|
|
|
- datasource ({ page, limit, where, order }) {
|
|
|
- return [{}];
|
|
|
- // return getWorkOrderList({
|
|
|
- // pageNum: page,
|
|
|
- // size: limit,
|
|
|
- // ...where,
|
|
|
- // type: 3
|
|
|
- // });
|
|
|
+ datasource ({ page, limit, where }) {
|
|
|
+ return getList({
|
|
|
+ pageNum: page,
|
|
|
+ size: limit,
|
|
|
+ ...where
|
|
|
+ });
|
|
|
},
|
|
|
// 发布工单
|
|
|
handleOrderPublish (row) {
|