纽威
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.

405 lines
19 KiB

11 months ago
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>纽威库位状态看板</title>
  6. <link rel="stylesheet" href="~/Content/Cust017/css/comon1.css" />
  7. <link rel="stylesheet" href="~/Content/Cust007/css/public.css" />
  8. <link rel="stylesheet" href="~/Content/Cust007/css/fq.css" />
  9. <style>
  10. .span1 {
  11. /*width: 130px !important;*/
  12. }
  13. .span2 {
  14. /*margin-bottom:2px;*/
  15. }
  16. .listhead5 span {
  17. /*font-family: 黑体;
  18. font-weight: 500 !important;*/
  19. font-size: 0.1rem !important;
  20. }
  21. .nav03 {
  22. height: calc(100%);
  23. }
  24. #WIPRCV ul li span {
  25. font-size: 0.2rem !important;
  26. word-break: break-word;
  27. }
  28. </style>
  29. </head>
  30. <body>
  31. <!-- 头部模块 -->
  32. <div class="header">
  33. <div class="title">
  34. <span>纽威系统看板</span>
  35. </div>
  36. <div class="time">
  37. <span></span>
  38. </div>
  39. <div class="company">
  40. @*<img src="~/Content/img/Panellogo.png" border="0" class="logoclass" />*@
  41. </div>
  42. </div>
  43. <div class="header5">
  44. <div class="title">库位状态看板</div>
  45. </div>
  46. <!-- 主题模块 -->
  47. <div class="main">
  48. <div class="mainbox">
  49. <ul class="clearfix">
  50. <li style="height: calc(95% - 0.45rem);">
  51. <div class="boxall" style="height: calc(100% - 0.1rem);">
  52. <div class="boxnav nav03">
  53. <button style="background-color: blue; font-size: 0.3rem !important;margin-left:40%" onclick="GetStatusOne()">一期</button>
  54. <button style="background-color: blue; font-size: 0.3rem !important; margin-left: 10px" onclick="GetStatusTwo()">二期</button>
  55. <button style="background-color: blue; font-size: 0.3rem !important;margin-left:10px" onclick="GetStatusThree()">三期</button>
  56. <div class="listnav listnav1 scrollDiv ContentFont" id="WIPRCV">
  57. </div>
  58. </div>
  59. <div class="boxfoot"></div>
  60. </div>
  61. </li>
  62. </ul>
  63. </div>
  64. </div>
  65. <script type="text/javascript" src="~/Content/Cust017/js/jquery.js"></script>
  66. <script type="text/javascript" src="~/Content/Cust017/js/echarts.min.js"></script>
  67. <script src="~/Content/Cust017/js/jquery.liMarquee.js"></script>
  68. <script language="JavaScript" src="~/Content/Cust017/js/js.js"></script>
  69. <script type="text/javascript" src="~/Content/Cust017/js/jquery.countup.min.js"></script>
  70. <script type="text/javascript" src="~/Content/Cust017/js/jquery.waypoints.min.js"></script>
  71. <script type="text/javascript">
  72. var time1;
  73. var time2;
  74. var time3;
  75. function GetStatusOne() {
  76. clearInterval(time1);
  77. clearInterval(time2);
  78. clearInterval(time3);
  79. time1 = setInterval(function () {
  80. $('.scrollDiv').liMarquee('destroy');
  81. GetStatusOne();
  82. }, 30 *60 * 1000);
  83. $.ajax({
  84. url: "/WMS/WatchPanel/GetGridJson_WareStatusOne?" + Math.random(),
  85. data: {},
  86. dataType: "json",
  87. async: true,
  88. success: function (result) {
  89. //请求成功时执行该函数内容,result即为服务器返回的json对象
  90. if (result && result != null && result.length > 0) {
  91. var html = "<ul>";
  92. var Count = Math.floor(result.length / 5);
  93. for (var i = 0; i < Count; i++) {
  94. if (result[5 * i].Qty != '0') {
  95. html += '<li> <span style="background-color:red">' + result[5 * i].LocationCode + '</span>';
  96. }
  97. else {
  98. html += '<li> <span style="background-color:green">' + result[5 * i].LocationCode + '</span>';
  99. }
  100. if (result[5 * i].Qty != '0') {
  101. html += '<span style="background-color:red">' + result[5 * i + 1].LocationCode + '</span>';
  102. }
  103. else {
  104. html += '<span style="background-color:green">' + result[5 * i + 1].LocationCode + '</span>';
  105. }
  106. if (result[5 * i].Qty != '0') {
  107. html += '<span style="background-color:red">' + result[5 * i + 2].LocationCode + '</span>';
  108. }
  109. else {
  110. html += '<span style="background-color:green">' + result[5 * i + 2].LocationCode + '</span>';
  111. }
  112. if (result[5 * i].Qty != '0') {
  113. html += '<span style="background-color:red">' + result[5 * i + 3].LocationCode + '</span>';
  114. }
  115. else {
  116. html += '<span style="background-color:green">' + result[5 * i + 3].LocationCode + '</span>';
  117. }
  118. if (result[5 * i].Qty != '0') {
  119. html += '<span style="background-color:red">' + result[5 * i + 4].LocationCode + '</span>';
  120. }
  121. else {
  122. html += '<span style="background-color:green">' + result[5 * i + 4].LocationCode + '</span>';
  123. }
  124. }
  125. if (result.length - Count * 5 > 0) {
  126. var i = result.length - Count * 5;
  127. if (i == 1) {
  128. if (result[Count * 5].Qty != '0') {
  129. html += '<li> <span style="background-color:red">' + result[Count * 5].LocationCode + '</span></li>';
  130. }
  131. else {
  132. html += '<li> <span style="background-color:green">' + result[Count * 5].LocationCode + '</span></li>';
  133. }
  134. }
  135. else {
  136. if (result[Count * 5].Qty != '0') {
  137. html += '<li><span style="background-color:red">' + result[Count * 5].LocationCode + '</span>';
  138. }
  139. else {
  140. html += '<li><span style="background-color:green">' + result[Count * 5].LocationCode + '</span>';
  141. }
  142. for (var i = 1; i < result.length - Count * 5; i++) {
  143. if (result[Count * 5 + i].Qty != '0') {
  144. html += '<span style="background-color:red">' + result[Count * 5 + i].LocationCode + '</span>';
  145. }
  146. else {
  147. html += '<span style="background-color:green">' + result[Count * 5 + i].LocationCode + '</span>';
  148. }
  149. }
  150. html += '</li>';
  151. }
  152. }
  153. html += "</ul>";
  154. $("#WIPRCV").html(html);
  155. $('.scrollDiv').liMarquee({
  156. direction: 'up', //身上滚动
  157. runshort: true, //内容不足时不滚动
  158. scrollamount: 20, //速度
  159. hoverstop: false
  160. })
  161. }
  162. else {
  163. alert("库位状态没有抓取到相关数据");
  164. }
  165. },
  166. error: function (errorMsg) {
  167. alert("库位状态统计请求数据失败!", "error");
  168. }
  169. });
  170. }
  171. function GetStatusTwo() {
  172. clearInterval(time1);
  173. clearInterval(time2);
  174. clearInterval(time3);
  175. $("#WIPRCV").html('');
  176. time2 = setInterval(function () {
  177. $('.scrollDiv').liMarquee('destroy');
  178. GetStatusTwo();
  179. }, 30 *60 * 1000);
  180. $.ajax({
  181. url: "/WMS/WatchPanel/GetGridJson_WareStatusTwo?" + Math.random(),
  182. data: {},
  183. dataType: "json",
  184. async: true,
  185. success: function (result) {
  186. //请求成功时执行该函数内容,result即为服务器返回的json对象
  187. if (result && result != null && result.length > 0) {
  188. var html = "<ul>";
  189. var Count = Math.floor(result.length / 5);
  190. for (var i = 0; i < Count; i++) {
  191. if (result[5 * i].Qty != '0') {
  192. html += ' <li><span style="background-color:red">' + result[5 * i].LocationCode + '</span>';
  193. }
  194. else {
  195. html += ' <li><span style="background-color:green">' + result[5 * i].LocationCode + '</span>';
  196. }
  197. if (result[5 * i].Qty != '0') {
  198. html += ' <span style="background-color:red">' + result[5 * i + 1].LocationCode + '</span>';
  199. }
  200. else {
  201. html += ' <span style="background-color:green">' + result[5 * i + 1].LocationCode + '</span>';
  202. }
  203. if (result[5 * i].Qty != '0') {
  204. html += ' <span style="background-color:red">' + result[5 * i + 2].LocationCode + '</span>';
  205. }
  206. else {
  207. html += ' <span style="background-color:green">' + result[5 * i + 2].LocationCode + '</span>';
  208. }
  209. if (result[5 * i].Qty != '0') {
  210. html += ' <span style="background-color:red">' + result[5 * i + 3].LocationCode + '</span>';
  211. }
  212. else {
  213. html += ' <span style="background-color:green">' + result[5 * i + 3].LocationCode + '</span>';
  214. }
  215. if (result[5 * i].Qty != '0') {
  216. html += ' <span style="background-color:red">' + result[5 * i + 4].LocationCode + '</span> </li>';
  217. }
  218. else {
  219. html += ' <span style="background-color:green">' + result[5 * i + 4].LocationCode + '</span> </li>';
  220. }
  221. }
  222. if (result.length - Count * 5 > 0) {
  223. var i = result.length - Count * 5;
  224. if (i == 1) {
  225. if (result[Count * 5].Qty != '0') {
  226. html += '<li> <span style="background-color:red">' + result[Count * 5].LocationCode + '</span></li>';
  227. }
  228. else {
  229. html += '<li> <span style="background-color:green">' + result[Count * 5].LocationCode + '</span></li>';
  230. }
  231. }
  232. else {
  233. if (result[Count * 5].Qty != '0') {
  234. html += '<li><span style="background-color:red">' + result[Count * 5].LocationCode + '</span>';
  235. }
  236. else {
  237. html += '<li><span style="background-color:green">' + result[Count * 5].LocationCode + '</span>';
  238. }
  239. for (var i = 1; i < result.length - Count * 5; i++) {
  240. if (result[Count * 5 + i].Qty != '0') {
  241. html += '<span style="background-color:red">' + result[Count * 5 + i].LocationCode + '</span>';
  242. }
  243. else {
  244. html += '<span style="background-color:green">' + result[Count * 5 + i].LocationCode + '</span>';
  245. }
  246. }
  247. html += '</li>';
  248. }
  249. }
  250. html += "</ul>";
  251. $("#WIPRCV").html(html);
  252. $('.scrollDiv').liMarquee({
  253. direction: 'up', //身上滚动
  254. runshort: true, //内容不足时不滚动
  255. scrollamount: 20, //速度
  256. hoverstop: false
  257. })
  258. }
  259. else {
  260. alert("库位状态没有抓取到相关数据");
  261. }
  262. },
  263. error: function (errorMsg) {
  264. alert("库位状态统计请求数据失败!", "error");
  265. }
  266. });
  267. }
  268. function GetStatusThree() {
  269. clearInterval(time1);
  270. clearInterval(time2);
  271. clearInterval(time3);
  272. $("#WIPRCV").html('');
  273. time3 = setInterval(function () {
  274. $('.scrollDiv').liMarquee('destroy');
  275. GetStatusThree();
  276. }, 30 *60 * 1000);
  277. $.ajax({
  278. url: "/WMS/WatchPanel/GetGridJson_WareStatusThree?" + Math.random(),
  279. data: {},
  280. dataType: "json",
  281. async: true,
  282. success: function (result) {
  283. //请求成功时执行该函数内容,result即为服务器返回的json对象
  284. if (result && result != null && result.length > 0) {
  285. var html = "<ul>";
  286. var Count = Math.floor(result.length / 5);
  287. for (var i = 0; i < Count; i++) {
  288. if (result[5 * i].Qty != '0') {
  289. html += '<li> <span style="background-color:red">' + result[5 * i].LocationCode + '</span>';
  290. }
  291. else {
  292. html += '<li> <span style="background-color:green">' + result[5 * i].LocationCode + '</span>';
  293. }
  294. if (result[5 * i].Qty != '0') {
  295. html += '<span style="background-color:red">' + result[5 * i + 1].LocationCode + '</span>';
  296. }
  297. else {
  298. html += '<span style="background-color:green">' + result[5 * i + 1].LocationCode + '</span>';
  299. }
  300. if (result[5 * i].Qty != '0') {
  301. html += '<span style="background-color:red">' + result[5 * i + 2].LocationCode + '</span>';
  302. }
  303. else {
  304. html += '<span style="background-color:green">' + result[5 * i + 2].LocationCode + '</span>';
  305. }
  306. if (result[5 * i].Qty != '0') {
  307. html += '<span style="background-color:red">' + result[5 * i + 3].LocationCode + '</span>';
  308. }
  309. else {
  310. html += '<span style="background-color:green">' + result[5 * i + 3].LocationCode + '</span>';
  311. }
  312. if (result[5 * i].Qty != '0') {
  313. html += '<span style="background-color:red">' + result[5 * i + 4].LocationCode + '</span>';
  314. }
  315. else {
  316. html += '<span style="background-color:green">' + result[5 * i + 4].LocationCode + '</span>';
  317. }
  318. }
  319. if (result.length - Count * 5 > 0) {
  320. var i = result.length - Count * 5;
  321. if (i == 1) {
  322. if (result[Count * 5].Qty != '0') {
  323. html += '<li> <span style="background-color:red">' + result[Count * 5].LocationCode + '</span></li>';
  324. }
  325. else {
  326. html += '<li> <span style="background-color:green">' + result[Count * 5].LocationCode + '</span></li>';
  327. }
  328. }
  329. else {
  330. if (result[Count * 5].Qty != '0') {
  331. html += '<li><span style="background-color:red">' + result[Count * 5].LocationCode + '</span>';
  332. }
  333. else {
  334. html += '<li><span style="background-color:green">' + result[Count * 5].LocationCode + '</span>';
  335. }
  336. for (var i = 1; i < result.length - Count * 5; i++) {
  337. if (result[Count * 5 + i].Qty != '0') {
  338. html += '<span style="background-color:red">' + result[Count * 5 + i].LocationCode + '</span>';
  339. }
  340. else {
  341. html += '<span style="background-color:green">' + result[Count * 5 + i].LocationCode + '</span>';
  342. }
  343. }
  344. html += '</li>';
  345. }
  346. }
  347. html += "</ul>";
  348. $("#WIPRCV").html(html);
  349. $('.scrollDiv').liMarquee({
  350. direction: 'up', //身上滚动
  351. runshort: true, //内容不足时不滚动
  352. scrollamount: 20, //速度
  353. hoverstop: false
  354. })
  355. }
  356. else {
  357. alert("库位状态没有抓取到相关数据");
  358. }
  359. },
  360. error: function (errorMsg) {
  361. alert("库位状态统计请求数据失败!", "error");
  362. }
  363. });
  364. }
  365. </script>
  366. </body>
  367. </html>