|
|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
$(() => {
|
|
|
|
|
// 公共请求地址
|
|
|
|
|
let url = '/broad/box'
|
|
|
|
|
let url = '/broad/beforeLibrary'
|
|
|
|
|
|
|
|
|
|
// 表格头
|
|
|
|
|
const planWorkOrderColumns = [
|
|
|
|
|
@ -8,7 +8,7 @@ $(() => {
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
// 订单详情
|
|
|
|
|
const orderDetailsTable = new AutoScrollTable(document.getElementById("orderDetails"), planWorkOrderColumns, {width: ['30%', null, null, null, '17%']})
|
|
|
|
|
const orderDetailsTable = new AutoScrollTable(document.getElementById("orderDetails"), ["编号", "计划数量", "完成数量", "差异值", "时间",], {width: ['30%', null, null, null, '17%']})
|
|
|
|
|
|
|
|
|
|
// 产线当日订单信息
|
|
|
|
|
const PropertyInsuranceOneDayOrderInfoTable = new AutoScrollTable(document.getElementById("PropertyInsuranceOneDayOrderInfo"), planWorkOrderColumns, {width: ['30%', null, null, null, '17%']})
|
|
|
|
|
@ -22,31 +22,33 @@ $(() => {
|
|
|
|
|
// 产线不良类型分布
|
|
|
|
|
pieChart(null, document.getElementById("distributionOfBadTypesInProductionLineByDay"));
|
|
|
|
|
|
|
|
|
|
//订单详情轮询
|
|
|
|
|
autoUpdate(url+"/getProductPlanInfo ", INTERVAL, data => {
|
|
|
|
|
orderDetailsTable.loadData(data.map(value => [value.plan_code, value.plan_number, value.actual_number, value.plan_number-value.actual_number, value.day]), Object.keys(planWorkOrderColumns))
|
|
|
|
|
//订单详情轮询 + 当日订单数量达成率轮询
|
|
|
|
|
autoUpdate(url + "/selectOrderInfo ", INTERVAL, data => {
|
|
|
|
|
orderDetailsTable.loadData(data.map(value => [value.plan_code, value.plan_number, value.actual_number, value.plan_number - value.actual_number, value.day]), Object.keys(planWorkOrderColumns))
|
|
|
|
|
horizontalRoundedBarChartWithBackground({
|
|
|
|
|
yName: data.map(value => value.plan_code),
|
|
|
|
|
xData: data.map(value => value.rate),
|
|
|
|
|
xDataName: "达成率",
|
|
|
|
|
}, document.getElementById("orderQuantityFulfillmentRateOfTheDay"))
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// const horizontalRoundedBarChartWithBackgroundEcharts = echarts.init(document.getElementById("orderQuantityFulfillmentRateOfTheDay"))
|
|
|
|
|
// horizontalRoundedBarChartWithBackgroundEcharts.setOption({
|
|
|
|
|
// yAxis: {
|
|
|
|
|
// data: data.map(value => value.plan_code),
|
|
|
|
|
// },
|
|
|
|
|
// series: [
|
|
|
|
|
// {
|
|
|
|
|
// data: data.map(value => value.rate),
|
|
|
|
|
// },
|
|
|
|
|
// {}
|
|
|
|
|
// ]
|
|
|
|
|
// })
|
|
|
|
|
//
|
|
|
|
|
//产线当日订单信息轮询
|
|
|
|
|
autoUpdate(url+"/getProductPlanInfo ", INTERVAL, data => {
|
|
|
|
|
PropertyInsuranceOneDayOrderInfoTable.loadData(data.map(value => [value.plan_code, value.plan_number, value.actual_number, value.plan_number-value.actual_number, value.day]), Object.keys(planWorkOrderColumns))
|
|
|
|
|
autoUpdate(url + "/selectOrderInfo ", INTERVAL, data => {
|
|
|
|
|
PropertyInsuranceOneDayOrderInfoTable.loadData(data.map(value => [value.plan_code, value.plan_number, value.actual_number, value.plan_number - value.actual_number, value.day]), Object.keys(planWorkOrderColumns))
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
//当日订单数量达成率轮询
|
|
|
|
|
const horizontalRoundedBarChartWithBackgroundEcharts = echarts.init(document.getElementById("inner-bile-by-type"))
|
|
|
|
|
autoUpdate(url+"/getProductPlanInfo ", INTERVAL, data => {
|
|
|
|
|
horizontalRoundedBarChartWithBackgroundEcharts.setOption({
|
|
|
|
|
xAxis: {
|
|
|
|
|
data: data.map(value => value.name),
|
|
|
|
|
},
|
|
|
|
|
series: [
|
|
|
|
|
{
|
|
|
|
|
name: '数量',
|
|
|
|
|
data: data.map(value => value.qty),
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
}) })
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|