|
@@ -14,6 +14,18 @@ function getDatesInMonth() {
|
|
|
}
|
|
}
|
|
|
return dates;
|
|
return dates;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+let statusOpt = [
|
|
|
|
|
+ { label: '生产中', value: '5' },
|
|
|
|
|
+ { label: '已完成', value: '6' },
|
|
|
|
|
+ { label: '已延期', value: '7' },
|
|
|
|
|
+ ]
|
|
|
|
|
+
|
|
|
|
|
+let daysOpt = [
|
|
|
|
|
+ { label: '已延期', value: -1},
|
|
|
|
|
+ { label: '已完成', value: 0},
|
|
|
|
|
+]
|
|
|
|
|
+
|
|
|
export const columns = [
|
|
export const columns = [
|
|
|
|
|
|
|
|
{
|
|
{
|
|
@@ -26,72 +38,82 @@ export const columns = [
|
|
|
fixed: 'left'
|
|
fixed: 'left'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- prop: 'name',
|
|
|
|
|
|
|
+ prop: 'batchNo',
|
|
|
label: '批次号',
|
|
label: '批次号',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
showOverflowTooltip: true,
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- prop: 'name',
|
|
|
|
|
|
|
+ prop: 'code',
|
|
|
label: '生产工单编码',
|
|
label: '生产工单编码',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
showOverflowTooltip: true,
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- prop: 'name1',
|
|
|
|
|
|
|
+ prop: 'status',
|
|
|
label: '工单状态',
|
|
label: '工单状态',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
showOverflowTooltip: true,
|
|
|
|
|
+ formatter: (row) => {
|
|
|
|
|
+ let result = statusOpt.find(item => item.value == row.status)
|
|
|
|
|
+ return result ? result.label : ''
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- prop: 'qualified',
|
|
|
|
|
|
|
+ prop: 'planStartTime',
|
|
|
label: '计划开始时间',
|
|
label: '计划开始时间',
|
|
|
minWidth: '120',
|
|
minWidth: '120',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
showOverflowTooltip: true,
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- prop: 'qualified',
|
|
|
|
|
|
|
+ prop: 'planCompleteTime',
|
|
|
label: '计划完成时间',
|
|
label: '计划完成时间',
|
|
|
minWidth: '120',
|
|
minWidth: '120',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
showOverflowTooltip: true,
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- prop: 'name12',
|
|
|
|
|
|
|
+ prop: 'productName',
|
|
|
label: '产品名称',
|
|
label: '产品名称',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
showOverflowTooltip: true,
|
|
|
}, {
|
|
}, {
|
|
|
- prop: 'name12',
|
|
|
|
|
|
|
+ prop: 'productCode',
|
|
|
label: '产品编码',
|
|
label: '产品编码',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
showOverflowTooltip: true,
|
|
|
- }, {
|
|
|
|
|
- prop: 'name12',
|
|
|
|
|
- label: '规格型号',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- }, {
|
|
|
|
|
- prop: 'name12',
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ // {
|
|
|
|
|
+ // prop: 'specification',
|
|
|
|
|
+ // label: '规格型号',
|
|
|
|
|
+ // align: 'center',
|
|
|
|
|
+ // showOverflowTooltip: true,
|
|
|
|
|
+ // },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'formingNum',
|
|
|
label: '数量(个)',
|
|
label: '数量(个)',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
showOverflowTooltip: true,
|
|
|
}, {
|
|
}, {
|
|
|
- prop: 'name12',
|
|
|
|
|
- label: '生产单位',
|
|
|
|
|
|
|
+ prop: 'taskName',
|
|
|
|
|
+ label: '生产工序',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
showOverflowTooltip: true,
|
|
|
}, {
|
|
}, {
|
|
|
- prop: 'name12',
|
|
|
|
|
- label: '状态',
|
|
|
|
|
|
|
+ prop: 'days',
|
|
|
|
|
+ label: '交期状态',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
showOverflowTooltip: true,
|
|
|
|
|
+ formatter: (row) => {
|
|
|
|
|
+ let result = daysOpt.find(item => item.value == row.days)
|
|
|
|
|
+ return result ? result.label : row.days ? '剩余' + row.days + '天' : ''
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
];
|
|
];
|
|
|
|
|
|
|
|
-export const barOption = (data, itemStyle = {}) => {
|
|
|
|
|
|
|
+export const barOption = (series, itemStyle = {}) => {
|
|
|
return {
|
|
return {
|
|
|
tooltip: {
|
|
tooltip: {
|
|
|
formatter: (item) => {
|
|
formatter: (item) => {
|
|
@@ -113,7 +135,6 @@ export const barOption = (data, itemStyle = {}) => {
|
|
|
data: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月',],
|
|
data: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月',],
|
|
|
axisLabel: {
|
|
axisLabel: {
|
|
|
fontSize: window.innerHeight * 0.012,
|
|
fontSize: window.innerHeight * 0.012,
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
},
|
|
},
|
|
@@ -129,25 +150,7 @@ export const barOption = (data, itemStyle = {}) => {
|
|
|
},
|
|
},
|
|
|
}
|
|
}
|
|
|
],
|
|
],
|
|
|
- series: [
|
|
|
|
|
- {
|
|
|
|
|
- name: '工单入库数量',
|
|
|
|
|
- barWidth: '25%',
|
|
|
|
|
- data: data,
|
|
|
|
|
- type: 'bar',
|
|
|
|
|
- yAxisIndex: 0 // 使用第一个Y轴
|
|
|
|
|
- }, {
|
|
|
|
|
- name: '工单数',
|
|
|
|
|
- symbolSize: 10,
|
|
|
|
|
- data: [2, 1, 4, 5, 1, 2, 3, 4, 5, 1, 2, 1],
|
|
|
|
|
- type: 'line', smooth: true,
|
|
|
|
|
-
|
|
|
|
|
- itemStyle: {
|
|
|
|
|
- color: '#ffab08'
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
- ]
|
|
|
|
|
|
|
+ series
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|