CylinderdataQuery.jsp 13 KB

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