|
|
@@ -1,5 +1,11 @@
|
|
|
// 引入Day.js库
|
|
|
const dayjs = require('dayjs');
|
|
|
+let statusOpt= [
|
|
|
+ { label: '待生产', value: 4 },
|
|
|
+ { label: '生产中', value: 5 },
|
|
|
+ { label: '待下达', value: 8 }
|
|
|
+ ];
|
|
|
+
|
|
|
// 获取本月日期列表的函数
|
|
|
function getDatesInMonth() {
|
|
|
let year = dayjs().year()
|
|
|
@@ -14,82 +20,157 @@ function getDatesInMonth() {
|
|
|
}
|
|
|
return dates;
|
|
|
}
|
|
|
-export const columns = [
|
|
|
+export const columns = [
|
|
|
+ {
|
|
|
+ columnKey: 'index',
|
|
|
+ slot: 'index',
|
|
|
+ label: '序号',
|
|
|
+ type: 'index',
|
|
|
+ width: 55,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ fixed: 'left'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ slot: 'code',
|
|
|
+ prop: 'code',
|
|
|
+ label: '生产订单号',
|
|
|
+ align: 'center',
|
|
|
+ minWidth: 180,
|
|
|
+ sortable: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'productionPlanCode',
|
|
|
+ label: '计划编号',
|
|
|
+ align: 'center',
|
|
|
+ minWidth: 150
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'produceRoutingName',
|
|
|
+ label: '工艺路线',
|
|
|
+ align: 'center',
|
|
|
+ minWidth: 170
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'productCode',
|
|
|
+ label: '编码',
|
|
|
+ align: 'center',
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'productName',
|
|
|
+ label: '名称',
|
|
|
+ align: 'center',
|
|
|
+ minWidth: 170
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'brandNo',
|
|
|
+ label: '牌号',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'batchNo',
|
|
|
+ label: '批次号',
|
|
|
+ align: 'center',
|
|
|
+ minWidth: 100,
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'model',
|
|
|
+ label: '型号',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
|
|
|
{
|
|
|
- columnKey: 'index',
|
|
|
- label: '序号',
|
|
|
- type: 'index',
|
|
|
- width: 55,
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- fixed: 'left'
|
|
|
+ prop: 'priority',
|
|
|
+ label: '优先级',
|
|
|
+ align: 'center',
|
|
|
+ minWidth: 120,
|
|
|
+ slot: 'priority',
|
|
|
+ sortable: 'custom'
|
|
|
},
|
|
|
+
|
|
|
{
|
|
|
- prop: 'name',
|
|
|
- label: '生产订单名称',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
+ prop: 'formingNum',
|
|
|
+ label: '要求生产数量',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
},
|
|
|
{
|
|
|
- prop: 'name',
|
|
|
- label: '生产订单编号',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
+ prop: 'formingWeight',
|
|
|
+ label: '要求生产重量',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110,
|
|
|
+ slot: 'formingWeight'
|
|
|
},
|
|
|
{
|
|
|
- prop: 'name1',
|
|
|
- label: '订单状态',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
+ prop: 'planStartTime',
|
|
|
+ label: '计划开始时间',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
},
|
|
|
+
|
|
|
{
|
|
|
- prop: 'qualified',
|
|
|
- label: '计划开始日期',
|
|
|
- minWidth: '120',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
+ prop: 'planCompleteTime',
|
|
|
+ label: '计划结束时间',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
},
|
|
|
+
|
|
|
{
|
|
|
- prop: 'qualified',
|
|
|
- label: '计划完成日期',
|
|
|
- minWidth: '120',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
+ prop: 'workCenterName',
|
|
|
+ label: '工作中心',
|
|
|
+ align: 'center',
|
|
|
+ minWidth: 110,
|
|
|
+ showOverflowTooltip: true
|
|
|
},
|
|
|
+
|
|
|
{
|
|
|
- prop: 'name12',
|
|
|
- label: '产品名称',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- }, {
|
|
|
- prop: 'name12',
|
|
|
- label: '产品编码',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- }, {
|
|
|
- prop: 'name12',
|
|
|
- label: '规格型号',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- }, {
|
|
|
- prop: 'name12',
|
|
|
- label: '数量(个)',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- }, {
|
|
|
- prop: 'name12',
|
|
|
- label: '生产单位',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- }, {
|
|
|
- prop: 'name12',
|
|
|
- label: '交期状态',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
+ prop: 'firstTaskName',
|
|
|
+ label: '首工序',
|
|
|
+ align: 'center',
|
|
|
+ minWidth: 110,
|
|
|
+ showOverflowTooltip: true
|
|
|
},
|
|
|
|
|
|
-];
|
|
|
+ {
|
|
|
+ prop: 'createTime',
|
|
|
+ label: '创建时间',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110,
|
|
|
+ sortable: 'custom'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ slot: 'status',
|
|
|
+ label: '状态',
|
|
|
+ align: 'center',
|
|
|
+ formatter: (row) => {
|
|
|
+ const obj = statusOpt.find((i) => i.value == row.status);
|
|
|
+ return obj && obj.label;
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'serialNo',
|
|
|
+ label: '客户代号',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'simpleName',
|
|
|
+ label: '客户简称',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ }
|
|
|
+ ];
|
|
|
export const lineOption = (data, itemStyle = {}) => {
|
|
|
return {
|
|
|
tooltip: {
|