HcngFillingdataQuery.jsp 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536
  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. fLoadData(i,pageSize);
  90. });
  91. function show(message) {
  92. $.messager.show({
  93. title: '提示信息',
  94. msg: message,
  95. timeout: 2000,
  96. showType: 'slide'
  97. });
  98. }
  99. function fLoadTable(){
  100. grid=$('#tt').datagrid({
  101. fit: true,//自动大小
  102. title: '',
  103. width: '100%',
  104. height: 580,
  105. toolbar: '#toolbar',
  106. fitColumns: true,
  107. singleSelect:false,
  108. loadMsg:'正在加载, 请稍等 …',
  109. nowrap : true,//设置为true,当数据长度超出列宽时将会自动截取
  110. striped : true,//设置为true将交替显示行背景
  111. collapsible : false,//显示可折叠按钮
  112. singleSelect:false,
  113. fitColumns:true,//允许表格自动缩放,以适应父容器
  114. rownumbers:true,
  115. pagination:true,//分页控件
  116. pageList: [10,20,30,100,200,400,500,1000,5000],//可以设置每页记录条数的列表
  117. columns:[[
  118. {field:'guid',align:'left',title:'UID',width:'160px'},
  119. {field:'stationNo',align:'left',title:'站编号',width:'160px'},
  120. {field:'stationName',align:'left',title:'站名称',width:'160px'},
  121. {field:'carNo',align:'left',title:'车牌号',width:'120px'},
  122. {field:'plateTypeName',align:'left',title:'车牌类型',width:'120px'},
  123. {field:'plateColorName',align:'left',title:'车牌颜色',width:'120px'},
  124. {field:'medium',align:'left',title:'充装介质',width:'120px'},
  125. {field:'regNo',align:'left',title:'使用登记证号',width:'120px'},
  126. {field:'regDate',align:'left',title:'发证时间',width:'120px'},
  127. {field:'regValidity',align:'left',title:'证件有效期',width:'120px'},
  128. {field:'regUnit',align:'left',title:'发证单位',width:'120px'},
  129. {field:'cylinderTypeName',align:'left',title:'气瓶类型',width:'120px'},
  130. {field:'cylinderNo',align:'left',title:'气瓶出厂编号',width:'120px'},
  131. {field:'productName',align:'left',title:'生产厂家',width:'120px'},
  132. {field:'productDate',align:'left',title:'生产日期',width:'120px'},
  133. {field:'startuseDate',align:'left',title:'投用日期',width:'120px'},
  134. {field:'yearLimit',align:'left',title:'使用年限',width:'120px'},
  135. {field:'productLicence',align:'left',title:'生产许可',width:'120px'},
  136. {field:'productType',align:'left',title:'气瓶产品型号',width:'120px'},
  137. {field:'weight',align:'left',title:'重量',width:'120px',formatter: function(value, row, index){
  138. if (value) {
  139. return parseFloat(value).toFixed(2);
  140. }
  141. return "";
  142. }},
  143. {field:'vol',align:'left',title:'容积',width:'120px',formatter: function(value, row, index){
  144. if (value) {
  145. return parseFloat(value).toFixed(2);
  146. }
  147. return "";
  148. }},
  149. {field:'thickness',align:'left',title:'壁厚',width:'120px',formatter: function(value, row, index){
  150. if (value) {
  151. return parseFloat(value).toFixed(2);
  152. }
  153. return "";
  154. }},
  155. {field:'press',align:'left',title:'压力',width:'120px',formatter: function(value, row, index){
  156. if (value) {
  157. return parseFloat(value).toFixed(2);
  158. }
  159. return "";
  160. }},
  161. {field:'material',align:'left',title:'材质',width:'120px'},
  162. {field:'installStation',align:'left',title:'安装单位',width:'120px'},
  163. {field:'installCert',align:'left',title:'安装合格证',width:'120px'},
  164. {field:'installDate',align:'left',title:'安装时间',width:'120px'},
  165. {field:'monitorStation',align:'left',title:'监检单位',width:'120px'},
  166. {field:'monitorCert',align:'left',title:'监检合格证',width:'120px'},
  167. {field:'monitorDate',align:'left',title:'监检时间',width:'120px'},
  168. {field:'checkStation',align:'left',title:'检验单位',width:'120px'},
  169. {field:'checkCert',align:'left',title:'检验合格证',width:'120px'},
  170. {field:'checkDate',align:'left',title:'检验时间',width:'120px'},
  171. {field:'nextCheckDate',align:'left',title:'下次检验时间',width:'120px'},
  172. {field:'beforeChecker',align:'left',title:'充装检查人员',width:'120px'},
  173. {field:'beforeTime',align:'left',title:'充半检查时间',width:'120px'},
  174. {field:'beforeItems',align:'left',title:'充装前检查项目',width:'120px'},
  175. {field:'beforeResult',align:'left',title:'充前检查结果',width:'120px',formatter: function(value, row, index){
  176. if (value == 0) {
  177. return "正常";
  178. }else if(value == 1){
  179. return "异常";
  180. }
  181. return "";
  182. }},
  183. {field:'beforeException',align:'left',title:'充前检查异常项目',width:'120px'},
  184. {field:'carRemark',align:'left',title:'车辆其它信息',width:'120px'},
  185. {field:'cylinderRemark',align:'left',title:'气瓶其它信息',width:'120px'},
  186. {field:'beforeVerifier',align:'left',title:'充前审核人员',width:'120px'},
  187. {field:'operatorName',align:'left',title:'操作人员姓名',width:'120px'},
  188. {field:'operatorId',align:'left',title:'操作人员身份证号',width:'120px'},
  189. {field:'operatorNo',align:'left',title:'操作人员编号',width:'120px'},
  190. {field:'operatorType',align:'left',title:'操作人员类型',width:'120px'},
  191. {field:'operatorDoc',align:'left',title:'操作人员档案号',width:'120px'},
  192. {field:'operatorCert',align:'left',title:'操作人员班证书',width:'120px'},
  193. {field:'operatorLicDate',align:'left',title:'发证时间',width:'120px'},
  194. {field:'operatorLicValidity',align:'left',title:'证书有效期',width:'120px'},
  195. {field:'machineFactory',align:'left',title:'充装设备厂家',width:'120px'},
  196. {field:'machineNo',align:'left',title:'充装设备编号',width:'120px'},
  197. {field:'machineName',align:'left',title:'充装设备名称',width:'120px'},
  198. {field:'gunNo',align:'left',title:'充装枪号',width:'120px'},
  199. {field:'fillStartTime',align:'left',title:'充装时间',width:'120px'},
  200. {field:'fillBeforePress',align:'left',title:'充前压力',width:'120px'},
  201. {field:'fillEndTime',align:'left',title:'充装结束时间',width:'120px'},
  202. {field:'fillEndPress',align:'left',title:'充装结束压力',width:'120px'},
  203. {field:'fillUnit',align:'left',title:'充装量单位',width:'120px',formatter: function(value, row, index){
  204. if (value == 1) {
  205. return "KG";
  206. }else if(value == 2){
  207. return "L";
  208. }else if(value == 3){
  209. return "M³";
  210. }
  211. return "";
  212. }},
  213. {field:'fillNum',align:'left',title:'充装量',width:'120px'},
  214. {field:'fillDensity',align:'left',title:'充装密度',width:'120px'},
  215. {field:'money',align:'left',title:'金额',width:'120px',formatter: function(value, row, index){
  216. if (value) {
  217. return parseFloat(value).toFixed(2);
  218. }
  219. return "";
  220. }},
  221. {field:'afterChecker',align:'left',title:'充后检查人员',width:'120px'},
  222. {field:'afterTime',align:'left',title:'充后检查时间',width:'120px'},
  223. {field:'afterTimes',align:'left',title:'充后检查项目',width:'120px'},
  224. {field:'afterResult',align:'left',title:'充后结果',width:'120px',formatter: function(value, row, index){
  225. if (value == 0) {
  226. return "正常";
  227. }else if(value == 1){
  228. return "异常";
  229. }
  230. return "";
  231. }},
  232. {field:'afterException',align:'left',title:'充后检查异常项目',width:'120px'},
  233. {field:'afterVerifier',align:'left',title:'充后审核人员',width:'120px'},
  234. {field:'remark',align:'left',title:'备注',width:'120px'}
  235. ]]
  236. });
  237. }
  238. function fLoadData(page,rows){
  239. if(!$('#station option:selected').text()){
  240. return false;
  241. }
  242. $.messager.progress({
  243. title: '请等待',
  244. msg: '正在加载数据...',
  245. text: '查询中.......'
  246. });
  247. $.ajax({
  248. type:"POST",
  249. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  250. data:$('#fillingform').serialize(),
  251. url:"ajax/chgFillingDataQuery?page="+page+"&psize="+rows,
  252. success:function (data){
  253. $.messager.progress('close');
  254. var vData = $.parseJSON(data);
  255. sum = vData.total;
  256. if(sum==0){
  257. show("没有查询到相关信息!!!");
  258. }
  259. totalpage = Math.ceil(sum/rows);
  260. $('#tt').datagrid('loadData', vData); //将数据绑定到datagrid
  261. var p = $('#tt').datagrid('getPager');
  262. $(p).pagination({
  263. pageList: [10,20,30,100,200,400,500,1000,5000],//可以设置每页记录条数的列表
  264. beforePageText: '第',//页数文本框前显示的汉字
  265. afterPageText: '页 共 {pages} 页',
  266. displayMsg: '当前显示 {from} - {to} 条记录 共 {total} 条记录',
  267. onSelectPage: function (pageNumber, pageSize) {
  268. fLoadData(pageNumber, pageSize);
  269. }
  270. });
  271. }
  272. });
  273. }
  274. function selectCountry(){
  275. var id=document.getElementById("city").value;
  276. var select = document.getElementById("country");
  277. for(var i=select.options.length-1;i>=0;i--) {
  278. select.options.remove(i);
  279. }
  280. $.ajax({
  281. type:"POST",
  282. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  283. url:"ajax/hiddenCity?cityId="+id,
  284. success:function (data){
  285. var obj=eval("(" + data + ")");
  286. if(obj.rows.length==1){
  287. select.options.add(new Option("请选择县", ""));
  288. }
  289. $.each(obj.rows, function(i,item){
  290. select.options.add(new Option(item.name, item.id));
  291. });
  292. }
  293. });
  294. }
  295. function selectCountry1(){
  296. selectCountry();
  297. selectstation();
  298. }
  299. function changeSize(){
  300. fLoadData(1,10);
  301. }
  302. function selectstation(){
  303. var ii=1;
  304. var id=document.getElementById("country").value;
  305. var select = document.getElementById("station");
  306. for(var i=select.options.length-1;i>=0;i--) {
  307. select.options.remove(i);
  308. }
  309. $.ajax({
  310. type:"POST",
  311. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  312. data:$('#fillingform').serialize(),
  313. //url:"ajax/hiddenCNGStation?cityId="+id,
  314. url:"ajax/hiddenspeStation2?type=7",
  315. success:function (data){
  316. var obj=eval("(" + data + ")");
  317. select.options.add(new Option("全部", ""));
  318. $.each(obj.rows, function(i,item){
  319. select.options.add(new Option(item.name, item.id));
  320. });
  321. }
  322. });
  323. }
  324. function selectstation1(){
  325. selectstation();
  326. //changeSize();
  327. }
  328. function exptSingle(){
  329. if(!grid){
  330. alert("数据为空");
  331. return false;
  332. }else{
  333. expt(grid);
  334. }
  335. }
  336. function exptAll(){
  337. fLoadDataAll(1,5000);
  338. }
  339. function fLoadDataAll(page,rows){
  340. var startTime1 = $('#startTime').datebox('getValue');
  341. var endTime1 = $('#endTime').datebox('getValue');
  342. document.getElementById("pageNumber").innerText = i;
  343. document.getElementById("from").innerText = (page-1)*rows;
  344. document.getElementById("to").innerText = page*rows;
  345. $.messager.progress({
  346. title: '请等待',
  347. msg: '正在加载数据...',
  348. text: '查询中.......'
  349. });
  350. $.ajax({
  351. type:"POST",
  352. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  353. data:$('#fillingform').serialize(),
  354. url:"ajax/chgFillingDataQuery?page="+page+"&psize="+rows,
  355. success:function (data){
  356. $.messager.progress('close');
  357. var vData = $.parseJSON(data);
  358. sum = vData.total;
  359. if(sum==0){
  360. show("没有查询到相关信息!!!");
  361. }
  362. totalpage = Math.ceil(sum/rows);
  363. document.getElementById("total").innerText = sum;
  364. document.getElementById("totalpage").innerText = totalpage;
  365. var vData = $.parseJSON(data);
  366. $('#tt').datagrid('loadData', vData); //将数据绑定到datagrid
  367. var p = $('#tt').datagrid('getPager');
  368. $(p).pagination({
  369. pageList: [10,20,30,100,200,400,500,1000,5000],//可以设置每页记录条数的列表
  370. beforePageText: '第',//页数文本框前显示的汉字
  371. afterPageText: '页 共 {pages} 页',
  372. displayMsg: '当前显示 {from} - {to} 条记录 共 {total} 条记录',
  373. onSelectPage: function (pageNumber, pageSize) {
  374. fLoadData(pageNumber, pageSize);
  375. }
  376. });
  377. if(!grid){
  378. alert("数据为空");
  379. return false;
  380. }else{
  381. expt(grid);
  382. }
  383. }
  384. });
  385. }
  386. function selectpage(){
  387. var selectpage = $('#selectpage').val();
  388. if(selectpage>=1&&selectpage<=totalpage){
  389. i = selectpage;
  390. $("#selectpage").val("");
  391. pageSize = $('#pageSize').val();
  392. fLoadData(i,pageSize);
  393. }else{
  394. $("#selectpage").val("");
  395. return false;
  396. }
  397. }
  398. //判断字符是否为空的方法
  399. function isEmpty(obj){
  400. if(typeof obj == "undefined" || obj == null || obj == ""){
  401. return true;
  402. }else{
  403. return false;
  404. }
  405. }
  406. //比较两个时间大小
  407. function compareDate(date1,date2){
  408. var oDate1 = new Date(date1);
  409. var oDate2 = new Date(date2);
  410. if(oDate1.getTime() > oDate2.getTime()){
  411. return true; //第一个大
  412. } else {
  413. return false; //第二个大
  414. }
  415. }
  416. </script>
  417. </head>
  418. <body>
  419. <!-- 查询结果:数据表格 -->
  420. <table id="tt" cellspacing="0" cellpadding="0" ></table>
  421. <div id="toolbar" style="padding-top: 0px;height: auto;">
  422. <form id="fillingform" action="ajax/filling" method="post">
  423. <input type="text" name="fillCheck2" id="fillCheck2" style="width: 150px;height: 34px;display: none;" class="hzbspan" value="-1">
  424. <table>
  425. <tr>
  426. <td>
  427. <span class="hzbspan">省:</span>
  428. </td>
  429. <td>
  430. <select name="province" style="width: 150px;height: 34px;min-width: 100px;" class="hzbspan select">
  431. <%for(AuthorityRegionPlace arp:arplist){
  432. cplist = arp.getCityPlace();
  433. %>
  434. <option value="<%=arp.getId() %>">
  435. <%=arp.getName() %>
  436. </option>
  437. <%} %>
  438. </select>
  439. </td>
  440. <td>
  441. <span class="hzbspan">市:</span>
  442. </td>
  443. <td>
  444. <select name="city" id="city" style="width: 150px;height: 34px;min-width: 100px;" class="hzbspan select" onchange="selectCountry1()">
  445. <%
  446. for(CityPlace cp:cplist){
  447. cyplist = cp.getSubPlaceList();
  448. %>
  449. <option value="<%=cp.getId() %>">
  450. <%=cp.getName() %>
  451. </option>
  452. <%} %>
  453. </select>
  454. </td>
  455. <td>
  456. <span class="hzbspan">县:</span>
  457. </td>
  458. <td>
  459. <select name="country" id = "country" style="width: 150px;height: 34px;min-width: 100px;" class="hzbspan select" onchange="selectstation1();" >
  460. <option value="">全部</option>
  461. </select>
  462. </td>
  463. </tr>
  464. <tr>
  465. <td>
  466. <span class="hzbspan">充装站点:</span>
  467. </td>
  468. <td>
  469. <select name="station" id ="station" style="width: 150px;height: 34px;min-width: 100px;" class="hzbspan select" >
  470. <option value="">全部</option>
  471. </select>
  472. </td>
  473. <td>
  474. <span style="cursor: default"><span class="hzbspan">开始时间:</span></span>
  475. </td>
  476. <td>
  477. <input type="text" name="startTime" id="startTime" class="easyui-datebox" style="width: 150px;height: 34px;" class="hzbspan" data-options="prompt:'- - - - - - -'">
  478. </td>
  479. <td>
  480. <span style="cursor: default"><span class="hzbspan">结束时间:</span></span>
  481. </td>
  482. <td>
  483. <input type="text" name="endTime" id="endTime" class="easyui-datebox" style="width: 150px;height: 34px;" class="hzbspan" data-options="prompt:'- - - - - - -'">
  484. </td>
  485. </tr>
  486. <tr>
  487. <td>
  488. <span style="cursor: default"><span class="hzbspan">车牌号:</span></span>
  489. </td>
  490. <td>
  491. <input type="text" name="carNo" id="carNo" style="width: 150px;height: 34px;" class="hzbspan" placeholder="- - - - - - -">
  492. </td>
  493. </tr>
  494. <tr>
  495. <td colspan="5">
  496. <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>
  497. <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>
  498. </td>
  499. </tr>
  500. </table>
  501. </form>
  502. </div>
  503. <div id="dialog2"></div>
  504. </body>
  505. </html>