listDraft.jsp 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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: '标题', name: 'title', width: 300 },
  21. { display: '类型', name: 'type', width: 150 ,
  22. render: function (row){
  23. var html = '';
  24. if(row.type == '1'){
  25. html = '紧急';
  26. } else {
  27. html = '普通';
  28. }
  29. return html;
  30. }},
  31. { display: '创建时间', name: 'createdate', width: 200 },
  32. {
  33. display: '操作', isAllowHide: false,
  34. render: function (row)
  35. {
  36. var html = '';
  37. html += '<a href=\"#\" onclick=\"window.parent.f_addTab(new Date().getTime(), \'查看专送件\', \'${pageContext.request.contextPath }/govCirculateAction.do?task=toEdit&id='
  38. + row.id + '\');\">编辑</a>&nbsp;';
  39. html += '<a href=\"#\" onclick=\"delete1('+row.id+')\">删除</a>&nbsp;';
  40. return html;
  41. }
  42. }
  43. ],
  44. pageSize:20,
  45. url: 'govCirculateAction.do?task=draft&time=' + new Date().getTime(),
  46. parms: [{name: "title1", value: ""},
  47. {name: "starttime", value: ""},
  48. {name: "endtime", value: ""}],
  49. pageParmName: 'p', //页索引参数名,(提交给服务器)
  50. pagesizeParmName: 'pSize', //页记录数参数名,(提交给服务器)
  51. width: '99.9%',
  52. height: '99%',
  53. onError: function(){alert("数据加载失败,请刷新页面!");}
  54. });
  55. $("#pageloading").hide();
  56. $("#starttime").ligerDateEditor({ showTime: false, labelAlign: 'left', format :"yyyy-MM-dd"});
  57. $("#endtime").ligerDateEditor({ showTime: false, labelAlign: 'left', format :"yyyy-MM-dd"});
  58. });
  59. function searchByKword(){
  60. grid.set("parms", [{name: "title1", value: encodeURI($("#title1").val())},
  61. {name : "starttime", value : $("#starttime").val()},
  62. {name : "endtime", value : $("#endtime").val()}]);
  63. grid.set("newPage", "1");
  64. grid.loadData(true);
  65. }
  66. function searchAll() {
  67. $("#title1").val("");
  68. $("#starttime").val("");
  69. $("#endtime").val("");
  70. searchByKword();
  71. }
  72. function close1(){
  73. window.parent.tab.removeSelectedTabItem();
  74. }
  75. function delete1(id){
  76. $.ajax({
  77. url : "govCirculateAction.do",
  78. async : false,
  79. type : "post",
  80. data : {"task": "delete", "id": id},
  81. success : function(data) {
  82. if(data == "false"){
  83. addError("删除失败!");
  84. } else {
  85. addWaitInfo("删除成功!",500);
  86. grid.loadData(true);
  87. }
  88. },
  89. error : function() {
  90. alert("数据处理失败,请检查网络重新登录或联系管理员!");
  91. }
  92. });
  93. }
  94. </script>
  95. </head>
  96. <body>
  97. <div class="container-layout">
  98. <div id="title" class="form-button" style="width: 100%">
  99. <input onclick="close1();" type="button" value="关闭" class="l-button">
  100. </div>
  101. <div class="default_search" style="margin: 0; width: 100%;">
  102. <ul class="list_search">
  103. <li class="title">标题:</li>
  104. <li class="text">
  105. <input type="text" id="title1" name="title1" value="" style="width: 130px;">
  106. </li>
  107. </ul>
  108. <ul class="list_search" style="width:450px;">
  109. <li class="title">发起时间:</li>
  110. <li class="text">
  111. <input type="text" id="starttime" name="starttime" style="width: 130px;">
  112. </li>
  113. <li class="title" style="width:10px; text-align: center; padding-left: 0px; padding-right: 3px;">
  114. </li>
  115. <li class="text">
  116. <input type="text" id="endtime" name="endtime" style="width: 130px;">
  117. </li>
  118. </ul>
  119. <ul>
  120. <li class="search-button">
  121. <input type="button" class='l-button' name="search" onclick="searchByKword()" value="查询"/>
  122. <input type="button" class='l-button' name="search" onclick="searchAll()" value="查询全部"/>
  123. </li>
  124. </ul>
  125. </div><div style="clear: both;">
  126. <div id="maingrid4" style="margin:0; padding:0"></div>
  127. </div>
  128. <div style="display:none;">
  129. </div>
  130. </div>
  131. <%@ include file="/include/message.jsp"%>
  132. </body>
  133. </html>