borrow.jsp 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. <%@ page language="java" contentType="text/html;charset=GBK" pageEncoding="GBK"%>
  2. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  3. <%@ taglib prefix="h" uri="/WEB-INF/tlds/author.tld" %>
  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 }/main.css" rel="stylesheet" type="text/css" />
  10. <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  11. <script src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  12. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script>
  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" src="/shares/js/yw/ams/flow/amsflow.js"></script>
  16. <script type="text/javascript">
  17. var grid = null;
  18. $(function (){
  19. // 修改查询时不需要具体到时分秒 linww20150122 begin
  20. $("#beginDate").ligerDateEditor({ showTime: false, width:130,labelAlign: 'left'});
  21. $("#endDate").ligerDateEditor({ showTime: false,width:130, labelAlign: 'left'});
  22. // 修改查询时不需要具体到时分秒 linww20150122 begin
  23. searchByKword();
  24. });
  25. function initList(params) {
  26. grid = $("#maingrid4").ligerGrid({columns :
  27. [{display : '档案类目',name : 'category_name',width : '15%'},
  28. {display : '部门',name : 'groupname',width : '10%',render:function(row){if(null==row.groupname){return "--"}else{return row.groupname}}},
  29. {display : '档案名称',name : 'archive_name',width : '30%'},
  30. //统计 借阅 linww20150126 begin
  31. {display : '借阅中',name : 'num',width : '10%',render:function(row){
  32. var h = "";
  33. if(row.borrow_state==2){
  34. h += "<a href='javascript:num(" + row.universalid + ")'>"+row.num+"</a> ";
  35. }
  36. else
  37. h += "0 ";
  38. return h;
  39. }},
  40. {display : '历史借阅',name : 'num',width : '10%',render:function(row){
  41. var h = "";
  42. if(row.borrow_state==3){
  43. h += "<a href='javascript:num2(" + row.universalid + ")'>"+row.num+"</a> ";
  44. }
  45. else {
  46. if(row.total-row.num==0){
  47. h += "0 ";
  48. }
  49. else{
  50. h += "<a href='javascript:num2(" + row.universalid + ")'>"+(row.total-row.num)+"</a> ";
  51. }
  52. }
  53. return h;
  54. }},
  55. {display : '总共借阅次数',name : 'num2',width : '10%',render:function(row){
  56. var h = "";
  57. h += "<a href='javascript:num3(" + row.universalid + ")'>"+row.total+"</a> ";
  58. return h;
  59. }}
  60. //统计 借阅 linww20150126 end
  61. ],
  62. pageSizeOptions: [10,20, 30, 40, 50],
  63. pageSize : 20,
  64. rownumbers:true,
  65. url : 'amsStatisticalBorrow.do?method=borrowData&time='+ new Date().getTime()+params,
  66. pageParmName : 'p',
  67. pagesizeParmName : 'pSize',
  68. width : '99.5%',
  69. height : '99%',
  70. onError:function(err){
  71. alert("获取数据失败,请刷新页面后重试!");
  72. }
  73. });
  74. $("#pageloading").hide();
  75. $("#starttime").ligerDateEditor({ showTime: true, width:120, labelAlign: 'left', format :"yyyy-MM-dd"});
  76. $("#endtime").ligerDateEditor({ showTime: true, width:120, labelAlign: 'left', format :"yyyy-MM-dd"});
  77. $("#modelId").ligerComboBox();
  78. };
  79. function searchByKword() {
  80. if(null != grid){
  81. grid.set("newPage","1");
  82. }
  83. var s="";
  84. s += "&groupname="+encodeURI(encodeURI($("#groupname").val()));
  85. s += "&category_name="+encodeURI(encodeURI($("#category_name").val()));
  86. s += "&beginDate="+encodeURI(encodeURI($("#beginDate").val()));
  87. s += "&endDate="+encodeURI(encodeURI($("#endDate").val()));
  88. s += "&archive_name="+encodeURI(encodeURI($("#archive_name").val()));
  89. initList(s);
  90. }
  91. function num(id){
  92. // submitAUrl("amsStatisticalBorrow.do?method=toBorrowDetail&universalid="+id);
  93. search("amsStatisticalBorrow.do?method=toBorrowDetail&universalid="+id);
  94. }
  95. //借阅历查看
  96. function num2(id){
  97. search2("amsStatisticalBorrow.do?method=toBorrowDetailhistory&universalid="+id);
  98. }
  99. //借阅总详细查看
  100. function num3(id){
  101. search3("amsStatisticalBorrow.do?method=toBorrowDetailTotal&universalid="+id);
  102. }
  103. function search(url) {
  104. var obj = window.top;
  105. if (obj != undefined && obj != null) {
  106. obj.$.ligerDialog
  107. .open({
  108. url : url,
  109. height : 400,
  110. width : 800,
  111. title:"借阅中详细",
  112. name : "listDialog"
  113. });
  114. }
  115. }
  116. function search2(url) {
  117. var obj = window.top;
  118. if (obj != undefined && obj != null) {
  119. obj.$.ligerDialog
  120. .open({
  121. url : url,
  122. height : 400,
  123. width : 800,
  124. title:"借阅历史详细",
  125. name : "listDialog"
  126. });
  127. }
  128. }
  129. function search3(url) {
  130. var obj = window.top;
  131. if (obj != undefined && obj != null) {
  132. obj.$.ligerDialog
  133. .open({
  134. url : url,
  135. height : 400,
  136. width : 800,
  137. title:"总共借阅次数详细",
  138. name : "listDialog"
  139. });
  140. }
  141. }
  142. </script>
  143. </head>
  144. <body>
  145. <form id="requestForm" action="" method="post">
  146. <div class="container">
  147. <!-- <div id="title" class="form-button" style="width: 100%;">
  148. <input onclick="closeTabUseInOA();" type="button" value="关闭" class="l-button">类目、部门、档案名称、起止日期、操作类型、操作人
  149. </div> -->
  150. <div class="default_search" style="margin: 0; width: 100%; padding:0;">
  151. <ul class="list_search" style="width:250px;">
  152. <li class="title">档案类目:</li>
  153. <li class="text">
  154. <input type="text" id="category_name" name="map.category_name" style="width: 130px;">
  155. </li>
  156. </ul>
  157. <ul class="list_search" style="width:450px;">
  158. <li class="title">借阅时间:</li>
  159. <li class="text">
  160. <input type="text" id="beginDate" name="beginDate" style="width: 130px;">
  161. </li>
  162. <li class="title title_rqjg">
  163. </li>
  164. <li class="text">
  165. <input type="text" id="endDate" name="endDate" style="width: 130px;">
  166. </li>
  167. </ul>
  168. </div>
  169. <div class="default_search" style="margin: 0; width: 100%; padding:0;">
  170. <ul class="list_search" style="width:250px;">
  171. <li class="title">部门:</li>
  172. <li class="text">
  173. <input type="text" id="groupname" name="map.groupname" style="width: 130px;">
  174. </li>
  175. </ul>
  176. <ul style="width:250px;"><li class="title">档案名称:</li>
  177. <li class="text">
  178. <input type="text" id="archive_name" name="archive_name" style="width: 130px;">
  179. </li>
  180. </ul>
  181. <ul><li class="search-button"><input type="button" class='l-button' name="search" onclick="searchByKword()" value="查询"/></li>
  182. </ul>
  183. </div>
  184. </div>
  185. </form>
  186. <div id="maingrid4" style="margin: 0; padding: 0;clear: both;"></div>
  187. <div style="display: none;">
  188. </div>
  189. <%@ include file="/include/message.jsp"%>
  190. </body>
  191. </html>