CylinderdataQuery.jsp 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
  2. <%@ page import="java.util.List" %>
  3. <%@ page import="com.runzhixing.bean.Car" %>
  4. <%@ page import="com.runzhixing.tool.Util"%>
  5. <%
  6. String path = request.getContextPath();
  7. String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
  8. List<Car> carlist = (List)session.getAttribute("carlist");
  9. String scarNo = request.getParameter("carNo");
  10. %>
  11. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  12. <html>
  13. <head>
  14. <base href="<%=basePath%>">
  15. <title>车辆气瓶数据详细</title>
  16. <meta http-equiv="pragma" content="no-cache">
  17. <meta http-equiv="cache-control" content="no-cache">
  18. <meta http-equiv="expires" content="0">
  19. <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
  20. <meta http-equiv="description" content="This is my page">
  21. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  22. <meta http-equiv="X-UA-Compatible" content="IE=10"/>
  23. <link rel="stylesheet" type="text/css" href="css/easyui/themes/default/easyui.css">
  24. <link rel="stylesheet" type="text/css" href="css/easyui/themes/icon.css">
  25. <link rel="stylesheet" type="text/css" href="css/easyui/demo/demo.css">
  26. <script type="text/javascript" src="css/easyui/jquery.min.js"></script>
  27. <script type="text/javascript" src="css/easyui/jquery.easyui.min.js" charset="utf-8"></script>
  28. <script type="text/javascript" src="css/easyui/locale/easyui-lang-zh_CN.js" charset="utf-8"></script>
  29. <link rel="stylesheet" type="text/css" href="css/common/hzbstyle.css">
  30. <style type="text/css">
  31. a:HOVER{
  32. color: red;
  33. text-decoration: none;
  34. }
  35. a{
  36. color: #f08300;
  37. text-decoration: none;
  38. }
  39. </style>
  40. <script type="text/javascript">
  41. var hiddenP='<%=(String)session.getAttribute("hiddenphone") %>';
  42. var i = 1;//第几页
  43. var sum;//总条数
  44. var totalpage;//总页数
  45. var scarNo;
  46. var pageSize =10;
  47. $(document).ready(function(){
  48. scarNo = $('#scarNo').val();
  49. fLoadTable();
  50. pageSize = $('#pageSize').val();
  51. fLoadData(1,10);
  52. if(hiddenP!="0"){
  53. document.getElementById("phone1").value="";
  54. document.getElementById("phone2").value="";
  55. }
  56. });
  57. function fLoadTable(){
  58. var st = $('#st').val();
  59. var et = $('#et').val();
  60. if(st!=null&&st!=""){
  61. $("#searchst").datebox("setValue", st);
  62. }
  63. if(et!=null&&et!=""){
  64. $("#searchet").datebox("setValue", et);
  65. }
  66. $('#tt').datagrid({
  67. fit: true,//自动大小
  68. title: '车辆气瓶数据详细',
  69. width: '100%',
  70. height: 580,
  71. toolbar: '#toolbar',
  72. fitColumns: true,
  73. singleSelect:false,
  74. loadMsg:'正在加载, 请稍等 …',
  75. nowrap : true,//设置为true,当数据长度超出列宽时将会自动截取
  76. striped : true,//设置为true将交替显示行背景
  77. collapsible : true,//显示可折叠按钮
  78. singleSelect:true,//为true时只能选择单行
  79. fitColumns:true,//允许表格自动缩放,以适应父容器
  80. rownumbers:true,
  81. pagination:true,//分页控件
  82. columns:[[
  83. {field:'cylindercarNo',align:'center',title:'操作',width:'60px',formatter: function(value, row, index){
  84. return '<a href="jsp/rzx/dataQuery/CylinderFollow?cylinderguid='+row.cylinderGuid+'" target="_blank">'+"追踪气瓶"+'</a>';
  85. }},
  86. {field:'carNo',align:'center',title:'所属车辆',width:'70px'},
  87. {field:'cylinderNo',align:'center',title:'气瓶使用编号',width:'80px'},
  88. {field:'productNo',align:'center',title:'生产厂家',width:'55px'},
  89. {field:'cylinderNo',align:'center',title:'气瓶出厂编号',width:'60px'},
  90. {field:'cylinderTypeName',align:'center',title:'气瓶类型',width:'60px'},
  91. {field:'productDate1',align:'center',title:'生产年月',width:'82px'},
  92. {field:'productType',align:'center',title:'型号',width:'30px'},
  93. {field:'cylinderState',align:'center',title:'使用状态',width:'55px',formatter: function(value, row, index){
  94. if (value == "0") {
  95. return '<font style="color:green;font-weight: bold;">'+"在用"+'</font>';
  96. }
  97. else if(value == "1") {
  98. return '<font style="color:red;font-weight: bold;">'+"报废"+'</font>';
  99. }else if(value == "2") {
  100. return '<font style="color:red;font-weight: bold;">'+"超期未检"+'</font>';
  101. }else if(value == "3") {
  102. return '<font style="color:red;font-weight: bold;">'+"周转"+'</font>';
  103. }}},
  104. {field:'nextCheckDate1',align:'center',title:'下次检验日期',width:'82px'},
  105. {field:'checkDate1',align:'center',title:'最后检验日期',width:'82px'},
  106. {field:'startUseDate1',align:'center',title:'开始投用日期',width:'82px'},
  107. {field:'installDate1',align:'center',title:'安装日期',width:'82px'},
  108. {field:'yearLimit',align:'center',title:'使用年限',width:'55px'},
  109. {field:'timesAvailable',align:'center',title:'可充装次数',width:'60px'},
  110. {field:'fillTimes',align:'center',title:'已充装次数',width:'60px'},
  111. {field:'checkStation',align:'center',title:'检验单位',width:'55px'},
  112. {field:'checkState',align:'center',title:'检验状态',width:'55px',formatter: function(value, row, index){
  113. if (value == "0") {
  114. return '<font style="color:green;font-weight: bold;">'+"合格"+'</font>';
  115. }
  116. else if(value == "1") {
  117. return '<font style="color:red;font-weight: bold;">'+"不合格"+'</font>';
  118. }}},
  119. {field:'installStation',align:'center',title:'安装单位',width:'55px'},
  120. {field:'installLicence',align:'center',title:'安装许可',width:'20px'},
  121. {field:'monitorStation',align:'center',title:'安装监检单位',width:'20px'},
  122. {field:'weight',align:'center',title:'重量',width:'40px',formatter: function(value, row, index){
  123. if(value){
  124. return value.toFixed(1);
  125. }
  126. return value;
  127. }},
  128. {field:'vol',align:'center',title:'容积',width:'40px',formatter: function(value, row, index){
  129. if(value){
  130. return value.toFixed(1);
  131. }
  132. return value;
  133. }},
  134. {field:'thickness',align:'center',title:'壁厚',width:'40px',formatter: function(value, row, index){
  135. if(value){
  136. return value.toFixed(1);
  137. }
  138. return value;
  139. }},
  140. {field:'press',align:'center',title:'压力',width:'40px',formatter: function(value, row, index){
  141. if(value){
  142. return value.toFixed(1);
  143. }
  144. return value;
  145. }},
  146. {field:'material',align:'center',title:'材质',width:'30px'},
  147. {field:'installLoc',align:'center',title:'安装位置',width:'55px'}
  148. ]]
  149. });
  150. $('#tt').datagrid('hideColumn','productType');
  151. $('#tt').datagrid('hideColumn','installLicence');
  152. $('#tt').datagrid('hideColumn','monitorStation');
  153. $('#tt').datagrid('hideColumn','material');
  154. $('#tt').datagrid('hideColumn','weight');
  155. $('#tt').datagrid('hideColumn','thickness');
  156. $('#tt').datagrid('hideColumn','press');
  157. }
  158. function show(message) {
  159. $.messager.show({
  160. title: '提示信息',
  161. msg: message,
  162. timeout: 2000,
  163. showType: 'slide'
  164. });
  165. }
  166. function fLoadData(page,rows){
  167. $.messager.progress({
  168. title: '请等待',
  169. msg: '正在加载数据...',
  170. text: '查询中.......'
  171. });
  172. $.ajax({
  173. type:"POST",
  174. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  175. url:"ajax/carsDataQueryagain?page="+page+"&psize="+rows,
  176. success:function (data){
  177. $.messager.progress('close');
  178. var vData = $.parseJSON(data);
  179. sum = vData.total;
  180. if(sum==0){
  181. show("没有查询到相关信息!!!");
  182. }
  183. totalpage = Math.ceil(sum/rows);
  184. $('#tt').datagrid('loadData', vData); //将数据绑定到datagrid
  185. $('#pp').pagination({
  186. total:sum,
  187. pageList: [2,10,50,100],
  188. beforePageText: '第',//页数文本框前显示的汉字
  189. afterPageText: '页 共 {pages} 页',
  190. displayMsg: '当前显示 {from} - {to} 条记录 共 {total} 条记录',
  191. onSelectPage:function(pageNumber, pageSize){
  192. fLoadData();
  193. }
  194. });
  195. }
  196. });
  197. }
  198. function changeSize(){
  199. fLoadData(1,10);
  200. }
  201. </script>
  202. </head>
  203. <body>
  204. <!-- 查询结果:数据表格 -->
  205. <table id="tt" cellspacing="0" cellpadding="0" >
  206. </table>
  207. <div id="toolbar" style="padding-top: 10px;height: auto;" class="hzbspan">
  208. 汽车厂家:<input type="text" style="width: 200px;height: 26px;border: none;line-height:33px;background:none;" value="<%=Util.removeNull(carlist.get(0).getCarProduct())%>" readonly="readonly">
  209. 发证单位:<input type="text" style="width: 200px;height: 26px;border: none;line-height:33px;background:none;" value="<%=Util.removeNull(carlist.get(0).getManaUnitName()) %>" readonly="readonly">
  210. 负&nbsp;&nbsp;责&nbsp;&nbsp;人:<input type="text" style="width: 197px;height: 26px;border: none;line-height:33px;background:none;" value="<%=Util.removeNull(carlist.get(0).getCarUnitMana()) %>" readonly="readonly">
  211. 车辆状态:<input type="text" style="width: 200px;height: 26px;border: none;line-height:33px;background:none;" value="<%=Util.removeNull(carlist.get(0).getCarStateName()) %>" readonly="readonly">
  212. <br/>
  213. 厂牌型号:<input type="text" style="width: 200px;height: 26px;border: none;line-height:33px;background:none;" value="<%=Util.removeNull(carlist.get(0).getCarType()) %>" readonly="readonly">
  214. 所属单位:<input type="text" style="width: 200px;height: 26px;border: none;line-height:33px;background:none;" value="<%=Util.removeNull(carlist.get(0).getCarUnit()) %>" readonly="readonly">
  215. 联系地址:<input type="text" style="width: 200px;height: 26px;border: none;line-height:33px;background:none;" value="<%=Util.removeNull(carlist.get(0).getAddr()) %>" readonly="readonly">
  216. 充装次数:<input type="text" style="width: 200px;height: 26px;border: none;line-height:33px;background:none;" value="<%=carlist.get(0).getFillTimes() %>" readonly="readonly">
  217. <br/>
  218. 应用类型:<input type="text" style="width: 200px;height: 26px;border: none;line-height:33px;background:none;" value="<%=Util.removeNull(carlist.get(0).getAppTypeName()) %>" readonly="readonly">
  219. 车主姓名:<input type="text" style="width: 200px;height: 26px;border: none;line-height:33px;background:none;" value="<%=Util.removeNull(carlist.get(0).getCarOwnerName()) %>" readonly="readonly">
  220. 联系电话:<input id="phone1" type="text" style="width: 200px;height: 26px;border: none;line-height:33px;background:none;" value="<%=Util.removeNull(carlist.get(0).getPhone()) %>" readonly="readonly">
  221. 操作状态:<input type="text" style="width: 200px;height: 26px;border: none;line-height:33px;background:none;" value="<%=Util.removeNull(carlist.get(0).getOperStateName()) %>" readonly="readonly">
  222. <br/>
  223. 发动机号:<input type="text" style="width: 200px;height: 26px;border: none;line-height:33px;background:none;" value="<%=Util.removeNull(carlist.get(0).getEngineNo()) %>" readonly="readonly">
  224. 发证时间:<input type="text" style="width: 200px;height: 26px;border: none;line-height:33px;background:none;" value="<%=Util.removeNull(carlist.get(0).getRegTime1()) %>" readonly="readonly">
  225. 单位电话:<input id="phone2" type="text" style="width: 200px;height: 26px;border: none;line-height:33px;background:none;" value="<%=Util.removeNull(carlist.get(0).getCarUnitPhone()) %>" readonly="readonly">
  226. 安装单位:<input type="text" style="width: 200px;height: 26px;border: none;line-height:33px;background:none;" value="<%=Util.removeNull(carlist.get(0).getInstallStation()) %>" readonly="readonly">
  227. <br/>
  228. 车&nbsp;架&nbsp;&nbsp;号:<input type="text" style="width: 200px;height: 26px;border: none;line-height:33px;background:none;" value="<%=Util.removeNull(carlist.get(0).getVin()) %>" readonly="readonly">
  229. 登记证号:<input type="text" style="width: 200px;height: 26px;border: none;line-height:33px;background:none;" value="<%=Util.removeNull(carlist.get(0).getRegNo()) %>" readonly="readonly">
  230. 邮 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;编:<input type="text" style="width: 198px;height: 26px;border: none;line-height:33px;background:none;" value="<%=Util.removeNull(carlist.get(0).getPost()) %>" readonly="readonly">
  231. 发标签站点:<input type="text" style="width: 188px;height: 26px;border: none;line-height:33px;background:none;" value="<%=Util.removeNull(carlist.get(0).getTagStation()) %>" readonly="readonly">
  232. <br/>
  233. 单&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;位:<input type="text" style="width: 200px;height: 26px;border: none;line-height:33px;background:none;" value="<%=Util.removeNull(carlist.get(0).getUnitName()) %>" readonly="readonly">
  234. 已发标签状态:<input type="text" style="width: 175px;height: 26px;border: none;line-height:33px;background:none;" value="<%=Util.removeNull(carlist.get(0).getTagOperStateName()) %>" readonly="readonly"/>
  235. 发标签时间:<input type="text" style="width: 191px;height: 26px;border: none;line-height:33px;background:none;" value="<%=Util.removeNull(carlist.get(0).getTagOperTime1()) %>" readonly="readonly"/>
  236. 发标签操作员:<input type="text" style="width: 175px;height: 26px;border: none;line-height:33px;background:none;" value="<%=Util.removeNull(carlist.get(0).getTagOperator()) %>" readonly="readonly"/>
  237. <br/>
  238. 车载气瓶:<input type="text" style="width: 200px;height: 26px;border: none;line-height:33px;background:none;" value="共&nbsp;<%=carlist.get(0).getInstallNum() %>&nbsp;个" readonly="readonly"/>
  239. </div>
  240. <input id = "st" type="hidden" value="<%=session.getAttribute("st") %>"/>
  241. <input id = "et" type="hidden" value="<%=session.getAttribute("et") %>"/>
  242. <input id = "scarNo" type="hidden" value="<%=scarNo %>"/>
  243. </body>
  244. </html>