|
|
@@ -28,43 +28,52 @@
|
|
|
|
|
|
<!--31天产量曲线图-->
|
|
|
<div style="width:1840px;height:30%;display:flex;flex-direction:row;">
|
|
|
- <div style="width: 75%; height: 300px;">
|
|
|
- <div style="color:white;font-size:15px;font-weight:600; text-align:center">每日产量计划达成</div>
|
|
|
- <canvas id="canvasDayCL" style="-moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; height: 330px; width: 80% "></canvas>
|
|
|
+ <div style="width: 82%; height: 150px;">
|
|
|
+ <canvas id="canvasDayCL" style="-moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; height: 160px; width: 100% "></canvas>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div style="width:1840px;height:40%;display:flex;flex-direction:row; margin-top:-7%">
|
|
|
+ <div style="width: 82%; height: 150px;">
|
|
|
+ <canvas id="canvasMonthDayCL" style="-moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; height: 170px; width: 100%;"></canvas>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<div>
|
|
|
- <table rules="none" align="right" style="width: 20%; height: 270px; margin-left:80%;margin-top:-291px ">
|
|
|
+ <table rules="none" align="right" style="width: 18%; height: 270px; margin-left:80%;margin-top:-30%">
|
|
|
<tr class="tr_title_warning">
|
|
|
- <td style="width: 8%; height: 60px; font-size: 30px; text-align: left" colspan="2" ><strong><span id="sj" style="color:white;">2023-4-30 00:00:00</span></strong></td>
|
|
|
+ <td style="width: 8%; height: 60px; font-size: 25px; text-align: left" colspan="2"><strong><span id="sj" style="color:white;">2023-4-30 00:00:00</span></strong></td>
|
|
|
</tr>
|
|
|
<tr class="tr_title_warning">
|
|
|
- <td style="width: 8%; height: 95px; font-size: 35px; text-align: left ">月打磨:<span id="ydm" style="color:white;">加载中...</span></td>
|
|
|
+ <td style="width: 8%; height: 95px; font-size: 35px; text-align: left ">月打磨量:<span id="ydm" style="color:white;">加载中...</span></td>
|
|
|
</tr>
|
|
|
<tr class="tr_title_warning">
|
|
|
- <td style="width: 8%; height: 95px; font-size: 35px; text-align: left ">月擦洗:<span id="ycx" style="color:white;">加载中...</span></td>
|
|
|
+ <td style="width: 8%; height: 95px; font-size: 35px; text-align: left ">月擦洗量:<span id="ycx" style="color:white;">加载中...</span></td>
|
|
|
</tr>
|
|
|
<tr class="tr_title_warning">
|
|
|
- <td style="width: 8%; height: 95px; font-size: 35px; text-align: left ">月改洗:<span id="ygx" style="color:white;">加载中...</span></td>
|
|
|
+ <td style="width: 8%; height: 95px; font-size: 35px; text-align: left ">月改洗量:<span id="ygx" style="color:white;">加载中...</span></td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
</div>
|
|
|
<!--表格-->
|
|
|
- <div style="width: 100%; height: 530px; display: flex; flex-direction: row; margin-top: 4%">
|
|
|
- <div style="width: 100%; height: 530px; ">
|
|
|
+ <div style="width: 100%; height: 500px; display: flex; flex-direction: row; margin-top: -10%">
|
|
|
+ <div style="width: 100%; height: 500px; ">
|
|
|
<table cellspacing="0" cellpadding="0" border="0" style="width:50%;">
|
|
|
+ <tr class="tr_title_warning">
|
|
|
+ <td colspan="7" style="font-size: 30px; color: white;">精修工序个人数据</td>
|
|
|
+ </tr>
|
|
|
<tr class="tr_title_warning" style="height: 30px; font-size:27px">
|
|
|
- <td style="width: 15%;text-align:center">工号</td>
|
|
|
- <td style="width: 15%; text-align: center">数量</td>
|
|
|
- <td style="width: 15%; text-align: center">工号</td>
|
|
|
- <td style="width: 15%; text-align: center">数量</td>
|
|
|
- <td style="width: 15%; text-align: center">工号</td>
|
|
|
- <td style="width: 15%;text-align:center">数量</td>
|
|
|
+ <td style="width: 15%;text-align:center">工号</td>
|
|
|
+ <td style="width: 15%; text-align: center">数量</td>
|
|
|
+ <td style="width: 15%; text-align: center">工号</td>
|
|
|
+ <td style="width: 15%; text-align: center">数量</td>
|
|
|
+ <td style="width: 15%; text-align: center">工号</td>
|
|
|
+ <td style="width: 15%;text-align:center">数量</td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
- <div style=" height:170px;overflow:hidden;">
|
|
|
- <table style="width: 50%; display:none;" id="StaffTable_template"> <!--style=""-->
|
|
|
+ <div style=" height:158px;overflow:hidden;">
|
|
|
+ <table style="width: 50%; display:none;" id="StaffTable_template">
|
|
|
+ <!--style=""-->
|
|
|
<tr class="tr_title_warning" style="height: 30px; font-size: 20px">
|
|
|
<td style="font-size: 18px; color: white; height: 30px; width: 16%; text-align: center ">{工号}</td>
|
|
|
<td style="font-size: 20px; color: white; height: 30px; width: 16%; text-align: center ">{数量}</td>
|
|
|
@@ -83,8 +92,8 @@
|
|
|
<td colspan="6">一烧产量:<span id="scl" style="color:white;">:——</span></td>
|
|
|
</tr>
|
|
|
<tr class="tr_title_warning" style="height: 50px; font-size: 30px">
|
|
|
- <td colspan="3"style="width:50%">打磨缺陷率:<span id="dmqxl" style="color:white;">——</span></td>
|
|
|
- <td colspan="3"style="width:50%">擦洗缺陷率:<span id="cxqxl" style="color:white;">——</span></td>
|
|
|
+ <td colspan="3" style="width:50%">打磨缺陷率:<span id="dmqxl" style="color:white;">——</span></td>
|
|
|
+ <td colspan="3" style="width:50%">擦洗缺陷率:<span id="cxqxl" style="color:white;">——</span></td>
|
|
|
</tr>
|
|
|
<tr class="tr_bg_light_warning" style="height: 50px; font-size: 25px">
|
|
|
<td>缺陷</td>
|
|
|
@@ -113,7 +122,7 @@
|
|
|
</table>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div style="width: 52%; height: 500px; padding-right: 20px; margin-top: -530px; margin-left: 50% ">
|
|
|
+ <div style="width: 52%; height: 500px; padding-right: 20px; margin-top: -500px; margin-left: 50% ">
|
|
|
<table cellspacing="0" cellpadding="0" border="0" style="width:100%;">
|
|
|
<tr class="tr_title_warning">
|
|
|
<td colspan="4" style="color: white; font-size: 30px;">成检实时数据(精修工序缺陷数据)</td>
|
|
|
@@ -125,7 +134,7 @@
|
|
|
<td style="font-size: 27px; width: 25%; height: 30px; ">产品分级</td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
- <div style=" height: 418px; overflow: hidden;">
|
|
|
+ <div style=" height: 468px; overflow: hidden;">
|
|
|
<table id="dayTable_template" style="display:none;">
|
|
|
<tr class="tr_bg_light_warning" style="height:30px;">
|
|
|
<td style="font-size: 18px; width: 25%; height: 30px; ">{责任工号}</td>
|
|
|
@@ -134,7 +143,7 @@
|
|
|
<td style="font-size: 18px; width: 25%; height: 30px; ">{产品分级}</td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
- <table id="dayTable" style="width: 100%; ">
|
|
|
+ <table id="dayTable" style="width: 100%; ">
|
|
|
</table>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -156,7 +165,9 @@
|
|
|
//页面加载
|
|
|
$(document).ready(function () {
|
|
|
loadData();
|
|
|
+ loadData2();
|
|
|
initData();
|
|
|
+ initData2();
|
|
|
clearData();
|
|
|
timeUp();
|
|
|
StaffTable();
|
|
|
@@ -268,12 +279,18 @@
|
|
|
function clearData() {
|
|
|
//清除数据
|
|
|
window.DayCL.data.labels = [];
|
|
|
- //window.DayCL.data.datasets[0].data = [0, 0, 0, 0, 0, 0, 0];
|
|
|
window.DayCL.data.datasets[0].data = [];
|
|
|
- //window.DayCL.data.datasets[1].data = [0, 0, 0, 0, 0, 0, 0];
|
|
|
- window.DayCL.data.datasets[1].data = [];
|
|
|
window.DayCL.update();
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
+ function clearData2() {
|
|
|
+ //清除数据
|
|
|
+ window.MonthDayCL.data.labels = [];
|
|
|
+ window.MonthDayCL.data.datasets[0].data = [];
|
|
|
+ window.MonthDayCL.data.datasets[1].data = [];
|
|
|
+ window.MonthDayCL.update();
|
|
|
+ }
|
|
|
function loadServerTime() {
|
|
|
$.get('RefinementKanban.ashx?m=fwq', function (data) {
|
|
|
var json = JSON.parse(data);
|
|
|
@@ -307,13 +324,111 @@
|
|
|
for (var n = 0; n < json["rows"].length; n++) {
|
|
|
window.DayCL.data.labels.push(json["rows"][n]["SJ"]);
|
|
|
window.DayCL.data.datasets[0].data[n] = (json["rows"][n]["打磨"]);
|
|
|
- window.DayCL.data.datasets[1].data[n] = (json["rows"][n]["擦洗"]);
|
|
|
- window.DayCL.data.datasets[2].data[n] = (json["rows"][n]["改洗"]);
|
|
|
}
|
|
|
}
|
|
|
window.DayCL.update();
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+ function loadData2() {
|
|
|
+ $.get("RefinementKanban.ashx?m=rate", function (data) {
|
|
|
+ clearData2();
|
|
|
+ var json = JSON.parse(data);
|
|
|
+ if (json["success"] == true) {
|
|
|
+ for (var n = 0; n < json["rows"].length; n++) {
|
|
|
+ window.MonthDayCL.data.labels.push(json["rows"][n]["SJ"]);
|
|
|
+ window.MonthDayCL.data.datasets[0].data[n] = (json["rows"][n]["擦洗"]);
|
|
|
+ window.MonthDayCL.data.datasets[1].data[n] = (json["rows"][n]["改洗"]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ window.MonthDayCL.update();
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ function initData2() {
|
|
|
+ window.chartColors = {
|
|
|
+ red: 'rgb(255, 99, 132)',
|
|
|
+ orange: 'rgb(255, 159, 64)',
|
|
|
+ yellow: 'rgb(255, 250, 86)',
|
|
|
+ green: 'rgb(75, 192, 192)',
|
|
|
+ blue: 'rgb(54, 162, 250)',
|
|
|
+ purple: 'rgb(153, 102, 255)',
|
|
|
+ grey: 'rgb(231,233,237)'
|
|
|
+ };
|
|
|
+
|
|
|
+ var color = Chart.helpers.color;
|
|
|
+
|
|
|
+ window.randomScalingFactor = function (num) {
|
|
|
+ return Math.round(Math.random() * num);
|
|
|
+ }
|
|
|
+
|
|
|
+ Chart.defaults.global.defaultFontColor = 'white';
|
|
|
+ Chart.defaults.global.defaultFontSize = 13;
|
|
|
+ Chart.defaults.global.legend.display = false;
|
|
|
+
|
|
|
+ //每小时产量=========================================
|
|
|
+ window.configMonthDayCL = {
|
|
|
+ data: {
|
|
|
+ labels: [],
|
|
|
+ datasets: [ {
|
|
|
+ label: "擦洗量",
|
|
|
+ fill: false,
|
|
|
+ backgroundColor: color(window.chartColors.blue).alpha(0.6).rgbString(),
|
|
|
+ borderColor: window.chartColors.blue,
|
|
|
+ borderWidth: 2,
|
|
|
+ pointRadius: 13,
|
|
|
+ data: []
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "改洗量",
|
|
|
+ fill: false,
|
|
|
+ backgroundColor: color(window.chartColors.green).alpha(0.6).rgbString(),
|
|
|
+ borderColor: window.chartColors.green,
|
|
|
+ borderWidth: 2,
|
|
|
+ pointRadius: 13,
|
|
|
+ data: []
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ type: 'line',
|
|
|
+ options: {
|
|
|
+ responsive: true,
|
|
|
+ legend: {
|
|
|
+ display: true
|
|
|
+ },
|
|
|
+ title: {
|
|
|
+ display: false,
|
|
|
+ text: '每小时产量'
|
|
|
+ },
|
|
|
+ tooltips: {
|
|
|
+ mode: 'index',
|
|
|
+ intersect: false,
|
|
|
+ },
|
|
|
+ hover: {
|
|
|
+ mode: 'nearest',
|
|
|
+ intersect: true
|
|
|
+ },
|
|
|
+ scales: {
|
|
|
+ xAxes: [{
|
|
|
+ display: true,
|
|
|
+ scaleLabel: {
|
|
|
+ display: false,
|
|
|
+ labelString: ''
|
|
|
+ }
|
|
|
+ }],
|
|
|
+ yAxes: [{
|
|
|
+ display: true,
|
|
|
+ scaleLabel: {
|
|
|
+ display: false,
|
|
|
+ labelString: 'Value'
|
|
|
+ }
|
|
|
+ }]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+ var ctxMonthDayCL = document.getElementById("canvasMonthDayCL").getContext("2d");
|
|
|
+ window.MonthDayCL = new Chart(ctxMonthDayCL, configMonthDayCL);
|
|
|
+ }
|
|
|
+
|
|
|
function initData() {
|
|
|
window.chartColors = {
|
|
|
red: 'rgb(255, 99, 132)',
|
|
|
@@ -332,7 +447,7 @@
|
|
|
}
|
|
|
|
|
|
Chart.defaults.global.defaultFontColor = 'white';
|
|
|
- Chart.defaults.global.defaultFontSize = 16;
|
|
|
+ Chart.defaults.global.defaultFontSize = 13;
|
|
|
Chart.defaults.global.legend.display = false;
|
|
|
|
|
|
//每小时产量=========================================
|
|
|
@@ -344,27 +459,10 @@
|
|
|
backgroundColor: color(window.chartColors.red).alpha(0.6).rgbString(),
|
|
|
borderColor: window.chartColors.red,
|
|
|
borderWidth: 2,
|
|
|
- pointRadius: 15,
|
|
|
+ pointRadius: 13,
|
|
|
data: [],
|
|
|
fill: false,
|
|
|
- }, {
|
|
|
- label: "擦洗量",
|
|
|
- fill: false,
|
|
|
- backgroundColor: color(window.chartColors.blue).alpha(0.6).rgbString(),
|
|
|
- borderColor: window.chartColors.blue,
|
|
|
- borderWidth: 2,
|
|
|
- pointRadius: 15,
|
|
|
- data: []
|
|
|
- },
|
|
|
- {
|
|
|
- label: "改洗量",
|
|
|
- fill: false,
|
|
|
- backgroundColor: color(window.chartColors.green).alpha(0.6).rgbString(),
|
|
|
- borderColor: window.chartColors.green,
|
|
|
- borderWidth: 2,
|
|
|
- pointRadius: 15,
|
|
|
- data: []
|
|
|
- }]
|
|
|
+ }]
|
|
|
},
|
|
|
type: 'line',
|
|
|
options: {
|