mtPaperCheckList.jspl.jsp 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  1. <%@ page language="java" contentType="text/html;charset=GBK" pageEncoding="GBK"%>
  2. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  4. <html>
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html;charset=GBK">
  7. <title>流程列表</title>
  8. <!-- <script type="text/javascript" src="/shares/js/yw/ams/flow/amsflow.js"></script> -->
  9. <link href="/shares/js/yw/master1/liger/skins/ynet/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  10. <link href="/shares/css/yw/master1/reset.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/core/base.js" type="text/javascript"></script>
  13. <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script>
  14. <script type="text/javascript" src="/shares/js/common.js"></script>
  15. <script type="text/javascript" src="/shares/js/constant.js"></script>
  16. <script type="text/javascript" src="/shares/js/yw/master1/page.js"></script>
  17. <script type="text/javascript" src="/shares/js/yw/master1/common.js"></script>
  18. <script type="text/javascript" src="/shares/js/yw/master1/searchBox.js"></script>
  19. <script type="text/javascript">
  20. var borrowType = ${borrowType};
  21. $(function() {
  22. initList();
  23. });
  24. function searchByKword(s) {
  25. var p = $("#p").val();
  26. var pSize = getPize();
  27. var param = {
  28. "p" : p,
  29. "pSize" : pSize
  30. };
  31. // url : 'amsBorrowMgrAction.do?task=borrowCheckList&time='+ new Date().getTime(),
  32. sendAsyncAjax(
  33. param,
  34. "mtAmsBorrowMgrAction.do?task=borrowCheckList" + s + "&time="
  35. + new Date().getTime(),
  36. "json",
  37. function(data) {
  38. var num = data.Total;
  39. page(num, pSize, p);
  40. var archiveList = data.Rows;
  41. var item_name = $('#contentDiv');
  42. $(item_name).empty();//初始化table,清空table
  43. var html = '';
  44. if (archiveList.length == 0) {
  45. html = notquery();
  46. } else {
  47. var j = 0;
  48. for (var i = 0; i < archiveList.length; i++) {
  49. var arr = archiveList[i];
  50. var bdiv = 1;
  51. bdiv = 1 + j;
  52. if (j < 7) {
  53. j++;
  54. } else {
  55. j = 0;
  56. }
  57. ;
  58. html += '<div class="tr_cont_new mar4 f5_new">';
  59. html += ' <div class="wdrw_tiao_new bn'+bdiv+' fl"></div>';
  60. html += ' <div class="tr_rw_d_new fl">';
  61. html += '<p><img src="/shares/images/master1/rw_ico_menu.png" width="17" height="15" />';
  62. html += arr.archive_num;
  63. html += "&nbsp;&nbsp;"+arr.archive_name;
  64. var borrow_type = "";
  65. for (var k = 0; k < borrowType.length; k++) {
  66. if (borrowType[k]['dvalue'] == arr.borrow_type)
  67. borrow_type = borrowType[k]['dname'];
  68. }
  69. if (borrow_type == "") {
  70. html += "&nbsp;&nbsp;--";
  71. } else {
  72. html += "&nbsp;&nbsp;" + borrow_type;
  73. }
  74. html += "&nbsp;&nbsp;借阅" + arr.borrow_days + "天";
  75. if (null != arr.borrow_hours) {
  76. html += arr.borrow_hours + " 小时 ";
  77. }
  78. html += "&nbsp;&nbsp;剩余天数:";
  79. if (arr["residue_days"] == null) {
  80. if (arr["au_state"] == "2") {
  81. if (arr["borrow_type"] != "3") {
  82. var residueDays = "";
  83. $
  84. .ajax({
  85. url : 'amsMyBorrowAction.do?task=checkResidueDays',
  86. async : false,
  87. type : 'post',
  88. data : {
  89. "return_time" : arr["return_time"]
  90. },
  91. cache : false,
  92. error : function(obj) {
  93. },
  94. success : function(obj) {
  95. if (obj != "") {
  96. residueDays = obj;
  97. }
  98. }
  99. });
  100. if (residueDays < 0) {
  101. html += '<FONT COLOR=\"red\">'
  102. + residueDays + ' 天</FONT>';
  103. } else {
  104. html += '<FONT COLOR=\"GREEN\">'
  105. + residueDays + ' 天</FONT>';
  106. }
  107. } else {
  108. html += '--';
  109. }
  110. } else {
  111. html += '--';
  112. }
  113. } else {
  114. if (s < 0) {
  115. html += '<FONT COLOR=\"red\">'
  116. + arr["residue_days"] + ' 天</FONT>';
  117. } else {
  118. html += '<FONT COLOR=\"GREEN\">'
  119. + arr["residue_days"] + ' 天</FONT>';
  120. }
  121. }
  122. html += "&nbsp;&nbsp;审核状态:";
  123. if (arr.au_state == "0") {
  124. html += '未审核';
  125. } else if (arr.au_state == "1") {
  126. html += "审核中";
  127. } else if (arr.au_state == "2") {
  128. html += "审核成功";
  129. } else if (arr.au_state == "3") {
  130. html += "驳回";
  131. }
  132. html += "&nbsp;&nbsp;借阅状态:";
  133. if (arr.au_state == "0") {
  134. html += '未申请';
  135. } else {
  136. if (arr.borrow_state == "1") {
  137. html += '申请中';
  138. } else if (arr.borrow_state == "2") {
  139. html += '借阅中';
  140. } else if (arr.borrow_state == "3") {
  141. html += '已归还';
  142. }
  143. }
  144. html += '&nbsp;&nbsp; </p>';
  145. html += '<p class="mar5">借阅人:' + arr.name;
  146. html += "&nbsp;&nbsp;申请时间:";
  147. html += subDate(arr.create_date);
  148. html += "&nbsp;&nbsp;借阅时间:";
  149. if (arr.start_borrow_time != null)
  150. html += subDate(arr.start_borrow_time);
  151. else
  152. html += "--";
  153. html += "&nbsp;&nbsp;实际归还时间:";
  154. if (arr.actual_return_time != null)
  155. html += subDate(arr.actual_return_time);
  156. else
  157. html += "--";
  158. html += '</p></div>';
  159. html += ' <div class="tr_rw_btn_new fr">';
  160. html += '<div class="div_btn"></div>';
  161. html += ' </div>';
  162. html += '</div>';
  163. }
  164. }
  165. $(item_name).html(html);
  166. });
  167. }
  168. function subDate(d) {
  169. var s = "";
  170. if (d != null && d.length > 10) {
  171. return s = d.substring(0, 10);
  172. } else {
  173. return s;
  174. }
  175. ;
  176. }
  177. function initList() {
  178. var s = "";
  179. var archiveName = searchBox.getValue();
  180. var archiveNum = $("#archiveNum").val();
  181. var borrowType = $("#borrowType").val();
  182. var borrowState = $("#borrowState").val();
  183. if (archiveName != "" && typeof (archiveName) != "undefined") {
  184. s += "&archiveName=" + encodeURI(encodeURI(archiveName));
  185. }
  186. if (archiveNum != "" && typeof (archiveNum) != "undefined") {
  187. s += "&archiveNum=" + encodeURI(encodeURI(archiveNum));
  188. }
  189. if (borrowType != "" && typeof (borrowType) != "undefined") {
  190. s += "&borrowType=" + borrowType;
  191. }
  192. if (borrowState != "" && typeof (borrowState) != "undefined") {
  193. s += "&borrowState=" + borrowState;
  194. }
  195. // grid.set("parms", [ {
  196. // name : "archiveNum",
  197. // value : encodeURI($("#archiveNum").val())
  198. // },{
  199. // name : "archiveName",
  200. // value : encodeURI($("#archiveName").val())
  201. // }, {
  202. // name : "borrowUser",
  203. // value : encodeURI($("#borrowUser").val())
  204. // }, {
  205. // name : "startCreateDate",
  206. // value : $("#startCreateDate").val()
  207. // }, {
  208. // name : "endCreateDate",
  209. // value : $("#endCreateDate").val()
  210. // }, {
  211. // name : "borrowType",
  212. // value : $("#borrowType").val()
  213. // }, {
  214. // name : "auState",
  215. // value : $("#auState").val()
  216. // }, {
  217. // name : "borrowState",
  218. // value : $("#borrowState").val()
  219. // }, {
  220. // name : "isOverDue",
  221. // value : $("#isOverDue").val()
  222. // }]);
  223. searchByKword(s);
  224. }
  225. </script>
  226. </head>
  227. <body>
  228. <div class="tc_b">
  229. <div id="left" style="float: left; width: 100%;">
  230. <div class="tc_r">
  231. <div class="tr_con b5 f4">
  232. <div class="fl f4">
  233. <img src="/shares/images/master1/wdrw_ico.png" width="25" height="31" />&nbsp;借阅查询
  234. </div>
  235. <div class="fl ">
  236. <div class="fl mar2">档案编号:</div>
  237. <div class="fl mar2 mar6">
  238. <input type="text" name="archiveNum" id="archiveNum" value="" />
  239. </div>
  240. <div class="fl mar2">借阅类型:</div>
  241. <div class="fl mar2 mar6">
  242. <select id="borrowType" name="borrowType" onchange="initList();">
  243. <option value="" selected="selected">-全部-</option>
  244. <c:forEach items="${borrow_types }" var="types">
  245. <option value="${types.dvalue }">${types.dname }</option>
  246. </c:forEach>
  247. </select>
  248. </div>
  249. <div class="fl mar2">借阅状态:</div>
  250. <div class="fl mar2 mar6">
  251. <!-- <select id="borrow_statue" name="borrow_type" onchange="initList()"> -->
  252. <!-- <option value="1" selected="selected">申请中</option> -->
  253. <!-- <option value="2">借阅中</option> -->
  254. <!-- <option value="3">已归还</option> -->
  255. <!-- </select> -->
  256. <select id="borrowState" name="borrowState" onchange="initList();">
  257. <option value="">-选择-</option>
  258. <c:forEach items="${borrow_borrow_state}" var="borrowStates">
  259. <option value="${borrowStates.dvalue }">${borrowStates.dname }</option>
  260. </c:forEach>
  261. </select>
  262. </div>
  263. </div>
  264. <div class="div_ck_k fr">
  265. <input class="div_cx fl" name="archiveName" id="archiveName" type="text" />
  266. <input class="btn_ck fl" type="button" onclick="initList();" id="button" />
  267. </div>
  268. </div>
  269. <div class="tr_right_bg fl">
  270. <div id="contentDiv"></div>
  271. <jsp:include page="/yw/master1/page.jsp">
  272. <jsp:param name="functionName" value="initList" />
  273. <jsp:param name="p" value="1" />
  274. <jsp:param name="pSize" value="7" />
  275. </jsp:include>
  276. </div>
  277. </div>
  278. </div><%@ include file="/yw/master1_ams/borrowMgr/leftBorrowMgr.jsp"%>
  279. </div>
  280. </body>
  281. </html>