listDoing2Db.jsp 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. <%@ page language="java" contentType="text/html;charset=GBK"
  2. pageEncoding="GBK"%>
  3. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  5. <html>
  6. <head>
  7. <meta http-equiv="Content-Type" content="text/html;charset=GBK">
  8. <title>待办收文</title>
  9. <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  10. <script type="text/javascript" src="/shares/js/jquery-1.8.2.js"></script>
  11. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script>
  12. <link href="${pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
  13. <script type="text/javascript" src="/shares/js/constant.js"></script>
  14. <script type="text/javascript" src="/shares/js/common.js"></script>
  15. <script type="text/javascript">
  16. var grid = null;
  17. $(function () {
  18. grid = $("#maingrid4").ligerGrid({
  19. columns: [
  20. { display: '&nbsp;', name: 'img', width: 50, align:'center',
  21. render : function (row){
  22. var curDate = dateFtt('yyyy-MM-dd',new Date());
  23. var createDate = row.createdate.substring(0,10);
  24. var d = datedifference(curDate,createDate);
  25. var img = "";
  26. if(d <= 1){
  27. img = "green.png";
  28. }else if(d <= 3){
  29. img = "yellow.png";
  30. }else{
  31. img = "red.png";
  32. }
  33. var html = "<img src='/shares/images/gov/"+img+"' style='width:20px;'/>";
  34. return html;
  35. }},
  36. { display: '标题', name: 'title', width: 300,
  37. render : function (row){
  38. var html = row.insName;
  39. return html;
  40. } },
  41. { display: '发起人', name: 'creator', width: 200,
  42. render : function (row){
  43. var html = row.creator.username;
  44. return html;
  45. } },
  46. { display: '创建时间', name: 'createdate', width: 200,
  47. render : function (row){
  48. var html = row.createdate;
  49. return html;
  50. } },
  51. {
  52. display: '操作', isAllowHide: false,
  53. render: function (row)
  54. {
  55. var html = '';
  56. html += '<a href=\"#\" onclick=\"window.parent.f_addTab(new Date().getTime(), \'查看收文信息\', \'${pageContext.request.contextPath }/govReceiveAction.do?task=toInfo&id='
  57. + row.rid + '\');\">查看</a>&nbsp;';
  58. html += '<a href=\"#\" onclick=\"addInfo(\'催办成功!\');\">催办</a>&nbsp;';
  59. return html;
  60. }
  61. }
  62. ],
  63. pageSize:20,
  64. url: 'govReceiveAction.do?task=listDoing2Db&time=' + new Date().getTime(),
  65. parms: [{name: "insName", value: ""},
  66. {name: "starttime", value: ""},
  67. {name: "endtime", value: ""}],
  68. pageParmName: 'p', //页索引参数名,(提交给服务器)
  69. pagesizeParmName: 'pSize', //页记录数参数名,(提交给服务器)
  70. width: '99.9%',
  71. height: '99%',
  72. onError: function(){alert("数据加载失败,请刷新页面!");}
  73. });
  74. $("#starttime").ligerDateEditor({ showTime: false, width:120, labelAlign: 'left', format :"yyyy-MM-dd"});
  75. $("#endtime").ligerDateEditor({ showTime: false, width:120, labelAlign: 'left', format :"yyyy-MM-dd"});
  76. $("#pageloading").hide();
  77. });
  78. function searchByKword(){
  79. grid.set("parms", [ {
  80. name : "insName",
  81. value : encodeURI($("#insName").val())
  82. }, {
  83. name : "starttime",
  84. value : $("#starttime").val()
  85. }, {
  86. name : "endtime",
  87. value : $("#endtime").val()
  88. }]);
  89. grid.set("newPage", "1");
  90. grid.loadData(true);
  91. }
  92. function searchAll() {
  93. $("#insName").val("");
  94. $("#starttime").val("");
  95. $("#endtime").val("");
  96. searchByKword();
  97. }
  98. function close1(){
  99. window.parent.tab.removeSelectedTabItem();
  100. }
  101. function datedifference(sDate1, sDate2) { //sDate1和sDate2是2006-12-18格式
  102. var dateSpan,
  103. tempDate,
  104. iDays;
  105. sDate1 = Date.parse(sDate1);
  106. sDate2 = Date.parse(sDate2);
  107. dateSpan = sDate2 - sDate1;
  108. dateSpan = Math.abs(dateSpan);
  109. iDays = Math.floor(dateSpan / (24 * 3600 * 1000));
  110. return iDays
  111. };
  112. function dateFtt(fmt,date)
  113. { //author: meizz
  114. var o = {
  115. "M+" : date.getMonth()+1, //月份
  116. "d+" : date.getDate(), //日
  117. "h+" : date.getHours(), //小时
  118. "m+" : date.getMinutes(), //分
  119. "s+" : date.getSeconds(), //秒
  120. "q+" : Math.floor((date.getMonth()+3)/3), //季度
  121. "S" : date.getMilliseconds() //毫秒
  122. };
  123. if(/(y+)/.test(fmt))
  124. fmt=fmt.replace(RegExp.$1, (date.getFullYear()+"").substr(4 - RegExp.$1.length));
  125. for(var k in o)
  126. if(new RegExp("("+ k +")").test(fmt))
  127. fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length)));
  128. return fmt;
  129. }
  130. </script>
  131. <style type="text/css">
  132. .circle{
  133. width: 20px;
  134. height: 20px;
  135. background-color:red;
  136. border-radius: 50%;
  137. -moz-border-radius: 50%;
  138. -webkit-border-radius: 50%;
  139. }
  140. </style>
  141. </head>
  142. <body>
  143. <div class="container-layout">
  144. <div id="title" class="form-button" style="width: 100%">
  145. <input onclick="close1();" type="button" value="关闭" class="l-button">
  146. </div>
  147. <div class="default_search" style="margin: 0; width: 100%;">
  148. <ul class="list_search">
  149. <li class="title">标题:</li>
  150. <li class="text">
  151. <input type="text" id="insName" name="insName" value="" style="width: 130px;">
  152. </li>
  153. </ul>
  154. <ul class="list_search" style="width:450px;">
  155. <li class="title">发起时间:</li>
  156. <li class="text">
  157. <input type="text" id="starttime" name="starttime" style="width: 130px;">
  158. </li>
  159. <li class="title" style="width:10px; text-align: center; padding-left: 0px; padding-right: 3px;">
  160. </li>
  161. <li class="text">
  162. <input type="text" id="endtime" name="endtime" style="width: 130px;">
  163. </li>
  164. </ul>
  165. <ul>
  166. <li class="search-button">
  167. <input type="button" class='l-button' name="search" onclick="searchByKword()" value="查询"/>
  168. <input type="button" class='l-button' name="search" onclick="searchAll()" value="查询全部"/>
  169. </li>
  170. </ul>
  171. </div><div style="clear: both;">
  172. <div id="maingrid4" style="margin:0; padding:0"></div>
  173. </div>
  174. <div style="display:none;">
  175. </div>
  176. </div>
  177. <%@ include file="/include/message.jsp"%>
  178. </body>
  179. </html>