修改发泡线生产统计数据表格

master
夜笙歌 2 years ago
parent a5b82e2fd0
commit 618546a9ec

@ -480,7 +480,7 @@
let plannedProduction = arr.map(e => e.plannedProduction).reduce((a, b) => a + b) || 0
let actualProduction = arr.map(e => e.actualProduction).reduce((a, b) => a + b) || 0
dataA.push([val.split(',')[0], '正常', arr[0].target, plannedProduction, actualProduction, plannedProduction === 0 ? '0%' : ((actualProduction / plannedProduction) * 100).toString().substr(0, 5) + '%', filter(arr, 'recordTime', 8, 'actualProduction') || 0, filter(arr, 'recordTime', 9, 'actualProduction') || 0, filter(arr, 'recordTime', 10, 'actualProduction') || 0, filter(arr, 'recordTime', 11, 'actualProduction') || 0, filter(arr, 'recordTime', 12, 'actualProduction') || 0, filter(arr, 'recordTime', 13, 'actualProduction') || 0, filter(arr, 'recordTime', 14, 'actualProduction') || 0, filter(arr, 'recordTime', 15, 'actualProduction') || 0, filter(arr, 'recordTime', 16, 'actualProduction') || 0, filter(arr, 'recordTime', 17, 'actualProduction') || 0, filter(arr, 'recordTime', 18, 'actualProduction') || 0, filter(arr, 'recordTime', 19, 'actualProduction') || 0])
}else{
} else {
let arr = data.filter(e => e.orderType === val)
let plannedProduction = arr.map(e => e.plannedProduction).reduce((a, b) => a + b) || 0
let actualProduction = arr.map(e => e.actualProduction).reduce((a, b) => a + b) || 0
@ -494,7 +494,7 @@
planInfo.loadData(dataA, 18, {
includeHead: true,
})
planInfo2.loadData(dataB, 18, {
planInfo2.loadData(dataB.length > 2 ? dataB : dataA, 18, {
includeHead: true,
})
})

Loading…
Cancel
Save