myArchiveBorrowList.jsp 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724
  1. <%@ page contentType="text/html;charset=GBK"%>
  2. <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <HEAD>
  5. <TITLE>我的档案借阅</TITLE>
  6. <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  7. <script src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  8. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/core/base.js" type="text/javascript"></script>
  9. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
  10. <link href="${pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
  11. <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script>
  12. <script type="text/javascript" src="/shares/js/constant.js"></script>
  13. <script type="text/javascript" src="/shares/js/common.js"></script>
  14. <script type="text/javascript" src="/shares/js/yw/ams/amsflow.js"></script>
  15. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerTab.js" type="text/javascript"></script>
  16. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerDrag.js" type="text/javascript"></script>
  17. <script type="text/javascript">
  18. var acrhiveRank = ${acrhiveRank};
  19. var archiveMedium =${archiveMedium};
  20. var borrowType =${borrowType};
  21. var grid = null;
  22. var curTab = 1;
  23. $(function (){
  24. $("#myBorrowTab").ligerTab({ onAfterSelectTabItem: function (tabid){
  25. if(tabid == "tabitem1"){
  26. curTab = 1;
  27. initList();
  28. }else if(tabid == "tabitem2"){
  29. curTab = 2;
  30. initList();
  31. }else if(tabid == "tabitem3"){
  32. curTab = 3;
  33. initList();
  34. }
  35. }});
  36. initList();
  37. });
  38. /* $(document).ready(function(){
  39. searchByKword();
  40. }); */
  41. var jsonObject;
  42. function loadArchiveMyApplicationList(params) {
  43. grid = $("#myApplicationGrid")
  44. .ligerGrid(
  45. {columns : [
  46. {display : '档案编号',name : 'archive_num',width : 120,
  47. render : function(row){
  48. if(null == row.archive_num){
  49. return "--";
  50. }else{
  51. return row.archive_num;
  52. }
  53. }},
  54. {display : '档案名称',name : 'archive_name',width : 650,
  55. render :function(item){
  56. var is_borrow=item.is_borrow;
  57. if(is_borrow=='1'){
  58. return "<font color=red >"+ '(纸质档案已被借出)'+item.archive_name+"</font>";
  59. }else{
  60. return item.archive_name;
  61. }}
  62. },
  63. {display : '档案类目',name : 'category_name',width : 150},
  64. {display : '借阅类型',name : 'borrow_type',width : 100,
  65. render : function(row){
  66. for (var i = 0; i < borrowType.length; i++){
  67. if (borrowType[i]['dvalue'] == row.borrow_type)
  68. return borrowType[i]['dname'];
  69. }
  70. return "--";
  71. }},
  72. {display : '借阅天数',name : 'borrow_days',width : 150,
  73. render : function(row){
  74. if(null !=row.borrow_hours){
  75. return row.borrow_days+" 天 "+row.borrow_hours+" 小时 ";
  76. }
  77. }}
  78. //by linww 2015.01.16 begin
  79. // ,{display : '借阅人',name : 'name',width : 70},
  80. // {display : '申请时间',name : 'create_date',width : 150},
  81. // {display : '审核状态',name : 'au_state',width : 100,
  82. // render :function(a,b){
  83. // var s = a["au_state"];
  84. // var borrow_id = a["borrow_id"];
  85. // var flow_bmp_id = a["flow_bmp_id"];
  86. // if(s=="0"){
  87. // return '<a href=\"#\" onclick=\"viewFlow()\"><FONT COLOR=\"blue\">未审核</FONT></a>';
  88. // }else if(s=="1"){
  89. // return '<a href=\"#\" onclick=\"openODialog(\'${pageContext.request.contextPath }/amsFlowAction.do?task=toInfo&insId='
  90. // + flow_bmp_id+ '&tabid='+ getCurrentTabId()+ '\', \'查看流程信息\');\"><FONT COLOR=\"blue\">审核中</FONT></a>';
  91. // }else if(s=="2"){
  92. // return '<a href=\"#\" onclick=\"openODialog(\'${pageContext.request.contextPath }/amsFlowAction.do?task=toInfo&insId='
  93. // + flow_bmp_id+ '&tabid='+ getCurrentTabId()+ '\', \'查看流程信息\');\"><FONT COLOR=\"blue\">审核成功</FONT></a>';
  94. // }else if(s=="3"){
  95. // return '<a href=\"#\" onclick=\"openODialog(\'${pageContext.request.contextPath }/amsFlowAction.do?task=toInfo&insId='
  96. // + flow_bmp_id+ '&tabid='+ getCurrentTabId()+ '\', \'查看流程信息\');\"><FONT COLOR=\"blue\">驳回</FONT></a>';
  97. // }
  98. // }},
  99. // {display : '操作',isAllowHide : false,width : 150,
  100. // render : function(row) {
  101. // var html = '<a href=\"#\" onclick=\"viewMyApplicationList('
  102. // + row.borrow_id+ ','+row.universalid+')\">查看</a>&nbsp;';
  103. // if(row.au_state == 1){
  104. // html += '<a href=\"#\" onclick=\"revocationFlow('
  105. // + row.borrow_id
  106. // + ')\">撤销流程</a>&nbsp;';
  107. // }else{
  108. // html += '<a href=\"#\" onclick=\"editMyApplicationList('
  109. // + row.borrow_id+','+row.au_state+')\">编辑</a>&nbsp;';
  110. // }
  111. // if(row.au_state == 0){
  112. // html += '<a href=\"#\" onclick=\"delMyApplicationList('
  113. // + row.borrow_id
  114. // + ')\">删除</a>&nbsp;';
  115. // }
  116. // return html;
  117. // }
  118. // }
  119. //by linww 2015.01.16 end
  120. ],
  121. pageSize : 20,
  122. url : 'amsMyBorrowAction.do?task=myApplicationList'+params+'&time='+ new Date().getTime(),
  123. pageParmName : 'p', //页索引参数名,(提交给服务器)
  124. pagesizeParmName : 'pSize', //页记录数参数名,(提交给服务器)
  125. parms :jsonObject,
  126. width : '99.9%',
  127. height : '99.5%',
  128. //by linww 2015.01.16 begin
  129. groupColumnName:'borrow_id',
  130. groupColumnDisplay:'流程编号',
  131. groupRender : function(val,row) {
  132. var html1='<span title='+row[0].borrow_aim+' style=\"float: left;margin: 0; padding-left: 20px;;width: 30%;max-width:40%;height:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}\">借阅目的:'
  133. +row[0].borrow_aim
  134. +'</span>';
  135. var html2='<span style=\"float: right;width: 30%;\" >&nbsp;&nbsp;申请时间: '+ row[0].create_date+"</span>";
  136. //审核状态
  137. var html3='<span style=\"float: right;width: 15%\" >审核状态: ';
  138. var s = row[0]["au_state"];
  139. var flow_id = row[0]["flow_id"];
  140. if(s=="4"){
  141. html3+='未审核';
  142. }else if(s=="1"){
  143. html3+= '<a href=\"#\" onclick=\"viewflow('+ flow_id + ')\"><font color=blue>审核中</font></a>&nbsp;';
  144. }else if(s=="2"){
  145. html3+= '<a href=\"#\" onclick=\"viewflow('+ flow_id + ')\"><font color=blue>审核通过</font></a>&nbsp;';
  146. }else if(s=="3"){
  147. html3 +='<a href=\"#\" onclick=\"viewflow('+ flow_id + ')\"><font color=blue>驳回</font></a>&nbsp;';
  148. }
  149. html3+='</span>';
  150. var html4 = '<span style=\"float: right;width: 20%;\" >操作:';
  151. html4 += '<a href=\"#\" onclick=\"viewMyApplicationList('
  152. + row[0].borrow_id+ ','+row[0].universalid+')\">查看</a>&nbsp;';
  153. if(row[0].au_state == 1 || row[0].au_state == 3){
  154. // wzf start 2015-1-28
  155. html4 += '<a href=\"#\" onclick=\"cancel_payflow('+ row[0].flow_id + ')\">撤消</a>&nbsp;';
  156. // html4 += '<a href=\"#\" onclick=\"revocationFlow('
  157. // + row[0].borrow_id
  158. // + ')\">撤销流程</a>&nbsp;';
  159. // wzf end 2015-1-28
  160. }
  161. //审核通过不需编辑 linww 200122 begin
  162. if(row[0].au_state == 4 || row[0].au_state == 3){
  163. //审核通过不需编辑 linww 200122 end
  164. html4 += '<a href=\"#\" onclick=\"editMyApplicationList('
  165. + row[0].borrow_id+','+row[0].au_state+')\">编辑</a>&nbsp;';
  166. }
  167. if(row[0].au_state == 4 || row[0].au_state == 3){
  168. html4 += '<a href=\"#\" onclick=\"delMyApplicationList('
  169. + row[0].borrow_id
  170. + ')\">删除</a>&nbsp;';
  171. }
  172. html4+='</span>';
  173. return '<span style=\"position:absolute; float: right;width: 99%;height:10px;\">'+html1+html4+html3+html2+'</span>';
  174. }
  175. //by linww 2015.01.16 begin
  176. });
  177. $("#pageloading").hide();
  178. }
  179. /**
  180. * 撤销流程
  181. */
  182. function cancel_payflow(insId){
  183. if(!confirm("确定要撤消流程?")){
  184. return ;
  185. }
  186. $.ajax({
  187. type:"post",
  188. url:"workFlowAction.do?task=cancelflow&insId="+insId+"&time="+new Date().getTime(),
  189. dataType:"json",
  190. success:function(data){
  191. if(data.i>0){
  192. $.ligerDialog.success("操作成功");
  193. searchByKword();
  194. }else{
  195. $.ligerDialog.success("操作失败");
  196. }
  197. }
  198. });
  199. }
  200. function viewflow(insId){
  201. var url="${pageContext.request.contextPath}/workFlowAction.do?task=viewflow&insId="+insId+"&tabid="+stripscript(getCurrentTabId());
  202. openODialog(url,"查看流程信息");
  203. }
  204. function openODialog(owurl, name) {
  205. oDialog = openTopDialog({
  206. height : $("body", window.top.document).height() - 50,
  207. width : $("body", window.top.document).width() - 50,
  208. url : owurl,
  209. showMax : false,
  210. showToggle : false,
  211. showMin : false,
  212. isResize : false,
  213. modal : false,
  214. title : name,
  215. allowClose : true
  216. });
  217. }
  218. function closeODialog() {
  219. oDialog.close();
  220. }
  221. function viewFlow (){
  222. $.ligerDialog.alert('没有流程信息!', '提示', 'warn');
  223. return
  224. }
  225. function loadArchiveMyBorrowList(params) {
  226. /* var grid = null; */
  227. grid = $("#myBorrowGrid")
  228. .ligerGrid(
  229. {columns : [
  230. {display : '档案编号',name : 'archive_num',width : 100,
  231. render : function(row){
  232. if(null == row.archive_num){
  233. return "--";
  234. }else{
  235. return row.archive_num;
  236. }
  237. }},
  238. {display : '档案名称',name : 'archive_name',width : 250,render: function(a,b){
  239. var archive_name = a["archive_name"];
  240. var infoid = a["infoid"];
  241. var universalid = a["universalid"];
  242. var is_valid = a["is_valid"];
  243. var borrow_type = a["borrow_type"];
  244. var archive_medium = a["archive_medium"];
  245. if(null!=a["archive_num"]){
  246. if(archive_medium==1){
  247. return '<a href=\"#\" onclick=\"viewborrowArchive('+ infoid+ ','+ universalid+ ','+borrow_type+','+is_valid+')\">'+'<FONT COLOR=\"blue\">'+archive_name+'</FONT>'+'</a>';
  248. }else {
  249. return '<a href=\"#\" onclick=\"viewArchive('+ infoid+ ','+ universalid+ ','+borrow_type+','+is_valid+')\">'+'<FONT COLOR=\"blue\">'+archive_name+'</FONT>'+'</a>';
  250. }
  251. }
  252. else {
  253. return ''+archive_name;
  254. }
  255. }},
  256. {display : '档案类目',name : 'category_name',width : 100},
  257. {display : '借阅类型',name : 'borrow_type',width : 90,
  258. render : function(row){
  259. for (var i = 0; i < borrowType.length; i++){
  260. if (borrowType[i]['dvalue'] == row.borrow_type)
  261. return borrowType[i]['dname'];
  262. }
  263. return "--";
  264. }},
  265. {display : '借阅天数',name : 'borrow_days',width : 80,
  266. render : function(row){
  267. if(null !=row.borrow_hours){
  268. return row.borrow_days+" 天 "+row.borrow_hours+" 小时 ";
  269. }
  270. }},
  271. {display : '开始时间',name : 'start_borrow_time',width : 150},
  272. {display : '应归还时间',name : 'return_time',width : 150},
  273. {display : '剩余天数',name : 'residue_days',width : 80,
  274. render : function(row){
  275. if(null == row.residue_days){
  276. var residueDays = "";
  277. $.ajax({
  278. url:'amsMyBorrowAction.do?task=checkResidueDays',
  279. async: false,
  280. type: 'post',
  281. data: {"return_time":row.return_time},
  282. cache: false,
  283. error: function(obj){},
  284. success: function(obj){if(obj!=""){residueDays = obj;}}
  285. });
  286. if(residueDays < 0){
  287. return '<FONT COLOR=\"red\">'+residueDays+' 天</FONT>';
  288. }else{
  289. return '<FONT COLOR=\"GREEN\">'+residueDays+' 天</FONT>';
  290. }
  291. }
  292. }},
  293. {display : '操作',isAllowHide : false,width : 100,
  294. render : function(row) {
  295. var html = '';
  296. <%-- by linww 20140119 begin--%>
  297. if(row.borrow_type != 3){
  298. //去掉借阅在线,下载借阅类型的归还
  299. html += '自动归还';//<a href=\"#\" onclick=\"returnArchive('+ row.borrow_id+','+row.universalid+')\">归还</a>&nbsp;
  300. }
  301. // 纸质类型显示借阅中 归还只有提示 linww 200123 begin
  302. else {
  303. html += '<a href=\"#\" onclick=\"prompt()\">归还</a>&nbsp;';
  304. }
  305. // 纸质类型显示借阅中 归还只有提示 linww 200123 end
  306. <%-- by linww 20140119 begin--%>
  307. return html;
  308. }
  309. } ],
  310. pageSize : 20,
  311. url : 'amsMyBorrowAction.do?task=myBorrowGrid'+params+ '&time='+ new Date().getTime(),
  312. pageParmName : 'p', //页索引参数名,(提交给服务器)
  313. pagesizeParmName : 'pSize', //页记录数参数名,(提交给服务器)
  314. parms :jsonObject,
  315. width : '99.9%',
  316. height : '99.5%',
  317. //by linww 2015.01.16 begin
  318. groupColumnName:'borrow_id',
  319. groupColumnDisplay:'流程编号',
  320. groupRender : function(val,row) {
  321. var html1='<span title='+row[0].borrow_aim+' style=\"float: left;margin: 0; padding-left: 20px;;width: 30%;max-width:40%;height:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}\">借阅目的:'
  322. +row[0].borrow_aim
  323. +'</span>';
  324. var html2='<span style=\"float: right;width: 30%;\" >&nbsp;&nbsp;申请时间: '+ row[0].create_date+"</span>";
  325. //审核状态
  326. var html3='<span style=\"float: right;width: 15%\" >审核状态: ';
  327. var s = row[0]["au_state"];
  328. var flow_id = row[0]["flow_id"];
  329. if(s=="0"){
  330. html3+='<a href=\"#\" onclick=\"viewFlow()\"><FONT COLOR=\"blue\">未审核</FONT></a>';
  331. }else if(s=="1"){
  332. html3+= '<a href=\"#\" onclick=\"viewflow('+ flow_id + ')\"><font color=blue>审核中</font></a>&nbsp;';
  333. }else if(s=="2"){
  334. html3+= '<a href=\"#\" onclick=\"viewflow('+ flow_id + ')\"><font color=blue>审核通过</font></a>&nbsp;';
  335. }else if(s=="3"){
  336. html3 +='<a href=\"#\" onclick=\"viewflow('+ flow_id + ')\"><font color=blue>驳回</font></a>&nbsp;';
  337. }
  338. html3+='</span>';
  339. var html4 = '<span style=\"float: right;width: 20%;\" >借阅申请:';
  340. html4+='<a href=\"#\" onclick=\"viewMyApplicationList('+ row[0].borrow_id+ ','+row[0].universalid+')\"><FONT COLOR=\"blue\">查看</FONT></a>&nbsp'
  341. html4+='</span>';
  342. return '<span style=\"position:absolute; float: right;width: 99%;height:10px;\">'+html1+html4+html3+html2+'</span>';
  343. }
  344. //by linww 2015.01.16 begin
  345. });
  346. $("#pageloading").hide();
  347. }
  348. //纸质类型显示借阅中 归还只有提示 linww 200123 begin
  349. function prompt(){
  350. $.ligerDialog.alert(''+'您借阅的是纸质档案,需档案管理员办理归还业务!','提示', 'question');
  351. }
  352. //纸质类型显示借阅中 归还只有提示 linww 200123 end
  353. function viewArchive(infoid,universalid,borrow_type,is_valid){
  354. if(is_valid == 0){
  355. $.ligerDialog.alert('该档案已删除!', '提示', 'warn');
  356. return
  357. }
  358. $.ajax({
  359. type : "POST",
  360. url : "amsMyBorrowAction.do?task=checkUp",
  361. data : {"infoid" : infoid,"universalid":universalid},
  362. timeout : 10000,
  363. cache : false,
  364. dataType : "json",
  365. success : function(data) {
  366. var success = data.success;
  367. if (success != undefined) {
  368. $.ligerDialog.alert('借阅到期,不能查看!', '提示', 'warn');
  369. return
  370. }else{
  371. addTab(new Date().getTime(), "查看档案信息", "amsArchiveMgr.do?method=toDetailArchive&borrow_type="+borrow_type+"&archiveInfo.universalid=" + infoid, true);
  372. }
  373. },
  374. error : showAjaxError
  375. });
  376. }
  377. function viewborrowArchive(infoid,universalid,borrow_type,is_valid){
  378. if(is_valid == 0){
  379. $.ligerDialog.alert('该档案已删除!', '提示', 'warn');
  380. return
  381. }
  382. $.ajax({
  383. type : "POST",
  384. url : "amsMyBorrowAction.do?task=checkUp",
  385. data : {"infoid" : infoid,"universalid":universalid},
  386. timeout : 10000,
  387. cache : false,
  388. dataType : "json",
  389. success : function(data) {
  390. var success = data.success;
  391. if (success != undefined) {
  392. $.ligerDialog.alert('借阅到期,不能查看!', '提示', 'warn');
  393. return
  394. }else{
  395. addTab(new Date().getTime(), "查看档案信息", "amsArchiveMgr.do?method=viewborrowArchive&borrow_type="+borrow_type+"&archiveInfo.universalid=" + infoid, true);
  396. }
  397. },
  398. error : showAjaxError
  399. });
  400. }
  401. function loadArchiveMyBorrowHistoryList(params) {
  402. /* var grid = null; */
  403. grid = $("#myHistoryGrid")
  404. .ligerGrid(
  405. {columns : [
  406. {display : '档案编号',name : 'archive_num',width : 120,
  407. render : function(row){
  408. if(null == row.archive_num){
  409. return "--";
  410. }else{
  411. return row.archive_num;
  412. }
  413. }},
  414. {display : '档案名称',name : 'archive_name',width : 350},
  415. {display : '档案类目',name : 'category_name',width : 100},
  416. {display : '借阅类型',name : 'borrow_type',width : 100,
  417. render : function(row){
  418. for (var i = 0; i < borrowType.length; i++){
  419. if (borrowType[i]['dvalue'] == row.borrow_type)
  420. return borrowType[i]['dname'];
  421. }
  422. return "--";
  423. }},
  424. {display : '借阅天数',name : 'borrow_days',width : 100,
  425. render : function(row){
  426. if(null !=row.borrow_hours){
  427. return row.borrow_days+" 天 "+row.borrow_hours+" 小时 ";
  428. }
  429. }},
  430. {display : '开始时间',name : 'start_borrow_time',width : 160},
  431. {display : '归还时间',name : 'actual_return_time',width : 160}
  432. // ,{display : '操作',isAllowHide : false,width : 100,
  433. // render : function(row) {
  434. // var html = '<a href=\"#\" onclick=\"viewMyApplicationList('
  435. // + row.borrow_id
  436. // + ','+row.universalid+')\">查看</a>&nbsp;';
  437. // return html;
  438. // }
  439. // }
  440. ],
  441. pageSize : 20,
  442. url : 'amsMyBorrowAction.do?task=myHistory'+params+ '&time='+ new Date().getTime(),
  443. pageParmName : 'p', //页索引参数名,(提交给服务器)
  444. pagesizeParmName : 'pSize', //页记录数参数名,(提交给服务器)
  445. parms :jsonObject,
  446. width : '99.9%',
  447. height : '99.5%',
  448. //by linww 2015.01.16 begin
  449. groupColumnName:'borrow_id',
  450. groupColumnDisplay:'流程编号',
  451. groupRender : function(val,row) {
  452. var html1='<span title='+row[0].borrow_aim+' style=\"float: left;margin: 0; padding-left: 20px;;width: 30%;max-width:40%;height:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}\">借阅目的:'
  453. +row[0].borrow_aim
  454. +'</span>';
  455. var html2='<span style=\"float: right;width: 30%;\" >&nbsp;&nbsp;申请时间: '+ row[0].create_date+"</span>";
  456. //审核状态
  457. var html3='<span style=\"float: right;width: 15%\" >审核状态: ';
  458. var s = row[0]["au_state"];
  459. var flow_id = row[0]["flow_id"];
  460. if(s=="0"){
  461. html3+='<a href=\"#\" onclick=\"viewFlow()\"><FONT COLOR=\"blue\">未审核</FONT></a>';
  462. }else if(s=="1"){
  463. html3+='<a href=\"#\" onclick=\"viewflow('+ flow_id + ')\"><font color=blue>审核中</font></a>&nbsp;';
  464. }else if(s=="2"){
  465. html3+= '<a href=\"#\" onclick=\"viewflow('+ flow_id + ')\"><font color=blue>审核成功</font></a>&nbsp;';
  466. }else if(s=="3"){
  467. html3 +='<a href=\"#\" onclick=\"viewflow('+ flow_id + ')\"><font color=blue>驳回</font></a>&nbsp;';
  468. }
  469. html3+='</span>';
  470. var html4 = '<span style=\"float: right;width: 20%;\" >借阅申请:';
  471. html4 += '<a href=\"#\" onclick=\"viewMyApplicationList('
  472. + row[0].borrow_id
  473. + ','+row[0].universalid+')\">查看</a>&nbsp;';
  474. html4+='</span>';
  475. return '<span style=\"position:absolute; float: right;width: 99%;height:10px;\">'+html1+html4+html3+html2+'</span>';
  476. }
  477. //by linww 2015.01.16 begin
  478. });
  479. $("#pageloading").hide();
  480. }
  481. function viewMyApplicationList(id,universalid){
  482. window.parent.f_addTab(new Date().getTime(), '查看申请档案信息', '${pageContext.request.contextPath }/amsMyBorrowAction.do?task=viewMyApplicationList&universalid='+universalid+'&borrow_id='+id+'&tabid=' + getCurrentTabId());
  483. }
  484. function editMyApplicationList(id,au_state){
  485. window.parent.f_addTab(new Date().getTime(),
  486. '编辑申请档案信息', '${pageContext.request.contextPath }/amsMyBorrowAction.do?task=editMyApplicationList&borrow_id='+id+'&au_state='+au_state+'&tabid=' + getCurrentTabId());
  487. }
  488. //删除档案
  489. function delMyApplicationList(id,au_state){
  490. if (confirm("确定要删除吗?")) {
  491. $.ajax({
  492. type : "POST",
  493. url : "amsMyBorrowAction.do?task=delMyApplicationList",
  494. data : {"universalid" : id},
  495. timeout : 10000,
  496. cache : false,
  497. dataType : "json",
  498. success : function(data) {
  499. var success = data.success;
  500. if (success != undefined) {
  501. $.ligerDialog.success("删除成功");
  502. } else {
  503. showAjaxError(null, data.error);
  504. }
  505. initList();
  506. },
  507. error : showAjaxError
  508. });
  509. }
  510. }
  511. //撤销档案流程
  512. var initDialog;
  513. function revocationFlow(id){
  514. $(function() {
  515. initDialog = $.ligerDialog({content:"是否撤销该流程?", title:"系统提示",type:"question",width:300,height:70,allowClose : false,
  516. buttons:[ { text:"是",onclick:function(){revocation(id);} } ,
  517. {text:"否",onclick:function(btn){initDialog.close();} }
  518. ]
  519. });
  520. });
  521. }
  522. function revocation(id){
  523. initDialog.close();
  524. $.ligerDialog.waitting('正在撤销中,请稍候...');
  525. $.ajax({
  526. type : "POST",
  527. url : "amsMyBorrowAction.do?task=revocationFlow&time=" + new Date().getTime(),
  528. data : {"borrow_id" : id},
  529. timeout : 10000,
  530. cache : false,
  531. dataType : "json",
  532. success : function(data) {
  533. var success = data.success;
  534. if (success != undefined) {
  535. $.ligerDialog.success(success);
  536. $.ligerDialog.closeWaitting();
  537. initList();
  538. }else{
  539. $.ligerDialog.closeWaitting();
  540. showAjaxError(null, data.error);
  541. }
  542. },
  543. error : showAjaxError
  544. });
  545. }
  546. //归还档案
  547. var initDialog2;
  548. function returnArchive(id,universalid){
  549. $(function() {
  550. initDialog2 = $.ligerDialog({content:"是否归还档案?", title:"系统提示",type:"question",width:300,height:70,allowClose : false,
  551. buttons:[ { text:"是",onclick:function(){gaveBack(id,universalid);} } ,
  552. {text:"否",onclick:function(btn){initDialog2.close();} }
  553. ]
  554. });
  555. });
  556. }
  557. function gaveBack(id,universalid){
  558. initDialog2.close();
  559. $.ligerDialog.waitting('正在归还中,请稍候...');
  560. $.ajax({
  561. type : "POST",
  562. url : "amsMyBorrowAction.do?task=gaveBack&time=" + new Date().getTime(),
  563. data : {"borrow_id" : id,"universalid":universalid},
  564. timeout : 10000,
  565. cache : false,
  566. dataType : "json",
  567. success : function(data) {
  568. var success = data.success;
  569. if (success != undefined) {
  570. $.ligerDialog.success(success);
  571. $.ligerDialog.closeWaitting();
  572. initList();
  573. }else{
  574. $.ligerDialog.closeWaitting();
  575. showAjaxError(null, data.error);
  576. }
  577. },
  578. error : showAjaxError
  579. });
  580. }
  581. function initList(){
  582. var params="";
  583. var archive_name = $("#archive_name").val();
  584. params = params+"&archive_names="+encodeURI(encodeURI(archive_name));
  585. var archive_number = $("#archive_number").val();
  586. params = params+"&archive_numbers="+encodeURI(encodeURI(archive_number));
  587. var borrow_type = $("#borrow_type").val();
  588. params = params+"&borrow_types="+encodeURI(encodeURI(borrow_type));
  589. switch(curTab){
  590. case 1 : loadArchiveMyApplicationList(params);
  591. break;
  592. case 2 : loadArchiveMyBorrowList(params);
  593. break;
  594. case 3 : loadArchiveMyBorrowHistoryList(params);
  595. break;
  596. default : loadArchiveMyApplicationList(params);
  597. break;
  598. }
  599. }
  600. function searchByKword(){
  601. grid.set("newPage","1");
  602. var params="";
  603. var archive_name = $("#archive_name").val();
  604. params = params+"&archive_names="+encodeURI(encodeURI(archive_name));
  605. var archive_number = $("#archive_number").val();
  606. params = params+"&archive_numbers="+encodeURI(encodeURI(archive_number));
  607. var borrow_type = $("#borrow_type").val();
  608. params = params+"&borrow_types="+encodeURI(encodeURI(borrow_type));
  609. switch(curTab){
  610. case 1 : loadArchiveMyApplicationList(params);
  611. break;
  612. case 2 : loadArchiveMyBorrowList(params);
  613. break;
  614. case 3 : loadArchiveMyBorrowHistoryList(params);
  615. break;
  616. default : loadArchiveMyApplicationList(params);
  617. break;
  618. }
  619. }
  620. $(function() {
  621. $("#borrow_type").ligerComboBox();
  622. });
  623. </script>
  624. <style type="text/css">
  625. body {
  626. padding: 5px;
  627. margin: 0;
  628. }
  629. #layout1 {
  630. width: 100%;
  631. margin: 0;
  632. padding: 0;
  633. }
  634. .l-button {
  635. margin-left: 1px;
  636. width:100px;
  637. }
  638. #deptBtn {
  639. width: 100%;
  640. background: #e5ecf9;
  641. text-align: center;
  642. height: 25px;
  643. padding-top: 3px
  644. }
  645. .l-layout-left {
  646. overflow-y: auto;
  647. }
  648. </style>
  649. </HEAD>
  650. <BODY>
  651. <%@ include file="/include/button.jsp"%>
  652. <%@ include file="/include/message.jsp"%>
  653. <div class="container">
  654. <div class="default_search" style="margin: 0;">
  655. <ul class="list_search">
  656. <li class="title">档案名称:</li>
  657. <li class="text"><input type="text" name="archive_name"
  658. id="archive_name" value=""/></li>
  659. </ul>
  660. <ul class="list_search">
  661. <li class="title">档案编号:</li>
  662. <li class="text"><input type="text" name="archive_number"
  663. id="archive_number" value=""/></li>
  664. </ul>
  665. <ul class="list_search">
  666. <li class="title">借阅类型:</li>
  667. <li class="text">
  668. <select id="borrow_type" name="borrow_type" style="width:130px;">
  669. <option value="" selected="selected">-全部-</option>
  670. <c:forEach items="${borrow_types }" var="types">
  671. <option value="${types.dvalue }" >${types.dname }</option>
  672. </c:forEach>
  673. </select>
  674. </li>
  675. </ul>
  676. <ul>
  677. <li class="search-button"><input type="button" class='l-button'
  678. name="search" onclick="searchByKword()" value="查询" /></li>
  679. </ul>
  680. </div>
  681. <div id="myBorrowTab" class="tab2 l-tab">
  682. <div title="申请中" id="myDTakingStockTab" style="overflow: hidden;">
  683. <div id="myApplicationGrid" style="margin: 0; padding: 0"></div>
  684. </div>
  685. <div title="借阅中" id="myPTakingStockTab" style="overflow: hidden;">
  686. <div id="myBorrowGrid" style="margin: 0; padding: 0"></div>
  687. </div>
  688. <div title="借阅历史" id="myPTakingStockTab" style="overflow: hidden;">
  689. <div id="myHistoryGrid" style="margin: 0; padding: 0"></div>
  690. </div>
  691. </div>
  692. </div>
  693. </BODY>
  694. </HTML>