金豪看板
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

668 lines
22 KiB

8 months ago
8 months ago
8 months ago
8 months ago
2 years ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
2 years ago
2 years ago
2 years ago
8 months ago
2 years ago
8 months ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
2 years ago
8 months ago
8 months ago
8 months ago
8 months ago
2 years ago
8 months ago
8 months ago
2 years ago
8 months ago
8 months ago
2 years ago
8 months ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
2 years ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
2 years ago
2 years ago
8 months ago
2 years ago
2 years ago
2 years ago
8 months ago
8 months ago
8 months ago
8 months ago
2 years ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>生产管理看板</title>
  6. <script type="text/javascript" src="~/Content/Cust011/js/jquery.js"></script>
  7. <link rel="stylesheet" href="~/Content/Cust011/css/comon0.css?ss=12" />
  8. <script type="text/javascript" src="~/Content/Cust011/js/echarts.min.js"></script>
  9. <link type="text/css" href="~/Content/Cust003/css/public.css" rel="stylesheet" />
  10. <link type="text/css" href="~/Content/Cust003/css/icon.css" rel="stylesheet" />
  11. <link type="text/css" href="~/Content/Cust003/css/index.css" rel="stylesheet" />
  12. @*<script language="JavaScript" src="~/Content/Cust011/js/js.js?ss=4"></script>*@
  13. <style>
  14. .logoclass {
  15. height:1rem;
  16. }
  17. .TopNamelogo {
  18. position:absolute;
  19. }
  20. .ul_listIn {
  21. -webkit-animation: 14s gundong linear infinite normal;
  22. animation: 14s gundong linear infinite normal;
  23. position: relative;
  24. }
  25. .rightMain_bottomIn, .rightMain_bottom,.biaoge {
  26. height:100%;
  27. }
  28. .rightMain_bottomIn {
  29. border: none;
  30. width: unset;
  31. min-height: unset;
  32. position: relative;
  33. padding: unset;
  34. }
  35. .rightMain_bottomIn .biaoge_list .ul_con {
  36. border-bottom: 1px solid rgba(255, 255, 255, .1);
  37. }
  38. .rightMain_bottomIn .biaoge_list ul li {
  39. width: 20%;
  40. text-align: center;
  41. color: rgba(255, 255, 255, .9);
  42. font-size: 0.18rem;
  43. height: 0.4rem;
  44. line-height: 0.4rem;
  45. border-bottom: 1px solid rgba(255, 255, 255, .1);
  46. white-space: normal !important;
  47. height: auto;
  48. }
  49. table td {
  50. font-size: .18rem;
  51. color: rgba(255, 255, 255, .6);
  52. }
  53. .rightMain_bottomIn .biaoge_list .ul_title {
  54. background: -webkit-linear-gradient(left, rgb(5 17 50 / 10%), rgb(5 17 50 / 50%), rgb(5 17 50 / 10%));
  55. }
  56. .LineStringSet span {
  57. color: #fff;
  58. }
  59. .ZPClass ul li:nth-child(1), .ZPClass ul li:nth-child(1) {
  60. width: 5% !important;
  61. }
  62. .ZPClass ul li:nth-child(2), .ZPClass ul li:nth-child(2) {
  63. width: 12% !important;
  64. }
  65. .ZPClass ul li:nth-child(3), .ZPClass ul li:nth-child(3) {
  66. width: 6% !important;
  67. }
  68. .ZPClass ul li:nth-child(4), .ZPClass ul li:nth-child(4) {
  69. width: 6% !important;
  70. }
  71. .ZPClass ul li:nth-child(5), .ZPClass ul li:nth-child(5) {
  72. width: 12% !important;
  73. }
  74. .ZPClass ul li:nth-child(6), .ZPClass ul li:nth-child(6) {
  75. width: 19% !important;
  76. }
  77. .ZPClass ul li:nth-child(7), .ZPClass ul li:nth-child(7) {
  78. width: 19% !important;
  79. }
  80. .ZPClass ul li:nth-child(8), .ZPClass ul li:nth-child(8) {
  81. width: 6% !important;
  82. }
  83. .ZPClass ul li:nth-child(9), .ZPClass ul li:nth-child(9) {
  84. width: 6% !important;
  85. }
  86. .ZPClass ul li:nth-child(10), .ZPClass ul li:nth-child(10) {
  87. width: 9% !important;
  88. }
  89. .rateCClass {
  90. margin:0.6rem;
  91. }
  92. .rateCClass {
  93. width: 2.4rem;
  94. z-index:99;
  95. }
  96. /* 方法1:Flexbox布局(推荐) */
  97. .equal-width-list {
  98. list-style: none;
  99. margin-bottom: 40px;
  100. }
  101. .equal-width-list li {
  102. display: flex;
  103. padding: 0.04rem;
  104. }
  105. .equal-width-list li span {
  106. flex: 1;
  107. text-align: center;
  108. font-weight: 500;
  109. color:#fff;
  110. font-size:0.2rem;
  111. }
  112. .left-span {
  113. background-color: #344244d1;
  114. color: white;
  115. }
  116. .right-span {
  117. background-color: #395cabb5;
  118. color: white;
  119. }
  120. </style>
  121. </head>
  122. <body>
  123. <div class="head">
  124. <img class="TopNamelogo logoclass" src="~/Content/img/logo.png" border="0" />
  125. <h1><a href="">金豪生产管理看板</a></h1>
  126. <div class="time" id="showTime">2019/12/05 16:16:54</div>
  127. </div>
  128. <div class="mainbox">
  129. <ul class="clearfix" style="height: calc(30%)">
  130. <li style="width: calc(65%)">
  131. <div class="boxall" style="height: calc(100% - 0.15rem)">
  132. <div class="alltitle">十天生产订单开工&生产汇总</div>
  133. <div class="boxnav" id="echarts1"></div>
  134. </div>
  135. </li>
  136. <li style="width: calc(35%)">
  137. <div class="rateCClass " style=" position:absolute;" >
  138. <ul class="equal-width-list">
  139. <li><span class="left-span">设备总数</span><span class="right-span" id="ZQTYStr">0</span></li>
  140. <li> <span class="left-span">开机总数</span><span class="right-span" id="QTYStr">0</span> </li>
  141. <li> <span class="left-span">设备开机率</span><span class="right-span" id="EQPRateStr">0</span> </li>
  142. </ul>
  143. </div>
  144. <div class="boxall" style="height: calc(100% - 0.15rem);">
  145. <div class="alltitle">设备开机率</div>
  146. <div class="boxnav" id="echarts3"></div>
  147. </div>
  148. </li>
  149. </ul>
  150. <ul class="clearfix" style="height: calc(35% )">
  151. <li style="width: calc(100%)">
  152. <div class="boxall" style="height: calc(100% - 0.15rem )">
  153. <div class="alltitle">当天定子生产工单明细</div>
  154. <div class="boxnav" id="">
  155. <div class="rightMain_bottom">
  156. <div class="rightMain_bottomIn">
  157. <div class="biaoge biaoge_list" id="UserWork1_list">
  158. <div class="biaoge_listIn ZPClass">
  159. <ul class="ul_title">
  160. <li>序号</li>
  161. <li>工单代码</li>
  162. <li>计划数量</li>
  163. <li>完工数量</li>
  164. <li>产品代码</li>
  165. <li>产品名称</li>
  166. <li>产品规格</li>
  167. <li>机台号</li>
  168. <li>模具号</li>
  169. <li>客户</li>
  170. </ul>
  171. <div class="ul_list" id="UserWork1_Upp">
  172. <div class="ul_listIn ul_listInCust1 ZPClass" id="UserWork1">
  173. </div>
  174. </div>
  175. </div>
  176. </div>
  177. </div>
  178. </div>
  179. </div>
  180. </div>
  181. </li>
  182. </ul>
  183. <ul class="clearfix" style="height: calc(35% )">
  184. <li style="width: calc(100%)">
  185. <div class="boxall" style="height: calc(100% - 0.15rem )">
  186. <div class="alltitle">当天转子生产工单明细</div>
  187. <div class="boxnav" id="">
  188. <div class="rightMain_bottom">
  189. <div class="rightMain_bottomIn">
  190. <div class="biaoge biaoge_list" id="UserWork2_list">
  191. <div class="biaoge_listIn ZPClass">
  192. <ul class="ul_title">
  193. <li>序号</li>
  194. <li>工单代码</li>
  195. <li>计划数量</li>
  196. <li>完工数量</li>
  197. <li>产品代码</li>
  198. <li>产品名称</li>
  199. <li>产品规格</li>
  200. <li>机台号</li>
  201. <li>模具号</li>
  202. <li>客户</li>
  203. </ul>
  204. <div class="ul_list" id="UserWork2_Upp">
  205. <div class="ul_listIn ul_listInCust2 ZPClass" id="UserWork2">
  206. </div>
  207. </div>
  208. </div>
  209. </div>
  210. </div>
  211. </div>
  212. </div>
  213. </div>
  214. </li>
  215. </ul>
  216. </div>
  217. <script>
  218. $(document).ready(function () {
  219. var whei = $(window).width()
  220. $("html").css({ fontSize: whei / 20 })
  221. $(window).resize(function () {
  222. var whei = $(window).width()
  223. $("html").css({ fontSize: whei / 20 })
  224. });
  225. });
  226. var DataF = 300;// 300;//单位秒 //刷新数据时间
  227. $(function () {
  228. getTime();
  229. GetDataZong();
  230. //刷新数据
  231. timer = setInterval(function () {
  232. GetDataZong();
  233. }, DataF * 1000);
  234. });
  235. function getTime() {
  236. var days = new Array("日", "一", "二", "三", "四", "五", "六");
  237. var currentDT = new Date();
  238. var y, m, date, day, hs, ms, ss, theDateStr;
  239. y = currentDT.getFullYear(); //四位整数表示的年份
  240. m = currentDT.getMonth() < 10 ? '0' + (currentDT.getMonth() + 1) : (currentDT.getMonth() + 1); //月
  241. date = currentDT.getDate() < 10 ? '0' + currentDT.getDate() : currentDT.getDate(); //日
  242. day = currentDT.getDay(); //星期
  243. hs = currentDT.getHours() < 10 ? '0' + currentDT.getHours() : currentDT.getHours(); //时
  244. ms = currentDT.getMinutes() < 10 ? '0' + currentDT.getMinutes() : currentDT.getMinutes(); //分
  245. ss = currentDT.getSeconds() < 10 ? '0' + currentDT.getSeconds() : currentDT.getSeconds(); //秒
  246. theDateStr = y + "-" + m + "-" + date + " " + hs + ":" + ms + ":" + ss;
  247. //填充到组件中
  248. $("#showTime").text(theDateStr);
  249. // setTimeout 在执行时,是在载入后延迟指定时间后,去执行一次表达式,仅执行一次
  250. window.setTimeout(getTime, 1000);
  251. }
  252. function GetDataZong() {
  253. echarts_1();
  254. echarts_3();
  255. table_1();
  256. SetIfGo("UserWork1_Upp", "UserWork1", "UserWork1_list");//判断是否需要滚动
  257. table_2();
  258. SetIfGo("UserWork2_Upp", "UserWork2", "UserWork2_list");//判断是否需要滚动
  259. }
  260. //十天生产订单开工&生产汇总
  261. function echarts_1() {
  262. var myChart = echarts.init(document.getElementById('echarts1'));
  263. var MoQty = new Array();//工单开工数量
  264. var ComInQty = new Array();//工单产出数量
  265. var MonthData = new Array();
  266. //测试
  267. //MonthData = ["1月", "2月", "3月"];
  268. //ComInQty = ["200", "100", "140","200", "100", "140","200", "100", "140","200", "100", "140"];
  269. //MoQty = ["4", "2", "7"];
  270. $.ajax({
  271. url: "/SRM/WatchPanel/GetList1?XX=XX&" + Math.random(),
  272. dataType: "json",
  273. async: false,
  274. success: function (data) {
  275. if (data != false && data != null && data.length > 0) {
  276. for (var i = 0; i < data.length; i++) {
  277. MoQty.push(data[i].开工数);
  278. MonthData.push(data[i].日期);
  279. ComInQty.push(data[i].生产数);
  280. }
  281. }
  282. }
  283. });
  284. option = {
  285. tooltip: {
  286. trigger: 'axis',
  287. axisPointer: { type: 'shadow' },
  288. }, "grid": {
  289. "top": "40",
  290. "right": "10",
  291. "bottom": "20",
  292. "left": "60",
  293. },
  294. legend: {
  295. data: ['开工数', '完工数'],
  296. right: 'center', width: '100%',
  297. textStyle: {
  298. color: "#fff"
  299. },
  300. itemWidth: 12,
  301. itemHeight: 10,
  302. },
  303. "xAxis": [
  304. {
  305. "type": "category",
  306. data: MonthData,
  307. axisLine: { lineStyle: { color: "rgba(255,255,255,.2)" } },
  308. axisLabel: {
  309. textStyle: { color: "rgba(255,255,255,.7)", fontSize: '14', },
  310. },
  311. },
  312. ],
  313. "yAxis": [
  314. {
  315. "type": "value",
  316. "name": "工单数",
  317. axisTick: { show: false },
  318. splitLine: {
  319. show: false,
  320. },
  321. axisLabel: {
  322. "show": true,
  323. fontSize: 14,
  324. color: "rgba(255,255,255,.7)"
  325. },
  326. axisLine: {
  327. min: 0,
  328. max: 10,
  329. lineStyle: { color: 'rgba(255,255,255,.2)' }
  330. },
  331. }
  332. ],
  333. "series": [
  334. {
  335. "name": "开工数",
  336. "type": "bar",
  337. "data": MoQty,
  338. "barWidth": "15%",
  339. "itemStyle": {
  340. "normal": {
  341. barBorderRadius: 15,
  342. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  343. offset: 0,
  344. color: '#145ab0e6'
  345. }, {
  346. offset: 1,
  347. color: '#3783e0e6'
  348. }]),
  349. }
  350. },
  351. //"barGap": "0.2"
  352. },
  353. {
  354. "name": "完工数",
  355. "type": "bar",
  356. "data": ComInQty,
  357. "barWidth": "15%",
  358. "itemStyle": {
  359. "normal": {
  360. barBorderRadius: 15,
  361. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  362. offset: 0,
  363. color: '#8bd46e'
  364. }, {
  365. offset: 1,
  366. color: '#09bcb7'
  367. }]),
  368. }
  369. },
  370. // "barGap": "0.2"
  371. },
  372. ]
  373. };
  374. myChart.setOption(option);
  375. window.addEventListener("resize", function () {
  376. myChart.resize();
  377. });
  378. }
  379. //定子
  380. function table_1() {
  381. $.ajax({
  382. url: "/SRM/WatchPanel/GetGridJson2?ttype=" + escape("定子") + "&" + Math.random(),
  383. dataType: "json",
  384. async: false,
  385. success: function (data) {
  386. if (data != false && data != null && data.length > 0) {
  387. var html = "";
  388. for (var i = 0; i < data.length; i++) {
  389. html += " <ul class='ul_con'> <li>" + data[i].序号 + "</li> <li>" + data[i].工单代码 +
  390. "</li> <li>" + data[i].计划数量 + "</li> <li>" + data[i].完工数量 +
  391. "</li> <li>" + data[i].产品代码 + "</li> <li>" + data[i].产品名称 +
  392. "</li> <li>" + data[i].产品规格 + "</li> <li>" + data[i].机台号 +
  393. "</li> <li>" + data[i].模具号 + "</li> <li>" + data[i].客户 + "</li> </ul>";
  394. }
  395. $(".ul_listInCust1").css("animation-duration", data.length * 3 + "s");
  396. document.getElementById("UserWork1").innerHTML = html;
  397. }
  398. }
  399. });
  400. }
  401. ///转子
  402. function table_2() {
  403. $.ajax({
  404. url: "/SRM/WatchPanel/GetGridJson2?ttype=" + escape("转子") + "&" + Math.random(),
  405. dataType: "json",
  406. async: false,
  407. success: function (data) {
  408. if (data != false && data != null && data.length > 0) {
  409. var html = "";
  410. for (var i = 0; i < data.length; i++) {
  411. html += " <ul class='ul_con'> <li>" + data[i].序号 + "</li> <li>" + data[i].工单代码 +
  412. "</li> <li>" + data[i].计划数量 + "</li> <li>" + data[i].完工数量 +
  413. "</li> <li>" + data[i].产品代码 + "</li> <li>" + data[i].产品名称 +
  414. "</li> <li>" + data[i].产品规格 + "</li> <li>" + data[i].机台号 +
  415. "</li> <li>" + data[i].模具号 + "</li> <li>" + data[i].客户 + "</li> </ul>";
  416. }
  417. $(".ul_listInCust2").css("animation-duration", data.length * 3 + "s");
  418. document.getElementById("UserWork2").innerHTML = html;
  419. }
  420. }
  421. });
  422. }
  423. //设备开机率
  424. function echarts_3() {
  425. // 基于准备好的dom,初始化echarts实例
  426. var myChart = echarts.init(document.getElementById('echarts3'));
  427. var EQPRATE =0;
  428. $.ajax({
  429. url: "/SRM/WatchPanel/GetGridJson7?XX=XX&" + Math.random(),
  430. dataType: "json",
  431. async: false,
  432. success: function (data) {
  433. if (data != false && data != null && data.length > 0) {
  434. EQPRATE=data[0].EQPRATE ;
  435. $("#ZQTYStr").html(data[0].ZQTY);
  436. $("#QTYStr").html(data[0].QTY);
  437. $("#EQPRateStr").html(data[0].EQPRATE+'%');
  438. }
  439. }
  440. });
  441. // EQPRATE = 65;
  442. option = {
  443. series: [
  444. {
  445. type: 'gauge',
  446. radius: "94%",
  447. center: ["74%", "48%"],
  448. itemStyle: {
  449. color: '#58D9F9',
  450. shadowColor: 'rgba(0,138,255,0.45)',
  451. shadowBlur: 10,
  452. shadowOffsetX: 2,
  453. shadowOffsetY: 2,
  454. },
  455. progress: {
  456. show: true,
  457. roundCap: true,
  458. width: 18
  459. },
  460. pointer: {
  461. length: "60%"
  462. },
  463. axisLine: {
  464. roundCap: true,
  465. lineStyle: {
  466. width: 8,
  467. color: [[1, '#37a2da']]
  468. }
  469. },
  470. axisTick: {
  471. splitNumber: 4,
  472. length:4,
  473. lineStyle: {
  474. width: 2,
  475. color: '#999'
  476. }
  477. },
  478. splitLine: {
  479. length: 12,
  480. lineStyle: {
  481. width: 1,
  482. color: '#999'
  483. }
  484. },
  485. axisLabel: {
  486. distance: 4,
  487. color: '#999',
  488. fontSize: 9,
  489. },
  490. title: {
  491. show: false
  492. },
  493. detail: {
  494. width: '20%',
  495. lineHeight: 40,
  496. height: 20,
  497. formatter: '{value} %',
  498. offsetCenter: [0, '65%'],
  499. valueAnimation: false,
  500. rich: {
  501. value: {
  502. fontSize: 30,
  503. fontWeight: 'bolder',
  504. color: '#777'
  505. },
  506. unit: {
  507. fontSize: 20,
  508. color: '#999',
  509. padding: [0, 0, -20, 10]
  510. }
  511. }
  512. },
  513. data: [
  514. {
  515. value: EQPRATE
  516. }
  517. ]
  518. }
  519. ]
  520. };
  521. // 使用刚指定的配置项和数据显示图表。
  522. myChart.setOption(option);
  523. window.addEventListener("resize", function () {
  524. myChart.resize();
  525. });
  526. }
  527. function SetIfGo(DivID, DivCHID, listID) {
  528. var ListDIV = $("#" + listID)[0].clientHeight;
  529. var H_marqueediv = $("#" + DivCHID)[0];
  530. //var H_marquee= H_marqueediv.clientHeight;
  531. var H_marqueeView = $("#" + DivID)[0].clientHeight;
  532. if ((ListDIV - 40) > H_marqueeView) {
  533. if (!$("#" + DivID).hasClass("animationNone")) {
  534. $("#" + DivID).addClass("animationNone");
  535. }
  536. if (!$("#" + DivCHID).hasClass("animationNone")) {
  537. $("#" + DivCHID).addClass("animationNone");
  538. }
  539. }
  540. else {
  541. if ($("#" + DivID).hasClass("animationNone")) {
  542. $("#" + DivID).removeClass("animationNone");
  543. }
  544. if ($("#" + DivCHID).hasClass("animationNone")) {
  545. $("#" + DivCHID).removeClass("animationNone");
  546. }
  547. }
  548. }
  549. </script>
  550. </body>
  551. </html>