HcngFillingdataQuery.jsp 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495
  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.tool.Util" %>
  8. <%@ page import="com.runzhixing.constant.Constant" %>
  9. <%
  10. String path = request.getContextPath();
  11. String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
  12. String username = (String) session.getAttribute("username");
  13. User user = (User)session.getAttribute(Constant.userMark);
  14. List<AuthorityRegionPlace> arplist = user.getPrivilegePlaces1();
  15. List<CityPlace> cplist = new ArrayList<CityPlace>();
  16. List<CountryPlace> cyplist = new ArrayList<CountryPlace>();
  17. List<Station> slist = new ArrayList<Station>();
  18. String ssid = (String) session.getAttribute(Constant.Privilege);
  19. %>
  20. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  21. <html>
  22. <head>
  23. <base href="<%=basePath%>">
  24. <title>氢气充装数据查询</title>
  25. <meta http-equiv="pragma" content="no-cache">
  26. <meta http-equiv="cache-control" content="no-cache">
  27. <meta http-equiv="expires" content="0">
  28. <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
  29. <meta http-equiv="description" content="This is my page">
  30. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  31. <meta http-equiv="X-UA-Compatible" content="IE=10"/>
  32. <link rel="stylesheet" type="text/css" href="css/easyui/themes/default/easyui.css">
  33. <link rel="stylesheet" type="text/css" href="css/easyui/themes/icon.css">
  34. <link rel="stylesheet" type="text/css" href="css/easyui/demo/demo.css">
  35. <script type="text/javascript" src="css/easyui/jquery.min.js"></script>
  36. <script type="text/javascript" src="css/easyui/jquery.easyui.min.js" charset="utf-8"></script>
  37. <script type="text/javascript" src="css/easyui/locale/easyui-lang-zh_CN.js" charset="utf-8"></script>
  38. <link rel="stylesheet" type="text/css" href="css/common/hzbstyle.css">
  39. <script type="text/javascript" src="js/easyui/export.js"></script>
  40. <script type="text/javascript" src="js/common/area.js"></script>
  41. <style type="text/css">
  42. .datagrid-header-row td{font-weight: bold;}
  43. #fm
  44. {
  45. margin: 0;
  46. padding: 10px 30px;
  47. }
  48. .ftitle
  49. {
  50. font-size: 14px;
  51. font-weight: bold;
  52. padding: 5px 0;
  53. margin-bottom: 10px;
  54. border-bottom: 1px solid #ccc;
  55. }
  56. .fitem
  57. {
  58. margin-bottom: 5px;
  59. }
  60. .fitem label
  61. {
  62. display: inline-block;
  63. width: 100px;
  64. }
  65. </style>
  66. <style type="text/css">
  67. a:HOVER{
  68. color: red;
  69. text-decoration: none;
  70. }
  71. a{
  72. color: #f08300;
  73. text-decoration: none;
  74. }
  75. </style>
  76. <script type="text/javascript">
  77. var ssid = '<%=ssid %>';
  78. var grid="";
  79. var exportString="";
  80. var i = 1;//第几页
  81. var sum;//总条数
  82. var pageSize =10;
  83. var totalpage;//总页数
  84. $(document).ready(function(){
  85. pageSize = $('#pageSize').val();
  86. selectCountry();
  87. selectstation();
  88. fLoadTable();
  89. $('#btnadd').linkbutton('disable');
  90. $('#btnadd1').linkbutton('disable');
  91. //fLoadData(i,pageSize);
  92. });
  93. function show(message) {
  94. $.messager.show({
  95. title: '提示信息',
  96. msg: message,
  97. timeout: 2000,
  98. showType: 'slide'
  99. });
  100. }
  101. function fLoadTable(){
  102. grid=$('#tt').datagrid({
  103. fit: true,//自动大小
  104. title: '',
  105. width: '100%',
  106. height: 580,
  107. toolbar: '#toolbar',
  108. fitColumns: true,
  109. singleSelect:false,
  110. loadMsg:'正在加载, 请稍等 …',
  111. nowrap : true,//设置为true,当数据长度超出列宽时将会自动截取
  112. striped : true,//设置为true将交替显示行背景
  113. collapsible : false,//显示可折叠按钮
  114. singleSelect:false,
  115. fitColumns:true,//允许表格自动缩放,以适应父容器
  116. rownumbers:true,
  117. pagination:true,//分页控件
  118. columns:[[
  119. {field:'guid',align:'left',title:'UID',width:'160px',rowspan:'2'},
  120. {field:'stationNo',align:'left',title:'站编号',width:'160px',rowspan:'2'},
  121. {field:'stationName',align:'left',title:'站名称',width:'160px',rowspan:'2'},
  122. {field:'carNo',align:'left',title:'车牌号',width:'120px',rowspan:'2'},
  123. {field:'plateType',align:'left',title:'车牌类型',width:'120px',rowspan:'2'},
  124. {field:'plateColor',align:'left',title:'车牌颜色',width:'120px',rowspan:'2'},
  125. {field:'medium',align:'left',title:'充装介质',width:'120px',rowspan:'2'},
  126. {field:'regNo',align:'left',title:'使用登记证号',width:'120px',rowspan:'2'},
  127. {field:'regDate',align:'left',title:'发证时间',width:'120px',rowspan:'2'},
  128. {field:'regValidity',align:'left',title:'证件有效期',width:'120px',rowspan:'2'},
  129. {field:'regUnit',align:'left',title:'发证单位',width:'120px',rowspan:'2'},
  130. {field:'cylinderType',align:'left',title:'气瓶类型',width:'120px',rowspan:'2'},
  131. {field:'cylinderNo',align:'left',title:'气瓶出厂编号',width:'120px',rowspan:'2'},
  132. {field:'productName',align:'left',title:'生产厂家',width:'120px',rowspan:'2'},
  133. {field:'productDate',align:'left',title:'生产日期',width:'120px',rowspan:'2'},
  134. {field:'startuseDate',align:'left',title:'投用日期',width:'120px',rowspan:'2'},
  135. {field:'yearLimit',align:'left',title:'使用年限',width:'120px',rowspan:'2'},
  136. {field:'productLicence',align:'left',title:'生产许可',width:'120px',rowspan:'2'},
  137. {field:'productType',align:'left',title:'气瓶产品型号',width:'120px',rowspan:'2'},
  138. {field:'weight',align:'left',title:'重量',width:'120px',rowspan:'2'},
  139. {field:'vol',align:'left',title:'容积',width:'120px',rowspan:'2'},
  140. {field:'thickness',align:'left',title:'壁厚',width:'120px',rowspan:'2'},
  141. {field:'press',align:'left',title:'压力',width:'120px',rowspan:'2'},
  142. {field:'material',align:'left',title:'材质',width:'120px',rowspan:'2'},
  143. {field:'installStation',align:'left',title:'安装单位',width:'120px',rowspan:'2'},
  144. {field:'installCert',align:'left',title:'安装合格证',width:'120px',rowspan:'2'},
  145. {field:'installDate',align:'left',title:'安装时间',width:'120px',rowspan:'2'},
  146. {field:'monitorStation',align:'left',title:'监检单位',width:'120px',rowspan:'2'},
  147. {field:'monitorCert',align:'left',title:'监检合格证',width:'120px',rowspan:'2'},
  148. {field:'monitorDate',align:'left',title:'监检时间',width:'120px',rowspan:'2'},
  149. {field:'checkStation',align:'left',title:'检验单位',width:'120px',rowspan:'2'},
  150. {field:'checkCert',align:'left',title:'检验合格证',width:'120px',rowspan:'2'},
  151. {field:'checkDate',align:'left',title:'检验时间',width:'120px',rowspan:'2'},
  152. {field:'nextCheckDate',align:'left',title:'下次检验时间',width:'120px',rowspan:'2'},
  153. {field:'beforeChecker',align:'left',title:'充装检查人员',width:'120px',rowspan:'2'},
  154. {field:'beforeTime',align:'left',title:'充半检查时间',width:'120px',rowspan:'2'},
  155. {field:'beforeItems',align:'left',title:'充装前检查项目',width:'120px',rowspan:'2'},
  156. {field:'beforeResult',align:'left',title:'充前检查结果',width:'120px',rowspan:'2'},
  157. {field:'beforeException',align:'left',title:'充前检查异常项目',width:'120px',rowspan:'2'},
  158. {field:'carRemark',align:'left',title:'车辆其它信息',width:'120px',rowspan:'2'},
  159. {field:'cylinderRemark',align:'left',title:'气瓶其它信息',width:'120px',rowspan:'2'},
  160. {field:'beforeVerifier',align:'left',title:'充前审核人员',width:'120px',rowspan:'2'},
  161. {field:'operatorName',align:'left',title:'操作人员姓名',width:'120px',rowspan:'2'},
  162. {field:'operatorId',align:'left',title:'操作人员身份证号',width:'120px',rowspan:'2'},
  163. {field:'operatorNo',align:'left',title:'操作人员编号',width:'120px',rowspan:'2'},
  164. {field:'operatorType',align:'left',title:'操作人员类型',width:'120px',rowspan:'2'},
  165. {field:'operatorDoc',align:'left',title:'操作人员档案号',width:'120px',rowspan:'2'},
  166. {field:'operatorCert',align:'left',title:'操作人员班证书',width:'120px',rowspan:'2'},
  167. {field:'operatorLicDate',align:'left',title:'发证时间',width:'120px',rowspan:'2'},
  168. {field:'operatorLicValidity',align:'left',title:'证书有效期',width:'120px',rowspan:'2'},
  169. {field:'machineFactory',align:'left',title:'充装设备厂家',width:'120px',rowspan:'2'},
  170. {field:'machineNo',align:'left',title:'充装设备编号',width:'120px',rowspan:'2'},
  171. {field:'machineName',align:'left',title:'充装设备名称',width:'120px',rowspan:'2'},
  172. {field:'gunNo',align:'left',title:'充装枪号',width:'120px',rowspan:'2'},
  173. {field:'fillStartTime',align:'left',title:'充装时间',width:'120px',rowspan:'2'},
  174. {field:'FillBeforePress',align:'left',title:'充前压力',width:'120px',rowspan:'2'},
  175. {field:'fillEndTime',align:'left',title:'充装结束时间',width:'120px',rowspan:'2'},
  176. {field:'FillEndPress',align:'left',title:'充装结束压力',width:'120px',rowspan:'2'},
  177. {field:'FillUnit',align:'left',title:'充装量单位',width:'120px',rowspan:'2'},
  178. {field:'FillNum',align:'left',title:'充装量',width:'120px',rowspan:'2'},
  179. {field:'FillDensity',align:'left',title:'充装密度',width:'120px',rowspan:'2'},
  180. {field:'money',align:'left',title:'金额',width:'120px',rowspan:'2'},
  181. {field:'afterChecker',align:'left',title:'充后检查人员',width:'120px',rowspan:'2'},
  182. {field:'afterTime',align:'left',title:'充后检查时间',width:'120px',rowspan:'2'},
  183. {field:'afterTimes',align:'left',title:'充后检查项目',width:'120px',rowspan:'2'},
  184. {field:'afterResult',align:'left',title:'充后结果',width:'120px',rowspan:'2'},
  185. {field:'afterException',align:'left',title:'充后检查异常项目',width:'120px',rowspan:'2'},
  186. {field:'afterVerifier',align:'left',title:'充后审核人员',width:'120px',rowspan:'2'},
  187. {field:'remark',align:'left',title:'备注',width:'120px',rowspan:'2'}
  188. ]]
  189. });
  190. if(ssid.substring(0, 2)!="51"){
  191. $('#tt').datagrid('hideColumn','lowPress');
  192. $('#tt').datagrid('hideColumn','highPress');
  193. $('#tt').datagrid('hideColumn','flux');
  194. $('#tt').datagrid('hideColumn','money');
  195. }
  196. }
  197. function fLoadData(page,rows){
  198. if(!$('#station option:selected').text()){
  199. return false;
  200. }
  201. $.messager.progress({
  202. title: '请等待',
  203. msg: '正在加载数据...',
  204. text: '查询中.......'
  205. });
  206. $.ajax({
  207. type:"POST",
  208. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  209. data:$('#fillingform').serialize(),
  210. url:"ajax/fillingDataQuery?page="+page+"&psize="+rows,
  211. success:function (data){
  212. $.messager.progress('close');
  213. var vData = $.parseJSON(data);
  214. sum = vData.total;
  215. if(sum==0){
  216. show("没有查询到相关信息!!!");
  217. }
  218. totalpage = Math.ceil(sum/rows);
  219. $('#tt').datagrid('loadData', vData); //将数据绑定到datagrid
  220. var p = $('#tt').datagrid('getPager');
  221. $(p).pagination({
  222. pageList: [10,20,30,100,200,400],//可以设置每页记录条数的列表
  223. beforePageText: '第',//页数文本框前显示的汉字
  224. afterPageText: '页 共 {pages} 页',
  225. displayMsg: '当前显示 {from} - {to} 条记录 共 {total} 条记录',
  226. onSelectPage: function (pageNumber, pageSize) {
  227. fLoadData(pageNumber, pageSize);
  228. }
  229. });
  230. }
  231. });
  232. }
  233. function selectCountry(){
  234. var id=document.getElementById("city").value;
  235. var select = document.getElementById("country");
  236. for(var i=select.options.length-1;i>=0;i--) {
  237. select.options.remove(i);
  238. }
  239. $.ajax({
  240. type:"POST",
  241. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  242. url:"ajax/hiddenCity?cityId="+id,
  243. success:function (data){
  244. var obj=eval("(" + data + ")");
  245. if(obj.rows.length==1){
  246. select.options.add(new Option("请选择县", ""));
  247. }
  248. $.each(obj.rows, function(i,item){
  249. select.options.add(new Option(item.name, item.id));
  250. });
  251. }
  252. });
  253. }
  254. function selectCountry1(){
  255. selectCountry();
  256. selectstation();
  257. }
  258. function changeSize(){
  259. fLoadData(1,10);
  260. }
  261. function selectstation(){
  262. var ii=1;
  263. var id=document.getElementById("country").value;
  264. var select = document.getElementById("station");
  265. for(var i=select.options.length-1;i>=0;i--) {
  266. select.options.remove(i);
  267. }
  268. $.ajax({
  269. type:"POST",
  270. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  271. data:$('#fillingform').serialize(),
  272. //url:"ajax/hiddenCNGStation?cityId="+id,
  273. url:"ajax/hiddenspeStation2?type=7",
  274. success:function (data){
  275. var obj=eval("(" + data + ")");
  276. select.options.add(new Option("全部", ""));
  277. $.each(obj.rows, function(i,item){
  278. select.options.add(new Option(item.name, item.id));
  279. });
  280. }
  281. });
  282. }
  283. function selectstation1(){
  284. selectstation();
  285. //changeSize();
  286. }
  287. function exptSingle(){
  288. if(!grid){
  289. alert("数据为空");
  290. return false;
  291. }else{
  292. expt(grid);
  293. }
  294. }
  295. function exptAll(){
  296. fLoadDataAll(1,5000);
  297. }
  298. function fLoadDataAll(page,rows){
  299. var startTime1 = $('#startTime').datebox('getValue');
  300. var endTime1 = $('#endTime').datebox('getValue');
  301. document.getElementById("pageNumber").innerText = i;
  302. document.getElementById("from").innerText = (page-1)*rows;
  303. document.getElementById("to").innerText = page*rows;
  304. $.messager.progress({
  305. title: '请等待',
  306. msg: '正在加载数据...',
  307. text: '查询中.......'
  308. });
  309. $.ajax({
  310. type:"POST",
  311. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  312. data:$('#fillingform').serialize(),
  313. url:"ajax/fillingDataQuery?page="+page+"&psize="+rows,
  314. success:function (data){
  315. $.messager.progress('close');
  316. var vData = $.parseJSON(data);
  317. sum = vData.total;
  318. if(sum==0){
  319. show("没有查询到相关信息!!!");
  320. }
  321. totalpage = Math.ceil(sum/rows);
  322. document.getElementById("total").innerText = sum;
  323. document.getElementById("totalpage").innerText = totalpage;
  324. var vData = $.parseJSON(data);
  325. $('#tt').datagrid('loadData', vData); //将数据绑定到datagrid
  326. var p = $('#tt').datagrid('getPager');
  327. $(p).pagination({
  328. pageList: [10,20,30,100,200,400],//可以设置每页记录条数的列表
  329. beforePageText: '第',//页数文本框前显示的汉字
  330. afterPageText: '页 共 {pages} 页',
  331. displayMsg: '当前显示 {from} - {to} 条记录 共 {total} 条记录',
  332. onSelectPage: function (pageNumber, pageSize) {
  333. fLoadData(pageNumber, pageSize);
  334. }
  335. });
  336. if(!grid){
  337. alert("数据为空");
  338. return false;
  339. }else{
  340. expt(grid);
  341. }
  342. }
  343. });
  344. }
  345. //判断字符是否为空的方法
  346. function isEmpty(obj){
  347. if(typeof obj == "undefined" || obj == null || obj == ""){
  348. return true;
  349. }else{
  350. return false;
  351. }
  352. }
  353. //比较两个时间大小
  354. function compareDate(date1,date2){
  355. var oDate1 = new Date(date1);
  356. var oDate2 = new Date(date2);
  357. if(oDate1.getTime() > oDate2.getTime()){
  358. return true; //第一个大
  359. } else {
  360. return false; //第二个大
  361. }
  362. }
  363. </script>
  364. </head>
  365. <body>
  366. <!-- 查询结果:数据表格 -->
  367. <table id="tt" cellspacing="0" cellpadding="0" ></table>
  368. <div id="toolbar" style="padding-top: 0px;height: auto;">
  369. <form id="fillingform" action="ajax/filling" method="post">
  370. <input type="text" name="fillCheck2" id="fillCheck2" style="width: 150px;height: 34px;display: none;" class="hzbspan" value="-1">
  371. <table>
  372. <tr>
  373. <td>
  374. <span class="hzbspan">省:</span>
  375. </td>
  376. <td>
  377. <select name="province" style="width: 150px;height: 34px;min-width: 100px;" class="hzbspan select">
  378. <%for(AuthorityRegionPlace arp:arplist){
  379. cplist = arp.getCityPlace();
  380. %>
  381. <option value="<%=arp.getId() %>">
  382. <%=arp.getName() %>
  383. </option>
  384. <%} %>
  385. </select>
  386. </td>
  387. <td>
  388. <span class="hzbspan">市:</span>
  389. </td>
  390. <td>
  391. <select name="city" id="city" style="width: 150px;height: 34px;min-width: 100px;" class="hzbspan select" onchange="selectCountry1()">
  392. <%
  393. for(CityPlace cp:cplist){
  394. cyplist = cp.getSubPlaceList();
  395. %>
  396. <option value="<%=cp.getId() %>">
  397. <%=cp.getName() %>
  398. </option>
  399. <%} %>
  400. </select>
  401. </td>
  402. <td>
  403. <span class="hzbspan">县:</span>
  404. </td>
  405. <td>
  406. <select name="country" id = "country" style="width: 150px;height: 34px;min-width: 100px;" class="hzbspan select" onchange="selectstation1();" >
  407. <option value="">全部</option>
  408. </select>
  409. </td>
  410. </tr>
  411. <tr>
  412. <td>
  413. <span class="hzbspan">充装站点:</span>
  414. </td>
  415. <td>
  416. <select name="station" id ="station" style="width: 150px;height: 34px;min-width: 100px;" class="hzbspan select" >
  417. <option value="">全部</option>
  418. </select>
  419. </td>
  420. <td>
  421. <span style="cursor: default"><span class="hzbspan">开始时间:</span></span>
  422. </td>
  423. <td>
  424. <input type="text" name="startTime" id="startTime" class="easyui-datebox" style="width: 150px;height: 34px;" class="hzbspan" data-options="prompt:'- - - - - - -'">
  425. </td>
  426. <td>
  427. <span style="cursor: default"><span class="hzbspan">结束时间:</span></span>
  428. </td>
  429. <td>
  430. <input type="text" name="endTime" id="endTime" class="easyui-datebox" style="width: 150px;height: 34px;" class="hzbspan" data-options="prompt:'- - - - - - -'">
  431. </td>
  432. </tr>
  433. <tr>
  434. <td>
  435. <span style="cursor: default"><span class="hzbspan">车牌号:</span></span>
  436. </td>
  437. <td>
  438. <input type="text" name="carNo" id="carNo" style="width: 150px;height: 34px;" class="hzbspan" placeholder="- - - - - - -">
  439. </td>
  440. </tr>
  441. <tr>
  442. <td colspan="5">
  443. <a id="btninfosearch" onclick="changeSize();" class="easyui-linkbutton" icon="icon-search" href="javascript:void(0)" style="margin-bottom: 5px;" ><span class="hzbspan" style="color: #f08300;font-size: 16px;">查询</span></a>
  444. <a id="btninfosearch" onclick="exptSingle();" class="easyui-linkbutton" icon="icon-export" href="javascript:void(0)" style="margin-bottom: 5px;" ><span class="hzbspan" style="color: #f08300;font-size: 16px;">导出</span></a>
  445. </td>
  446. </tr>
  447. </table>
  448. </form>
  449. </div>
  450. </body>
  451. </html>