kaoqindataStatistics.jsp 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
  2. <%@ page import="com.runzhixing.bean.CityPlace" %>
  3. <%@ page import="com.runzhixing.bean.CountryPlace" %>
  4. <%@ page import="com.runzhixing.bean.Station" %>
  5. <%@ page import="com.runzhixing.bean.AuthorityRegionPlace" %>
  6. <%@ page import="com.runzhixing.bean.User" %>
  7. <%@ page import="com.runzhixing.constant.Constant" %>
  8. <%
  9. String path = request.getContextPath();
  10. String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
  11. User user = (User)session.getAttribute(Constant.userMark);
  12. List<AuthorityRegionPlace> arplist = user.getPrivilegePlaces1();
  13. List<CityPlace> cplist = new ArrayList<CityPlace>();
  14. List<CountryPlace> cyplist = new ArrayList<CountryPlace>();
  15. List<Station> slist = new ArrayList<Station>();
  16. %>
  17. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  18. <html>
  19. <head>
  20. <base href="<%=basePath%>">
  21. <title>考勤数据统计</title>
  22. <meta http-equiv="pragma" content="no-cache">
  23. <meta http-equiv="cache-control" content="no-cache">
  24. <meta http-equiv="expires" content="0">
  25. <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
  26. <meta http-equiv="description" content="This is my page">
  27. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  28. <meta http-equiv="X-UA-Compatible" content="IE=10"/>
  29. <link rel="stylesheet" type="text/css" href="css/easyui/themes/default/easyui.css">
  30. <link rel="stylesheet" type="text/css" href="css/easyui/themes/icon.css">
  31. <link rel="stylesheet" type="text/css" href="css/easyui/demo/demo.css">
  32. <script type="text/javascript" src="css/easyui/jquery.min.js"></script>
  33. <script type="text/javascript" src="css/easyui/jquery.easyui.min.js" charset="utf-8"></script>
  34. <script type="text/javascript" src="css/easyui/locale/easyui-lang-zh_CN.js" charset="utf-8"></script>
  35. <link rel="stylesheet" type="text/css" href="css/common/hzbstyle.css">
  36. <script type="text/javascript" src="js/common/area.js"></script>
  37. <script type="text/javascript">
  38. var i = 1;//第几页
  39. var sum;//总条数
  40. var totalpage;//总页数
  41. var pageSize =10;
  42. $(document).ready(function(){
  43. fLoadTable();
  44. //fLoadData(1,10);
  45. //selectCountry();
  46. });
  47. function fLoadTable(){
  48. $('#tt').datagrid({
  49. fit: true,//自动大小
  50. title: '考勤数据统计图',
  51. width: '100%',
  52. height: 580,
  53. toolbar: '#toolbar',
  54. fitColumns: true,
  55. singleSelect:false,
  56. loadMsg:'正在加载, 请稍等 …',
  57. nowrap : true,//设置为true,当数据长度超出列宽时将会自动截取
  58. striped : true,//设置为true将交替显示行背景
  59. collapsible : true,//显示可折叠按钮
  60. singleSelect:true,//为true时只能选择单行
  61. fitColumns:true//允许表格自动缩放,以适应父容器
  62. });
  63. }
  64. function fLoadData(page,rows){
  65. var cylinderpName = $('#cylinderpName').val();
  66. var myDate = new Date();
  67. var cylinderTime = myDate.getTime();
  68. cylinderpName = "images/createImg/"+cylinderTime+".png";
  69. var checkText="";
  70. var checkText1=$("#province").find("option:selected").text();
  71. var checkText2=$("#city").find("option:selected").text();
  72. checkText2 = checkText2.replace("无", "");
  73. checkText2 = checkText2.replace("全部", "");
  74. var checkText3=$("#country").find("option:selected").text();
  75. checkText3 = checkText3.replace("无", "");
  76. checkText3 = checkText3.replace("全部", "");
  77. checkText = checkText1+checkText2+checkText3;
  78. if (!checkText ){
  79. checkText = "考勤数据统计图";
  80. } 
  81. $.messager.progress({
  82. title: '请等待',
  83. msg: '正在加载数据...',
  84. text: '查询中.......'
  85. });
  86. $.ajax({
  87. type:"POST",
  88. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  89. data:$('#kaoqinDateStatistform').serialize(),
  90. url:"ajax/kaoqinDateStatist?cylinderpName="+cylinderTime,
  91. success:function (data){
  92. //$("#infoaddstreetwindows").panel({title:rowData.seriesName});
  93. document.getElementById("titleContent").innerHTML=checkText;
  94. document.getElementById("cylinderImg").innerHTML='<img src='+cylinderpName+' height="70%;" width="90%" />';
  95. //document.getElementById("cylinderImg").innerHTML='<img src='+inputpName+'height="auto" width="100%" />';
  96. $.messager.progress('close');
  97. }
  98. });
  99. }
  100. function selectCountry(){
  101. var id=document.getElementById("city").value;
  102. var select = document.getElementById("country");
  103. for(var i=select.options.length-1;i>=0;i--) {
  104. select.options.remove(i);
  105. }
  106. $.ajax({
  107. type:"POST",
  108. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  109. url:"ajax/hiddenCity?cityId="+id,
  110. success:function (data){
  111. var obj=eval("(" + data + ")");
  112. $.each(obj.rows, function(i,item){
  113. select.options.add(new Option(item.name, item.id));
  114. });
  115. }
  116. });
  117. }
  118. function selectCountry1(){
  119. selectCountry();
  120. //fLoadData(1,10);
  121. }
  122. </script>
  123. </head>
  124. <body>
  125. <!-- 查询结果:数据表格 -->
  126. <table id="tt" cellspacing="0" cellpadding="0" >
  127. </table>
  128. <div id="toolbar" style="padding-top: 2px;height: auto;">
  129. <form id="kaoqinDateStatistform" action="ajax/cylinderDateStatist" method="post">
  130. <span class="easyui-linkbutton" style="cursor: default;margin-bottom: 5px;"><span class="hzbspan" style="color: #f08300;font-size: 16px;" >统计类型:</span></span>&nbsp;&nbsp;
  131. <select name="searchType" id="searchType" style="width: auto;height: 24px;min-width: 100px;" class="hzbspan">
  132. <option value="0">按出勤次数统计</option>
  133. <option value="1">按出勤时间统计</option>
  134. </select>
  135. <span class="easyui-linkbutton" style="cursor: default;margin-bottom: 5px;"><span class="hzbspan" style="color: #f08300;font-size: 16px;" >开始时间:</span></span>&nbsp;&nbsp;
  136. &nbsp;&nbsp;<input type="text" class="easyui-datebox" id="startTime" name="startTime" style="width: 100px;height: 24px;" class="hzbspan">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  137. <span class="easyui-linkbutton" style="cursor: default;margin-bottom: 5px;"><span class="hzbspan" style="color: #f08300;font-size: 16px;" >结束时间:</span></span>&nbsp;&nbsp;
  138. &nbsp;&nbsp;<input type="text" class="easyui-datebox" id="endTime" name="endTime" style="width: 100px;height: 24px;" class="hzbspan">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  139. <a id="btninfosearch" class="easyui-linkbutton" icon="icon-search" onclick="fLoadData(1,10);" style="margin-bottom: 5px;" ><span class="hzbspan" style="color: #f08300;font-size: 16px;">查&nbsp;&nbsp;询&nbsp;&nbsp;</span></a>
  140. </form>
  141. </div>
  142. <center>
  143. <div id="cylinderImg" style="position: absolute;top:125px;left: 10%;width: 80%;height: 500px;text-align: center;overflow: auto;">
  144. </div>
  145. <div id="titleContent" style="position: absolute;top:105px;height: auto;left: 10%;width:80%; text-align: center;font-size: 18px;" class="hzbspan">
  146. </div>
  147. </center>
  148. </body>
  149. </html>