CheckAnnouncementInfofilling.jsp 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  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. %>
  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. <link rel="stylesheet" type="text/css" href="css/easyui/themes/default/easyui.css">
  31. <link rel="stylesheet" type="text/css" href="css/easyui/themes/icon.css">
  32. <link rel="stylesheet" type="text/css" href="css/easyui/demo/demo.css">
  33. <script type="text/javascript" src="css/easyui/jquery.min.js"></script>
  34. <script type="text/javascript" src="css/easyui/jquery.easyui.min.js" charset="utf-8"></script>
  35. <script type="text/javascript" src="css/easyui/locale/easyui-lang-zh_CN.js" charset="utf-8"></script>
  36. <link rel="stylesheet" type="text/css" href="css/common/hzbstyle.css">
  37. <style type="text/css">
  38. a:HOVER{
  39. color: red;
  40. text-decoration: none;
  41. }
  42. a{
  43. color: #f08300;
  44. text-decoration: none;
  45. }
  46. </style>
  47. <script type="text/javascript">
  48. var i = 1;//第几页
  49. var sum;//总条数
  50. var totalpage;//总页数
  51. var pageSize =10;
  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. loadMsg:'正在加载, 请稍等 …',
  68. nowrap : true,//设置为true,当数据长度超出列宽时将会自动截取
  69. striped : true,//设置为true将交替显示行背景
  70. collapsible : true,//显示可折叠按钮
  71. fitColumns:true,//允许表格自动缩放,以适应父容器
  72. rownumbers:true,
  73. pagination:true,//分页控件
  74. columns:[[
  75. {field:'title',title:'标题',width:'10%'},
  76. {field:'id',title:'ID',width:'10%',formatter: function(value, row, index){
  77. hiddenID = value;
  78. return value;
  79. }},
  80. {field:'none',title:'内容',width:'10%',formatter: function(value, row, index){
  81. return '<a href="Detailbyid?hiddenID='+hiddenID+'" target="_blank">'+"详情"+'</a>';
  82. }},
  83. {field:'publishTime1',title:'发布时间',width:'10%'},
  84. {field:'publisher',title:'发布人',width:'10%'},
  85. {field:'publishStation',title:'发布站点',width:'10%'},
  86. {field:'recordOperatorName',title:'记录人',width:'10%'},
  87. {field:'acceptDistrictName',title:'接收区域',width:'10%'},
  88. {field:'acceptTypeName',title:'接收类型',width:'10%'},
  89. {field:'stateName',title:'信息状态',width:'10%'}
  90. ]]
  91. });
  92. }
  93. function fLoadData(page,rows){
  94. $.messager.progress({
  95. title: '请等待',
  96. msg: '正在加载数据...',
  97. text: '查询中.......'
  98. });
  99. $.ajax({
  100. type:"POST",
  101. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  102. data:$('#checkAnnounform').serialize(),
  103. url:"ajax/checkAnnounformment?page="+page+"&psize="+rows,
  104. success:function (data){
  105. $.messager.progress('close');
  106. var vData = $.parseJSON(data);
  107. sum = vData.total;
  108. if(sum==0){
  109. show("没有查询到相关信息!!!");
  110. }
  111. totalpage = Math.ceil(sum/rows);
  112. $('#tt').datagrid('loadData', vData); //将数据绑定到datagrid
  113. var p = $('#tt').datagrid('getPager');
  114. $(p).pagination({
  115. pageList: [10,20,30,100,200,400],//可以设置每页记录条数的列表
  116. beforePageText: '第',//页数文本框前显示的汉字
  117. afterPageText: '页 共 {pages} 页',
  118. displayMsg: '当前显示 {from} - {to} 条记录 共 {total} 条记录',
  119. onSelectPage: function (pageNumber, pageSize) {
  120. fLoadData(pageNumber, pageSize);
  121. }
  122. });
  123. }
  124. });
  125. }
  126. function selectCountry(){
  127. var id=document.getElementById("city").value;
  128. var select = document.getElementById("country");
  129. for(var i=select.options.length-1;i>=0;i--) {
  130. select.options.remove(i);
  131. }
  132. $.ajax({
  133. type:"POST",
  134. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  135. url:"ajax/hiddenCity?cityId="+id,
  136. success:function (data){
  137. var obj=eval("(" + data + ")");
  138. $.each(obj.rows, function(i,item){
  139. select.options.add(new Option(item.name, item.id));
  140. });
  141. }
  142. });
  143. }
  144. function selectCountry21(){
  145. var id=document.getElementById("cityNop").value;
  146. var select = document.getElementById("pubstationno");
  147. for(var i=select.options.length-1;i>=0;i--) {
  148. select.options.remove(i);
  149. }
  150. $.ajax({
  151. type:"POST",
  152. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  153. url:"ajax/hiddenCity?cityId="+id,
  154. success:function (data){
  155. var obj=eval("(" + data + ")");
  156. $.each(obj.rows, function(i,item){
  157. select.options.add(new Option(item.name, item.id));
  158. });
  159. }
  160. });
  161. }
  162. function show(message) {
  163. $.messager.show({
  164. title: '提示信息',
  165. msg: message,
  166. timeout: 2000,
  167. showType: 'slide'
  168. });
  169. }
  170. function selectCountry1(){
  171. selectCountry();
  172. //changeSize();
  173. }
  174. function selectCountry11(){
  175. selectCountry21();
  176. //changeSize();
  177. }
  178. function changeSize(){
  179. fLoadData(1,10);
  180. }
  181. </script>
  182. </head>
  183. <body>
  184. <!-- 查询结果:数据表格 -->
  185. <table id="tt" cellspacing="0" cellpadding="0" >
  186. </table>
  187. <div id="toolbar" style="padding-top: 0px;height: auto;">
  188. <form id="checkAnnounform" action="ajax/checkAnnounformment" method="post">
  189. <select name="province" style="width: auto;height: 24px;min-width: 100px;display: none;" class="hzbspan">
  190. <%for(AuthorityRegionPlace arp:arplist){
  191. cplist = arp.getCityPlace();
  192. %>
  193. <option value="<%=arp.getId() %>">
  194. <%=arp.getName() %>
  195. </option>
  196. <%} %>
  197. </select>
  198. <select name="city" id="city" style="width: auto;height: 24px;min-width: 100px;display: none;" class="hzbspan" onchange="selectCountry1();">
  199. <%
  200. for(CityPlace cp:cplist){
  201. cyplist = cp.getSubPlaceList();
  202. %>
  203. <option value="<%=cp.getId() %>">
  204. <%=cp.getName() %>
  205. </option>
  206. <%} %>
  207. </select>
  208. <select name="country" id = "country" style="width: auto;height: 24px;min-width: 100px;display: none;" class="hzbspan" onchange="changeSize();" >
  209. </select>
  210. <br/>
  211. <span class="easyui-linkbutton" style="cursor: default;margin-bottom: 5px;"><span class="hzbspan" style="color: #f08300;font-size: 16px;" >发送省:</span></span>
  212. <select name="sendprovince" style="width: auto;height: 24px;min-width: 100px;" class="hzbspan">
  213. <%for(AuthorityRegionPlace arp:arplist){
  214. cplist = arp.getCityPlace();
  215. %>
  216. <option value="<%=arp.getId() %>">
  217. <%=arp.getName() %>
  218. </option>
  219. <%} %>
  220. </select>
  221. <span class="easyui-linkbutton" style="cursor: default;margin-bottom: 5px;"><span class="hzbspan" style="color: #f08300;font-size: 16px;" >发送市:</span></span>
  222. <select name="cityNop" id="cityNop" style="width: auto;height: 24px;min-width: 100px;" class="hzbspan" onchange="selectCountry11();">
  223. <%
  224. for(CityPlace cp:cplist){
  225. cyplist = cp.getSubPlaceList();
  226. %>
  227. <option value="<%=cp.getId() %>">
  228. <%=cp.getName() %>
  229. </option>
  230. <%} %>
  231. </select>
  232. <span class="easyui-linkbutton" style="cursor: default;margin-bottom: 5px;"><span class="hzbspan" style="color: #f08300;font-size: 16px;" >发送县:</span></span>
  233. <select name="pubstationno" id = "pubstationno" style="width: auto;height: 24px;min-width: 100px;" class="hzbspan" >
  234. </select>
  235. <table>
  236. <tr><td>
  237. <select name="acceptType" id = "acceptType" style="width: auto;height: 24px;min-width: 100px;display: none;" class="hzbspan">
  238. <option value="" selected="selected">
  239. 改装厂
  240. </option>
  241. </select>
  242. </td>
  243. <td>
  244. <span style="cursor: default"><span class="hzbspan">开始时间:</span></span></td>
  245. <td><input type="text" id="startTime" name="startTime" class="easyui-datebox" style="width: 100px;height: 24px;" class="hzbspan">
  246. </td>
  247. <td><span style="cursor: default"><span class="hzbspan">结束时间:</span></span></td>
  248. <td><input type="text" class="easyui-datebox" id="endTime" name="endTime" style="width: 100px;height: 24px;" class="hzbspan">
  249. </td>
  250. <td>
  251. <span class="easyui-linkbutton" style="cursor: default;margin-bottom: 5px;"><span class="hzbspan" style="color: #f08300;font-size: 16px;" >排序方式:</span></span>
  252. </td>
  253. <td><select name="direct" id = "direct" style="width: auto;height: 24px;min-width: 100px;" class="hzbspan" >
  254. <option value="0" selected="selected">
  255. 升序
  256. </option>
  257. <option value="1">
  258. 降序
  259. </option>
  260. </select></td>
  261. <td>
  262. <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>
  263. </td></tr></table>
  264. </form>
  265. </div>
  266. </body>
  267. </html>