detailbyid.jsp 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
  2. <%@ page import="java.util.List" %>
  3. <%@ page import="com.runzhixing.bean.Announcement" %>
  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<Announcement> carlist = (List)session.getAttribute("andetailbyid");
  9. %>
  10. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  11. <html>
  12. <head>
  13. <base href="<%=basePath%>">
  14. <title>公告信息详细</title>
  15. <meta http-equiv="pragma" content="no-cache">
  16. <meta http-equiv="cache-control" content="no-cache">
  17. <meta http-equiv="expires" content="0">
  18. <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
  19. <meta http-equiv="description" content="This is my page">
  20. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  21. <meta http-equiv="X-UA-Compatible" content="IE=10"/>
  22. <script type="text/javascript" src="js/easyui/XiuCai.index.js"> </script>
  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. $(document).ready(function(){
  45. });
  46. function fLoadTable(){
  47. var st = $('#st').val();
  48. var et = $('#et').val();
  49. if(st!=null&&st!=""){
  50. $("#searchst").datebox("setValue", st);
  51. }
  52. if(et!=null&&et!=""){
  53. $("#searchet").datebox("setValue", et);
  54. }
  55. $('#tt').datagrid({
  56. fit: true,//自动大小
  57. title: '车辆气瓶数据详细',
  58. width: '100%',
  59. height: 580,
  60. toolbar: '#toolbar',
  61. fitColumns: true,
  62. singleSelect:false,
  63. loadMsg:'正在加载, 请稍等 …',
  64. nowrap : true,//设置为true,当数据长度超出列宽时将会自动截取
  65. striped : true,//设置为true将交替显示行背景
  66. collapsible : true,//显示可折叠按钮
  67. singleSelect:true,//为true时只能选择单行
  68. fitColumns:true,//允许表格自动缩放,以适应父容器
  69. rownumbers:true,
  70. frozenColumns:[[ //选择框
  71. {field:'ck',checkbox:true}
  72. ]],
  73. columns:[[
  74. {field:'cylindercarNo',title:'操作',width:'7%',formatter: function(value, row, index){
  75. return '<a href="jsp/rzx/dataQuery/CylinderFollow?cylinderguid='+value+'" target="_blank">'+"追踪气瓶"+'</a>';
  76. }},
  77. {field:'carNo',title:'所属车辆',width:'7%'},
  78. {field:'cylinderNo',title:'气瓶使用编号',width:'7%'},
  79. {field:'productNo',title:'生产厂家',width:'7%'},
  80. {field:'cylinderNo',title:'气瓶出厂编号',width:'7%'},
  81. {field:'cylinderTypeName',title:'气瓶类型',width:'7%'},
  82. {field:'productDate1',title:'生产年月',width:'7%'},
  83. {field:'productType',title:'型号',width:'7%'},
  84. {field:'cylinderState',title:'使用状态',width:'7%',formatter: function(value, row, index){
  85. if (value == "0") {
  86. return '<font style="color:green;font-weight: bold;">'+"在用"+'</font>';
  87. }
  88. else if(value == "1") {
  89. return '<font style="color:red;font-weight: bold;">'+"报废"+'</font>';
  90. }else if(value == "2") {
  91. return '<font style="color:red;font-weight: bold;">'+"超期未检"+'</font>';
  92. }else if(value == "3") {
  93. return '<font style="color:red;font-weight: bold;">'+"周转"+'</font>';
  94. }}},
  95. {field:'nextCheckDate',title:'下次检验日期',width:'7%',formatter:function(value,row,index){
  96. var unixTimestamp = new Date(value);
  97. return unixTimestamp.toLocaleString();
  98. }},
  99. {field:'checkDate',title:'最后检验日期',width:'7%',formatter:function(value,row,index){
  100. var unixTimestamp = new Date(value);
  101. return unixTimestamp.toLocaleString();
  102. }},
  103. {field:'startUseDate',title:'开始投用日期',width:'7%',formatter:function(value,row,index){
  104. var unixTimestamp = new Date(value);
  105. return unixTimestamp.toLocaleString();
  106. }},
  107. {field:'installDate1',title:'安装日期',width:'7%'},
  108. {field:'yearLimit',title:'使用年限',width:'7%'},
  109. {field:'timesAvailable',title:'可充装次数',width:'7%'},
  110. {field:'fillTimes',title:'已充装次数',width:'7%'},
  111. {field:'checkStation',title:'检验单位',width:'7%'},
  112. {field:'checkState',title:'检验状态',width:'7%',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',title:'安装单位',width:'7%'},
  120. {field:'installLicence',title:'安装许可',width:'7%'},
  121. {field:'monitorStation',title:'安装监检单位',width:'7%'},
  122. {field:'weight',title:'重量',width:'7%'},
  123. {field:'vol',title:'容积',width:'7%'},
  124. {field:'thickness',title:'壁厚',width:'7%'},
  125. {field:'press',title:'压力',width:'7%'},
  126. {field:'material',title:'材质',width:'7%'},
  127. {field:'installLoc',title:'安装位置',width:'7%'}
  128. ]]
  129. });
  130. }
  131. function fLoadData(page,rows){
  132. document.getElementById("pageNumber").innerText = i;
  133. document.getElementById("from").innerText = (page-1)*rows;
  134. document.getElementById("to").innerText = page*rows;
  135. $.messager.progress({
  136. title: '请等待',
  137. msg: '正在加载数据...',
  138. text: '查询中.......'
  139. });
  140. $.ajax({
  141. type:"POST",
  142. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  143. url:"ajax/carsDataQueryagain?page="+page+"&psize="+rows,
  144. success:function (data){
  145. $.messager.progress('close');
  146. var vData = $.parseJSON(data);
  147. sum = vData.total;
  148. totalpage = Math.ceil(sum/rows);
  149. document.getElementById("total").innerText = sum;
  150. document.getElementById("totalpage").innerText = totalpage;
  151. $('#tt').datagrid('loadData', vData); //将数据绑定到datagrid
  152. $('#pp').pagination({
  153. total:sum,
  154. pageList: [2,10,50,100],
  155. beforePageText: '第',//页数文本框前显示的汉字
  156. afterPageText: '页 共 {pages} 页',
  157. displayMsg: '当前显示 {from} - {to} 条记录 共 {total} 条记录',
  158. onSelectPage:function(pageNumber, pageSize){
  159. fLoadData();
  160. }
  161. });
  162. }
  163. });
  164. }
  165. function changeSize(){
  166. fLoadData(1,10);
  167. }
  168. </script>
  169. </head>
  170. <body>&nbsp;
  171. <!-- 查询结果:数据表格 -->
  172. <table id="tt" cellspacing="0" cellpadding="0" >
  173. </table>
  174. <center>
  175. <div id="toolbar" style="padding-top: 10px;height: auto;" class="hzbspan">
  176. <table style="border-collapse:separate; border-spacing:10px;">
  177. <tr>
  178. <td class="hzbspan">
  179. ID号:<input class="hzbspan" type="text" style="width: 200px;height: 26px;border: none;line-height:26px;" value="<%=carlist.get(0).getId()%>" readonly="readonly">
  180. </td>
  181. <td class="hzbspan">
  182. 标题:<input class="hzbspan" type="text" style="width: 200px;height: 26px;border: none;line-height:26px;" value="<%=carlist.get(0).getTitle() %>" readonly="readonly">
  183. </td>
  184. <td class="hzbspan">
  185. 发布人:<input class="hzbspan" type="text" style="width: 200px;height: 26px;border: none;line-height:26px;" value="<%=carlist.get(0).getPublisher() %>" readonly="readonly">
  186. </td>
  187. <td class="hzbspan">
  188. 内容:<input class="hzbspan" type="text" style="width: 200px;height: 26px;border: none;line-height:26px;" value="<%=carlist.get(0).getContent() %>" readonly="readonly">
  189. </td>
  190. </tr>
  191. <tr>
  192. <td class="hzbspan">
  193. 发布时间:<input class="hzbspan" type="text" style="width: 200px;height: 26px;border: none;line-height:26px;" value="<%=carlist.get(0).getPublishTime1() %>" readonly="readonly">
  194. </td>
  195. <td class="hzbspan">
  196. 发布站点:<input class="hzbspan" type="text" style="width: 200px;height: 26px;border: none;line-height:26px;" value="<%=carlist.get(0).getPublishStationNo() %>" readonly="readonly">
  197. </td>
  198. <td class="hzbspan">
  199. 发布站点:<input class="hzbspan" type="text" style="width: 200px;height: 26px;border: none;line-height:26px;" value="<%=carlist.get(0).getPublishStation() %>" readonly="readonly">
  200. </td>
  201. <td class="hzbspan">
  202. 录入人:<input class="hzbspan" type="text" style="width: 200px;height: 26px;border: none;line-height:26px;" value="<%=carlist.get(0).getRecordOperator() %>" readonly="readonly">
  203. </td>
  204. </tr>
  205. <tr>
  206. <td class="hzbspan">
  207. 录入人:<input class="hzbspan" type="text" style="width: 200px;height: 26px;border: none;line-height:26px;" value="<%=carlist.get(0).getRecordOperatorName() %>" readonly="readonly">
  208. </td>
  209. <td class="hzbspan">
  210. 接收区域:<input class="hzbspan" type="text" style="width: 200px;height: 26px;border: none;line-height:26px;" value="<%=carlist.get(0).getAcceptDistrict() %>" readonly="readonly">
  211. </td>
  212. <td class="hzbspan">
  213. 接收区域:<input class="hzbspan" type="text" style="width: 200px;height: 26px;border: none;line-height:26px;" value="<%=carlist.get(0).getAcceptDistrictName() %>" readonly="readonly">
  214. </td>
  215. <td class="hzbspan">
  216. 站点类型:<input class="hzbspan" type="text" style="width: 200px;height: 26px;border: none;line-height:26px;" value="<%=carlist.get(0).getAcceptStationType() %>" readonly="readonly">
  217. </td>
  218. </tr>
  219. <tr>
  220. <td class="hzbspan">
  221. 接收类型:<input class="hzbspan" type="text" style="width: 200px;height: 26px;border: none;line-height:26px;" value="<%=carlist.get(0).getAcceptTypeName() %>" readonly="readonly">
  222. </td>
  223. <td class="hzbspan">
  224. 信息状态:<input class="hzbspan" type="text" style="width: 200px;height: 26px;border: none;line-height:26px;" value="<%=carlist.get(0).getState() %>" readonly="readonly">
  225. </td>
  226. <td class="hzbspan">
  227. 信息状态:<input class="hzbspan" type="text" style="width: 200px;height: 26px;border: none;line-height:26px;" value="<%=carlist.get(0).getStateName() %>" readonly="readonly">
  228. </td>
  229. </tr>
  230. </table>
  231. </div>
  232. </center>
  233. <input id = "st" type="hidden" value="<%=session.getAttribute("st") %>"/>
  234. <input id = "et" type="hidden" value="<%=session.getAttribute("et") %>"/>
  235. </body>
  236. </html>