reeor.jsp 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <%@ page contentType="text/html; charset=utf-8" session="false" %>
  2. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <title>我的工作台</title>
  6. <%@ include file="../common/header.jsp" %>
  7. <link type="text/css" rel="stylesheet" href="${contextPath}/css/themes/easyui.css" />
  8. <script type="text/javascript" src="${contextPath }/js/jquery.easyui.min.js"></script>
  9. <script type="text/javascript" src="${contextPath }/js/calendar/WdatePicker.js"></script>
  10. <style type="text/css">
  11. .tabs-panels{
  12. border-style: none none none none;
  13. }
  14. .tabs-header{
  15. border-style: none none none none;
  16. }
  17. </style>
  18. <script type="text/javascript">
  19. $(document).ready( function() {
  20. $("input.datebox").bind("click", function() {WdatePicker();});
  21. setNowDate();
  22. $("#tt").height(document.body.clientHeight-50);
  23. });
  24. $(window).resize(function(){
  25. $("#tt").height(document.body.clientHeight-50);
  26. $(".tabs-header").width(document.body.clientWidth*0.98);
  27. $(".tabs-wrap").width(document.body.clientWidth*0.98);
  28. });
  29. //初始化日期
  30. function setNowDate(){
  31. var myDate = new Date();
  32. var year = myDate.getFullYear();
  33. var month = myDate.getMonth()+1;
  34. var day = myDate.getDate();
  35. var nowdate = year + "-" + month + "-" + day;
  36. $("#beginDate").val(nowdate);
  37. $("#endDate").val(nowdate);
  38. }
  39. //查询数据
  40. function queryDate(){
  41. var tab = $("#tt").tabs("getSelected");
  42. var title = tab.panel("options").title;
  43. if(title == "按车次、班次统计"){
  44. $("#r1Result").load("${contextPath }/admin/statistics/reeorlink.html?reeorno=1");
  45. }else if(title == "违章统计"){
  46. $("#r2Result").load("${contextPath }/admin/statistics/reeorlink.html?reeorno=2");
  47. }else if(title == "饲料投喂误差"){
  48. $("#r3Result").load("${contextPath }/admin/statistics/reeorlink.html?reeorno=3");
  49. }else if(title == "饲料添加误差"){
  50. $("#r4Result").load("${contextPath }/admin/statistics/reeorlink.html?reeorno=4");
  51. }
  52. }
  53. //导出数据
  54. function excelDate(){
  55. var beginDate = $("#beginDate").val();
  56. var endDate = $("#endDate").val();
  57. var tab = $("#tt").tabs("getSelected");
  58. var title = tab.panel("options").title;
  59. if(title == "按车次、班次统计"){
  60. document.location.href="${contextPath }/admin/statistics/reeorexcel.html?reeorno=1&beginDate="+beginDate+"&endDate="+endDate;
  61. }else if(title == "违章统计"){
  62. document.location.href="${contextPath }/admin/statistics/reeorexcel.html?reeorno=2&beginDate="+beginDate+"&endDate="+endDate;
  63. }else if(title == "饲料投喂误差"){
  64. document.location.href="${contextPath }/admin/statistics/reeorexcel.html?reeorno=3&beginDate="+beginDate+"&endDate="+endDate;
  65. }else if(title == "饲料添加误差"){
  66. document.location.href="${contextPath }/admin/statistics/reeorexcel.html?reeorno=4&beginDate="+beginDate+"&endDate="+endDate;
  67. }
  68. }
  69. function leftDate(){
  70. var beginDate = $("#beginDate").val();
  71. var endDate = $("#endDate").val();
  72. var newbDate = checkDate(beginDate,"left");
  73. var neweDate = checkDate(endDate,"left");
  74. $("#beginDate").val(newbDate);
  75. $("#endDate").val(neweDate);
  76. queryDate();
  77. }
  78. function rightDate(){
  79. var beginDate = $("#beginDate").val();
  80. var endDate = $("#endDate").val();
  81. var newbDate = checkDate(beginDate,"");
  82. var neweDate = checkDate(endDate,"");
  83. $("#beginDate").val(newbDate);
  84. $("#endDate").val(neweDate);
  85. queryDate();
  86. }
  87. </script>
  88. </head>
  89. <body>
  90. <div style="background-color: #E0E0E0;">
  91. <div style="height: " class="navfrm">
  92. <span>当前位置:</span>
  93. <span><a href="${contextPath }/admin/welcome.html">首页</a></span>
  94. <span>&nbsp;>>&nbsp;</span>
  95. <span>误差分析</span>
  96. </div>
  97. <input type="hidden" id="Times" name="Times" value="" />
  98. <input type="hidden" id="DataCaptureNo" name="DataCaptureNo" value="" />
  99. <input type="hidden" id="DriverID" name="DriverID" value="" />
  100. <input type="hidden" id="currentpId" name="currentpId" value="${currentpId }" />
  101. <input id="beginDate" name="beginDate" style="width:100px;" class="datebox" value=""/> -
  102. <input id="endDate" name="endDate" style="width:100px;" class="datebox" value=""/>
  103. <input type="button" value="<" onclick="leftDate();" /><input type="button" value=">" onclick="rightDate();" />
  104. <input type="button" value="查询" onclick="queryDate()" class="sysub" />
  105. <input type="button" value="导出Excel" onclick="excelDate()" class="sysub" />
  106. <div id="tt" class="easyui-tabs" style="width:100%;height:100%;">
  107. <div title="按车次、班次统计">
  108. <div id="r1Result" style="padding: 2px;"></div>
  109. </div>
  110. <div title="违章统计">
  111. <div id="r2Result" style="padding: 2px;"></div>
  112. </div>
  113. <div title="饲料投喂误差">
  114. <div id="r3Result" style="padding: 1px;"></div>
  115. </div>
  116. <div title="饲料添加误差">
  117. <div id="r4Result" style="padding: 2px;"></div>
  118. </div>
  119. </div>
  120. </div>
  121. </body>
  122. </html>