CheckAnnouncementInfofillingRe.jsp 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358
  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.tool.Util" %>
  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. <script type="text/javascript" src="js/easyui/XiuCai.index.js"> </script>
  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. 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">
  49. var i = 1;//第几页
  50. var sum;//总条数
  51. var totalpage;//总页数
  52. var hiddenID="";
  53. $(document).ready(function(){
  54. fLoadTable();
  55. fLoadData(1,10);
  56. selectCountry();
  57. selectCountry21();
  58. });
  59. function fLoadTable(){
  60. $('#tt').datagrid({
  61. fit: true,//自动大小
  62. title: '',
  63. width: '100%',
  64. height: 580,
  65. toolbar: '#toolbar',
  66. fitColumns: true,
  67. singleSelect:false,
  68. loadMsg:'正在加载, 请稍等 …',
  69. nowrap : true,//设置为true,当数据长度超出列宽时将会自动截取
  70. striped : true,//设置为true将交替显示行背景
  71. collapsible : true,//显示可折叠按钮
  72. singleSelect:true,//为true时只能选择单行
  73. fitColumns:true,//允许表格自动缩放,以适应父容器
  74. rownumbers:true,
  75. frozenColumns:[[ //选择框
  76. {field:'ck',checkbox:true},
  77. ]],
  78. columns:[[
  79. {field:'title',title:'标题',width:'10%'},
  80. {field:'id',title:'ID',width:'10%',formatter: function(value, row, index){
  81. hiddenID = value;
  82. return value;
  83. }},
  84. {field:'none',title:'内容',width:'10%',formatter: function(value, row, index){
  85. return '<a href="Detailbyid?hiddenID='+hiddenID+'" target="_blank">'+"详情"+'</a>';
  86. }},
  87. {field:'publishTime1',title:'发布时间',width:'10%'},
  88. {field:'publisher',title:'发布人',width:'10%'},
  89. {field:'publishStation',title:'发布站点',width:'10%'},
  90. {field:'recordOperatorName',title:'记录人',width:'10%'},
  91. {field:'acceptDistrictName',title:'接收区域',width:'10%'},
  92. {field:'acceptTypeName',title:'接收类型',width:'10%'},
  93. {field:'stateName',title:'信息状态',width:'10%'}
  94. ]]
  95. });
  96. }
  97. function fLoadData(page,rows){
  98. document.getElementById("pageNumber").innerText = i;
  99. document.getElementById("from").innerText = (page-1)*rows;
  100. document.getElementById("to").innerText = page*rows;
  101. $.messager.progress({
  102. title: '请等待',
  103. msg: '正在加载数据...',
  104. text: '查询中.......'
  105. });
  106. $.ajax({
  107. type:"POST",
  108. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  109. data:$('#checkAnnounform').serialize(),
  110. url:"ajax/checkAnnounformment?page="+page+"&psize="+rows,
  111. success:function (data){
  112. $.messager.progress('close');
  113. var vData = $.parseJSON(data);
  114. sum = vData.total;
  115. totalpage = Math.ceil(sum/rows);
  116. document.getElementById("total").innerText = sum;
  117. document.getElementById("totalpage").innerText = totalpage;
  118. $('#tt').datagrid('loadData', vData); //将数据绑定到datagrid
  119. $('#pp').pagination({
  120. total:sum,
  121. pageList: [2,10,50,100],
  122. beforePageText: '第',//页数文本框前显示的汉字
  123. afterPageText: '页 共 {pages} 页',
  124. displayMsg: '当前显示 {from} - {to} 条记录 共 {total} 条记录',
  125. onSelectPage:function(pageNumber, pageSize){
  126. fLoadData();
  127. }
  128. });
  129. }
  130. });
  131. }
  132. function selectCountry(){
  133. var id=document.getElementById("city").value;
  134. var select = document.getElementById("country");
  135. for(var i=select.options.length-1;i>=0;i--) {
  136. select.options.remove(i);
  137. }
  138. $.ajax({
  139. type:"POST",
  140. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  141. url:"ajax/hiddenCity?cityId="+id,
  142. success:function (data){
  143. var obj=eval("(" + data + ")");
  144. $.each(obj.rows, function(i,item){
  145. select.options.add(new Option(item.name, item.id));
  146. });
  147. }
  148. });
  149. }
  150. function selectCountry21(){
  151. var id=document.getElementById("cityNop").value;
  152. var select = document.getElementById("pubstationno");
  153. for(var i=select.options.length-1;i>=0;i--) {
  154. select.options.remove(i);
  155. }
  156. $.ajax({
  157. type:"POST",
  158. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  159. url:"ajax/hiddenCity?cityId="+id,
  160. success:function (data){
  161. var obj=eval("(" + data + ")");
  162. $.each(obj.rows, function(i,item){
  163. select.options.add(new Option(item.name, item.id));
  164. });
  165. }
  166. });
  167. }
  168. function selectCountry1(){
  169. selectCountry();
  170. //changeSize();
  171. }
  172. function selectCountry11(){
  173. selectCountry21();
  174. //changeSize();
  175. }
  176. function paginationpre(){
  177. pageSize = $('#pageSize').val();
  178. if(i<=1){
  179. return false;
  180. }else{
  181. i--;
  182. fLoadData(i,pageSize);
  183. }
  184. }
  185. function paginationnext(){
  186. //先跟总页数相比,看看有没得下一页
  187. pageSize = $('#pageSize').val();
  188. if(i<totalpage){
  189. i++;
  190. fLoadData(i,pageSize);
  191. }else{
  192. return false;
  193. }
  194. }
  195. function changeSize(){
  196. fLoadData(i,changeSize);
  197. }
  198. </script>
  199. </head>
  200. <body>
  201. <!-- 查询结果:数据表格 -->
  202. <table id="tt" cellspacing="0" cellpadding="0" >
  203. </table>
  204. <div id="toolbar" style="padding-top: 10px;height: auto;">
  205. <form id="checkAnnounform" action="ajax/checkAnnounformment" method="post">
  206. <table style="border-collapse:separate; border-spacing:10px;">
  207. <tr>
  208. <td>
  209. </td>
  210. <td>
  211. <select name="province" style="width: 150px;height: 34px;min-width: 100px;display: none;" class="hzbspan select">
  212. <%for(AuthorityRegionPlace arp:arplist){
  213. cplist = arp.getCityPlace();
  214. %>
  215. <option value="<%=arp.getId() %>">
  216. <%=arp.getName() %>
  217. </option>
  218. <%} %>
  219. </select>
  220. </td>
  221. <td>
  222. </td>
  223. <td>
  224. <select name="city" id="city" style="width: 150px;height: 34px;min-width: 100px;display: none;" class="hzbspan select" onchange="selectCountry1();">
  225. <%
  226. for(CityPlace cp:cplist){
  227. cyplist = cp.getSubPlaceList();
  228. %>
  229. <option value="<%=cp.getId() %>">
  230. <%=cp.getName() %>
  231. </option>
  232. <%} %>
  233. </select>
  234. </td>
  235. <td>
  236. </td>
  237. <td>
  238. <select name="country" id = "country" style="width: 150px;height: 34px;min-width: 100px;display: none;" class="hzbspan select" onchange="changeSize();" >
  239. </select>
  240. </td>
  241. </tr>
  242. <tr>
  243. <td>
  244. <span style="cursor: default"><span class="hzbspan" style="font-size: 16px;" >发送省:</span></span>
  245. </td>
  246. <td>
  247. <select name="sendprovince" style="width: 150px;height: 34px;min-width: 100px;" class="hzbspan">
  248. <%for(AuthorityRegionPlace arp:arplist){
  249. cplist = arp.getCityPlace();
  250. %>
  251. <option value="<%=arp.getId() %>">
  252. <%=arp.getName() %>
  253. </option>
  254. <%} %>
  255. </select>
  256. </td>
  257. <td>
  258. <span style="cursor: default;"><span class="hzbspan" style="font-size: 16px;" >发送市:</span></span>
  259. </td>
  260. <td>
  261. <select name="cityNop" id="cityNop" style="width: 150px;height: 34px;min-width: 100px;" class="hzbspan select" onchange="selectCountry11();">
  262. <%
  263. for(CityPlace cp:cplist){
  264. cyplist = cp.getSubPlaceList();
  265. %>
  266. <option value="<%=cp.getId() %>">
  267. <%=cp.getName() %>
  268. </option>
  269. <%} %>
  270. </select>
  271. </td>
  272. <td>
  273. <span style="cursor: default;"><span class="hzbspan" style="font-size: 16px;" >发送县:</span></span>
  274. </td>
  275. <td>
  276. <select name="pubstationno" id = "pubstationno" style="width: 150px;height: 34px;min-width: 100px;" class="hzbspan select" >
  277. </select>
  278. </td>
  279. <td>
  280. <select name="acceptType" id = "acceptType" style="width: 150px;height: 34px;min-width: 100px;display: none;" class="hzbspan select">
  281. <option value="04" selected="selected">
  282. 充装站
  283. </option>
  284. </select>
  285. </td>
  286. </tr>
  287. <tr>
  288. <td>
  289. <span style="cursor: default"><span class="hzbspan">开始时间:</span></span>
  290. </td>
  291. <td>
  292. <input type="text" id="startTime" name="startTime" class="easyui-datebox" style="width: 150px;height: 34px;" class="hzbspan" data-options="prompt:'- - - - - - -'">
  293. </td>
  294. <td>
  295. <span style="cursor: default"><span class="hzbspan">结束时间:</span></span>
  296. </td>
  297. <td>
  298. <input type="text" class="easyui-datebox" id="endTime" name="endTime" style="width: 150px;height: 34px;" class="hzbspan" data-options="prompt:'- - - - - - -'">
  299. </td>
  300. <td>
  301. <span style="cursor: default;"><span class="hzbspan" style="font-size: 16px;" >排序方式:</span></span>
  302. </td>
  303. <td>
  304. <select name="direct" id = "direct" style="width: 150px;height: 34px;min-width: 100px;" class="hzbspan select" >
  305. <option value="0" selected="selected">
  306. 升序
  307. </option>
  308. <option value="1">
  309. 降序
  310. </option>
  311. </select>
  312. </td>
  313. <td>
  314. <a id="btninfosearch" onclick="changeSize();" class="easyui-linkbutton" icon="icon-search" href="javascript:void(0)" style="margin-bottom: 5px;" ><span class="hzbspan" style="color: #f08300;font-size: 16px;">查询</span></a>
  315. </td>
  316. </tr>
  317. </table>
  318. </form>
  319. </div>
  320. </body>
  321. </html>