SpecialequipmentdataQueryfilling.jsp 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443
  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. selectSpcialStation();
  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:'equpState',align:'left',title:'状态',width:40,formatter: function(value, row, index){
  80. if (value == "0") {
  81. return '<font style="color:green;font-weight: bold;">'+"正常"+'</font>';
  82. }
  83. else if(value == "1") {
  84. return '<font style="color:red;font-weight: bold;">'+"超期"+'</font>';
  85. }else{
  86. return '<font style="color:red;font-weight: bold;">'+"无状态"+'</font>';
  87. }
  88. }},
  89. {field:'stationNo',align:'left',title:'站点编号',width:120},
  90. {field:'stationName',align:'left',title:'站点名称',width:'180px'},
  91. {field:'equpName',align:'left',title:'设备名称',width:100},
  92. {field:'equpTypeName',align:'left',title:'设备类别',width:60},
  93. {field:'equpModel',align:'left',title:'规格型号',width:120},
  94. {field:'licenseNo',align:'left',title:'使用证编号',width:120},
  95. {field:'useDate1',align:'left',title:'投用日期',width:120},
  96. {field:'checkDate1',align:'left',title:'检验日期',width:'160px'},
  97. {field:'checkUnit',align:'left',title:'检验单位',width:'180px'},
  98. {field:'checkResult',align:'left',title:'检验结论',width:'120px'},
  99. {field:'nextCheckDate1',align:'left',title:'下次检验日期',width:'160px'},
  100. {field:'operDetail',align:'left',title:'操作状态',width:'120px'},
  101. {field:'editStationNo',align:'left',title:'登记/修改站点',width:'180px'},
  102. {field:'editOperatorNo',align:'left',title:'登记/修改操作员',width:'120px'},
  103. {field:'editOperTime1',align:'left',title:'录入时间',width:'160px'},
  104. {field:'auditStationNo',align:'left',title:'审核站点',width:'120px'},
  105. {field:'auditOperatorNo',align:'left',title:'审核操作员',width:'120px'},
  106. {field:'auditOperTime1',align:'left',title:'审核时间',width:'120px'},
  107. {field:'equpSelfNo',align:'left',title:'设备自编号',width:'120px'},
  108. {field:'produceDate1',align:'left',title:'出厂日期',width:'120px'},
  109. {field:'producer',align:'left',title:'生产厂家',width:'120px'},
  110. {field:'producerLic',align:'left',title:'生产许可证号',width:'120px'},
  111. {field:'equpRegNo',align:'left',title:'设备注册代码',width:'120px'},
  112. {field:'timequpParame2',align:'left',title:'设备参数',width:'120px'},
  113. {field:'checkReport',align:'left',title:'鉴定报告',width:'120px'},
  114. {field:'time2',align:'left',title:'操作',width:'120px'}
  115. ]]
  116. });
  117. }
  118. function show(message) {
  119. $.messager.show({
  120. title: '提示信息',
  121. msg: message,
  122. timeout: 2000,
  123. showType: 'slide'
  124. });
  125. }
  126. function fLoadData(page,rows){
  127. if(!$('#specialStation option:selected').text()){
  128. return false;
  129. }
  130. $.messager.progress({
  131. title: '请等待',
  132. msg: '正在加载数据...',
  133. text: '查询中.......'
  134. });
  135. $.ajax({
  136. type:"POST",
  137. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  138. data:$('#specialform').serialize(),
  139. url:"ajax/specialequipmentdataQuery?page="+page+"&psize="+rows,
  140. success:function (data){
  141. $.messager.progress('close');
  142. var vData = $.parseJSON(data);
  143. sum = vData.total;
  144. if(sum==0){
  145. show("没有查询到相关信息!!!");
  146. }
  147. totalpage = Math.ceil(sum/rows);
  148. $('#tt').datagrid('loadData', vData); //将数据绑定到datagrid
  149. var p = $('#tt').datagrid('getPager');
  150. $(p).pagination({
  151. pageList: [10,20,30,100,200,400],//可以设置每页记录条数的列表
  152. beforePageText: '第',//页数文本框前显示的汉字
  153. afterPageText: '页 共 {pages} 页',
  154. displayMsg: '当前显示 {from} - {to} 条记录 共 {total} 条记录',
  155. onSelectPage: function (pageNumber, pageSize) {
  156. fLoadData(pageNumber, pageSize);
  157. }
  158. });
  159. }
  160. });
  161. }
  162. function selectCountry(){
  163. var id=document.getElementById("city").value;
  164. var select = document.getElementById("country");
  165. for(var i=select.options.length-1;i>=0;i--) {
  166. select.options.remove(i);
  167. }
  168. $.ajax({
  169. type:"POST",
  170. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  171. url:"ajax/hiddenCity?cityId="+id,
  172. success:function (data){
  173. var obj=eval("(" + data + ")");
  174. $.each(obj.rows, function(i,item){
  175. select.options.add(new Option(item.name, item.id));
  176. });
  177. }
  178. });
  179. }
  180. function selectCountry1(){
  181. selectCountry();
  182. selectSpcialStation();
  183. //changeSize();
  184. }
  185. function changeSize(){
  186. fLoadData(1,10);
  187. }
  188. function selectSpcialStation(){
  189. var ii=1;
  190. var select = document.getElementById("specialStation");
  191. for(var i=select.options.length-1;i>=0;i--) {
  192. select.options.remove(i);
  193. }
  194. $.ajax({
  195. type:"POST",
  196. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  197. data:$('#specialform').serialize(),
  198. url:"ajax/hiddenspeStation?type=2",
  199. success:function (data){
  200. var obj=eval("(" + data + ")");
  201. $.each(obj.rows, function(i,item){
  202. select.options.add(new Option(item.name, item.id));
  203. });
  204. }
  205. });
  206. }
  207. function selectSpcialStation1(){
  208. selectSpcialStation();
  209. //changeSize();
  210. }
  211. function expt1(){
  212. expt(grid);
  213. }
  214. function exptSingle(){
  215. if(!grid){
  216. alert("数据为空");
  217. return false;
  218. }else{
  219. expt(grid);
  220. }
  221. }
  222. function exptAll(){
  223. fLoadDataAll(1,5000);
  224. }
  225. function fLoadDataAll(page,rows){
  226. document.getElementById("pageNumber").innerText = i;
  227. document.getElementById("from").innerText = (page-1)*rows;
  228. document.getElementById("to").innerText = page*rows;
  229. $.messager.progress({
  230. title: '请等待',
  231. msg: '正在加载数据...',
  232. text: '查询中.......'
  233. });
  234. $.ajax({
  235. type:"POST",
  236. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  237. data:$('#specialform').serialize(),
  238. url:"ajax/specialequipmentdataQuery?page="+page+"&psize="+rows,
  239. success:function (data){
  240. $.messager.progress('close');
  241. var vData = $.parseJSON(data);
  242. sum = vData.total;
  243. if(sum==0){
  244. show("没有查询到相关信息!!!");
  245. }
  246. totalpage = Math.ceil(sum/rows);
  247. document.getElementById("total").innerText = sum;
  248. document.getElementById("totalpage").innerText = totalpage;
  249. var vData = $.parseJSON(data);
  250. $('#tt').datagrid('loadData', vData); //将数据绑定到datagrid
  251. var p = $('#tt').datagrid('getPager');
  252. $(p).pagination({
  253. pageList: [10,20,30,100,200,400],//可以设置每页记录条数的列表
  254. beforePageText: '第',//页数文本框前显示的汉字
  255. afterPageText: '页 共 {pages} 页',
  256. displayMsg: '当前显示 {from} - {to} 条记录 共 {total} 条记录',
  257. onSelectPage: function (pageNumber, pageSize) {
  258. fLoadData(pageNumber, pageSize);
  259. }
  260. });
  261. if(!grid){
  262. alert("数据为空");
  263. return false;
  264. }else{
  265. expt(grid);
  266. }
  267. }
  268. });
  269. }
  270. </script>
  271. </head>
  272. <body>
  273. <!-- 查询结果:数据表格 -->
  274. <table id="tt" cellspacing="0" cellpadding="0" >
  275. </table>
  276. <div id="toolbar" style="padding-top: 0px;height: auto;">
  277. <form id="specialform" action="ajax/special" method="post">
  278. <table>
  279. <tr>
  280. <td>
  281. <span class="hzbspan">省:</span>
  282. </td>
  283. <td>
  284. <select name="province" style="width: 150px;height: 34px;min-width: 100px;" class="hzbspan select">
  285. <%for(AuthorityRegionPlace arp:arplist){
  286. cplist = arp.getCityPlace();
  287. %>
  288. <option value="<%=arp.getId() %>">
  289. <%=arp.getName() %>
  290. </option>
  291. <%} %>
  292. </select>
  293. </td>
  294. <td>
  295. <span class="hzbspan">市:</span>
  296. </td>
  297. <td>
  298. <select name="city" id="city" style="width: 150px;height: 34px;min-width: 100px;" class="hzbspan select" onchange="selectCountry1()">
  299. <%
  300. for(CityPlace cp:cplist){
  301. cyplist = cp.getSubPlaceList();
  302. %>
  303. <option value="<%=cp.getId() %>">
  304. <%=cp.getName() %>
  305. </option>
  306. <%} %>
  307. </select>
  308. </td>
  309. <td>
  310. <span class="hzbspan">县:</span>
  311. </td>
  312. <td>
  313. <select name="country" id = "country" style="width: 150px;height: 34px;min-width: 100px;" class="hzbspan select" onchange="selectSpcialStation1();" >
  314. </select>
  315. </td>
  316. </tr>
  317. <tr>
  318. <td>
  319. <span class="hzbspan">站点:</span>
  320. </td>
  321. <td>
  322. <select name="specialStation" id = "specialStation" style="width: 150px;height: 34px;min-width: 100px;" class="hzbspan select" >
  323. <option value="">全部</option>
  324. </select>
  325. </td>
  326. </tr>
  327. <tr>
  328. <td>
  329. <span style="cursor: default"><span class="hzbspan">设备GUID:</span></span></td>
  330. <td><input type="text" name="equpGuid" id="equpGuid" style="width: 150px;height: 34px;" class="hzbspan" placeholder="- - - - - - -">
  331. </td>
  332. <td><span style="cursor: default"><span class="hzbspan">设备名称:</span></span></td>
  333. <td><input type="text" name="equpName" id="equpName" style="width: 150px;height: 34px;" class="hzbspan" placeholder="- - - - - - -">
  334. </td>
  335. <td><span style="cursor: default"><span class="hzbspan">设备类别:</span></span></td>
  336. <td><select name="equpType" id="equpType" style="width: 150px;height: 34px;" class="hzbspan select">
  337. <option value="-1" selected="selected">全部</option>
  338. <option value="1">压力容器</option>
  339. <option value="2">压力管道</option>
  340. <option value="3">起重机械</option>
  341. <option value="4">锅炉</option>
  342. <option value="5">电梯</option>
  343. <option value="6">场(厂)内机动车辆</option>
  344. <option value="7">客运索道</option>
  345. <option value="8">大型游乐设施</option>
  346. <option value="9">安全附件</option>
  347. </select></td>
  348. <td>
  349. <span style="cursor: default"><span class="hzbspan">规格型号:</span></span></td>
  350. <td><input type="text" name="equpModel" id="equpModel" style="width: 150px;height: 34px;" class="hzbspan" placeholder="- - - - - - -">
  351. </td>
  352. </tr><tr>
  353. <td>
  354. <span style="cursor: default"><span class="hzbspan">录入开始时间:</span></span></td>
  355. <td><input type="text" name="editSDate" id="editSDate" class="easyui-datebox" style="width: 150px;height: 34px;" class="hzbspan" data-options="prompt:'- - - - - - -'">
  356. </td>
  357. <td><span style="cursor: default"><span class="hzbspan">录入结束时间:</span></span></td>
  358. <td><input type="text" name="editEDate" id="editEDate" class="easyui-datebox" style="width: 150px;height: 34px;" class="hzbspan" data-options="prompt:'- - - - - - -'">
  359. </td>
  360. <td>
  361. <span style="cursor: default"><span class="hzbspan">检验开始日期:</span></span></td>
  362. <td><input type="text" name="checkSDate" id="checkSDate" class="easyui-datebox" style="width: 150px;height: 34px;" class="hzbspan" data-options="prompt:'- - - - - - -'">
  363. </td>
  364. <td>
  365. <span style="cursor: default"><span class="hzbspan">检验结束日期:</span></span></td>
  366. <td><input type="text" name="checkEDate" id="checkEDate" class="easyui-datebox" style="width: 150px;height: 34px;" class="hzbspan" data-options="prompt:'- - - - - - -'">
  367. </td></tr><tr>
  368. <td>
  369. <span style="cursor: default"><span class="hzbspan">下次检验开始日期:</span></span></td>
  370. <td><input type="text" name="nextCheckSDate" id="nextCheckSDate" class="easyui-datebox" style="width: 150px;height: 34px;" class="hzbspan" data-options="prompt:'- - - - - - -'">
  371. </td>
  372. <td><span style="cursor: default"><span class="hzbspan">下次检验结束日期:</span></span></td>
  373. <td><input type="text" name="nextCheckEDate" id="nextCheckEDate" class="easyui-datebox" style="width: 150px;height: 34px;" class="hzbspan" data-options="prompt:'- - - - - - -'">
  374. </td>
  375. <td><span style="cursor: default"><span class="hzbspan">操作状态:</span></span></td>
  376. <td><select name="opeState" id="opeState" style="width: 150px;height: 34px;" class="hzbspan select" >
  377. <option value="-1" selected="selected">全部</option>
  378. <option value="0">新数据,要求审核</option>
  379. <option value="1">安装完成,要求监检</option>
  380. <option value="2">监检完成,要求审核</option>
  381. <option value="3">检验完成,要求审核或复装</option>
  382. <option value="4">审核完成</option>
  383. <option value="5">已经发标签</option>
  384. <option value="6">数据审核不通过</option>
  385. <option value="7">检验后数据不通过</option>
  386. <option value="8">过户后审核不通过</option>
  387. <option value="9">监检不通过</option>
  388. <option value="10">未发标签</option>
  389. <option value="21">申请加瓶</option>
  390. <option value="22">申请减瓶</option>
  391. <option value="31">过户,要求审核</option>
  392. <option value="41">已注销</option>
  393. </select></td>
  394. <td>
  395. <span style="cursor: default"><span class="hzbspan">只查超期数据:</span></span></td>
  396. <td><input type="checkbox" name="exceedOnly" id="exceedOnly" value="yes" >
  397. </td>
  398. <td>
  399. <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>
  400. <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>
  401. </td>
  402. </tr></table>
  403. </form>
  404. </div>
  405. <div id="dialog2"></div>
  406. </body>
  407. </html>