checkSeeQuery.jsp 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399
  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. <style type="text/css">
  39. a:HOVER{
  40. color: red;
  41. text-decoration: none;
  42. }
  43. a{
  44. color: #f08300;
  45. text-decoration: none;
  46. }
  47. </style>
  48. <script type="text/javascript" src="js/easyui/export.js"></script>
  49. <script type="text/javascript">
  50. var grid="";
  51. var exportString="";
  52. var i = 1;//第几页
  53. var sum;//总条数
  54. var pageSize =10;
  55. var totalpage;//总页数
  56. $(document).ready(function(){
  57. fLoadTable();
  58. pageSize = $('#pageSize').val();
  59. selectCountry();
  60. selsectCheckStation();
  61. //fLoadData(i,pageSize);
  62. });
  63. function fLoadTable(){
  64. grid=$('#tt').datagrid({
  65. fit: true,//自动大小
  66. title: '',
  67. width: '100%',
  68. height: 580,
  69. toolbar: '#toolbar',
  70. fitColumns: true,
  71. loadMsg:'正在加载, 请稍等 …',
  72. nowrap : true,//设置为true,当数据长度超出列宽时将会自动截取
  73. striped : true,//设置为true将交替显示行背景
  74. collapsible : false,//显示可折叠按钮
  75. fitColumns:true,//允许表格自动缩放,以适应父容器
  76. rownumbers:true,
  77. pagination:true,//分页控件
  78. columns:[[
  79. {field:'carNo',align:'left',title:'所属车辆',width:'120px',formatter: function(value, row, index){
  80. return '<a href="machineDetail?carNo='+value+'&appType='+row.appType+'&operState='+row.operState+'&plateType='+row.plateType+'&carGuid='+row.carGuid+'" target="_blank">'+value+'</a>';
  81. }},
  82. {field:'plateTypeName',align:'left',title:'车牌类型',width:'120px'},
  83. {field:'cylinderNo',align:'left',title:'气瓶出厂编号',width:'160px',formatter: function(value, row, index){
  84. return '<a href="cylinderGuid?cylinderGuid='+row.cylinderGuid+'&carGuid='+row.carGuid+'&carNo='+row.carNo+'&districtNo='+row.installGuid+'" target="_blank">'+value+'</a>';
  85. }},
  86. {field:'cylinderTypeName',align:'left',title:'气瓶类型',width:'180px'},
  87. {field:'appTypeName',align:'left',title:'应用类型',width:60},
  88. {field:'productNo',align:'left',title:'厂家',width:30},
  89. {field:'productDate1',align:'left',title:'生产日期',width:'120px'},
  90. {field:'monitorStation',align:'left',title:'安装监检单位',width:'180px'},
  91. {field:'monitorDate1',align:'left',title:'安装监检日期',width:'160px'},
  92. {field:'monitorLicence',align:'left',title:'安装监检许可',width:'180px'},
  93. {field:'monitorCert',align:'left',title:'安装监检证书',width:'180px'},
  94. {field:'monitorWorkerName',align:'left',title:'安装监检人员',width:'120px'},
  95. {field:'editStation',align:'left',title:'登记/修改站点',width:'180px'},
  96. {field:'editOperator',align:'left',title:'登记/修改操作人员',width:'120px'},
  97. {field:'editOperTime1',align:'left',title:'录入时间',width:'160px'}
  98. ]]
  99. });
  100. }
  101. function show(message) {
  102. $.messager.show({
  103. title: '提示信息',
  104. msg: message,
  105. timeout: 2000,
  106. showType: 'slide'
  107. });
  108. }
  109. function fLoadData(page,rows){
  110. if(!$('#checkStation option:selected').text()){
  111. return false;
  112. }
  113. $.messager.progress({
  114. title: '请等待',
  115. msg: '正在加载数据...',
  116. text: '查询中.......'
  117. });
  118. $.ajax({
  119. type:"POST",
  120. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  121. data:$('#checkStationform').serialize(),
  122. url:"ajax/checkSeedataform?page="+page+"&psize="+rows,
  123. success:function (data){
  124. $.messager.progress('close');
  125. var vData = $.parseJSON(data);
  126. sum = vData.total;
  127. if(sum==0){
  128. show("没有查询到相关信息!!!");
  129. }
  130. totalpage = Math.ceil(sum/rows);
  131. $('#tt').datagrid('loadData', vData); //将数据绑定到datagrid
  132. var p = $('#tt').datagrid('getPager');
  133. $(p).pagination({
  134. pageList: [10,20,30,100,200,400],//可以设置每页记录条数的列表
  135. beforePageText: '第',//页数文本框前显示的汉字
  136. afterPageText: '页 共 {pages} 页',
  137. displayMsg: '当前显示 {from} - {to} 条记录 共 {total} 条记录',
  138. onSelectPage: function (pageNumber, pageSize) {
  139. fLoadData(pageNumber, pageSize);
  140. }
  141. });
  142. }
  143. });
  144. }
  145. function selectCountry(){
  146. var id=document.getElementById("city").value;
  147. var select = document.getElementById("country");
  148. for(var i=select.options.length-1;i>=0;i--) {
  149. select.options.remove(i);
  150. }
  151. $.ajax({
  152. type:"POST",
  153. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  154. url:"ajax/hiddenCity?cityId="+id,
  155. success:function (data){
  156. var obj=eval("(" + data + ")");
  157. $.each(obj.rows, function(i,item){
  158. select.options.add(new Option(item.name, item.id));
  159. });
  160. }
  161. });
  162. }
  163. function selectCountry1(){
  164. selectCountry();
  165. selsectCheckStation();
  166. //changeSize();
  167. }
  168. function changeSize(){
  169. fLoadData(1,10);
  170. }
  171. function selsectCheckStation(){
  172. var ii=1;
  173. var select = document.getElementById("checkStation");
  174. for(var i=select.options.length-1;i>=0;i--) {
  175. select.options.remove(i);
  176. }
  177. $.ajax({
  178. type:"POST",
  179. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  180. data:$('#checkStationform').serialize(),
  181. //url:"ajax/hiddencheckStation",
  182. //url:"ajax/hiddenspeStation",
  183. url:"ajax/hiddenspeStation?type=1",
  184. success:function (data){
  185. var obj=eval("(" + data + ")");
  186. var sum = obj.total;
  187. select.options.add(new Option("全部", ""));
  188. $.each(obj.rows, function(i,item){
  189. select.options.add(new Option(item.name, item.id));
  190. });
  191. }
  192. });
  193. }
  194. function selsectCheckStation1(){
  195. selsectCheckStation();
  196. //changeSize();
  197. }
  198. function expt1(){
  199. expt(grid);
  200. }
  201. function exptSingle(){
  202. if(!grid){
  203. alert("数据为空");
  204. return false;
  205. }else{
  206. expt(grid);
  207. }
  208. }
  209. function exptAll(){
  210. fLoadDataAll(1,5000);
  211. }
  212. function fLoadDataAll(page,rows){
  213. var startTime1 = $('#startTime').datebox('getValue');
  214. var endTime1 = $('#endTime').datebox('getValue');
  215. document.getElementById("pageNumber").innerText = i;
  216. document.getElementById("from").innerText = (page-1)*rows;
  217. document.getElementById("to").innerText = page*rows;
  218. $.messager.progress({
  219. title: '请等待',
  220. msg: '正在加载数据...',
  221. text: '查询中.......'
  222. });
  223. $.ajax({
  224. type:"POST",
  225. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  226. data:$('#checkStationform').serialize(),
  227. url:"ajax/testingdataQuery?page="+page+"&psize="+rows,
  228. success:function (data){
  229. $.messager.progress('close');
  230. var vData = $.parseJSON(data);
  231. sum = vData.total;
  232. if(sum==0){
  233. show("没有查询到相关信息!!!");
  234. }
  235. totalpage = Math.ceil(sum/rows);
  236. document.getElementById("total").innerText = sum;
  237. document.getElementById("totalpage").innerText = totalpage;
  238. var vData = $.parseJSON(data);
  239. $('#tt').datagrid('loadData', vData); //将数据绑定到datagrid
  240. var p = $('#tt').datagrid('getPager');
  241. $(p).pagination({
  242. pageList: [10,20,30,100,200,400],//可以设置每页记录条数的列表
  243. beforePageText: '第',//页数文本框前显示的汉字
  244. afterPageText: '页 共 {pages} 页',
  245. displayMsg: '当前显示 {from} - {to} 条记录 共 {total} 条记录',
  246. onSelectPage: function (pageNumber, pageSize) {
  247. fLoadData(pageNumber, pageSize);
  248. }
  249. });
  250. if(!grid){
  251. alert("数据为空");
  252. return false;
  253. }else{
  254. expt(grid);
  255. }
  256. }
  257. });
  258. }
  259. </script>
  260. </head>
  261. <body>
  262. <!-- 查询结果:数据表格 -->
  263. <table id="tt" cellspacing="0" cellpadding="0" >
  264. </table>
  265. <div id="toolbar" style="padding-top: 10px;height: auto;">
  266. <form id="checkStationform" action="ajax/checkStation" method="post">
  267. <table>
  268. <tr>
  269. <td>
  270. <span class="hzbspan">省:</span>
  271. </td>
  272. <td>
  273. <select name="province" style="width: 150px;height: 34px;min-width: 100px;" class="hzbspan select">
  274. <%for(AuthorityRegionPlace arp:arplist){
  275. cplist = arp.getCityPlace();
  276. %>
  277. <option value="<%=arp.getId() %>">
  278. <%=arp.getName() %>
  279. </option>
  280. <%} %>
  281. </select>
  282. </td>
  283. <td>
  284. <span class="hzbspan">市:</span>
  285. </td>
  286. <td>
  287. <select name="city" id="city" style="width: 150px;height: 34px;min-width: 100px;" class="hzbspan select" onchange="selectCountry1()">
  288. <%
  289. for(CityPlace cp:cplist){
  290. cyplist = cp.getSubPlaceList();
  291. %>
  292. <option value="<%=cp.getId() %>">
  293. <%=cp.getName() %>
  294. </option>
  295. <%} %>
  296. </select>
  297. </td>
  298. <td>
  299. <span class="hzbspan">县:</span>
  300. </td>
  301. <td>
  302. <select name="country" id = "country" style="width: 150px;height: 34px;min-width: 100px;" class="hzbspan select" onchange="selsectCheckStation1();" >
  303. </select>
  304. </td>
  305. </tr>
  306. <tr>
  307. <td>
  308. <span class="hzbspan">监检单位:</span>
  309. </td>
  310. <td>
  311. <select name="checkStation" id = "checkStation" style="width: 150px;height: 34px;min-width: 100px;" class="hzbspan select" >
  312. <option value="">全部</option>
  313. </select>
  314. </td>
  315. </tr>
  316. <tr>
  317. <td>
  318. <span style="cursor: default"><span class="hzbspan">气瓶类型:</span></span></td>
  319. <td><select name="cylinderType" id="cylinderType" style="width: 150px;height: 34px;" class="hzbspan select" >
  320. <option value="-1" selected="selected">全部</option>
  321. <option value="0">其他</option>
  322. <option value="1">钢质气瓶</option>
  323. <option value="2">钢质内胆环向缠绕气瓶</option>
  324. <option value="3">铝合金内胆全缠绕气瓶</option>
  325. <option value="4">塑料内胆全缠绕气瓶</option>
  326. <option value="5">LNG液化天然气气瓶</option>
  327. </select></td>
  328. <td>
  329. <span style="cursor: default"><span class="hzbspan">监检开始时间:</span></span></td>
  330. <td><input type="text" name="startTime" id="startTime" class="easyui-datebox" style="width: 150px;height: 34px;" class="hzbspan" data-options="prompt:'- - - - - - -'">
  331. </td>
  332. <td><span style="cursor: default"><span class="hzbspan">监检结束时间:</span></span></td>
  333. <td><input type="text" name="endTime" id="endTime" class="easyui-datebox" style="width: 150px;height: 34px;" class="hzbspan" data-options="prompt:'- - - - - - -'">
  334. </td>
  335. <td><span style="cursor: default"><span class="hzbspan">监检单位编号:</span></span><input type="text" name="monitorStationNo" id="monitorStationNo" style="width: 150px;height: 34px;" class="hzbspan" placeholder="- - - - - - -">
  336. </td></tr>
  337. <tr><td>
  338. <span style="cursor: default"><span class="hzbspan">气瓶厂家编号:</span></span></td>
  339. <td><input type="text" name="productNo" id="productNo" style="width: 150px;height: 34px;" class="hzbspan" placeholder="- - - - - - -">
  340. </td>
  341. <td><span style="cursor: default"><span class="hzbspan">气瓶出厂编号:</span></span></td>
  342. <td><input type="text" name="cylinderNo" id="cylinderNo" style="width: 150px;height: 34px;" class="hzbspan" placeholder="- - - - - - -">
  343. </td>
  344. <td>
  345. <span style="cursor: default"><span class="hzbspan">车牌号:</span></span></td>
  346. <td><input type="text" name="carNo" id="carNo" style="width: 150px;height: 34px;" class="hzbspan" placeholder="- - - - - - -">
  347. </td>
  348. <td>
  349. <a id="btninfosearch" onclick="changeSize();" class="easyui-linkbutton" icon="icon-search" href="javascript:void(0)"><span class="hzbspan" style="color: #f08300;font-size: 16px;">查询</span></a>
  350. <a id="btninfosearch" onclick="exptSingle();" class="easyui-linkbutton" icon="icon-save" href="javascript:void(0)"><span class="hzbspan" style="color: #f08300;font-size: 16px;">导出</span></a>
  351. </td></tr>
  352. </table>
  353. </form>
  354. </div>
  355. <div id="dialog2"></div>
  356. </body>
  357. </html>