$(function(){vType=parseInt(vType);setCurPageGirdList();commonSetParaInit(null,"record");enterEvent("keyword",searchRdrRecord);$("#rdrDataGridList").datagrid({onSelect:onSelectRdrDataGridList});$("#cirDataGridList").datagrid({fitColumns:true});$("#historyBorrowDataGridList").datagrid({fitColumns:true});$("#keyword").textbox("textbox").focus();$("#cirDataGridList").datagrid("hideColumn","name");$("#cirDataGridList").datagrid("hideColumn","rdrno")});function setCurPageGirdList(){if(vType=="0"){setCurLoanGridHeight()}else{if(vType=="1"){setHistoryLoanGridHeight()}}}function onSelectRdrDataGridList(a,b){if(vType=="0"){bindCurLoanDataGridList(b.id)}else{if(vType=="1"){bindHistoryLoanDataGridList(b.id)}}}function bindHistoryLoanDataGridList(b){var b=b;var a=base_path+"cir/cirlog/pageUnion.do";var c={};clearGridData("historyBorrowDataGridList");c.rows=10;c.page=1;c.rdrid=b;if(getValue("cirlogtype").length>0){c.logtype=getValue("cirlogtype")}if(getValue("cirlogbegdate").length>0&&getValue("cirlogenddate").length>0){c["limit[0].condition"]="logdate";c["limit[0].typeHandler"]="2";c["limit[0].value"]=getValue("cirlogbegdate").replace(new RegExp("-","g"),"");c["limit[0].secondValue"]=getValue("cirlogenddate").replace(new RegExp("-","g"),"")}$("#historyBorrowDataGridList").datagrid({url:a,queryParams:c,onLoadSuccess:function(d){},method:"post"})}function bindCurLoanDataGridList(b){var a=base_path+"hld/holding/listHoldingWithBib.do";var c={};clearGridData("cirDataGridList");c.rows=10;c.page=1;c.rdrid=b;$("#cirDataGridList").datagrid({url:a,queryParams:c,onLoadSuccess:function(d){},method:"post"})}function setHistoryLoanGridHeight(){var a=$(window).height();var b=a-306;$(".curhistory-grid-div").css("height",b+"px");$("#historyBorrowDataGridList").datagrid("resize")}function setCurLoanGridHeight(){var a=$(window).height();var b=a-260;$(".curloan-grid-div").css("height",b+"px");$("#cirDataGridList").datagrid("resize")}function searchRdrRecord(){var a=base_path+"cir/reader/page.do";var b={};if(getValue("keyword").length==0){return openMessageDlg("检索值不能为空")}clearGridData("rdrDataGridList,cirDataGridList,historyBorrowDataGridList");b.rows=10;b.page=1;b[""+getValue("index")+""]=getValue("keyword");$("#rdrDataGridList").datagrid({url:a,queryParams:b,onLoadSuccess:function(c){if(c.total>0){$("#rdrDataGridList").datagrid("selectRow",0)}else{return openMessageDlg("未找到合适的记录")}},method:"post"})};