| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724 |
- <%@ page contentType="text/html;charset=GBK"%>
- <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <HEAD>
- <TITLE>我的档案借阅</TITLE>
- <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css" />
- <script src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/core/base.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
- <link href="${pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
- <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script>
- <script type="text/javascript" src="/shares/js/constant.js"></script>
- <script type="text/javascript" src="/shares/js/common.js"></script>
- <script type="text/javascript" src="/shares/js/yw/ams/amsflow.js"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerTab.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerDrag.js" type="text/javascript"></script>
- <script type="text/javascript">
- var acrhiveRank = ${acrhiveRank};
- var archiveMedium =${archiveMedium};
- var borrowType =${borrowType};
- var grid = null;
- var curTab = 1;
- $(function (){
- $("#myBorrowTab").ligerTab({ onAfterSelectTabItem: function (tabid){
- if(tabid == "tabitem1"){
- curTab = 1;
- initList();
- }else if(tabid == "tabitem2"){
- curTab = 2;
- initList();
- }else if(tabid == "tabitem3"){
- curTab = 3;
- initList();
- }
- }});
- initList();
- });
- /* $(document).ready(function(){
- searchByKword();
- }); */
- var jsonObject;
- function loadArchiveMyApplicationList(params) {
- grid = $("#myApplicationGrid")
- .ligerGrid(
- {columns : [
- {display : '档案编号',name : 'archive_num',width : 120,
- render : function(row){
- if(null == row.archive_num){
- return "--";
- }else{
- return row.archive_num;
- }
- }},
- {display : '档案名称',name : 'archive_name',width : 650,
- render :function(item){
- var is_borrow=item.is_borrow;
- if(is_borrow=='1'){
- return "<font color=red >"+ '(纸质档案已被借出)'+item.archive_name+"</font>";
- }else{
- return item.archive_name;
- }}
-
- },
- {display : '档案类目',name : 'category_name',width : 150},
- {display : '借阅类型',name : 'borrow_type',width : 100,
- render : function(row){
- for (var i = 0; i < borrowType.length; i++){
- if (borrowType[i]['dvalue'] == row.borrow_type)
- return borrowType[i]['dname'];
- }
- return "--";
- }},
- {display : '借阅天数',name : 'borrow_days',width : 150,
- render : function(row){
- if(null !=row.borrow_hours){
- return row.borrow_days+" 天 "+row.borrow_hours+" 小时 ";
- }
- }}
- //by linww 2015.01.16 begin
- // ,{display : '借阅人',name : 'name',width : 70},
- // {display : '申请时间',name : 'create_date',width : 150},
- // {display : '审核状态',name : 'au_state',width : 100,
- // render :function(a,b){
- // var s = a["au_state"];
- // var borrow_id = a["borrow_id"];
- // var flow_bmp_id = a["flow_bmp_id"];
- // if(s=="0"){
- // return '<a href=\"#\" onclick=\"viewFlow()\"><FONT COLOR=\"blue\">未审核</FONT></a>';
- // }else if(s=="1"){
- // return '<a href=\"#\" onclick=\"openODialog(\'${pageContext.request.contextPath }/amsFlowAction.do?task=toInfo&insId='
- // + flow_bmp_id+ '&tabid='+ getCurrentTabId()+ '\', \'查看流程信息\');\"><FONT COLOR=\"blue\">审核中</FONT></a>';
- // }else if(s=="2"){
- // return '<a href=\"#\" onclick=\"openODialog(\'${pageContext.request.contextPath }/amsFlowAction.do?task=toInfo&insId='
- // + flow_bmp_id+ '&tabid='+ getCurrentTabId()+ '\', \'查看流程信息\');\"><FONT COLOR=\"blue\">审核成功</FONT></a>';
- // }else if(s=="3"){
- // return '<a href=\"#\" onclick=\"openODialog(\'${pageContext.request.contextPath }/amsFlowAction.do?task=toInfo&insId='
- // + flow_bmp_id+ '&tabid='+ getCurrentTabId()+ '\', \'查看流程信息\');\"><FONT COLOR=\"blue\">驳回</FONT></a>';
- // }
- // }},
- // {display : '操作',isAllowHide : false,width : 150,
- // render : function(row) {
- // var html = '<a href=\"#\" onclick=\"viewMyApplicationList('
- // + row.borrow_id+ ','+row.universalid+')\">查看</a> ';
- // if(row.au_state == 1){
- // html += '<a href=\"#\" onclick=\"revocationFlow('
- // + row.borrow_id
- // + ')\">撤销流程</a> ';
- // }else{
- // html += '<a href=\"#\" onclick=\"editMyApplicationList('
- // + row.borrow_id+','+row.au_state+')\">编辑</a> ';
- // }
- // if(row.au_state == 0){
- // html += '<a href=\"#\" onclick=\"delMyApplicationList('
- // + row.borrow_id
- // + ')\">删除</a> ';
- // }
- // return html;
- // }
- // }
- //by linww 2015.01.16 end
- ],
- pageSize : 20,
- url : 'amsMyBorrowAction.do?task=myApplicationList'+params+'&time='+ new Date().getTime(),
- pageParmName : 'p', //页索引参数名,(提交给服务器)
- pagesizeParmName : 'pSize', //页记录数参数名,(提交给服务器)
- parms :jsonObject,
- width : '99.9%',
- height : '99.5%',
- //by linww 2015.01.16 begin
- groupColumnName:'borrow_id',
- groupColumnDisplay:'流程编号',
- groupRender : function(val,row) {
- 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;}\">借阅目的:'
- +row[0].borrow_aim
- +'</span>';
- var html2='<span style=\"float: right;width: 30%;\" > 申请时间: '+ row[0].create_date+"</span>";
-
- //审核状态
- var html3='<span style=\"float: right;width: 15%\" >审核状态: ';
- var s = row[0]["au_state"];
- var flow_id = row[0]["flow_id"];
- if(s=="4"){
- html3+='未审核';
- }else if(s=="1"){
- html3+= '<a href=\"#\" onclick=\"viewflow('+ flow_id + ')\"><font color=blue>审核中</font></a> ';
- }else if(s=="2"){
- html3+= '<a href=\"#\" onclick=\"viewflow('+ flow_id + ')\"><font color=blue>审核通过</font></a> ';
- }else if(s=="3"){
- html3 +='<a href=\"#\" onclick=\"viewflow('+ flow_id + ')\"><font color=blue>驳回</font></a> ';
- }
- html3+='</span>';
-
- var html4 = '<span style=\"float: right;width: 20%;\" >操作:';
- html4 += '<a href=\"#\" onclick=\"viewMyApplicationList('
- + row[0].borrow_id+ ','+row[0].universalid+')\">查看</a> ';
- if(row[0].au_state == 1 || row[0].au_state == 3){
- // wzf start 2015-1-28
- html4 += '<a href=\"#\" onclick=\"cancel_payflow('+ row[0].flow_id + ')\">撤消</a> ';
-
- // html4 += '<a href=\"#\" onclick=\"revocationFlow('
- // + row[0].borrow_id
- // + ')\">撤销流程</a> ';
- // wzf end 2015-1-28
- }
- //审核通过不需编辑 linww 200122 begin
- if(row[0].au_state == 4 || row[0].au_state == 3){
- //审核通过不需编辑 linww 200122 end
- html4 += '<a href=\"#\" onclick=\"editMyApplicationList('
- + row[0].borrow_id+','+row[0].au_state+')\">编辑</a> ';
- }
- if(row[0].au_state == 4 || row[0].au_state == 3){
- html4 += '<a href=\"#\" onclick=\"delMyApplicationList('
- + row[0].borrow_id
- + ')\">删除</a> ';
- }
- html4+='</span>';
- return '<span style=\"position:absolute; float: right;width: 99%;height:10px;\">'+html1+html4+html3+html2+'</span>';
- }
- //by linww 2015.01.16 begin
- });
- $("#pageloading").hide();
- }
- /**
- * 撤销流程
- */
- function cancel_payflow(insId){
- if(!confirm("确定要撤消流程?")){
- return ;
- }
- $.ajax({
- type:"post",
- url:"workFlowAction.do?task=cancelflow&insId="+insId+"&time="+new Date().getTime(),
- dataType:"json",
- success:function(data){
- if(data.i>0){
- $.ligerDialog.success("操作成功");
- searchByKword();
- }else{
- $.ligerDialog.success("操作失败");
- }
- }
- });
- }
- function viewflow(insId){
- var url="${pageContext.request.contextPath}/workFlowAction.do?task=viewflow&insId="+insId+"&tabid="+stripscript(getCurrentTabId());
- openODialog(url,"查看流程信息");
- }
- function openODialog(owurl, name) {
- oDialog = openTopDialog({
- height : $("body", window.top.document).height() - 50,
- width : $("body", window.top.document).width() - 50,
- url : owurl,
- showMax : false,
- showToggle : false,
- showMin : false,
- isResize : false,
- modal : false,
- title : name,
- allowClose : true
- });
- }
- function closeODialog() {
- oDialog.close();
- }
-
- function viewFlow (){
- $.ligerDialog.alert('没有流程信息!', '提示', 'warn');
- return
- }
-
- function loadArchiveMyBorrowList(params) {
- /* var grid = null; */
- grid = $("#myBorrowGrid")
- .ligerGrid(
- {columns : [
- {display : '档案编号',name : 'archive_num',width : 100,
- render : function(row){
- if(null == row.archive_num){
- return "--";
- }else{
- return row.archive_num;
- }
- }},
- {display : '档案名称',name : 'archive_name',width : 250,render: function(a,b){
- var archive_name = a["archive_name"];
- var infoid = a["infoid"];
- var universalid = a["universalid"];
- var is_valid = a["is_valid"];
- var borrow_type = a["borrow_type"];
- var archive_medium = a["archive_medium"];
- if(null!=a["archive_num"]){
- if(archive_medium==1){
- return '<a href=\"#\" onclick=\"viewborrowArchive('+ infoid+ ','+ universalid+ ','+borrow_type+','+is_valid+')\">'+'<FONT COLOR=\"blue\">'+archive_name+'</FONT>'+'</a>';
- }else {
- return '<a href=\"#\" onclick=\"viewArchive('+ infoid+ ','+ universalid+ ','+borrow_type+','+is_valid+')\">'+'<FONT COLOR=\"blue\">'+archive_name+'</FONT>'+'</a>';
- }
- }
- else {
- return ''+archive_name;
- }
- }},
- {display : '档案类目',name : 'category_name',width : 100},
- {display : '借阅类型',name : 'borrow_type',width : 90,
- render : function(row){
- for (var i = 0; i < borrowType.length; i++){
- if (borrowType[i]['dvalue'] == row.borrow_type)
- return borrowType[i]['dname'];
- }
- return "--";
- }},
- {display : '借阅天数',name : 'borrow_days',width : 80,
- render : function(row){
- if(null !=row.borrow_hours){
- return row.borrow_days+" 天 "+row.borrow_hours+" 小时 ";
- }
- }},
- {display : '开始时间',name : 'start_borrow_time',width : 150},
- {display : '应归还时间',name : 'return_time',width : 150},
- {display : '剩余天数',name : 'residue_days',width : 80,
- render : function(row){
- if(null == row.residue_days){
- var residueDays = "";
- $.ajax({
- url:'amsMyBorrowAction.do?task=checkResidueDays',
- async: false,
- type: 'post',
- data: {"return_time":row.return_time},
- cache: false,
- error: function(obj){},
- success: function(obj){if(obj!=""){residueDays = obj;}}
- });
- if(residueDays < 0){
- return '<FONT COLOR=\"red\">'+residueDays+' 天</FONT>';
- }else{
- return '<FONT COLOR=\"GREEN\">'+residueDays+' 天</FONT>';
- }
- }
- }},
- {display : '操作',isAllowHide : false,width : 100,
- render : function(row) {
- var html = '';
- <%-- by linww 20140119 begin--%>
- if(row.borrow_type != 3){
- //去掉借阅在线,下载借阅类型的归还
- html += '自动归还';//<a href=\"#\" onclick=\"returnArchive('+ row.borrow_id+','+row.universalid+')\">归还</a>
- }
- // 纸质类型显示借阅中 归还只有提示 linww 200123 begin
- else {
- html += '<a href=\"#\" onclick=\"prompt()\">归还</a> ';
- }
- // 纸质类型显示借阅中 归还只有提示 linww 200123 end
- <%-- by linww 20140119 begin--%>
- return html;
- }
- } ],
- pageSize : 20,
- url : 'amsMyBorrowAction.do?task=myBorrowGrid'+params+ '&time='+ new Date().getTime(),
- pageParmName : 'p', //页索引参数名,(提交给服务器)
- pagesizeParmName : 'pSize', //页记录数参数名,(提交给服务器)
- parms :jsonObject,
- width : '99.9%',
- height : '99.5%',
- //by linww 2015.01.16 begin
- groupColumnName:'borrow_id',
- groupColumnDisplay:'流程编号',
- groupRender : function(val,row) {
- 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;}\">借阅目的:'
- +row[0].borrow_aim
- +'</span>';
- var html2='<span style=\"float: right;width: 30%;\" > 申请时间: '+ row[0].create_date+"</span>";
-
- //审核状态
- var html3='<span style=\"float: right;width: 15%\" >审核状态: ';
- var s = row[0]["au_state"];
- var flow_id = row[0]["flow_id"];
- if(s=="0"){
- html3+='<a href=\"#\" onclick=\"viewFlow()\"><FONT COLOR=\"blue\">未审核</FONT></a>';
- }else if(s=="1"){
- html3+= '<a href=\"#\" onclick=\"viewflow('+ flow_id + ')\"><font color=blue>审核中</font></a> ';
- }else if(s=="2"){
- html3+= '<a href=\"#\" onclick=\"viewflow('+ flow_id + ')\"><font color=blue>审核通过</font></a> ';
- }else if(s=="3"){
- html3 +='<a href=\"#\" onclick=\"viewflow('+ flow_id + ')\"><font color=blue>驳回</font></a> ';
- }
- html3+='</span>';
- var html4 = '<span style=\"float: right;width: 20%;\" >借阅申请:';
- html4+='<a href=\"#\" onclick=\"viewMyApplicationList('+ row[0].borrow_id+ ','+row[0].universalid+')\"><FONT COLOR=\"blue\">查看</FONT></a> '
- html4+='</span>';
- return '<span style=\"position:absolute; float: right;width: 99%;height:10px;\">'+html1+html4+html3+html2+'</span>';
- }
- //by linww 2015.01.16 begin
- });
- $("#pageloading").hide();
- }
- //纸质类型显示借阅中 归还只有提示 linww 200123 begin
- function prompt(){
- $.ligerDialog.alert(''+'您借阅的是纸质档案,需档案管理员办理归还业务!','提示', 'question');
- }
- //纸质类型显示借阅中 归还只有提示 linww 200123 end
-
- function viewArchive(infoid,universalid,borrow_type,is_valid){
- if(is_valid == 0){
- $.ligerDialog.alert('该档案已删除!', '提示', 'warn');
- return
- }
- $.ajax({
- type : "POST",
- url : "amsMyBorrowAction.do?task=checkUp",
- data : {"infoid" : infoid,"universalid":universalid},
- timeout : 10000,
- cache : false,
- dataType : "json",
- success : function(data) {
- var success = data.success;
- if (success != undefined) {
- $.ligerDialog.alert('借阅到期,不能查看!', '提示', 'warn');
- return
- }else{
- addTab(new Date().getTime(), "查看档案信息", "amsArchiveMgr.do?method=toDetailArchive&borrow_type="+borrow_type+"&archiveInfo.universalid=" + infoid, true);
- }
- },
- error : showAjaxError
- });
- }
-
- function viewborrowArchive(infoid,universalid,borrow_type,is_valid){
- if(is_valid == 0){
- $.ligerDialog.alert('该档案已删除!', '提示', 'warn');
- return
- }
- $.ajax({
- type : "POST",
- url : "amsMyBorrowAction.do?task=checkUp",
- data : {"infoid" : infoid,"universalid":universalid},
- timeout : 10000,
- cache : false,
- dataType : "json",
- success : function(data) {
- var success = data.success;
- if (success != undefined) {
- $.ligerDialog.alert('借阅到期,不能查看!', '提示', 'warn');
- return
- }else{
- addTab(new Date().getTime(), "查看档案信息", "amsArchiveMgr.do?method=viewborrowArchive&borrow_type="+borrow_type+"&archiveInfo.universalid=" + infoid, true);
- }
- },
- error : showAjaxError
- });
- }
-
- function loadArchiveMyBorrowHistoryList(params) {
- /* var grid = null; */
- grid = $("#myHistoryGrid")
- .ligerGrid(
- {columns : [
- {display : '档案编号',name : 'archive_num',width : 120,
- render : function(row){
- if(null == row.archive_num){
- return "--";
- }else{
- return row.archive_num;
- }
- }},
- {display : '档案名称',name : 'archive_name',width : 350},
- {display : '档案类目',name : 'category_name',width : 100},
- {display : '借阅类型',name : 'borrow_type',width : 100,
- render : function(row){
- for (var i = 0; i < borrowType.length; i++){
- if (borrowType[i]['dvalue'] == row.borrow_type)
- return borrowType[i]['dname'];
- }
- return "--";
- }},
- {display : '借阅天数',name : 'borrow_days',width : 100,
- render : function(row){
- if(null !=row.borrow_hours){
- return row.borrow_days+" 天 "+row.borrow_hours+" 小时 ";
- }
- }},
- {display : '开始时间',name : 'start_borrow_time',width : 160},
- {display : '归还时间',name : 'actual_return_time',width : 160}
- // ,{display : '操作',isAllowHide : false,width : 100,
- // render : function(row) {
- // var html = '<a href=\"#\" onclick=\"viewMyApplicationList('
- // + row.borrow_id
- // + ','+row.universalid+')\">查看</a> ';
- // return html;
- // }
- // }
- ],
- pageSize : 20,
- url : 'amsMyBorrowAction.do?task=myHistory'+params+ '&time='+ new Date().getTime(),
- pageParmName : 'p', //页索引参数名,(提交给服务器)
- pagesizeParmName : 'pSize', //页记录数参数名,(提交给服务器)
- parms :jsonObject,
- width : '99.9%',
- height : '99.5%',
- //by linww 2015.01.16 begin
- groupColumnName:'borrow_id',
- groupColumnDisplay:'流程编号',
- groupRender : function(val,row) {
- 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;}\">借阅目的:'
- +row[0].borrow_aim
- +'</span>';
- var html2='<span style=\"float: right;width: 30%;\" > 申请时间: '+ row[0].create_date+"</span>";
-
- //审核状态
- var html3='<span style=\"float: right;width: 15%\" >审核状态: ';
- var s = row[0]["au_state"];
- var flow_id = row[0]["flow_id"];
- if(s=="0"){
- html3+='<a href=\"#\" onclick=\"viewFlow()\"><FONT COLOR=\"blue\">未审核</FONT></a>';
- }else if(s=="1"){
- html3+='<a href=\"#\" onclick=\"viewflow('+ flow_id + ')\"><font color=blue>审核中</font></a> ';
- }else if(s=="2"){
- html3+= '<a href=\"#\" onclick=\"viewflow('+ flow_id + ')\"><font color=blue>审核成功</font></a> ';
- }else if(s=="3"){
- html3 +='<a href=\"#\" onclick=\"viewflow('+ flow_id + ')\"><font color=blue>驳回</font></a> ';
- }
- html3+='</span>';
-
- var html4 = '<span style=\"float: right;width: 20%;\" >借阅申请:';
- html4 += '<a href=\"#\" onclick=\"viewMyApplicationList('
- + row[0].borrow_id
- + ','+row[0].universalid+')\">查看</a> ';
- html4+='</span>';
- return '<span style=\"position:absolute; float: right;width: 99%;height:10px;\">'+html1+html4+html3+html2+'</span>';
- }
- //by linww 2015.01.16 begin
- });
- $("#pageloading").hide();
- }
-
- function viewMyApplicationList(id,universalid){
- window.parent.f_addTab(new Date().getTime(), '查看申请档案信息', '${pageContext.request.contextPath }/amsMyBorrowAction.do?task=viewMyApplicationList&universalid='+universalid+'&borrow_id='+id+'&tabid=' + getCurrentTabId());
- }
- function editMyApplicationList(id,au_state){
- window.parent.f_addTab(new Date().getTime(),
- '编辑申请档案信息', '${pageContext.request.contextPath }/amsMyBorrowAction.do?task=editMyApplicationList&borrow_id='+id+'&au_state='+au_state+'&tabid=' + getCurrentTabId());
- }
- //删除档案
- function delMyApplicationList(id,au_state){
- if (confirm("确定要删除吗?")) {
- $.ajax({
- type : "POST",
- url : "amsMyBorrowAction.do?task=delMyApplicationList",
- data : {"universalid" : id},
- timeout : 10000,
- cache : false,
- dataType : "json",
- success : function(data) {
- var success = data.success;
- if (success != undefined) {
- $.ligerDialog.success("删除成功");
- } else {
- showAjaxError(null, data.error);
- }
- initList();
- },
- error : showAjaxError
- });
- }
- }
- //撤销档案流程
- var initDialog;
- function revocationFlow(id){
- $(function() {
- initDialog = $.ligerDialog({content:"是否撤销该流程?", title:"系统提示",type:"question",width:300,height:70,allowClose : false,
- buttons:[ { text:"是",onclick:function(){revocation(id);} } ,
- {text:"否",onclick:function(btn){initDialog.close();} }
- ]
- });
- });
- }
- function revocation(id){
- initDialog.close();
- $.ligerDialog.waitting('正在撤销中,请稍候...');
- $.ajax({
- type : "POST",
- url : "amsMyBorrowAction.do?task=revocationFlow&time=" + new Date().getTime(),
- data : {"borrow_id" : id},
- timeout : 10000,
- cache : false,
- dataType : "json",
- success : function(data) {
- var success = data.success;
- if (success != undefined) {
- $.ligerDialog.success(success);
- $.ligerDialog.closeWaitting();
- initList();
- }else{
- $.ligerDialog.closeWaitting();
- showAjaxError(null, data.error);
- }
- },
- error : showAjaxError
- });
- }
- //归还档案
- var initDialog2;
- function returnArchive(id,universalid){
- $(function() {
- initDialog2 = $.ligerDialog({content:"是否归还档案?", title:"系统提示",type:"question",width:300,height:70,allowClose : false,
- buttons:[ { text:"是",onclick:function(){gaveBack(id,universalid);} } ,
- {text:"否",onclick:function(btn){initDialog2.close();} }
- ]
- });
- });
- }
- function gaveBack(id,universalid){
- initDialog2.close();
- $.ligerDialog.waitting('正在归还中,请稍候...');
- $.ajax({
- type : "POST",
- url : "amsMyBorrowAction.do?task=gaveBack&time=" + new Date().getTime(),
- data : {"borrow_id" : id,"universalid":universalid},
- timeout : 10000,
- cache : false,
- dataType : "json",
- success : function(data) {
- var success = data.success;
- if (success != undefined) {
- $.ligerDialog.success(success);
- $.ligerDialog.closeWaitting();
- initList();
- }else{
- $.ligerDialog.closeWaitting();
- showAjaxError(null, data.error);
- }
- },
- error : showAjaxError
- });
- }
- function initList(){
- var params="";
- var archive_name = $("#archive_name").val();
- params = params+"&archive_names="+encodeURI(encodeURI(archive_name));
- var archive_number = $("#archive_number").val();
- params = params+"&archive_numbers="+encodeURI(encodeURI(archive_number));
- var borrow_type = $("#borrow_type").val();
- params = params+"&borrow_types="+encodeURI(encodeURI(borrow_type));
- switch(curTab){
- case 1 : loadArchiveMyApplicationList(params);
- break;
- case 2 : loadArchiveMyBorrowList(params);
- break;
- case 3 : loadArchiveMyBorrowHistoryList(params);
- break;
- default : loadArchiveMyApplicationList(params);
- break;
- }
- }
- function searchByKword(){
- grid.set("newPage","1");
- var params="";
- var archive_name = $("#archive_name").val();
- params = params+"&archive_names="+encodeURI(encodeURI(archive_name));
- var archive_number = $("#archive_number").val();
- params = params+"&archive_numbers="+encodeURI(encodeURI(archive_number));
- var borrow_type = $("#borrow_type").val();
- params = params+"&borrow_types="+encodeURI(encodeURI(borrow_type));
- switch(curTab){
- case 1 : loadArchiveMyApplicationList(params);
- break;
- case 2 : loadArchiveMyBorrowList(params);
- break;
- case 3 : loadArchiveMyBorrowHistoryList(params);
- break;
- default : loadArchiveMyApplicationList(params);
- break;
- }
-
- }
- $(function() {
-
- $("#borrow_type").ligerComboBox();
- });
- </script>
- <style type="text/css">
- body {
- padding: 5px;
- margin: 0;
- }
- #layout1 {
- width: 100%;
- margin: 0;
- padding: 0;
- }
- .l-button {
- margin-left: 1px;
- width:100px;
- }
- #deptBtn {
- width: 100%;
- background: #e5ecf9;
- text-align: center;
- height: 25px;
- padding-top: 3px
- }
- .l-layout-left {
- overflow-y: auto;
- }
- </style>
- </HEAD>
- <BODY>
- <%@ include file="/include/button.jsp"%>
- <%@ include file="/include/message.jsp"%>
- <div class="container">
- <div class="default_search" style="margin: 0;">
- <ul class="list_search">
- <li class="title">档案名称:</li>
- <li class="text"><input type="text" name="archive_name"
- id="archive_name" value=""/></li>
- </ul>
- <ul class="list_search">
- <li class="title">档案编号:</li>
- <li class="text"><input type="text" name="archive_number"
- id="archive_number" value=""/></li>
- </ul>
- <ul class="list_search">
- <li class="title">借阅类型:</li>
- <li class="text">
- <select id="borrow_type" name="borrow_type" style="width:130px;">
- <option value="" selected="selected">-全部-</option>
- <c:forEach items="${borrow_types }" var="types">
- <option value="${types.dvalue }" >${types.dname }</option>
- </c:forEach>
- </select>
- </li>
- </ul>
- <ul>
- <li class="search-button"><input type="button" class='l-button'
- name="search" onclick="searchByKword()" value="查询" /></li>
- </ul>
- </div>
- <div id="myBorrowTab" class="tab2 l-tab">
- <div title="申请中" id="myDTakingStockTab" style="overflow: hidden;">
- <div id="myApplicationGrid" style="margin: 0; padding: 0"></div>
- </div>
-
- <div title="借阅中" id="myPTakingStockTab" style="overflow: hidden;">
- <div id="myBorrowGrid" style="margin: 0; padding: 0"></div>
- </div>
- <div title="借阅历史" id="myPTakingStockTab" style="overflow: hidden;">
- <div id="myHistoryGrid" style="margin: 0; padding: 0"></div>
- </div>
- </div>
- </div>
- </BODY>
- </HTML>
|