修改吸附内胆库存

master
夜笙歌 2 years ago
parent 828748abdf
commit 471ace6a31

@ -238,7 +238,8 @@
top: 73%; top: 73%;
left: 2%; left: 2%;
} }
.scrollTable{
.scrollTable {
/*font-size: 127.8px;*/ /*font-size: 127.8px;*/
} }
@ -335,16 +336,19 @@
//库存统计 //库存统计
autoUpdate("/system/AbsorbDeviceMes/getinventory", INTERVAL, data => { autoUpdate("/system/AbsorbDeviceMes/getinventory", INTERVAL, data => {
console.log(JSON.stringify(data));
data.forEach((item) => { data.forEach((item) => {
xAxisData.push(item.name); let name = ''
if(item.name.length >= 15){
name = item.name.split(',')[0]
}else{
name = item.name
}
xAxisData.push(name);
seriesData1.push(parseInt(item.value)); seriesData1.push(parseInt(item.value));
sum += parseInt(item.value); sum += parseInt(item.value);
}); });
console.log("xAxisData:"+xAxisData); console.log(xAxisData)
console.log("seriesData1:"+seriesData1);
console.log("sum:"+sum);
})
option = { option = {
@ -615,6 +619,8 @@
], ],
}; };
option && mycharts.setOption(option); option && mycharts.setOption(option);
})
}) })
</script> </script>
<script> <script>
@ -627,11 +633,10 @@
type: 'POST', type: 'POST',
dataType: 'JSON', dataType: 'JSON',
success: function (result) { success: function (result) {
console.log(result)
let Res = {data: []} let Res = {data: []}
for(let item of result){ for (let item of result) {
Res.data.push( Res.data.push(
[item.orderNo, item.planAmount, item.actualAmount, item.differAmount,`${(item.actualAmount / item.planAmount * 100).toFixed(1)}%`]); [item.orderNo, item.planAmount, item.actualAmount, item.differAmount, `${(item.actualAmount / item.planAmount * 100).toFixed(1)}%`]);
} }
Res.header = ['编号', '计划数量', '完成数量', '差异值', '执行进度'] Res.header = ['编号', '计划数量', '完成数量', '差异值', '执行进度']
$('#productionPlan').remove() $('#productionPlan').remove()
@ -648,7 +653,7 @@
headerBGC: 'rgba(8,36,75,0.2)', headerBGC: 'rgba(8,36,75,0.2)',
oddRowBGC: 'rgba(8,36,75,0.2)', oddRowBGC: 'rgba(8,36,75,0.2)',
evenRowBGC: 'rgba(6,25,57,0.2)', evenRowBGC: 'rgba(6,25,57,0.2)',
colWidth: ['32%', '18%', '18%', '14%','18%'] colWidth: ['32%', '18%', '18%', '14%', '18%']
}); });
}, },
error: function (e) { error: function (e) {

Loading…
Cancel
Save