checkStationInfo.jsp 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411
  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.constant.Constant" %>
  8. <%@ page import="com.runzhixing.tool.Util" %>
  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. String hiddenphone =(String)session.getAttribute("hiddenphone");
  18. %>
  19. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  20. <html>
  21. <head>
  22. <base href="<%=basePath%>">
  23. <title>查看站点信息</title>
  24. <meta http-equiv="pragma" content="no-cache">
  25. <meta http-equiv="cache-control" content="no-cache">
  26. <meta http-equiv="expires" content="0">
  27. <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
  28. <meta http-equiv="description" content="This is my page">
  29. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  30. <meta http-equiv="X-UA-Compatible" content="IE=10"/>
  31. <link rel="stylesheet" type="text/css" href="css/easyui/themes/default/easyui.css">
  32. <link rel="stylesheet" type="text/css" href="css/easyui/themes/icon.css">
  33. <link rel="stylesheet" type="text/css" href="css/easyui/demo/demo.css">
  34. <script type="text/javascript" src="css/easyui/jquery.min.js"></script>
  35. <script type="text/javascript" src="css/easyui/jquery.easyui.min.js" charset="utf-8"></script>
  36. <script type="text/javascript" src="css/easyui/locale/easyui-lang-zh_CN.js" charset="utf-8"></script>
  37. <link rel="stylesheet" type="text/css" href="css/common/hzbstyle.css">
  38. <style type="text/css">
  39. .paiDiv a:HOVER{
  40. color: red;
  41. text-decoration: none;
  42. font-weight: bold;
  43. }
  44. .paiDiv a{
  45. color: #f08300;
  46. text-decoration: none;
  47. font-weight: bold;
  48. }
  49. .hzbspan{font-family:'Microsoft YaHei', Verdana, 'SimSun', 'Lucida Grande', 'Trebuchet MS', Helvetica, sans-serif;
  50. letter-spacing:normal;
  51. font-size: 14px;
  52. }
  53. </style>
  54. <script type="text/javascript">
  55. var hiddenP='<%=hiddenphone %>';
  56. var i = 1;//第几页
  57. var sum;//总条数
  58. var totalpage;//总页数
  59. var oldstationId;
  60. $(document).ready(function(){
  61. selectCountry11();
  62. selectStation();
  63. getcng();
  64. });
  65. //点击查询按钮
  66. $('#btninfosearch').click(function(){
  67. var id=document.getElementById("station").value;
  68. i = 1;
  69. fLoadData(i,id);
  70. });
  71. function fLoadTable(){
  72. $('#tt').datagrid({
  73. });
  74. }
  75. function getcng(){
  76. var stationId = document.getElementById("station").value;
  77. getcngdetail(stationId);
  78. }
  79. function getcngdetail(stationId){
  80. $.messager.progress({
  81. title: '请等待',
  82. msg: '正在加载数据...',
  83. text: '查询中.......'
  84. });
  85. $.ajax({
  86. type:"POST",
  87. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  88. url:"ajax/checkStationInfo?stationId="+stationId,
  89. success:function (data){
  90. $.messager.progress('close');
  91. var obj=eval("(" + data + ")");
  92. document.getElementById("tableDiv").innerHTML ="";
  93. $.each(obj.rows, function(i,item){
  94. var mobile=item.mobile;
  95. if(hiddenP!="0"){
  96. mobile="无权查看!"
  97. }
  98. if(item.state==0){//断开
  99. document.getElementById("tableDiv").innerHTML +=
  100. '<center><table class="hzbspan"><tr><td>站点名称:</td><td style="padding-right:20px;">'+item.name+'</td><td>站点简称:</td><td style="padding-right:20px;">'+item.placeAB+'</td><td>站点地址:</td><td>'+item.addr+'</td></tr>'+
  101. '<tr><td>充装许可证:</td><td>'+item.licence+'</td><td>发证时间:</td><td>'+subTime10(item.licenceDate1)+'</td><td>有效期至:</td><td>'+subTime10(item.validity1)+'</td></tr>'+
  102. '<tr><td>负责人:</td><td>'+item.manager+'</td><td>技术负责人:</td><td>'+item.techManager+'</td><td>邮编:</td><td>'+item.post+'</td></tr>'+
  103. '<tr><td>手机:</td><td>'+mobile+'</td><td>座机:</td><td>'+item.phone+'</td><td>传真:</td><td>'+item.fax+'</td></tr>'+
  104. '</table></center>'+
  105. ''+
  106. '<center><table class="hzbspan"><tr ><td colspan="4" align="center" style="font-size:18px;font-weight:bold;color:#f08300;">网络连接状态</td></tr><tr><td>连接状态:</td><td style="padding-right:20px;"><img titile="断开" src="images/rzx/disconnect.png"/></td><td>断开时间:</td><td>'+subTime19(item.disconnectTime1)+'</td></tr>'+
  107. '<tr><td>服务器IP:</td><td>'+item.serverIp+'</td><td>客户端IP:</td><td>'+item.clientIp+'</td></tr>'
  108. +'</table>'
  109. +'</center>';
  110. }else if(item.state==1){//连接
  111. document.getElementById("tableDiv").innerHTML +=
  112. '<center><table class="hzbspan"><tr><td>站点名称:</td><td style="padding-right:20px;">'+item.name+'</td><td>站点简称:</td><td style="padding-right:20px;">'+item.placeAB+'</td><td>站点地址:</td><td>'+item.addr+'</td></tr>'+
  113. '<tr><td>充装许可证:</td><td>'+item.licence+'</td><td>发证时间:</td><td>'+subTime10(item.licenceDate1)+'</td><td>有效期至:</td><td>'+subTime10(item.validity1)+'</td></tr>'+
  114. '<tr><td>负责人:</td><td>'+item.manager+'</td><td>技术负责人:</td><td>'+item.techManager+'</td><td>邮编:</td><td>'+item.post+'</td></tr>'+
  115. '<tr><td>手机:</td><td>'+mobile+'</td><td>座机:</td><td>'+item.phone+'</td><td>传真:</td><td>'+item.fax+'</td></tr>'+
  116. '</table></center>'+
  117. ''+
  118. '<center><table class="hzbspan"><tr ><td colspan="4" align="center" style="font-size:18px;font-weight:bold;color:#f08300;">网络连接状态</td></tr><tr><td>连接状态:</td><td style="padding-right:20px;"><img titile="连接" src="images/rzx/connect.png"/></td><td>连接时间:</td><td>'+subTime19(item.connectTime1)+'</td></tr>'+
  119. '<tr><td>服务器IP:</td><td>'+item.serverIp+'</td><td>客户端IP:</td><td>'+item.clientIp+'</td></tr>'
  120. +'</table>'
  121. +'</center>';
  122. }else{
  123. }
  124. });
  125. }
  126. });
  127. }
  128. function subTime10(time){
  129. if(time&&time.length>=10){
  130. return time.substring(0,10);
  131. }
  132. return '';
  133. }
  134. function subTime19(time){
  135. if(time&&time.length>=19){
  136. return time.substring(0,19);
  137. }
  138. return '';
  139. }
  140. function operatorDetail(operatorNo){
  141. $.messager.progress({
  142. title: '请等待',
  143. msg: '正在加载数据...',
  144. text: '查询中.......'
  145. });
  146. $.ajax({
  147. type:"POST",
  148. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  149. url:"ajax/operatorDetail?operatorno="+operatorNo,
  150. success:function (data){
  151. $.messager.progress('close');
  152. var obj=eval("(" + data + ")");
  153. $.each(obj.rows, function(i,item){
  154. document.getElementById("opname").value = item.name;
  155. document.getElementById("opsex").value = item.sex;
  156. document.getElementById("opidno").value = item.idNo;
  157. document.getElementById("oplicence").value = item.licence;
  158. document.getElementById("oplicenceorg").value = item.licenceOrg;
  159. if(!item.licenceDate||item.licenceDate=="null"){
  160. item.licenceDate="";
  161. }
  162. if(!item.validity||item.validity=="null"){
  163. item.validity="";
  164. }
  165. document.getElementById("oplicenceDate").value = item.licenceDate;
  166. document.getElementById("opvalidity").value = item.validity;
  167. });
  168. $('#operatorwindows').window('open');
  169. }
  170. });
  171. }
  172. function machineDetail(stationNo,machineNo){
  173. $.messager.progress({
  174. title: '请等待',
  175. msg: '正在加载数据...',
  176. text: '查询中.......'
  177. });
  178. $.ajax({
  179. type:"POST",
  180. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  181. url:"ajax/machineDetail?stationNo="+stationNo+"&machineNo="+machineNo,
  182. success:function (data){
  183. $.messager.progress('close');
  184. var obj=eval("(" + data + ")");
  185. $.each(obj.rows, function(i,item){
  186. document.getElementById("maendTime").value = item.endTime;
  187. document.getElementById("macarNo").value = item.carNo;
  188. document.getElementById("maappType").value = item.appType;
  189. document.getElementById("malicence").value = item.licence;
  190. document.getElementById("malicenceorg").value = item.licenceOrg;
  191. document.getElementById("malicenceDate").value = item.licenceDate;
  192. document.getElementById("mavalidity").value = item.validity;
  193. });
  194. $('#machinewindows').window('open');
  195. }
  196. });
  197. }
  198. function selectCountry(){
  199. var id=document.getElementById("city").value;
  200. //document.getElementById("hiddenCity").value=id;
  201. var select = document.getElementById("country");
  202. for(var i=select.options.length-1;i>=0;i--) {
  203. select.options.remove(i);
  204. }
  205. $.ajax({
  206. type:"POST",
  207. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  208. url:"ajax/hiddenCity?cityId="+id,
  209. success:function (data){
  210. var obj=eval("(" + data + ")");
  211. $.each(obj.rows, function(i,item){
  212. select.options.add(new Option(item.name, item.id));
  213. });
  214. }
  215. });
  216. selectStation();
  217. }
  218. function selectCountry11(){
  219. var id=document.getElementById("city").value;
  220. //document.getElementById("hiddenCity").value=id;
  221. var select = document.getElementById("country");
  222. for(var i=select.options.length-1;i>=0;i--) {
  223. select.options.remove(i);
  224. }
  225. $.ajax({
  226. type:"POST",
  227. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  228. url:"ajax/hiddenCity?cityId="+id,
  229. success:function (data){
  230. var obj=eval("(" + data + ")");
  231. $.each(obj.rows, function(i,item){
  232. select.options.add(new Option(item.name, item.id));
  233. });
  234. }
  235. });
  236. }
  237. function selectStation(){
  238. var id=document.getElementById("city").value;
  239. var id1=document.getElementById("country").value;
  240. //document.getElementById("hiddenCity").value=id;
  241. var select = document.getElementById("station");
  242. for(var i=select.options.length-1;i>=0;i--) {
  243. select.options.remove(i);
  244. }
  245. var i=0;
  246. $.ajax({
  247. type:"POST",
  248. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  249. url:"ajax/hiddenCountry?countryId="+id1+"&cityId="+id,
  250. success:function (data){
  251. var obj=eval("(" + data + ")");
  252. $.each(obj.rows, function(i,item){
  253. if(i==0){
  254. if(obj.rows.length>1){
  255. select.options.add(new Option("请选择一个站点", ""));
  256. }
  257. i++;
  258. }
  259. select.options.add(new Option(item.name, item.id));
  260. });
  261. }
  262. });
  263. }
  264. </script>
  265. </head>
  266. <body>
  267. <!-- 查询结果:数据表格 -->
  268. <table id="tt" cellspacing="0" cellpadding="0" >
  269. </table>
  270. <div id="toolbar" style="padding-top: 10px;height: 30px;">
  271. <span class="easyui-linkbutton" style="cursor: default;margin-bottom: 5px;"><span class="hzbspan" style="color: #f08300;font-size: 16px;" >省:</span></span>&nbsp;&nbsp;
  272. <select name="province" style="width: auto;height: 24px;min-width: 100px;" class="hzbspan">
  273. <%for(AuthorityRegionPlace arp:arplist){
  274. cplist = arp.getCityPlace();
  275. %>
  276. <option value="<%=arp.getId() %>">
  277. <%=arp.getName() %>
  278. </option>
  279. <%} %>
  280. </select>&nbsp;&nbsp;
  281. <span class="easyui-linkbutton" style="cursor: default;margin-bottom: 5px;"><span class="hzbspan" style="color: #f08300;font-size: 16px;" >市:</span></span>&nbsp;&nbsp;
  282. <select name="city" id="city" style="width: auto;height: 24px;min-width: 100px;" class="hzbspan" onchange="selectCountry()">
  283. <%
  284. for(CityPlace cp:cplist){
  285. cyplist = cp.getSubPlaceList();
  286. %>
  287. <option value="<%=cp.getId() %>">
  288. <%=cp.getName() %>
  289. </option>
  290. <%} %>
  291. </select>&nbsp;&nbsp;
  292. <span class="easyui-linkbutton" style="cursor: default;margin-bottom: 5px;"><span class="hzbspan" style="color: #f08300;font-size: 16px;" >县:</span></span>&nbsp;&nbsp;
  293. <select name="country" id = "country" style="width: auto;height: 24px;min-width: 100px;" class="hzbspan" onchange="selectStation()">
  294. </select>&nbsp;&nbsp;
  295. <span class="easyui-linkbutton" style="cursor: default;margin-bottom: 5px;"><span class="hzbspan" style="color: #f08300;font-size: 16px;" >加气站:</span></span>&nbsp;&nbsp;
  296. <select name="station" id="station" style="width: auto;height: 24px;min-width: 100px;" class="hzbspan" onchange="getcng()">
  297. </select>&nbsp;&nbsp;
  298. <a class="easyui-linkbutton" icon="icon-search" onclick="getcng()" style="margin-bottom: 5px;" ><span class="hzbspan" style="color: #f08300;font-size: 16px;">查&nbsp;&nbsp;询&nbsp;&nbsp;</span></a>
  299. </div>
  300. <div id="tableDiv" style="width: 100%;height: auto;border: 1px solid #4682B4;"></div>
  301. <div id="operatorwindows" modal="true" title="工作人员详细信息" class="easyui-window" closed="true" collapsible="false" minimizable="false" maximizable="false" icon="icon-add" style="width:900px;height: 200px;padding:5px;background:#fafafa;" >
  302. <div class="easyui-layout" fit="true">
  303. <div region="center" id="pnamecenter" border="false" style="padding: 10px; background: #fff; border: 1px solid #ccc;">
  304. <table>
  305. <tr>
  306. <td>
  307. <span class="hzbspan">姓名:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><input type="text" id="opname" style="width: 200px;border: none;" readonly="readonly"/>
  308. </td><td>
  309. <span class="hzbspan">性别:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><input type="text" id="opsex" style="width: 200px;border: none;" readonly="readonly"/>
  310. </td><td>
  311. <span class="hzbspan">身份证号:</span><input type="text" id="opidno" style="width: 200px;border: none;" readonly="readonly"/>
  312. </td>
  313. </tr>
  314. <tr>
  315. <td>
  316. <span class="hzbspan">许可证号:</span><input type="text" id="oplicence" style="width: 200px;border: none;" readonly="readonly"/>
  317. </td><td>
  318. <span class="hzbspan">发证机构:</span><input type="text" id="oplicenceorg" style="width: 200px;border: none;" readonly="readonly"/>
  319. </td><td>
  320. <span class="hzbspan">发证时间:</span><input type="text" id="oplicenceDate" style="width: 200px;border: none;" readonly="readonly"/>
  321. </td></tr>
  322. <tr><td colspan="3">
  323. <span class="hzbspan">有效期:&nbsp;&nbsp;&nbsp;</span><input type="text" id="opvalidity" style="width: 200px;border: none;" readonly="readonly"/>
  324. </td></tr>
  325. </table>
  326. </div>
  327. <div region="south" border="false" style="text-align: right; height: 30px; line-height: 30px;">
  328. <a id="infoaddstreetcancel" class="easyui-linkbutton" icon="icon-cancel" onclick="$('#operatorwindows').window('close');">返回</a>
  329. </div>
  330. </div>
  331. </div>
  332. <div id="machinewindows" modal="true" title="车辆详细信息" class="easyui-window" closed="true" collapsible="false" minimizable="false" maximizable="false" icon="icon-add" style="width:900px;height: 500px;;padding:5px;background:#fafafa;" >
  333. <div class="easyui-layout" fit="true">
  334. <div region="center" id="pnamecenter" border="false" style="padding: 10px; background: #fff; border: 1px solid #ccc;">
  335. <span class="hzbspan">姓名:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><input type="text" id="maendTime" style="width: 200px;" readonly="readonly"/>
  336. <span class="hzbspan">性别:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><input type="text" id="macarNo" style="width: 200px;" readonly="readonly"/>
  337. <span class="hzbspan">应用类型:</span><input type="text" id="maappType" style="width: 200px;" readonly="readonly"/>
  338. <br/><br/>
  339. <span class="hzbspan">充装时间:</span><input type="text" id="maendTime" style="width: 200px;" readonly="readonly"/>
  340. <span class="hzbspan">发证机构:</span><input type="text" id="malicenceorg" style="width: 200px;" readonly="readonly"/>
  341. <span class="hzbspan">发证时间:</span><input type="text" id="malicenceDate" style="width: 200px;" readonly="readonly"/>
  342. <br/><br/>
  343. <span class="hzbspan">车牌号:&nbsp;&nbsp;&nbsp;</span><input type="text" id="macarNo" style="width: 200px;" readonly="readonly"/>
  344. </div>
  345. <div region="south" border="false" style="text-align: right; height: 30px; line-height: 30px;">
  346. <a id="infoaddstreetcancel" class="easyui-linkbutton" icon="icon-cancel" onclick="$('#machinewindows').window('close');">返回</a>
  347. </div>
  348. </div>
  349. </div>
  350. </body>
  351. </html>