SmallKanban.html 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  6. <link rel="shortcut icon" href="/img/logo.png" />
  7. <link rel="bookmark" href="/img/logo.png" />
  8. <link rel="stylesheet" href="/plugins/bootstrap-4.3.1/css/bootstrap.min.css">
  9. <link rel="stylesheet" href="/plugins/font-awesome-4.7.0/css/font-awesome.min.css">
  10. <link href="/Plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet" />
  11. <link rel="stylesheet" href="../DashBoard.css?v3" />
  12. <script src="/Plugins/jquery-3.4.1/jquery-3.4.1.min.js"></script>
  13. <script src="/Plugins/xrequest/xrequest.min.js"></script>
  14. <title>东科软件</title>
  15. </head>
  16. <body class="bg-white p-0 dk-report">
  17. <!--实时缺陷记录-->
  18. <div class="container-fluid pt-1 p-0 box_1920_1080">
  19. <div class="position-absolute">
  20. <span id="实时缺陷加载" class="dk-report-loading" style="padding-left: 290px;font-size: 13px;color: #38dcff;font-weight: 700;float: left;padding-top: 40px;"></span>
  21. </div>
  22. <h4 class="text-center pb-2 dk-report-title" style="font-size: 60px; font-weight: bolder;color: #f8f9fa;">小件看板</h4>
  23. <table id="小件看板第一table" class="table-hover table-striped" style="font-size: 14px; width: 1875px; margin-left: 21px; margin-top: -18px;">
  24. <thead style="border: 1px solid #38dcff ">
  25. <tr style="height: 42px; width: 1866px;">
  26. <td scope="col" class="text-center" id="wd" style="width: 130px; font-size: 35px; color: #f8f9fa; text-align:left ">
  27. <div style="text-align: left; font-size: 35px;">出窑数:<soan id="cys" style=" font-size: 35px;"></soan></div>
  28. <div style="text-align:right;margin-top:-3%"<span id="sj" style=" font-size: 35px;">0000-00-00 00:00</span></div>
  29. </td>
  30. </tr>
  31. </thead>
  32. </table>
  33. <div style="width: 49%; height:65%">
  34. <table id="修坯上水" class="table-hover table-striped" style=" width: 100%; height: 5%; margin-left: 21px; margin-top: -17px;">
  35. <thead style="border: 1px solid #38dcff ">
  36. <tr style="height: 35px; width: 1866px;">
  37. <td colspan="6" scope="col" class="text-center" id="wd" style="width: 130px; font-size: 30px; color: #f8f9fa; text-align: center ">修坯上水</td>
  38. </tr>
  39. <tr style="height: 35px; width: 1866px; ">
  40. <td colspan="3" scope="col" class="text-center" id="xpcl" style="width: 130px; font-size: 30px; color: #f8f9fa; text-align: left ">总 产 量:</td>
  41. <td colspan="3" scope="col" class="text-center" id="xphgl" style="width: 130px; font-size: 30px; color: #f8f9fa; text-align: left ">总合格率:</td>
  42. </tr>
  43. <tr style="height: 28px; width: 1866px; ">
  44. <td colspan="2" scope="col" class="text-center" id="wd" style="width: 130px; font-size: 28px; color: #f8f9fa; text-align: center ">工 号</td>
  45. <td colspan="2" scope="col" class="text-center" id="wd" style="width: 130px; font-size: 28px; color: #f8f9fa; text-align: center ">产 量</td>
  46. <td colspan="2" scope="col" class="text-center" id="wd" style="width: 130px; font-size: 28px; color: #f8f9fa; text-align: center ">合格率</td>
  47. </tr>
  48. </thead>
  49. </table>
  50. <table id="修坯上水模版" class="table-hover table-striped" style=" width: 100%; height: 5%; margin-left: 21px; margin-top: -17px; display: none;">
  51. <thead style="border: 1px solid #38dcff ">
  52. <tr style="height: 24px; ">
  53. <td colspan="2" scope="col" class="text-center" id="wd" style="width: 130px; font-size: 25px; color: #f8f9fa; text-align: left ">{gh}</td>
  54. <td colspan="2" scope="col" class="text-center" id="wd" style="width: 130px; font-size: 25px; color: #f8f9fa; text-align: left ">{cl}</td>
  55. <td colspan="2" scope="col" class="text-center" id="wd" style="width: 130px; font-size: 25px; color: #f8f9fa; text-align: left ">{hgl}</td>
  56. </tr>
  57. </thead>
  58. </table>
  59. <table id="xpsssj" cellspacing="0" cellpadding="0" border="0" style="width: 100%; margin-left: 21px; margin-top: -17px; ">
  60. </table>
  61. </div>
  62. <div style="width: 937px; height: 35%; margin-top: -700px; ">
  63. <table id="施釉" class="table-hover table-striped" style="font-size: 30px; height: 5%; width: 100%; margin-left: 960px; ">
  64. <tr style="height: 35px; width: 1866px;">
  65. <td colspan="6" scope="col" class="text-center" id="wd" style="width: 130px; font-size: 30px; color: #f8f9fa; text-align: center ">施釉</td>
  66. </tr>
  67. <tr style="height: 35px; width: 1866px;">
  68. <td colspan="3" scope="col" class="text-center" id="sycl" style="width: 130px; font-size: 30px; color: #f8f9fa; text-align: left ">总 产 量:</td>
  69. <td colspan="3" scope="col" class="text-center" id="syhgl" style="width: 130px; font-size: 30px; color: #f8f9fa; text-align: left ">总合格率:</td>
  70. </tr>
  71. <tr style="height: 28px; width: 1866px; ">
  72. <td colspan="2" scope="col" class="text-center" id="wd" style="width: 130px; font-size: 28px; color: #f8f9fa; text-align: center ">工 号</td>
  73. <td colspan="2" scope="col" class="text-center" id="wd" style="width: 130px; font-size: 28px; color: #f8f9fa; text-align: center ">产 量</td>
  74. <td colspan="2" scope="col" class="text-center" id="wd" style="width: 130px; font-size: 28px; color: #f8f9fa; text-align: center ">合格率</td>
  75. </tr>
  76. </table>
  77. <table id="施釉模版" class="table-hover table-striped" style=" width: 100%; height: 5%; margin-left: 960px; margin-top: -17px; display: none;">
  78. <thead style="border: 1px solid #38dcff ">
  79. <tr style="height: 32px; width: 1866px; ">
  80. <td colspan="2" scope="col" class="text-center" id="wd" style="width: 130px; font-size: 25px; color: #f8f9fa; text-align: left ">{gh}</td>
  81. <td colspan="2" scope="col" class="text-center" id="wd" style="width: 130px; font-size: 25px; color: #f8f9fa; text-align: left ">{cl}</td>
  82. <td colspan="2" scope="col" class="text-center" id="wd" style="width: 130px; font-size: 25px; color: #f8f9fa; text-align: left ">{hgl}</td>
  83. </tr>
  84. </thead>
  85. </table>
  86. <table id="施釉数据" cellspacing="0" cellpadding="0" border="0" style="width: 100%; margin-left: 960px; margin-top: -17px; ">
  87. </table>
  88. </div>
  89. <div style="width: 49%; height: 40%; margin-top: 203px ">
  90. <table id="二检" class="table-hover table-striped" style="font-size: 30px; height: 5%; width: 100%; margin-left: 21px; ">
  91. <tr style="height: 35px; width: 1866px;">
  92. <td colspan="8" scope="col" class="text-center" id="wd" style="width: 130px; font-size: 33px; color: #f8f9fa; text-align: center ">二检</td>
  93. </tr>
  94. <tr style="height: 28px; width: 1866px; ">
  95. <td colspan="2" scope="col" class="text-center" id="wd" style="width: 100px; font-size: 28px; color: #f8f9fa; text-align: center ">工 号</td>
  96. <td colspan="2" scope="col" class="text-center" id="wd" style="width: 120px; font-size: 28px; color: #f8f9fa; text-align: center ">产 量</td>
  97. <td colspan="2" scope="col" class="text-center" id="wd" style="width: 100px; font-size: 28px; color: #f8f9fa; text-align: center ">外裂量</td>
  98. <td colspan="2" scope="col" class="text-center" id="wd" style="width: 120px; font-size: 28px; color: #f8f9fa; text-align: center ">合格率</td>
  99. </tr>
  100. </table>
  101. <table id="二检模版" class="table-hover table-striped" style=" width: 100%; height: 5%; margin-left: 21px; margin-top: -17px; display: none; ">
  102. <thead style="border: 1px solid #38dcff ">
  103. <tr style="height: 30px; width: 1866px; ">
  104. <td colspan="2" scope="col" class="text-center" id="wd" style="width: 100px; font-size: 23px; color: #f8f9fa; text-align: left ">{gh}</td>
  105. <td colspan="2" scope="col" class="text-center" id="wd" style="width: 120px; font-size: 23px; color: #f8f9fa; text-align: left ">{cl}</td>
  106. <td colspan="2" scope="col" class="text-center" id="wd" style="width: 100px; font-size: 23px; color: #f8f9fa; text-align: left ">{wll}</td>
  107. <td colspan="2" scope="col" class="text-center" id="wd" style="width: 120px; font-size: 23px; color: #f8f9fa; text-align: left ">{hgl}</td>
  108. </tr>
  109. </thead>
  110. </table>
  111. <table id="二检数据" cellspacing="0" cellpadding="0" border="0" style="width: 100%; margin-left: 21px; margin-top: -17px; ">
  112. </table>
  113. </div>
  114. <div style="width: 937px; height: 10%; margin-left: 960px; margin-top: -605px ">
  115. <table id="缺陷汇总" class="table-hover table-striped" style="font-size: 30px; height: 100%; width: 100%; ">
  116. <tr style="height: 35px; width: 1866px; ">
  117. <td colspan="6" scope="col" class="text-center" id="wd" style="width: 130px; font-size: 30px; color: #f8f9fa; text-align: center ">缺陷汇总</td>
  118. </tr>
  119. <tr style="height: 32px; width: 1866px; ">
  120. <td colspan="1" scope="col" class="text-center" id="wd" style="width: 100px; font-size: 20px; color: #f8f9fa; text-align: left ">条 码</td>
  121. <td colspan="1" scope="col" class="text-center" id="wd" style="width: 100px; font-size: 25px; color: #f8f9fa; text-align: left ">责任工号</td>
  122. <td colspan="1" scope="col" class="text-center" id="wd" style="width: 100px; font-size: 25px; color: #f8f9fa; text-align: left ">缺陷名称</td>
  123. <td colspan="1" scope="col" class="text-center" id="wd" style="width: 100px; font-size: 25px; color: #f8f9fa; text-align: left ">产品型号</td>
  124. <td colspan="1" scope="col" class="text-center" id="wd" style="width: 100px; font-size: 25px; color: #f8f9fa; text-align: left ">二检工号</td>
  125. <td colspan="1" scope="col" class="text-center" id="wd" style="width: 100px; font-size: 25px; color: #f8f9fa; text-align: left ">产品分级</td>
  126. </tr>
  127. </table>
  128. <div style="width: 100%; margin-top: -17px; height: 207px">
  129. <table id="缺陷汇总模版" class="table-hover table-striped" style="width: 100%; height: 100%; display: none; ">
  130. <thead style="border: 1px solid #38dcff ">
  131. <tr style="height: 36px; width: 1866px; ">
  132. <td scope="col" class="text-center" id="wd" style="width: 100px; font-size: 15px; color: #f8f9fa; text-align: left ">{tm}</td>
  133. <td scope="col" class="text-center" id="wd" style="width: 100px; font-size: 25px; color: #f8f9fa; text-align: left ">{zrgh}</td>
  134. <td scope="col" class="text-center" id="wd" style="width: 100px; font-size: 18px; color: #f8f9fa; text-align: left ">{qxmc}</td>
  135. <td scope="col" class="text-center" id="wd" style="width: 100px; font-size: 25px; color: #f8f9fa; text-align: left ">{cpxh}</td>
  136. <td scope="col" class="text-center" id="wd" style="width: 100px; font-size: 25px; color: #f8f9fa; text-align: left ">{ejgh}</td>
  137. <td scope="col" class="text-center" id="wd" style="width: 100px; font-size: 25px; color: #f8f9fa; text-align: left ">{cpfj}</td>
  138. </tr>
  139. </thead>
  140. </table>
  141. <table id="缺陷汇总数据" cellspacing="0" cellpadding="0" border="0" style="width: 100%;">
  142. </table>
  143. </div>
  144. </div>
  145. </div>
  146. <!--版权信息-->
  147. <script src="/Plugins/bootstrap-4.3.1/js/bootstrap.bundle.min.js"></script>
  148. <script src="/Plugins/bootstrap-table/bootstrap-table.min.js"></script>
  149. <script src="/Plugins/bootstrap-table/bootstrap-table-locale-all.min.js"></script>
  150. <script src="/Plugins/sweetalert/sweetalert.min.js"></script>
  151. <script src="/Plugins/chartjs-2.8.0/chart-2.8.min.js"></script>
  152. <script src="/Plugins/chartjs-2.8.0/utils.js"></script>
  153. <script>
  154. //缺陷明细定时翻页
  155. var showpage = 10; //显示条数
  156. var pages = 1; //当前页数
  157. var excesspage; //剩余条数
  158. var countpage; //总条数
  159. $(document).ready(function () {
  160. Lode();
  161. TablesFour();
  162. doGetData = setInterval(function () { TablesFour(); }, 8000);
  163. doGetData = setInterval(function () { Lode(); }, 18000);
  164. doGetData = setInterval(function () { loadServerTime(); }, 60000);
  165. doGetData = setInterval(function () { Table1Color(); }, 3000);
  166. });
  167. function Lode() {
  168. loadServerTime();
  169. Summary();
  170. TableOne();
  171. TablesTwo();
  172. TablesThree();
  173. }
  174. function Table1Color() {
  175. Table1Color1();
  176. Table1Color2();
  177. Table1Color3();
  178. }
  179. function Table1Color1() {
  180. var count = 0;
  181. $("#xpsssj tr td:nth-child(3)").each(function () {
  182. if (parseFloat($(this).text().slice(0,-1)) < 98) {
  183. $(this).css("color", "red");
  184. } else {
  185. $(this).css("color", "white");
  186. }
  187. count++;
  188. });
  189. }
  190. function Table1Color2() {
  191. var count = 0;
  192. $("#施釉数据 tr td:nth-child(3)").each(function () {
  193. if (parseFloat($(this).text().slice(0, -1)) < 98) {
  194. $(this).css("color", "red");
  195. } else {
  196. $(this).css("color", "white");
  197. }
  198. count++;
  199. });
  200. }
  201. function Table1Color3() {
  202. var count = 0;
  203. $("#二检数据 tr td:nth-child(4)").each(function () {
  204. if (parseFloat($(this).text().slice(0, -1)) < 98) {
  205. $(this).css("color", "red");
  206. } else {
  207. $(this).css("color", "white");
  208. }
  209. count++;
  210. });
  211. }
  212. //取服务器时间
  213. function loadServerTime() {
  214. $.get('SmallKanban.ashx?m=fwq', function (data) {
  215. var json = JSON.parse(data);
  216. if (json["success"] == true) {
  217. $('#sj').html(json["sj"]);
  218. }
  219. });
  220. }
  221. function Summary() {
  222. $.get('SmallKanban.ashx?m=Summary', function (data) {
  223. var json = JSON.parse(data);
  224. if (json["success"] == true) {
  225. $('#cys').text(json["rows"][0]["出窑数量"]);
  226. $('#xpcl').text("总产量:"+json["rows"][0]["修坯上水产量"]);
  227. $('#sycl').text("总产量:" + json["rows"][0]["施釉产量"]);
  228. var onenumber = json["rows"][0]["修坯上水合格率"].slice(0, -1);
  229. var twonumber = json["rows"][0]["施釉合格率"].slice(0, -1);
  230. if (onenumber < 98) {
  231. document.getElementById('xphgl').style.color = 'red'
  232. } else {
  233. document.getElementById('xphgl').style.color = 'white'
  234. }
  235. if (twonumber < 98) {
  236. document.getElementById('syhgl').style.color = 'red'
  237. } else {
  238. document.getElementById('syhgl').style.color = 'white'
  239. }
  240. $('#xphgl').text("总合格率:" + json["rows"][0]["修坯上水合格率"]);
  241. $('#syhgl').text("总合格率:" + json["rows"][0]["施釉合格率"]);
  242. }
  243. });
  244. }
  245. function TableOne() {
  246. $.get('SmallKanban.ashx?m=修坯上水', function (data) {
  247. var json = JSON.parse(data);
  248. if (json["success"] == true) {
  249. $("#xpsssj").html("");
  250. for (var i = 0; i < json["rows"].length; i++) {
  251. var temp = $("#修坯上水模版").html();
  252. temp = temp.replace("<tbody>", "").replace("</tbody>", "");
  253. temp = temp.replace('{gh}', json["rows"][i]['工号']);
  254. temp = temp.replace('{cl}', json["rows"][i]['产量']);
  255. temp = temp.replace('{hgl}', json["rows"][i]['合格率']);
  256. $("#xpsssj").append(temp);
  257. }
  258. }
  259. });
  260. }
  261. function TablesTwo() {
  262. $.get('SmallKanban.ashx?m=二检', function (data) {
  263. var json = JSON.parse(data);
  264. if (json["success"] == true) {
  265. $("#二检数据").html("");
  266. for (var i = 0; i < json["rows"].length; i++) {
  267. var temp = $("#二检模版").html();
  268. temp = temp.replace("<tbody>", "").replace("</tbody>", "");
  269. temp = temp.replace('{gh}', json["rows"][i]['工号']);
  270. temp = temp.replace('{cl}', json["rows"][i]['产量']);
  271. temp = temp.replace('{wll}', json["rows"][i]['外裂量']);
  272. temp = temp.replace('{hgl}', json["rows"][i]['合格率']);
  273. $("#二检数据").append(temp);
  274. }
  275. }
  276. });
  277. }
  278. function TablesThree() {
  279. $.get('SmallKanban.ashx?m=施釉', function (data) {
  280. var json = JSON.parse(data);
  281. if (json["success"] == true) {
  282. $("#施釉数据").html("");
  283. for (var i = 0; i < json["rows"].length; i++) {
  284. var temp = $("#施釉模版").html();
  285. temp = temp.replace("<tbody>", "").replace("</tbody>", "");
  286. temp = temp.replace('{gh}', json["rows"][i]['工号']);
  287. temp = temp.replace('{cl}', json["rows"][i]['产量']);
  288. temp = temp.replace('{hgl}', json["rows"][i]['合格率']);
  289. $("#施釉数据").append(temp);
  290. }
  291. }
  292. });
  293. }
  294. function TablesFour() {
  295. $.get('SmallKanban.ashx?m=缺陷汇总数量', function (data) {
  296. var json = JSON.parse(data);
  297. if (json["success"] == true) {
  298. countpage = parseInt(json["counts"]);
  299. }
  300. });
  301. excesspage = countpage - (showpage * pages)
  302. if (excesspage > 0) {
  303. pages++;
  304. }
  305. else {
  306. pages = 1;
  307. }
  308. $.get('SmallKanban.ashx?m=缺陷汇总&&page=' + pages, function (data) {
  309. var json = JSON.parse(data);
  310. if (json["success"] == true) {
  311. $("#缺陷汇总数据").html("");
  312. for (var i = 0; i < json["rows"].length; i++) {
  313. var temp = $("#缺陷汇总模版").html();
  314. temp = temp.replace("<tbody>", "").replace("</tbody>", "");
  315. temp = temp.replace('{tm}', json["rows"][i]['条码']);
  316. temp = temp.replace('{zrgh}', json["rows"][i]['责任工号']);
  317. temp = temp.replace('{qxmc}', json["rows"][i]['缺陷名称']);
  318. temp = temp.replace('{cpxh}', json["rows"][i]['产品型号']);
  319. temp = temp.replace('{ejgh}', json["rows"][i]['二检工号']);
  320. temp = temp.replace('{cpfj}', json["rows"][i]['产品分级']);
  321. $("#缺陷汇总数据").append(temp);
  322. }
  323. }
  324. });
  325. }
  326. </script>
  327. <style>
  328. table {
  329. height: 40px;
  330. color: #f8f9fa !important;
  331. font-size: 20px;
  332. font-weight: 700;
  333. background: rgba(25, 52, 90,.5);
  334. border: 1px solid #38dcff;
  335. margin-bottom: 1rem;
  336. }
  337. td {
  338. padding: 2px !important;
  339. text-align: center !important;
  340. border-bottom: 1px solid #38dcff !important;
  341. border-right: 1px dashed #38dcff !important;
  342. border: white;
  343. }
  344. a {
  345. background-color: lightblue;
  346. }
  347. </style>
  348. </body>
  349. </html>