bpb_fx.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title></title>
  6. <link rel="stylesheet" type="text/css" href="css/main.css">
  7. <link rel="stylesheet" type="text/css" href="css/jquery-ui.css">
  8. <link rel="stylesheet" type="text/css" href="css/bpb.css">
  9. </head>
  10. <body onclick="clearEle();" class="bpb_bg">
  11. <div class="bpb_title"></div>
  12. <div class="bpb_content">
  13. <div class="abs" style="text-align: center;top:2%;width: 100%;letter-spacing: 5px;color: #cdd2fb;font-size: 18px;">
  14. <span style="position: relative;">订单日期<input value="2025-01-23" readonly="" type="text" style="text-align: center;width: 150px;"><img class="abs" src="image/bpb/CalendarBlank.png" style="left: inherit;right: 5px;"></span>
  15. <span style="position: relative;">预测周期<input value="10" type="text" style="text-align: center;width: 80px;">&nbsp;天</span>
  16. </div>
  17. <div class="bpb_orderlist">
  18. <div class="bpb_order_num fontcolor">订单数:<b>8</b></div>
  19. <div class="itemlist">
  20. <div class="bpb_order_item"><div class="no">编号:12345678</div></div>
  21. <div class="bpb_order_item"><div class="no">编号:12345678</div></div>
  22. <div class="bpb_order_item"><div class="no">编号:12345678</div></div>
  23. <div class="bpb_order_item"><div class="no">编号:12345678</div></div>
  24. <div class="bpb_order_item"><div class="no">编号:12345678</div></div>
  25. <div class="bpb_order_item"><div class="no">编号:12345678</div></div>
  26. <div class="bpb_order_item"><div class="no">编号:12345678</div></div>
  27. <div class="bpb_order_item"><div class="no">编号:12345678</div></div>
  28. </div>
  29. </div>
  30. <div class="pbp_order_app">
  31. <div class="title fontcolor">订单系统</div>
  32. <div class="iconlist">
  33. <img src="image/bpb/o.png" style="z-index: 1">
  34. <img src="image/bpb/o.png" id="order_app_linkpoint" style="z-index: 2;top: calc(0.7*110px);left: calc(0.7*70px);">
  35. <img src="image/bpb/o.png" style="z-index: 3;top: calc(0.7*154px);left: calc(0.7*150px);">
  36. </div>
  37. </div>
  38. <div class="abs" id="order_app_line" style="height: 50px;"><img src="image/bpb/v317.png" style="width: 100%;height: 100%;"><img class="abs refresh" src="image/bpb/refresh.png" style="left: 35%;top:8%;"></div>
  39. <div class="bpb_mt_list">
  40. <div class="title fontcolor">物料清单</div>
  41. <div class="title fontcolor" style="left: 360px;top: 94px;">经编产能</div>
  42. <img class="wlbg" src="image/bpb/wlbg.png">
  43. <div class="itemlist">
  44. <div class="bpb_mt_item"><table cellspacing="0" cellpadding="0"><tr><td rowspan="2">单层涤纶毯(成品)</td><td>需求:30T</td></tr><tr><td>库存:35T</td></tr></table><img src="image/bpb/v320.png" class="link_point"><div class="cl"><b class="">10T</b></div></div>
  45. <div class="bpb_mt_item"><table cellspacing="0" cellpadding="0"><tr><td rowspan="2">单层涤纶毯(成品)</td><td>需求:30T</td></tr><tr><td>库存:35T</td></tr></table><img src="image/bpb/v320.png" class="link_point"><div class="cl"><b class="">10T</b></div></div>
  46. <div class="bpb_mt_item alarm"><table cellspacing="0" cellpadding="0"><tr><td rowspan="2">单层涤纶毯(成品)</td><td>需求:30T</td></tr><tr><td>库存:35T</td></tr></table><img src="image/bpb/v320.png" class="link_point"><div class="cl"><b class="">10T</b></div></div>
  47. <div class="bpb_mt_item alarm"><table cellspacing="0" cellpadding="0"><tr><td rowspan="2">单层涤纶毯(成品)</td><td>需求:30T</td></tr><tr><td>库存:35T</td></tr></table><img src="image/bpb/v320.png" class="link_point"><div class="cl"><b class="">10T</b></div></div>
  48. </div>
  49. </div>
  50. <div class="abs" id="order_wl_line" style="width: calc(0.5*240px);"><img src="image/bpb/v318.png" style="width: 100%;height: 100%;"><img class="abs refresh" src="image/bpb/refresh.png" style="left: 35%;top:8%;"></div>
  51. <div class="pbp_storage">
  52. <div class="title fontcolor" style="top: 43px;left: -20px;">仓储</div>
  53. <div class="iconlist">
  54. <img src="image/bpb/h.png" style="z-index: 1">
  55. <img src="image/bpb/h.png" id="storage_app_linkpoint" style="z-index: 2;top: calc(0.7*110px);left: calc(0.7*70px);">
  56. <img src="image/bpb/h.png" style="z-index: 3;top: calc(0.7*154px);left: calc(0.7*150px);">
  57. </div>
  58. <div class="abs" id="storage_wl_line" style="height: 50px;"><img src="image/bpb/v317.png" style="width: 100%;height: 100%;"><img class="abs refresh" src="image/bpb/refresh.png" style="left: 35%;top:100%;width: 36px;height: 36px"></div>
  59. </div>
  60. <div class="pbp_plc">
  61. <div class="title fontcolor" style="top: 43px;left: -20px;">生产</div>
  62. <div class="iconlist">
  63. <img src="image/bpb/plc.png" style="z-index: 1">
  64. <img src="image/bpb/plc.png" id="plc_app_linkpoint" style="z-index: 2;top: calc(0.7*110px);left: calc(0.7*70px);">
  65. <img src="image/bpb/plc.png" style="z-index: 3;top: calc(0.7*154px);left: calc(0.7*150px);">
  66. </div>
  67. <div class="abs" id="plc_wl_line" style="height: 50px;"><img src="image/bpb/v319.png" style="width: 100%;height: 100%;top:0;"><img class="abs refresh" src="image/bpb/refresh.png" style="left: 35%;top:32%;width: 36px;height: 36px"></div>
  68. </div>
  69. <div class="bpb_order_resultlist" style="left:inherit;right: 50px;top:calc(0.7*710px)">
  70. <div class="itemlist">
  71. <div class="bpb_order_item"><div class="no">需求过剩:5T<br>编号:12345678</div></div>
  72. <div class="bpb_order_item"><div class="no">需求过剩:5T<br>编号:12345678</div></div>
  73. <div class="bpb_order_item"><div class="no">需求过剩:5T<br>编号:12345678</div></div>
  74. <div class="bpb_order_item"><div class="no">需求过剩:5T<br>编号:12345678</div></div>
  75. <div class="bpb_order_item"><div class="no">需求过剩:5T<br>编号:12345678</div></div>
  76. <div class="bpb_order_item"><div class="no">需求过剩:5T<br>编号:12345678</div></div>
  77. <div class="bpb_order_item alarm"><div class="no">需求过剩:5T<br>编号:12345678</div></div>
  78. <div class="bpb_order_item alarm"><div class="no">需求过剩:5T<br>编号:12345678</div></div>
  79. </div>
  80. <div class="abs order_result_line"><img src="image/bpb/v320.png" class="link_point"><img class="abs refresh" src="image/bpb/refresh.png" style="left: 35%;top:27%;width: 36px;height: 36px"></div>
  81. </div>
  82. </div>
  83. </body>
  84. </html>
  85. <!-- 引入qwebchannel.js、Player.js、PlayerUtils.js -->
  86. <script type="text/javascript" src="jquery-3.4.1.js"></script>
  87. <script type="text/javascript" src="jquery-ui.min.js"></script>
  88. <script type="text/javascript" src="echarts.min.js"></script>
  89. <script src="global.js"></script>
  90. <script type="text/javascript" src="template.js"></script>
  91. <script>
  92. //汉化日期控件
  93. $.datepicker.regional['zh-CN'] = {
  94. clearText: '清除',
  95. clearStatus: '清除已选日期',
  96. closeText: '关闭',
  97. closeStatus: '不改变当前选择',
  98. prevText: '<上月',
  99. prevStatus: '显示上月',
  100. prevBigText: '<<',
  101. prevBigStatus: '显示上一年',
  102. nextText: '下月>',
  103. nextStatus: '显示下月',
  104. nextBigText: '>>',
  105. nextBigStatus: '显示下一年',
  106. currentText: '今天',
  107. currentStatus: '显示本月',
  108. monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
  109. monthNamesShort: ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二'],
  110. monthStatus: '选择月份',
  111. yearStatus: '选择年份',
  112. weekHeader: '周',
  113. weekStatus: '年内周次',
  114. dayNames: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
  115. dayNamesShort: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
  116. dayNamesMin: ['日', '一', '二', '三', '四', '五', '六'],
  117. dayStatus: '设置 DD 为一周起始',
  118. dateStatus: '选择 m月 d日, DD',
  119. dateFormat: 'yy-mm-dd',
  120. firstDay: 1,
  121. initStatus: '请选择日期',
  122. isRTL: false
  123. };
  124. $(document).ready(function () {
  125. $.datepicker.setDefaults($.datepicker.regional['zh-CN']); //设置日期控制语言
  126. $("#datepicker1").datepicker({
  127. dateFormat: "yy-mm-dd",
  128. showOn: "button",
  129. buttonText: "选择日期",
  130. changeMonth: true,
  131. changeYear: true,
  132. numberOfMonths: 1,
  133. rangeSelect: true,
  134. onClose: function (selectedDate) {
  135. $("#datepicker2").datepicker("option", "minDate", selectedDate);
  136. $("#datepicker2").val('');
  137. var isNowDay = selectedDate==new Date().Format("yyyy-MM-dd");
  138. var hour1Opts = [];
  139. var nowHour = new Date().Format("h");
  140. for (var i = 0; i < 24; i++) {
  141. if( !isNowDay || (isNowDay && i<=nowHour)) hour1Opts.push('<option value="' + i + '">' + i + ' 时</option>');
  142. }
  143. $("#hour1,#hourP1").html(hour1Opts.join(''))
  144. }
  145. });
  146. $("#datepicker2").datepicker({
  147. dateFormat: "yy-mm-dd",
  148. showOn: "button",
  149. buttonText: "选择日期",
  150. changeMonth: true,
  151. changeYear: true,
  152. numberOfMonths: 1,
  153. rangeSelect: true,
  154. defaultDate: new Date().Format("yyyy-MM-dd"),
  155. onClose:function(selectedDate){
  156. var isNowDay = selectedDate==new Date().Format("yyyy-MM-dd");
  157. var hour2Opts = [];
  158. var nowHour = new Date().Format("h");
  159. for (var i = 0; i < 24; i++) {
  160. if( !isNowDay || (isNowDay && i<=nowHour)) hour2Opts.push('<option value="' + i + '">' + i + ' 时</option>');
  161. }
  162. $("#hour2,#hourP2").html(hour2Opts.join(''))
  163. }
  164. });
  165. //日期不能超过当前日期
  166. //$("#datepicker1,#datepicker2").datepicker("option", "maxDate", new Date().Format("yyyy-MM-dd"));
  167. $("#date_select,#ui-datepicker-div,#day_select").on("click", function (e) {
  168. e.stopPropagation();
  169. });
  170. //$(".bpb_content").height($(window).height()-$(".bpb_title").height());
  171. $(".bpb_content .bpb_orderlist .itemlist .bpb_order_item").each(function(ind,obj){
  172. var $this = $(this);
  173. $this.css({"left":'0px',"top":(ind*30)+'px',"z-index":100-ind});
  174. })
  175. var lastitem =$(".bpb_content .bpb_orderlist .itemlist .bpb_order_item:last");
  176. var orderH = lastitem.height()+lastitem.position().top;
  177. $(".bpb_content .bpb_orderlist").height(orderH);
  178. $(".pbp_order_app").css({"top":lastitem.position().top+lastitem.height()/2+"px"});
  179. var tmpele = $("#order_app_linkpoint");
  180. $("#order_app_line").css({"left":(tmpele.offset().left+tmpele.width()/2+30)+"px","top":tmpele.offset().top-tmpele.height()-30+"px"});
  181. $("#order_wl_line").css({"top":lastitem.offset().top-lastitem.height()/4+"px","left":lastitem.offset().left+lastitem.width()+"px"});
  182. var $bpb_mt_list = $(".bpb_mt_list");
  183. $(".pbp_storage").css({"top":$bpb_mt_list.position().top+$bpb_mt_list.height()-60+"px","left":$bpb_mt_list.offset().left-120+"px"});
  184. var tmpele = $("#storage_app_linkpoint");
  185. $("#storage_wl_line").css({"left":(tmpele.position().left+tmpele.width()/2+30)+"px","top":tmpele.position().top-tmpele.height()-30+"px","width":(0.7*130)+"px","height":(0.7*80)+"px"});
  186. $(".bpb_mt_list .itemlist .bpb_mt_item").each(function(ind,obj){
  187. var $this = $(this);
  188. $this.css({"left":272+(ind*-53)+'px',"top":11+(ind*30)+'px',"z-index":100-ind});
  189. var $linkline = $this.find(".link_point").css({"left":$this.width()-16+'px',"top":$this.height()-13+'px',"z-index":100-ind});
  190. $this.find(".cl").css({"left":$this.width()+$linkline.width()-40+'px',"top":$this.height()+$linkline.height()-46+'px',"z-index":100-ind});
  191. });
  192. var $bpb_mt_lastitem = $(".bpb_mt_list .bpb_mt_item:last .cl");
  193. $(".pbp_plc").css({"top":$bpb_mt_lastitem.offset().top+$bpb_mt_lastitem.height()-60+"px","left":$bpb_mt_lastitem.offset().left-200+"px"});
  194. var tmpele = $("#plc_app_linkpoint");
  195. $("#plc_wl_line").css({"left":(tmpele.position().left+tmpele.width()/2+30)+"px","top":tmpele.position().top-tmpele.height()-30+"px","width":(0.7*132)+"px","height":(0.7*173)+"px"});
  196. //需求预测结果
  197. var orderList = $(".bpb_content .bpb_order_resultlist .itemlist .bpb_order_item");
  198. orderList.each(function(ind,obj){
  199. var $this = $(this);
  200. $this.css({"left":'0px',"top":(ind*-37)+'px',"z-index":1+ind});
  201. });
  202. var $order_result_line = $(".order_result_line");
  203. var orderCount = orderList.length;
  204. if(orderCount>3) orderCount=3;
  205. var tmpTop = orderList.eq(0).height()*0.7+((orderCount-1)*30);
  206. $order_result_line.css({"left":"inherit","right":$(".bpb_content .bpb_order_resultlist").width()+25+"px","top":tmpTop*-1+"px"})
  207. });
  208. function clearEle(){
  209. }
  210. function GetData() {
  211. $.getJSON(SERVER_URL + "/index", {}, function (res) {
  212. setTimeout(function () {
  213. //每60秒主动查询一次数据
  214. GetData()
  215. }, INDEX_TIMEOUT);
  216. if (res == null || res.code != 0) {
  217. return
  218. }
  219. var jsondata = res.data;
  220. })
  221. }
  222. //关闭窗口
  223. function CloseWin() {
  224. }
  225. </script>