| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800 |
- <!doctype html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
- <link rel="shortcut icon" href="/img/logo.png" />
- <link rel="bookmark" href="/img/logo.png" />
- <link rel="stylesheet" href="/plugins/bootstrap-4.3.1/css/bootstrap.min.css">
- <link rel="stylesheet" href="/plugins/font-awesome-4.7.0/css/font-awesome.min.css">
- <link href="/Plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet" />
- <link rel="stylesheet" href="../DashBoard.css?v3" />
- <script src="/Plugins/jquery-3.4.1/jquery-3.4.1.min.js"></script>
- <script src="/Plugins/xrequest/xrequest.min.js"></script>
- <title>东科软件</title>
- </head>
- <body class="bg-white p-0 dk-report">
- <!--实时缺陷记录-->
- <div class="container-fluid pt-1 p-0 box_1920_1080">
- <div class="position-absolute">
- <span id="实时缺陷加载" class="dk-report-loading" style="padding-left: 290px; font-size: 15px; color: #38dcff; font-weight: 700; float: left; padding-top: 40px;"></span>
- <!--<span id="页面跳转" class="dk-report-loading" style="padding-left: 1080px; font-size: 15px; color: #38dcff; font-weight: 700; float: left; margin-top: 40px; ">页面跳转倒计时</span>-->
- </div>
- <h4 class="text-center pb-2 dk-report-title" style="font-size: 60px; font-weight: bolder;color: #f8f9fa;">二检看板</h4>
- <table id="二检" class="table-hover table-striped" style="font-size: 14px; width: 1866px; margin-left: 27px; margin-top: -10px;">
- <thead style="border: 1px solid #38dcff ">
- <tr style="height: 47px; width: 1866px;">
- <!--<td scope="col" class="text-center" style="width: 130px; font-size: 40px; color: #f8f9fa;"><div id="wendu" name="wendu"></div></td>
- <td id="shidu" name="shidu" scope="col" class="text-center" style="width: 130px; font-size: 40px; color: #f8f9fa;"><div id="shidu" name="shidu"></div></td>-->
- <td scope="col" class="text-center" style="text-align: right;width: 130px; font-size: 30px; color: #f8f9fa; ">
- <div id="dqsj" name="dqsj" style="float: right"></div>
- </td>
- </tr>
- </thead>
- </table>
- <div>
- <table class="table-hover table-striped" style="font-size: 14px; width: 1866px; margin-left: 27px; margin-top: -15px;">
- <tr style="height: 47px; width: 1866px;">
- <td scope="col" class="text-center" id="sumjs" style="width: 918px; font-size: 75px; color: #f8f9fa; ">--</td>
- <td scope="col" class="text-center" id="sumhgl" style="width: 918px; font-size: 75px; color: #f8f9fa; ">总合格率:100%</td>
- </tr>
- </table>
- <div id="1" class="box_body" style="display: flex; flex-direction: column; display:block;">
- <!-- #region 横板 -->
- <table id="二检一期上" class="table-hover table-striped" style="font-size: 14px; width: 919px; margin-left: -10px; margin-top: -10px;">
- <thead style="border: 1px solid #38dcff ">
- <tr style="height: 47px; width: 1866px;">
- <td scope="col" class="text-center" style="width: 130px; height: 65px; font-size: 37px; color: #f8f9fa; font-weight: bolder; " colspan="3"><div id="JS2" name="JS2">一线产量:0</div></td>
- </tr>
- <!--<tr style="height: 47px; width: 1866px;">
- <td scope="col" class="text-center" style="width: 130px; height: 65px; font-size: 37px; color: #f8f9fa; font-weight: bolder; " colspan="5"><div id="JS2" name="JS2"></div></td>
- </tr>-->
- <tr style="height: 47px; width: 1866px;">
- <td scope="col" class="text-center" style="width: 130px; font-size: 37px;">缺陷类别</td>
- <td scope="col" class="text-center" style="width: 130px; font-size: 37px;">上水</td>
- <td scope="col" class="text-center" style="width: 130px; font-size: 37px;">规整度</td>
- </tr>
- <tr style="height: 47px;">
- <td scope="col" class="text-center" style="width: 130px; font-size: 23px;">数量</td>
- <td scope="col" class="text-center" style="width: 130px; font-size: 23px; " id="sl11">-</td>
- <td scope="col" class="text-center" style="width: 130px; font-size: 23px; " id="sl12">-</td>
- </tr>
- <tr style="height: 47px;">
- <td scope="col" class="text-center" style="width: 130px; font-size: 23px;">缺陷率</td>
- <td scope="col" class="text-center" style="width: 130px; font-size: 23px; " id="qxl11">-</td>
- <td scope="col" class="text-center" style="width: 130px; font-size: 23px; " id="qxl12">-</td>
- </tr>
- <tr style="height: 71px;">
- <td scope="col" class="text-center" style="width: 130px; font-size: 25px;">前三部位</td>
- <td scope="col" class="text-center" style="width: 130px; font-size: 23px;" id="qsbw11">-</td>
- <td scope="col" class="text-center" style="width: 130px; font-size: 23px;" id="qsbw12">-</td>
- </tr>
- <tr style="height: 47px;">
- <td scope="col" class="text-center" style="width: 130px; font-size: 23px;">合格率</td>
- <td scope="col" class="text-center" style="width: 130px; font-size: 23px; " colspan="2" id="sumhgl1">-</td>
- </tr>
- <tr style="height: 47px;">
- <td scope="col" class="text-center" style="width: 130px; font-size: 23px;">废品率</td>
- <td scope="col" class="text-center" style="width: 130px; font-size: 23px; " colspan="2" id="gxfpll4">-</td>
- </tr>
- </table>
- <table id="二检二期上" class="table-hover table-striped" style="font-size: 14px; width: 919px; margin-left: -10px; margin-top: -10px; ">
- <thead style="border: 1px solid #38dcff ">
- <tr style="height: 47px; width: 1866px;">
- <td scope="col" class="text-center" style="width: 130px; height: 66px; font-size: 37px; color: #f8f9fa; font-weight: bolder; " colspan="5"><div id="JS5" name="JS5">二线产量:0</div></td>
- </tr>
- <!--<tr style="height: 47px; width: 1866px;">
- <td scope="col" class="text-center" style="width: 130px; height: 65px; font-size: 37px; color: #f8f9fa; font-weight: bolder; " colspan="5"><div id="JS5" name="JS5"></div></td>
- </tr>-->
- <tr style="height: 48px; width: 1866px;">
- <td scope="col" class="text-center" style="width: 130px; font-size: 37px;">缺陷类别</td>
- <td scope="col" class="text-center" style="width: 130px; font-size: 37px;">上水</td>
- <td scope="col" class="text-center" style="width: 130px; font-size: 37px;">规整度</td>
- </tr>
- <tr style="height: 49px;">
- <td scope="col" class="text-center" style="width: 130px; font-size: 23px;">数量</td>
- <td scope="col" class="text-center" style="width: 130px; font-size: 23px; " id="sl1">-</td>
- <td scope="col" class="text-center" style="width: 130px; font-size: 23px; " id="sl2">-</td>
- </tr>
- <tr style="height: 49px;">
- <td scope="col" class="text-center" style="width: 130px; font-size: 23px;">缺陷率</td>
- <td scope="col" class="text-center" style="width: 130px; font-size: 23px; " id="qxl1">-</td>
- <td scope="col" class="text-center" style="width: 130px; font-size: 23px; " id="qxl2">-</td>
- </tr>
- <tr style="height: 73px;">
- <td scope="col" class="text-center" style="width: 130px; font-size: 25px;">前三部位</td>
- <td scope="col" class="text-center" style="width: 130px; font-size: 23px;" id="qsbw1">-</td>
- <td scope="col" class="text-center" style="width: 130px; font-size: 23px;" id="qsbw2">-</td>
- </tr>
- <tr style="height: 50px;">
- <td scope="col" class="text-center" style="width: 130px; font-size: 23px;">合格率</td>
- <td scope="col" class="text-center" style="width: 130px; font-size: 23px;" colspan="2" id="sumhgl2">-</td>
- </tr>
- <tr style="height: 50px;">
- <td scope="col" class="text-center" style="width: 130px; font-size: 23px;">废品率</td>
- <td scope="col" class="text-center" style="width: 130px; font-size: 23px;" colspan="2" id="fpl1">-</td>
- </tr>
- </table>
- <div style="width: 960px; height: 550px; padding-left: 24px; margin-top: -100px; ">
- <table id="一线产量明细" class="table-hover table-striped" style="font-size: 14px; width: 480px; position: absolute; right: 28px; absolute; top: 156px; width: 459px; margin-right: 458px; margin-top: 90px; ">
- <thead style="border: 1px solid #38dcff ">
- <tr style="height: 65px;">
- <td scope="col" class="text-center" style="width: 92px; font-size: 40px;" colspan="2">一线</td>
- </tr>
- <tr style="height: 64px;">
- <td scope="col" class="text-center" style="width: 92px; font-size: 35px; ">工号</td>
- <td scope="col" class="text-center" style="width: 92px; font-size: 35px; ">产量</td>
- </tr>
- </thead>
- </table>
- <div style="font-size: 14px; width: 920px; height: 706px; overflow: hidden; position: absolute; right: 28px; absolute; top: -122px; width: 459px; margin-right: 458px; margin-top: 504px; ">
- <table id="二检一线产量明细" style="display: none; border: 1px solid #38dcff ">
- <tr style="height:64px;">
- <td style="font-size: 35px; width: 92px;">{工号1}</td>
- <td style="font-size: 35px; width: 92px;" id="二检一线产量">{产量1}</td>
- </tr>
- </table>
- <table id="DD1" cellspacing="0" cellpadding="0" border="0" style="margin-top: 10px; width: 100%; font-size: 35px; margin-top: 0px ">
- </table>
- </div>
- </div>
- <div>
- <table id="二线产量明细" class="table-hover table-striped" style="font-size: 14px; width: 460px; position: absolute; right: 28px; absolute; top: 156px; width: 459px; margin-left: 0px; margin-top: 90px; ">
- <thead style="border: 1px solid #38dcff ">
- <tr style="height: 65px;">
- <td scope="col" class="text-center" style="width: 92px; font-size: 40px;" colspan="2">二线</td>
- </tr>
- <tr style="height: 64px; ">
- <td scope="col" class="text-center" style="width: 92px; font-size: 35px; ">工号</td>
- <td scope="col" class="text-center" style="width: 92px; font-size: 35px; ">产量</td>
- </tr>
- </thead>
- </table>
- <div style="font-size: 14px; width: 920px; height: 706px; overflow: hidden; position: absolute; right: 28px; absolute; top: -122px; width: 459px; margin-right: 0px; margin-top: 504px; ">
- <table id="二检二线产量明细" style="display: none; border: 1px solid #38dcff ">
- <tr style="height:64px;">
- <td style="font-size: 35px; width: 92px;">{工号2}</td>
- <td style="font-size: 35px; width: 92px;"id="二检二线产量">{产量2}</td>
- </tr>
- </table>
- <table id="DD2" cellspacing="0" cellpadding="0" border="0" style="margin-top: 10px; width: 100%; font-size: 35px; margin-top: 0px ">
- </table>
- </div>
- </div>
- <div style="width: 960px; height: 530px; padding-right: 10px; padding-left: 24px; margin-top: -100px; ">
- <table id="二检二期下" class="table-hover table-striped" style="font-size: 14px; width: 920px; position: absolute; right: 28px; absolute; top: 156px; width: 918px; margin-left: 27px; margin-top: 489px; ">
- <thead style="border: 1px solid #38dcff ">
- <tr style="height: 65px; width: 1866px;">
- <td scope="col" class="text-center" style="width: 153px; font-size: 20px; ">责任工号</td>
- <td scope="col" class="text-center" style="width: 182px; font-size: 20px; ">责任人</td>
- <td scope="col" class="text-center" style="width: 209px; font-size: 20px; ">条码</td>
- <td scope="col" class="text-center" style="width: 181px; font-size: 20px; ">缺陷名称</td>
- <td scope="col" class="text-center" style="width: 184px; font-size: 20px; ">缺陷位置</td>
- <td scope="col" class="text-center" style="width: 182px; font-size: 20px; ">产品分级</td>
- </tr>
- </thead>
- </table>
- <div style="font-size: 14px; width: 920px; height: 706px; overflow: hidden; position: absolute; right: 28px; absolute; top: 210px; width: 918px; margin-left: 27px; margin-top: 503px; ">
- <table id="二检二期下明细" style="display: none; border: 1px solid #38dcff ">
- <tr style="height:47px;">
- <td style="font-size: 35px; width: 150px; font-size: 20px; ">{责任工号2}</td>
- <td style="font-size: 35px; width: 185px; font-size: 20px; " id="zrr">{责任人2}</td>
- <td style="font-size: 35px; width: 185px; font-size: 20px; ">{条码2}</td>
- <td style="font-size: 35px; width: 185px; font-size: 20px; ">{缺陷名称2}</td>
- <td style="font-size: 35px; width: 185px; font-size: 20px; ">{缺陷位置2}</td>
- <td style="font-size: 35px; width: 185px; font-size: 20px; ">{产品分级2}</td>
- <td style="font-size: 35px; width: 185px; font-size: 20px; display:none ">{出现次数}</td>
- </tr>
- </table>
- <table id="ejeqmx" cellspacing="0" cellpadding="0" border="0" style="margin-top: 10px; width: 100%; font-size: 35px; margin-top: 0px ">
- </table>
- </div>
- </div>
- </div>
- <!--<table class="table-hover table-striped" style="font-size: 14px; width: 1866px; margin-left: 27px; margin-top: -15px;">
- <tr style="height: 27px; width: 1866px;">
- <td scope="col" class="text-center" id="CrackSum" style="width: 918px; font-size: 55px; color: #f8f9fa; " colspan="10">--</td>
- </tr>
- </table>-->
- </div>
- <!-- #region 横板 -->
- <!--<div class="box_body" style="display: flex; flex-direction: column; margin-top:-1%;margin-left:27px;">-->
- <!--表格-->
- <!--<div style="width: 1866px; height: 830px; display: flex; flex-direction: row; ">-->
- <!--<div style="width: 60%; height: 930px; padding-right: 2px;">
- <table cellspacing="0" cellpadding="0" border="0" style="width: 100%; font-size: 35px;">
- <tr class="tr_title_warning" style=" font-size: 45px;">
- <td colspan="9" style="color:white;" id="lieone">裂(一线):</td>
- </tr>
- <tr class="tr_title_warning" style=" font-size: 35px;">
- <td style="font-size: 30px; color: white; width: 30%;">责任工号</td>
- <td style="font-size: 30px; color: white; width: 30%">位置</td>
- <td style="font-size: 30px; color: white; width: 30%">数量</td>
- </tr>
- </table>
- <div style="display: flex; height: 600px; overflow: hidden;;margin-top:-13px">
- <table id="firstTable_template" style="display:none;">
- <tr class="tr_title_warning" style="height: 30px; font-size: 35px; ">
- <td style="font-size: 30px; color: white; width: 30%">{dg}</td>
- <td style="font-size: 25px; color: white; width: 30% ">{dp}</td>
- <td style="font-size: 30px; color: white; width: 30%">{dc}</td>
- </tr>
- </table>
- <table id="firstTable" cellspacing="0" cellpadding="0" border="0" style="width: 100%; ">
- </table>
- </div>
- </div>-->
- <!--<div style="width: 60%;height:930px;">
- <table cellspacing="0" cellpadding="0" border="0" style="width: 100%;">
- <tr class="tr_title_warning" style=" font-size: 45px;">
- <td colspan="9" style="color:white;" id="lietwo">裂(二线):</td>
- </tr>
- <tr class="tr_title_warning" style=" font-size: 35px;">
- <td style="font-size: 30px; color: white; width: 30%">责任工号</td>
- <td style="font-size: 30px; color: white; width: 30%">位置</td>
- <td style="font-size: 30px; color: white; width: 30%">数量</td>
- </tr>
- </table>
- <div style="display: flex; height: 600px; overflow: hidden;; margin-top: -13px ">
- <table id="SecondTable_template" style="display: none; ">
- <tr class="tr_bg_light_orange" style="height:30px;">
- <td style="font-size: 30px; color: white; width: 30% ">{mg}</td>
- <td style="font-size: 25px; color: white; width: 30%">{mp}</td>
- <td style="font-size: 30px; color: white; width: 30% ">{mc}</td>
- </tr>
- </table>
- <table id="SecondTable" cellspacing="0" cellpadding="0" border="0" style="width: 100%;">
- </table>
- </div>
- </div>-->
- <!--</div>
- </div>-->
- </div>
-
- <!-- #endregion -->
- <!--版权信息-->
- <script src="/Plugins/bootstrap-4.3.1/js/bootstrap.bundle.min.js"></script>
- <script src="/Plugins/bootstrap-table/bootstrap-table.min.js"></script>
- <script src="/Plugins/bootstrap-table/bootstrap-table-locale-all.min.js"></script>
- <script src="/Plugins/sweetalert/sweetalert.min.js"></script>
- <script src="/Plugins/chartjs-2.8.0/chart-2.8.min.js"></script>
- <script src="/Plugins/chartjs-2.8.0/utils.js"></script>
- <script type="text/javascript">
- var jumptime = 120000;
- var jumptimes = 0;
- var lodpage = 1;
- $(document).ready(function () {
- jumptimes = jumptime;
- doGetData = setInterval(function () { SecondLode(); }, 1000);
- });
- function SecondLode() {
- //if (jumptimes == 0) {
- // ++lodpage;
- // if ((lodpage % 2) == 0) {
- // jumptime = 60000
- // } else {
- // jumptime = 120000;
- // }
- // jumptimes = jumptime;
- // timeUpdate();
- //}
- //else {
- // $("#页面跳转").html('页面跳转倒计时(秒):' + jumptimes / 1000);
- // jumptimes = jumptimes - 1000;
- //}
- }
- function timeUpdate() {
- $("#1").toggle("d-none");
- $("#2").toggle("d-none");
- }
- </script>
- <script>
- //实时缺陷刷新时间
- //获取当前时间
- var firstInterval;
- var firstTableRowCount = 0;
- var SecondInterval;
- var SecondTableRowCount = 0;
- var refreshTime2 = 30000;
- var currentTime2 = 0;
- var tableScroll = true;
- var tableScroll2 = true;
- var doGetData;
- var doGetTime;
- var doGetPage;
- //缺陷明细定时翻页
- var showpage = 7; //显示条数
- var pages = 1; //当前页数
- var excesspage; //剩余条数
- var countpage; //总条数
- //一线产量明细定时翻页
- var showpage1 = 4; //显示条数
- var pages1 = 1; //当前页数
- var excesspage1; //剩余条数
- var countpage1; //总条数
- //二线产量明细定时翻页
- var showpage2 = 4; //显示条数
- var pages2 = 1; //当前页数
- var excesspage2; //剩余条数
- var countpage2; //总条数
- $(document).ready(function () {
- //总合格率
- HGL();
- loadData();
- //右侧
- tableLoad();
- //第二样式 加载
- firstDayTable();
- SecondDayTable();
- TableLoad();
- doGetData = setInterval(function () { tableLoad(); }, 15000);
- doGetData = setInterval(function () { loadData(); }, 1000);
- //刷新时间
- loadServerTime();
- doGetTime = setInterval(function () { loadServerTime(); }, 60000);
- doGetTime = setInterval(function () { TableLoad(); }, 15000);
- //刷新时间
- loadServerTime();
- doGetTime = setInterval(function () { FastTable(); }, 15000);
- doGetTime = setInterval(function () { TimeStar(); }, 2000);
- });
- //取服务器时间
- function loadServerTime() {
- $.get('SecondaryCheck.ashx?m=fwq', function (data) {
- var json = JSON.parse(data);
- if (json["success"] == true) {
- $('#dqsj').html(json["sj"]);
- }
- });
- }
- function TimeStar() {
- DefectDetailsColor();
- firstTableColor();
- SecondTableColor();
- var time = new Date()
- var hour = time.getHours();
- if (hour >= 17) {
- Table1Color();
- Table2Color();
- }
- }
- function Table1Color() {
- $(function () {
- $("#DD1 tr td:nth-child(2)").each(function () {
- if (parseFloat($(this).text()) < 95) {
- $(this).css("color", "red");
- } else if (parseFloat($(this).text()) <= 100 && parseFloat($(this).text()) >= 95) {
- $(this).css("color", "yellow");
- } else if (parseFloat($(this).text()) > 100) {
- $(this).css("color", "white");
- }
- });
- });
- }
- function DefectDetailsColor() {
- var count = 0;
- $(function () {
- $("#ejeqmx tr td:nth-child(7)").each(function () {
- if (parseFloat($(this).text()) >= 2) {
- document.getElementById("ejeqmx").rows[count].cells[1].style.color ="red";
- } else if ((parseFloat($(this).text()) < 2) ){
- document.getElementById("ejeqmx").rows[count].cells[1].style.color = "white";
- }
- count++;
- });
- });
- }
- function firstTableColor() {
- var count = 0;
- $(function () {
- $("#firstTable tr td:nth-child(3)").each(function () {
- if (parseFloat($(this).text()) >= 2) {
- document.getElementById("firstTable").rows[count].cells[0].style.color = "red";
- } else if ((parseFloat($(this).text()) < 2)) {
- document.getElementById("firstTable").rows[count].cells[0].style.color = "white";
- }
- count++;
- });
- });
- }
- function SecondTableColor() {
- var count = 0;
- $(function () {
- $("#SecondTable tr td:nth-child(3)").each(function () {
- if (parseFloat($(this).text()) >= 2) {
- document.getElementById("SecondTable").rows[count].cells[0].style.color = "red";
- } else if ((parseFloat($(this).text()) < 2)) {
- document.getElementById("SecondTable").rows[count].cells[0].style.color = "white";
- }
- count++;
- });
- });
- }
- function Table2Color() {
- $(function () {
- $("#DD2 tr td:nth-child(2)").each(function () {
- if (parseFloat($(this).text()) < 95) {
- $(this).css("color", "red");
- } else if (parseFloat($(this).text()) <= 100 && parseFloat($(this).text()) >=95 ) {
- $(this).css("color", "yellow");
- } else if (parseFloat($(this).text()) > 100) {
- $(this).css("color", "white");
- }
- });
- });
- }
- //定时翻页
- function getPage() {
- $.get('SecondaryCheck.ashx?m=count', function (data) {
- var json = JSON.parse(data);
- if (json["success"] == true) {
- countpage = parseInt(json["counts"]);
- }
- });
- excesspage = countpage - (showpage * pages)
- if (excesspage > 0) {
- pages++;
- }
- else {
- pages = 1;
- }
- $.get('SecondaryCheck.ashx?m=TK1smallTableTitle&&page=' + pages, function (data) {
- var json = JSON.parse(data);
- if (json['success'] == true) {
- $('#ejeqmx').html('');
- for (var i = 0; i < json['rows'].length; i++) {
- var template = $('#二检二期下明细').html();
- template = template.replace("<tbody>", "").replace("</tbody>", "");
- template = template.replace('{责任工号2}', json["rows"][i]['责任工号']);
- template = template.replace('{责任人2}', json["rows"][i]['责任人']);
- template = template.replace('{条码2}', json["rows"][i]['条码']);
- template = template.replace('{缺陷名称2}', json["rows"][i]['缺陷名称']);
- template = template.replace('{缺陷位置2}', json["rows"][i]['缺陷位置']);
- template = template.replace('{产品分级2}', json["rows"][i]['产品分级']);
- template = template.replace('{出现次数}', json["rows"][i]['出现次数']);
- $('#ejeqmx').append(template);
- }
- }
- });
- }
- //加载数据
- function loadData() {
- if (currentTime2 == 0) {
- currentTime2 = refreshTime2;
- loadTable('#二检一期上', 'SecondaryCheck.ashx', function (jsonData) {
- $('#实时缺陷加载').bootstrapTable('refreshOptions', { data: jsonData });
- });
- //总合格率
- HGL();
- //汇总产量
- NumberStatistics();
- //一线合格率
- HGL1();
- //二线合格率
- HGL2();
- }
- else {
- $("#实时缺陷加载").html('刷新倒计时(秒):' + currentTime2 / 1000);
- currentTime2 = currentTime2 - 1000;
- }
- }
- function tableLoad() {
- getPage();
- Dsum();
- //二线产量明细
- Dsum2();
- }
- //一线产量明细
- function Dsum() {
- $.get('SecondaryCheck.ashx?m=count1', function (data) {
- var json = JSON.parse(data);
- if (json["success"] == true) {
- countpage1 = parseInt(json["counts"]);
- }
- });
- excesspage1 = countpage1 - (showpage1 * pages1)
- if (excesspage1 > 0) {
- pages1++;
- }
- else {
- pages1 = 1;
- }
- $.get('SecondaryCheck.ashx?m=DD1&&page=' + pages1, function (data) {
- var json = JSON.parse(data);
- if (json['success'] == true) {
- $('#DD1').html('');
- for (var i = 0; i < json['rows'].length; i++) {
- var template = $('#二检一线产量明细').html();
- template = template.replace("<tbody>", "").replace("</tbody>", "");
- template = template.replace('{工号1}', json["rows"][i]['工号']);
- template = template.replace('{产量1}', json["rows"][i]['产量']);
- $('#DD1').append(template);
- }
- }
- });
- }
- //二线产量明细
- function Dsum2() {
- $.get('SecondaryCheck.ashx?m=count2', function (data) {
- var json = JSON.parse(data);
- if (json["success"] == true) {
- countpage2 = parseInt(json["counts"]);
- }
- });
- excesspage2 = countpage2 - (showpage2 * pages2)
- if (excesspage2 > 0) {
- pages2++;
- }
- else {
- pages2 = 1;
- }
- $.get('SecondaryCheck.ashx?m=DD2&&page=' + pages2, function (data) {
- var json = JSON.parse(data);
- if (json['success'] == true) {
- $('#DD2').html('');
- for (var i = 0; i < json['rows'].length; i++) {
- var template = $('#二检二线产量明细').html();
- template = template.replace("<tbody>", "").replace("</tbody>", "");
- template = template.replace('{工号2}', json["rows"][i]['工号']);
- template = template.replace('{产量2}', json["rows"][i]['产量']);
- $('#DD2').append(template);
- }
- }
- });
- }
- function NumberStatistics() {
- $.get('SecondaryCheck.ashx?m=NumberStatistics', function (data) {
- var json = JSON.parse(data);
- if (json['success'] == true) {
- $('#JS2').html("一线产量:" + json["rows"][0]["一线"]);
- $('#JS5').html("二线产量:" + json["rows"][0]["二线"]);
- $('#sumjs').html("总产量:" + json["rows"][0]["总产量"]);
- }
- });
- }
- function HGL() {
- $.get('SecondaryCheck.ashx?m=HGL', function (data) {
- var json = JSON.parse(data);
- if (json["success"] == true) {
- var tst = Number(json["sumhgl"].toString().match(/^\d+(?:\.\d{0,2})?/))
- $('#sumhgl').html("总合格率:" + (Number(json["sumhgl"].toString().match(/^\d+(?:\.\d{0,2})?/)) + "%"));
- if (json["sumhgl"] >= 98.5 && json["sumhgl"] < 99) {
- document.getElementById('sumhgl').style.color='yellow'
- }
- if ( json["sumhgl"] < 98.5) {
- document.getElementById('sumhgl').style.color = 'red'
- }
- if (json["sumhgl"] >=99) {
- document.getElementById('sumhgl').style.color = 'white'
- }
- }
- });
- }
- function HGL1() {
- $.get('SecondaryCheck.ashx?m=HGL1', function (data) {
- var json = JSON.parse(data);
- if (json["success"] == true) {
- var tst = Number(json["sumhgl"].toString().match(/^\d+(?:\.\d{0,2})?/))
- $('#sumhgl1').html((Number(json["sumhgl"].toString().match(/^\d+(?:\.\d{0,2})?/)) + "%"));
- if (json["sumhgl"] >= 98.5 && json["sumhgl"] < 99) {
- document.getElementById('sumhgl1').style.color = 'yellow'
- }
- if (json["sumhgl"] < 98.5) {
- document.getElementById('sumhgl1').style.color = 'red'
- }
- if (json["sumhgl"] >= 99) {
- document.getElementById('sumhgl1').style.color = 'white'
- }
- }
- });
- }
- function HGL2() {
- $.get('SecondaryCheck.ashx?m=HGL2', function (data) {
- var json = JSON.parse(data);
- if (json["success"] == true) {
- var tst = Number(json["sumhgl"].toString().match(/^\d+(?:\.\d{0,2})?/))
- $('#sumhgl2').html((Number(json["sumhgl"].toString().match(/^\d+(?:\.\d{0,2})?/)) + "%"));
- if (json["sumhgl"] >= 98.5 && json["sumhgl"] < 99) {
- document.getElementById('sumhgl2').style.color = 'yellow'
- }
- if (json["sumhgl"] < 98.5) {
- document.getElementById('sumhgl2').style.color = 'red'
- }
- if (json["sumhgl"] >= 99) {
- document.getElementById('sumhgl2').style.color = 'white'
- }
- }
- });
- }
- //加载数据到表格控件
- function loadTable(id, url, callback) {
- $(id + '加载').html('<i class="fa fa-spinner fa-pulse fa-fw"></i>');
- //TK1本烧
- $.get(url + '?m=TK1Big', function (data) {
- var json = JSON.parse(data);
- if (json['success'] == true) {
- $('#sl11').text(json["rows"][0]["上水"]);
- $('#sl12').text(json["rows"][0]["吹风"]);
- $('#qxl11').text(json["rows"][1]["上水"]);
- $('#qxl12').text(json["rows"][1]["吹风"]);
- $('#qsbw11').text(json["rows"][2]["上水"]);
- $('#qsbw12').text(json["rows"][2]["吹风"]);
- $('#gxfpll4').text(json["rows"][3]["吹风"]);
- //$('#gxfpll4').text(json["rows"][4]["吹风"]);
- //var bll = json["rows"][3]["吹风"].replace("%", "");
- //var fpl = json["rows"][4]["吹风"].replace("%", "")
- //$('#gxhgl4').text(Number((100 - bll - fpl).toString().match(/^\d+(?:\.\d{0,2})?/)) + "%");
- }
- });
- $.get(url + '?m=TK1QualifiedRate', function (data) {
- var json = JSON.parse(data);
- if (json['success'] == true) {
- $('#sl1').text(json["rows"][0]["上水"]);
- $('#sl2').text(json["rows"][0]["吹风"]);
- $('#qxl1').text(json["rows"][1]["上水"]);
- $('#qxl2').text(json["rows"][1]["吹风"]);
- $('#qsbw1').text(json["rows"][2]["上水"]);
- $('#qsbw2').text(json["rows"][2]["吹风"]);
- $('#fpl1').text(json["rows"][3]["吹风"]);
- //$('#fpl1').text(json["rows"][4]["吹风"]);
- //var bll = json["rows"][3]["吹风"].replace("%", "");
- //var fpl = json["rows"][4]["吹风"].replace("%", "")
- //$('#gxhgl4').text(Number((100 - bll - fpl).toString().match(/^\d+(?:\.\d{0,2})?/)) + "%");
- }
- });
- }
-
- function FastTable() {
- CrackSum();
- }
- function TableLoad() {
- if (firstTableRowCount <= 10) {
- //doGetTime = setInterval(function () { firstDayTable(); }, 25000);
- firstDayTable();
- }
- if (SecondTableRowCount <= 10) {
- //doGetTime = setInterval(function () { SecondDayTable(); }, 25000);
- SecondDayTable();
- }
- }
- function CrackSum() {
- //$.get('SecondaryCheck.ashx?m=SumCrack', function (data) {
- // var json = JSON.parse(data);
- // if (json["success"] == true) {
- // $('#lieone').text("裂(一线):" + json["rows"][0]["一线"]);
- // $('#lietwo').text("裂(二线):" + json["rows"][1]["一线"]);
- // $('#CrackSum').text("裂总量:" + json["rows"][2]["一线"]);
- // if (json["rows"][2]["一线"] > 20) {
- // document.getElementById('CrackSum').style.color = 'red'
- // } else {
- // document.getElementById('CrackSum').style.color = 'white'
- // }
-
- // }
- //});
- }
- function firstTableScroll() {
- var scrollHeight = $("#firstTable_template").find("tr").outerHeight();
- $("#firstTable").animate({ marginTop: -scrollHeight, }, 500,
- function () {
- $(this).css({ marginTop: "0px", }).find("tr:first").appendTo(this);
- if (firstTableRowCount > -1) {
- firstTableRowCount--;
- } else {
- clearInterval(firstInterval);
- firstDayTable();
- }
- }
- );
- }
- //明细表
- function firstDayTable() {
- //$.get("SecondaryCheckTwo.ashx?m=firstTable", function (data) {
- // var json = JSON.parse(data);
- // if (json["success"] == true) {
- // $("#firstTable").html("");
- // for (var i = 0; i < json["rows"].length; i++) {
- // var temp = $("#firstTable_template").html();
- // temp = temp.replace("<tbody>", "").replace("</tbody>", "");
- // temp = temp.replace('{dg}', json["rows"][i]['CODE']);
- // temp = temp.replace('{dp}', json["rows"][i]['位置统计']);
- // temp = temp.replace('{dc}', json["rows"][i]['一线产量']);
- // $("#firstTable").append(temp);
- // }
- // firstTableRowCount = json["rows"].length;
- // if (firstInterval > 10) {
- // firstInterval = setInterval(firstTableScroll, 2000);
- // }
- // }
- //});
- }
- function SecondTableScroll() {
- var scrollHeight = $("#SecondTable_template").find("tr").outerHeight();
- $("#SecondTable").animate({ marginTop: -scrollHeight, }, 500,
- function () {
- $(this).css({ marginTop: "0px", }).find("tr:first").appendTo(this);
- if (firstTableRowCount > -1) {
- firstTableRowCount--;
- } else {
- clearInterval(SecondInterval);
- SecondDayTable();
- }
- }
- );
- }
- //明细表
- function SecondDayTable() {
- //$.get("SecondaryCheckTwo.ashx?m=SecondTable", function (data) {
- // var json = JSON.parse(data);
- // if (json["success"] == true) {
- // $("#SecondTable").html("");
- // for (var i = 0; i < json["rows"].length; i++) {
- // var temp = $("#SecondTable_template").html();
- // temp = temp.replace("<tbody>", "").replace("</tbody>", "");
- // temp = temp.replace('{mg}', json["rows"][i]['CODE']);
- // temp = temp.replace('{mp}', json["rows"][i]['位置统计']);
- // temp = temp.replace('{mc}', json["rows"][i]['二线产量']);
- // $("#SecondTable").append(temp);
- // }
- // SecondTableRowCount = json["rows"].length;
- // if (SecondTableRowCount > 10) {
- // SecondInterval = setInterval(SecondTableScroll, 2000);
- // }
- // }
- //});
- }
- </script>
- <style>
- table {
- height: 40px;
- color: #f8f9fa !important;
- font-size: 20px;
- font-weight: 700;
- background: rgba(25, 52, 90,.5);
- border: 1px solid #38dcff;
- margin-bottom: 1rem;
- }
- td {
- padding: 2px !important;
- text-align: center !important;
- border-bottom: 1px solid #38dcff !important;
- border-right: 1px dashed #38dcff !important;
- border: white;
- }
- </style>
- </body>
- </html>
|