ModifydataStatistics.jsp 8.4 KB

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