listHonorCard.jsp 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  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 src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  11. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/core/base.js" type="text/javascript"></script>
  12. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
  13. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerDateEditor.js" type="text/javascript"></script>
  14. <link href="${pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
  15. <script type="text/javascript" src="/shares/js/constant.js"></script>
  16. <script type="text/javascript" src="/shares/js/common.js"></script>
  17. <script type="text/javascript" src="/shares/js/yw/yongfu/common.js"></script>
  18. <script type="text/javascript">
  19. var grid = null;
  20. function deleteRow(obj)
  21. {
  22. if(confirm("确定要删除该证书吗?")){
  23. window.parent.f_addTab(new Date().getTime(), '删除证书', '${pageContext.request.contextPath }/HonorCardAction.do?task=delHonorCard&honorcard_id='+obj+'&tabid=' + getCurrentTabId());
  24. }
  25. }
  26. $(function () {
  27. grid = $("#maingrid4").ligerGrid({
  28. columns: [
  29. { display: '证件类型', name: 'card_sort', width: 100},
  30. { display: '证件名称', name: 'card_name', width: 200},
  31. { display: '颁发时间', name: 'award_date', width: 100
  32. ,render: function (row) {
  33. var html = subDate(row.award_date);
  34. return html;
  35. }
  36. },
  37. { display: '颁发单位', name: 'award_unit', width: 100},
  38. { display: '项目名称', name: 'project_name', width: 150 },
  39. { display: '级别', name: 'level', width: 70},
  40. { display: '红头文件', name: 'red_file', width: 100},
  41. { display: '有无牌匾', name: 'have_tablet', width: 100},
  42. { display: '文件存放处', name: 'original_place', width: 100},
  43. { display: '备注', name: 'remark', width: 100},
  44. {
  45. display: '操作', isAllowHide: false,width: 300,
  46. render: function (row)
  47. {
  48. var html = '<a href=\"#\" onclick=\"window.parent.f_addTab(new Date().getTime(), \'查看\', \'${pageContext.request.contextPath }/HonorCardAction.do?task=infoHonorCard&honorcard_id='
  49. + row.honorcard_id + '&tabid=' + getCurrentTabId()+'\');\">查看</a>&nbsp;';
  50. html += '<a href=\"#\" onclick=\"window.parent.f_addTab(new Date().getTime(), \'修改\', \'${pageContext.request.contextPath }/HonorCardAction.do?task=toEditHonorCard&honorcard_id='
  51. + row.honorcard_id + '&tabid=' + getCurrentTabId()+'\');\">修改</a>&nbsp;';
  52. html += '<a href=\"#\" onclick=\"deleteRow('+row.honorcard_id+')\">删除</a>&nbsp;';
  53. return html;
  54. }
  55. }
  56. ],
  57. fixedCellHeight: false, //是否固定单元格的高度
  58. pageSize:20,
  59. url: 'HonorCardAction.do?task=listHonorCard&time=' + new Date().getTime(),
  60. pageParmName: 'p', //页索引参数名,(提交给服务器)
  61. pagesizeParmName: 'pSize', //页记录数参数名,(提交给服务器)
  62. enabledSort: true, //是否允许排序
  63. width: '99.8%',
  64. height: '99%'
  65. });
  66. $("#pageloading").hide();
  67. });
  68. function searchByKword(){
  69. var card_name = document.getElementById("card_name");
  70. var level = document.getElementById("level");
  71. var card_sort = document.getElementById("card_sort");
  72. var s = "";
  73. if(card_name.value != "" && typeof(card_name.value) != "undefined" ){
  74. s += "&card_name=" + encodeURI(encodeURI(card_name.value));
  75. }
  76. if(level.value != "" && typeof(level.value) != "undefined" ){
  77. s += "&level=" + level.value;
  78. }
  79. if(card_sort.value != "" && typeof(card_sort.value) != "undefined" ){
  80. s += "&card_sort=" + card_sort.value;
  81. }
  82. grid.set("newPage", "1");
  83. grid = $("#maingrid4").ligerGrid({
  84. columns: [
  85. { display: '证件类型', name: 'card_sort', width: 100},
  86. { display: '证件名称', name: 'card_name', width: 200},
  87. { display: '颁发时间', name: 'award_date', width: 100
  88. ,render: function (row) {
  89. var html = subDate(row.award_date);
  90. return html;
  91. }
  92. },
  93. { display: '颁发单位', name: 'award_unit', width: 100},
  94. { display: '项目名称', name: 'project_name', width: 150 },
  95. { display: '级别', name: 'level', width: 70},
  96. { display: '红头文件', name: 'red_file', width: 100},
  97. { display: '有无牌匾', name: 'have_tablet', width: 100},
  98. { display: '文件存放处', name: 'original_place', width: 100},
  99. { display: '备注', name: 'remark', width: 100},
  100. {
  101. display: '操作', isAllowHide: false,width: 300,
  102. render: function (row)
  103. {
  104. var html = '<a href=\"#\" onclick=\"window.parent.f_addTab(new Date().getTime(), \'查看\', \'${pageContext.request.contextPath }/HonorCardAction.do?task=infoHonorCard&honorcard_id='
  105. + row.honorcard_id + '&tabid=' + getCurrentTabId()+'\');\">查看</a>&nbsp;';
  106. html += '<a href=\"#\" onclick=\"window.parent.f_addTab(new Date().getTime(), \'修改\', \'${pageContext.request.contextPath }/HonorCardAction.do?task=toEditHonorCard&honorcard_id='
  107. + row.honorcard_id + '&tabid=' + getCurrentTabId()+'\');\">修改</a>&nbsp;';
  108. html += '<a href=\"#\" onclick=\"deleteRow('+row.honorcard_id+')\">删除</a>&nbsp;';
  109. return html;
  110. }
  111. }
  112. ],
  113. fixedCellHeight: false, //是否固定单元格的高度
  114. pageSize:20,
  115. url: 'HonorCardAction.do?task=listHonorCard&time=' + new Date().getTime()+s,
  116. pageParmName: 'p', //页索引参数名,(提交给服务器)
  117. pagesizeParmName: 'pSize', //页记录数参数名,(提交给服务器)
  118. enabledSort: true, //是否允许排序
  119. width: '99.8%',
  120. height: '99%'
  121. });
  122. $("#pageloading").hide();
  123. }
  124. function searchAll() {
  125. $("#card_name").val("");
  126. $("#card_sort").val("");
  127. $("#level").val("");
  128. searchByKword();
  129. }
  130. </script>
  131. </head>
  132. <body >
  133. <div class="container-layout">
  134. <div id="title" class="form-button">
  135. <input type="button" class="l-button" value="新增证书" onclick="window.parent.f_addTab(new Date().getTime(), '新增证书', '${pageContext.request.contextPath }/HonorCardAction.do?task=toCreateHonorCard&tabid=' + getCurrentTabId());"/>
  136. </div>
  137. <div class="default_search" >
  138. <ul class="list_search">
  139. <li class="title">证件名称:</li>
  140. <li class="text">
  141. <input type="text" name="card_name" id="card_name" >
  142. </li>
  143. </ul>
  144. <ul class="list_search" >
  145. <li class="title">证书类型:</li>
  146. <li class="text">
  147. <select name="card_sort" id="card_sort">
  148. <option value="">==请选择==</option>
  149. <c:forEach var="list" items="${listCardSort }">
  150. <option value="${list.data_id }">${list.value_name }</option>
  151. </c:forEach>
  152. </select>
  153. </li>
  154. </ul>
  155. <ul class="list_search" >
  156. <li class="title">级别:</li>
  157. <li class="text">
  158. <select name="level" id="level">
  159. <option value="">==请选择==</option>
  160. <c:forEach var="list" items="${listCardLevel }">
  161. <option value="${list.data_id }">${list.value_name }</option>
  162. </c:forEach>
  163. </select>
  164. </li>
  165. </ul>
  166. <ul>
  167. <li class="search-button" >
  168. <input type="button" class='l-button' name="search" onclick="searchByKword()" value="查询"/>
  169. <input type="button" class='l-button' name="search" onclick="searchAll()" value="查询全部"/>
  170. </li>
  171. </ul>
  172. </div>
  173. <div style="clear: both;">
  174. <div id="maingrid4" style="margin: 0; padding: 0"></div>
  175. </div>
  176. </div>
  177. </body>
  178. </html>