var payMoney;var rdrRecord;var VPAGEFIN="reader";var uploader;var uploaderFile;var vServiceStatus=0;var vPrintTicketStatus=0;var vBase64Image=0;var initJson;var rdrController=function(){};$(function(){rdrController.prototype.init();rdrController.prototype.bind()});rdrController.prototype.bind=function(){showRdrFldName();_myPage.prototype.onLoadAllLibDataNoLimit({code:"showlibcode",key:"libcode"});enterEvent("keyword",searchRdrRecord);getReaderPhoto();$(".easyui-panel").panel("resize")};rdrController.prototype.init=function(){rdrController.prototype.initConfig()};rdrController.prototype.initConfig=function(){initJson=[{key:"rdrtype",condition:"libcode",value:vLibcode},{code:"formatdesign_libcode,libcode",key:"libcode",condition:"code",value:vLibcode},{key:"rdrfld1",condition:"parentid",value:"1"},{key:"rdrfld2",condition:"parentid",value:"2"},{key:"rdrfld3",condition:"parentid",value:"3"},{key:"rdrfld4",condition:"parentid",value:"4"},{key:"peccancy"},{key:"cirlogtype"},{code:"status",key:"rdrstatus"},{code:"finsearchfintype",key:"fintype"},{code:"finsearchrectype",key:"rectype"},{code:"finsearchpayway",key:"payway"},{code:"formatdesign_operid,operid",key:"operid"}];_myPage.prototype.getLoadData(initJson);$("#keyword").textbox("textbox").focus()};_myPage.prototype.getLoadSuccess=function(a,b){_fmtGridDataRows=a;_myPage.prototype.onLoadData(_fmtGridDataRows,initJson);getPageConfig("page_type",callSetParaResult,"cir");_myPage.prototype.getOperatorParam()};_myPage.prototype.initComboxByOperatorParm=function(e){if(e.showrdrtype){var a=$("#rdrtype").combobox("getData");var d=[];for(var b=0;b-1){d.push(a[b])}}$("#rdrtype").combobox("loadData",d)}};function showRdrFldName(){$(".show-rdrfld1").html(mystorage.get("rdr_fld1"));$(".show-rdrfld2").html(mystorage.get("rdr_fld2"));$(".show-rdrfld3").html(mystorage.get("rdr_fld3"));$(".show-rdrfld4").html(mystorage.get("rdr_fld4"))}function onSelectRdrDataGridList(a,b){if(!isUpdateByLibcode(b.libcode)){setRdrBntIsShowByLibcode(true)}else{setRdrBntIsShowByLibcode(false)}searchRdrRecordById(b.id);getLoanRule(b.libcode,b.rdrtype)}function setRdrBntIsShowByLibcode(a){if(a){$("#saveRdrRecord").linkbutton({disabled:true});$("#deleteRdrRecord").linkbutton({disabled:true});$("#rdrPhotoRecord").hide();$("#rdrCardRecord").hide();$("#rdrmoneyRecord").hide();$("#rdrServiceRecord").hide();$("#rdrBonusHandler").hide();$("#upLoadPhoto").hide();$("#deletePhoto").hide();$("#tuizheng").hide();$("#yajinchuli").hide()}else{$("#saveRdrRecord").linkbutton({disabled:false});$("#deleteRdrRecord").linkbutton({disabled:false});$("#rdrPhotoRecord").show();$("#rdrCardRecord").show();$("#rdrmoneyRecord").show();$("#rdrServiceRecord").show();$("#rdrBonusHandler").show();$("#upLoadPhoto").show();$("#deletePhoto").show();$("#tuizheng").show();$("#yajinchuli").show()}}function getLoanRule(c,a){$(".loanrulelist").html("");var b=base_path+"cir/circulation/getloanrule.do";var d={};d.libcode=c;d.rdrtype=a;$.post(b,d,function(j){if(j.status=="0"){var h=j.rows;for(var f=0;f借阅制度["+k.code+"|"+k.name+"],可借["+k.libcode+"]"+g+"")}}},"json")}function searchRdrRecord(c,a){var b=base_path+"cir/reader/page.do";var d={};if(getValue("keyword").length==0&&!a){return openMessageDlg("检索值不能为空")}vBase64Image=0;cleanJsonData("record");cleanJsonData("showrecord");$(".loanrulelist").html("");deleteGridData("rdrDataGridList");d.rows=10;d.page=1;if(c){d[c]=a}else{d[""+getValue("index")+""]=getValue("keyword")}$("#rdrDataGridList").datagrid({url:b,queryParams:d,onLoadSuccess:function(e){if(e.status=="0"){if(e.total>0){$("#rdrDataGridList").datagrid("selectRow",0)}else{return openMessageDlg("未找到合适的记录")}}else{openMessageDlg(e.message)}},method:"post"})}function searchRdrRecordById(c){$("#photourl").attr("src","images/bg.png");cleanJsonData("showrecord");cleanJsonData("record");var a=base_path+"cir/reader/getFirstReader.do";var b={};b.id=c;$.post(a,b,function(d){if(d.status=="0"){var e=d.rows[0];setJsonData(null,e);setJsonData("show",e);setValue("showlibcode",e.libcode);$("#libcode").combobox("setText",$("#showlibcode").combobox("getText"));getReaderPhoto(e.id,e.photourl)}},"json")}function getReaderPhoto(b,a){getImageByCode(b,"0","photourl")}function RndNum(c){var b="";for(var a=0;a0){saveReaderRecord(a,rdrRecord)}else{if(rdrRecord.libcode&&rdrRecord.idcard){var b=base_path+"cir/reader/checkIdcard.do";var c={};c.idcard=rdrRecord.idcard;c.libcode=rdrRecord.libcode;$.post(b,c,function(e){if(e.total==0){if(e.status=="3002"){$.messager.confirm("提示消息",e.message+",继续办证按确定!",function(f){if(f){checkGetFirstReader(a,rdrRecord)}})}else{checkGetFirstReader(a,rdrRecord)}}else{checkGetFirstReader(a,rdrRecord)}},"json")}else{checkGetFirstReader(a,rdrRecord)}}}function checkGetFirstReader(b,c){var a=base_path+"cir/reader/getFirstReader.do";var d={};d.rdrno=c.rdrno;$.post(a,d,function(e){if(e.total==0){saveReaderRecord(b,c)}else{openMessageDlg("此读者证号已存在!")}},"json")}function saveReaderRecord(b,a,c){var d=getValue("id");payMoney={};$.post(b,a,function(h){if(h.rows.length>0&&h.rows[0].id){saveImageByCode(h.rows[0].id,"0")}if(h.status=="0"){if(c){$("#lost-change-dlg").dialog("close");$("#card-delay-dlg").dialog("close")}openMessageDlg(h.message);searchRdrRecord("id",h.rows[0].id);searchDepositGridList(h.rows[0],"deposit","fin_deposit_dlg");if(vPrintTicketStatus==1){printTicketHandler("deposit",h.rows[0]);vPrintTicketStatus=0}}else{if(h.status=="3001"){payMoney=h.rows[0];var j=0;$(".payfin-addrdr-body").html("");var f='';if(payMoney.deposit){var i="交";if(payMoney.deposit<0){i="退"}f+='";j+=parseFloat(payMoney.deposit)}if(payMoney.gong_ben_fei){f+='";j+=parseFloat(payMoney.gong_ben_fei)}if(payMoney.yan_zheng_fei){f+='";j+=parseFloat(payMoney.yan_zheng_fei)}else{f+=''}f+='';var i="交";if(j<0){i="退"}f+='
此读者证需要处理以下款项:
'+i+"押金:"+Math.abs(payMoney.deposit).toFixed(2)+"元
交工本费:'+payMoney.gong_ben_fei+"元
交验证费:'+payMoney.yan_zheng_fei+"元
  
合计共'+i+":["+Math.abs(j).toFixed(2)+"]
";var g="";g+="
"+f+"
";var e=rdrConfigParamjson.paybarcode;if(e&&e=="1"&&j>-1){g+="
提示:如果【现金支付】请选择确定按钮,如果【微信或者支付宝支付】直接扫描读者出示的二维码进行扫码支付
";g+='
'}$(".payfin-addrdr-body").append(g);$("#payfin-addrdr-dlg").window("open");bindPayDepositFinEvent()}else{openMessageDlg(h.message)}}},"json")}function bindPayDepositFinEvent(){if($("#olpaycode").length>0){$("#olpaycode").focus().select();$("#olpaycode").keydown(function(a){if(a.keyCode==13){saveReaderRecordOKResult()}})}}function saveReaderRecordOKResult(){$("#payfin-addrdr-dlg").window("close");rdrRecord.check="1";if(payMoney.deposit){rdrRecord.deposit=payMoney.deposit}if(payMoney.gong_ben_fei){rdrRecord.gong_ben_fei=payMoney.gong_ben_fei}if(payMoney.yan_zheng_fei){rdrRecord.yan_zheng_fei=payMoney.yan_zheng_fei}if($("#olpaycode").length>0){rdrRecord.olpaycode=$("#olpaycode").val()}vPrintTicketStatus=1;var a=base_path+"cir/reader/saveReader.do";saveReaderRecord(a,rdrRecord)}function saveReaderRecordCancleResult(){$("#payfin-addrdr-dlg").window("close");rdrRecord.check="1";var a=base_path+"cir/reader/saveReader.do";saveReaderRecord(a,rdrRecord)}function deleteRdrRecord(){var a=$("#rdrDataGridList").datagrid("getSelected");if(!a){return openMessageDlg("请先选择一条读者信息,进行删除")}openConfirmDlg("您确定要删除读者证号为["+a.rdrno+"]的读者数据吗?",null,deleteRrdRecordResult,null)}function deleteRrdRecordResult(){var c=$("#rdrDataGridList").datagrid("getSelected");var a=base_path+"cir/reader/delete.do";var b={};b.pk=c.id;$.post(a,b,function(d){if(d.status=="0"){vBase64Image=0;deleteImageByCode(c.id,"0","photourl");searchRdrRecord();openMessageDlg(d.message)}else{openMessageDlg(d.message)}},"json")}function deletePhoto(){var a=$("#rdrDataGridList").datagrid("getSelected");if(!a){return openMessageDlg("请先选择一条读者信息,才能进行照片删除操作")}deleteImageByCode(a.id,"0","photourl")}function rdrDataRdrRecord(b){rdrRecord={};rdrRecord=getJsonData(null,"record");if(rdrRecord.id>0){if(b=="4"){if(getValue("showdebt")>0){return openMessageDlg("读者有欠款["+getValue("showdebt")+"]未交,不能退证。")}if(getValue("showcurloan")>0){return openMessageDlg("读者还有["+getValue("showcurloan")+"]本图书未还,不能退证。")}openConfirmDlg("您确定要为读者证号为["+rdrRecord.rdrno+"]的读者,进行退证操作吗?",null,rdrDataRdrRecordResult,null)}else{if(b=="0"&&getValue("status")=="0"){openMessageDlg("读者已是有效状态,无需做证恢复操作!")}else{var a=base_path+"cir/reader/saveReader.do";rdrRecord.status=b;saveReaderRecord(a,rdrRecord)}}}else{openMessageDlg("请选中一条读者记录进行操作!")}}function cancelStopLoanData(){rdrRecord={};rdrRecord=getJsonData(null,"record");if(rdrRecord.id>0){var a=base_path+"cir/reader/saveReader.do";rdrRecord.stopdate="0";saveReaderRecord(a,rdrRecord)}else{openMessageDlg("请选中一条读者记录进行操作!")}}function rdrDataRdrRecordResult(){rdrRecord={};rdrRecord=getJsonData(null,"record");var a=base_path+"cir/reader/saveReader.do";rdrRecord.status="4";saveReaderRecord(a,rdrRecord)}function resetPassWordRecord(){var a=getValue("id");if(a>0){$.messager.confirm("提示消息","您确定要对当前读者进行重置密码操作吗?",function(c){if(c){var b=base_path+"cir/reader/resetPassword.do";var d={};d.id=a;$.post(b,d,function(e){if(e.status=="0"){openMessageDlg(e.message)}else{openMessageDlg(e.message)}},"json")}})}else{openMessageDlg("请选中一条读者记录进行操作!")}}function lostCardChange(){var a=getValue("id");if(a>0){setValue("changeoldcardno",getValue("rdrno"));$("#lost-change-dlg").window("open")}else{openMessageDlg("请选中一条读者记录进行操作!")}}function onLostAddCard(){if(getValue("rdrno")==getValue("changenewcardno")){return openMessageDlg("新证和旧证不能相同!")}rdrRecord={};rdrRecord=getJsonData(null,"record");var a=base_path+"cir/reader/saveReader.do";rdrRecord.rdrno=getValue("changenewcardno");saveReaderRecord(a,rdrRecord,"1")}function cardDelay(){var b=getValue("id");if(b>0){var a=base_path+"par/readertype/get.do";$.post(a,{pk:getValue("rdrtype")},function(e){if(e.status=="0"){var c=JSON.parse(e.rows[0].paramjson);var g=parseInt(c.you_xiao_qi);var f=$("#enddate").datebox("getValue");var d=addDate(f,g);setValue("cardstartdate",getValue("startdate"));setValue("cardenddate",d);$("#card-delay-dlg").window("open")}},"json")}else{openMessageDlg("请选中一条读者记录进行操作!")}}function onCardDelayHandler(){if(parseInt(getValue("cardstartdate"))>parseInt(getValue("cardenddate"))){return openMessageDlg("启用日期不能大于终止日期!")}rdrRecord={};rdrRecord=getJsonData(null,"record");var a=base_path+"cir/reader/saveReader.do";rdrRecord.startdate=getValue("cardstartdate");rdrRecord.enddate=getValue("cardenddate");saveReaderRecord(a,rdrRecord,"1")}function curBorrowSearch(){var a=getValue("id");if(a>0){$("#cur-borrow-dlg").dialog({onLoad:function(){getCirDataGridList(a)}}).dialog("open")}else{openMessageDlg("请选中一条读者记录进行操作!")}}function searchCurBorrow(){var a=getValue("id");getCirDataGridList(a)}function getCirDataGridList(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 historyBorrowSearch(){var a=getValue("id");if(a>0){$("#history-borrow-dlg").dialog({onLoad:function(){_myPage.prototype.dataToCombobox(_fmtGridDataRows.rows[0].cirlogtype,{id:"cirlogtype"});getHistoryBorrowDataGridList()}}).dialog("open")}else{openMessageDlg("请选中一条读者记录进行操作!")}}function getHistoryBorrowDataGridList(){var b=getValue("id");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 setPara(){var a="../circulation/com/rdr_pageconfig.jsp";var b=$("#pageconfig_setpara_dlg").dialog({href:a,onLoad:function(){rdrConfig.prototype.init()}}).dialog("open")}function onSerachRdrBarcode(){var a=base_path+"par/common/getInitData.do?key=barformat&condition=type&value=1";var b={};clearGridData("rdrBarcodeDataGridList");$("#rdrBarcodeDataGridList").datagrid({url:a,queryParams:b,onLoadSuccess:function(c){},method:"post"})}function savePageConfig(){var a=getJsonData("page_","record");if(!a){openMessageDlg("记录异常");return}if(rdrConfigParamjson&&rdrConfigParamjson.depositticket){var d=rdrConfigParamjson.depositticket;if(d=="1"){if(!drConfigParamjson.acceptDepositFormatDesignIndex){return openMessageDlg("您还没与选择打印押金小票格式!")}}}if(rdrConfigParamjson&&rdrConfigParamjson.fineticket){var c=rdrConfigParamjson.fineticket;if(c=="1"){if(!drConfigParamjson.acceptDebtFormatDesignIndex){return openMessageDlg("您还没与选择打印罚款小票格式!")}}}var b=base_path+"lib/pageconfig/save.do";$.post(b,a,function(e){if(e.status=="0"){openMessageDlg(e.message);$("#pageconfig_setpara_dlg").dialog("close");savePageConfigCallBack()}else{openMessageDlg(e.message)}},"json")}function savePageConfigCallBack(){getPageConfig("page_type",callSetParaResult)}function sohwService(){var a=getValue("id");if(a>0){$("#servicedlg").dialog({onLoad:function(){getServiceDataGridList();$("#serviceDataGridList").datagrid({onSelect:onSelectService})}}).dialog("open")}else{openMessageDlg("请选中一条读者记录进行操作!")}}function getServiceDataGridList(){$(".rdrno").html(getValue("rdrno"));$(".name").html(getValue("name"));var a=base_path+"par/special/page.do";onHnadlerSvaeBntScreen(null,true);var b={};$.post(a,b,function(g){onHnadlerSvaeBntScreen(null,false);if(g.status=="0"){var f=g.rows;var c=[];for(var e=0;e";f+=parseFloat(e.deposit);var d="交";b+='
合计共'+d+":"+Math.abs(f).toFixed(2)+"元
";var c="";c+="
"+b+"
";var a=rdrConfigParamjson.paybarcode;if(a&&a=="1"){c+="
提示:如果【现金支付】请选择确定按钮,如果【微信或者支付宝支付】直接扫描读者出示的二维码进行扫码支付
";c+='
'}$(".payfin-service-body").append(c);$("#payfin-service-dlg").window("open");bindPayServiceFinEvent()}else{}}else{openMessageDlg("请选中一条专项服务记录进行操作!")}}function bindPayServiceFinEvent(){if($("#olpaycode").length>0){$("#olpaycode").focus().select();$("#olpaycode").keydown(function(a){if(a.keyCode==13){onServiceHandler()}})}}function onRenewService(){var c=$("#serviceDataGridList").datagrid("getSelected");if(c){var a=base_path+"cir/reader/renewService.do";onHnadlerSvaeBntScreen(null,true);var b={};b.rdrid=getValue("id");b.rulecode=c.code;$.post(a,b,function(d){onHnadlerSvaeBntScreen(null,false);if(d.status=="0"){openMessageDlg(d.message);var e=d.rows[0];setValue("paramjson",e.paramjson);$("#payfin-service-dlg").window("close");getServiceDataGridList()}else{openMessageDlg(d.message)}},"json")}else{openMessageDlg("请选中一条专项服务记录进行操作!")}}function onSelectService(b,c){if(c.status=="0"){var a=getValue("paramjson");if(a){a=JSON.parse(a);if(a.sperule&&a.sperule[c.code]){$("#onOpenService").linkbutton({disabled:true});$("#onRenewService").linkbutton({disabled:false});$("#onCancelService").linkbutton({disabled:false})}else{$("#onOpenService").linkbutton({disabled:false});$("#onRenewService").linkbutton({disabled:true});$("#onCancelService").linkbutton({disabled:true})}}else{$("#onOpenService").linkbutton({disabled:false});$("#onRenewService").linkbutton({disabled:true});$("#onCancelService").linkbutton({disabled:true})}}else{$("#onOpenService").linkbutton({disabled:true});$("#onRenewService").linkbutton({disabled:true});$("#onCancelService").linkbutton({disabled:true})}}function onServiceHandler(){$("#payfin-service-dlg").dialog("close");var a=base_path+"cir/reader/openService.do";if(vServiceStatus==0||vServiceStatus==2){a=base_path+"cir/reader/cancelService.do"}onHnadlerSvaeBntScreen(null,true);var c={};c.rdrid=getValue("id");if(vServiceStatus==2){var b=$("#depositDataGridList").datagrid("getSelected");c.rulecode=b.resefld1;c.deposit=b.money}else{var b=$("#serviceDataGridList").datagrid("getSelected");c.rulecode=b.code;c.deposit=b.deposit;if($("#olpaycode").length>0){c.olpaycode=$("#olpaycode").val()}}c.payway="0";$.post(a,c,function(d){onHnadlerSvaeBntScreen(null,false);if(d.status=="0"){openMessageDlg(d.message);var e=d.rows[0];setValue("paramjson",e.paramjson);$("#payfin-service-dlg").window("close");if(vServiceStatus==2){finDepositHandle()}else{getServiceDataGridList()}}else{openMessageDlg(d.message)}},"json")}function onCancelService(){var d=0;var c=$("#serviceDataGridList").datagrid("getSelected");if(c){vServiceStatus=0;if(c.deposit){$(".payfin-service-body").html("");var a='';var b="退";a+='";d+=parseFloat(c.deposit);var b="退";a+='
此读者证开通专项服务需要处理以下款项:
'+b+"专项押金:"+Math.abs(c.deposit).toFixed(2)+"元
合计共'+b+":"+Math.abs(d).toFixed(2)+"元
";$(".payfin-service-body").append(a);$("#payfin-service-dlg").window("open")}else{canceServiceRecord()}}else{openMessageDlg("请选中一条专项服务记录进行操作!")}}function refundServiceDeposit(){var d=0;var c=$("#depositDataGridList").datagrid("getSelected");if(c){if(c.type=="8"){vServiceStatus=2;if(c.money){$(".payfin-service-body").html("");var a='';var b="退";a+='";d+=parseFloat(c.money);var b="退";a+='
此读者退专项押金需要处理以下款项:
'+b+"专项押金:"+Math.abs(c.money).toFixed(2)+"元
合计共'+b+":"+Math.abs(d).toFixed(2)+"元
";$(".payfin-service-body").append(a);$("#payfin-service-dlg").window("open")}else{canceServiceRecord()}}else{openMessageDlg("请选中一条专项押金记录进行操作!")}}else{openMessageDlg("请选中一条专项押金记录进行操作!")}}function peccancyListSearch(){var a=getValue("id");if(a>0){$("#peccancydlg").dialog({onLoad:function(){_myPage.prototype.dataToCombobox(_fmtGridDataRows.rows[0].peccancy,{id:"peccancy"});getPeccancyDataGridList()}}).dialog("open")}else{openMessageDlg("请选中一条读者记录进行操作!")}}function getPeccancyDataGridList(){var a=base_path+"cir/peccancy/pageUnion.do";var b={};b.rows=10;b.page=1;b["limit[0].condition"]="rdrid";b["limit[0].value"]=getValue("id");if(getValue("peccancybegdate")>0){b["limit[1].condition"]="pecdate";b["limit[1].typeHandler"]="7";b["limit[1].value"]=getValue("peccancybegdate").replace(new RegExp("-","g"),"")}if(getValue("peccancyenddate")>0){b["limit[2].condition"]="pecdate";b["limit[2].typeHandler"]="5";b["limit[2].value"]=getValue("peccancyenddate").replace(new RegExp("-","g"),"")}$("#peccancyDataGridList").datagrid({url:a,queryParams:b,onLoadSuccess:function(c){},method:"post"})}function speloanSearch(){var a=getValue("id");if(a>0){$("#seploandlg").dialog({onLoad:function(){var b=base_path+"cir/speloan/pageCurLoan.do";var c={};clearGridData("seploanDataGridList");c.rows=10;c.page=1;c.rdrid=a;$("#seploanDataGridList").datagrid({url:b,queryParams:c,onLoadSuccess:function(d){},method:"post"})}}).dialog("open")}else{openMessageDlg("请选中一条读者记录进行操作!")}}function onOpenRdrSetParaDlg(){}var _readerCard=function(){};_readerCard.prototype.search=function(){var a="http://127.0.0.1:5000/api/register";$.ajax({type:"get",url:a,data:{},timeout:10000,dataType:"json",error:function(b,e,d){var c=b.responseJSON;openMessageDlg(c.msg)},success:function(b){console.log(b);vBase64Image=1;if(b.rspcode==200){setJsonData(null,b);if(b.photourl){$("#photourl").attr("src","data:image/jpeg;base64,"+b.photourl)}}else{alert(b.msg)}}})};function handlerFun(b){if(b.readfield){var a=base_path+"cir/reader/list.do";var c={};c["limit[0].condition"]=b.readfield;c["limit[0].typeHandler"]="0";c["limit[0].value"]=b.readvalue;$("#rdrDataGridList").datagrid({url:a,queryParams:c,onLoadSuccess:function(d){if(d.status=="0"&&d.total>0){$("#rdrDataGridList").datagrid("selectRow",0)}else{readTipHandlerFun(b)}},method:"post"})}else{readTipHandlerFun(b)}}function readTipHandlerFun(b){var a=rdrConfigParamjson.readertip;if(a=="1"){readAddByReaderCard(b)}else{$.messager.confirm("提示消息","未找到合适的数据,是否执行新增操作?",function(c){if(c){readAddByReaderCard(b)}})}}function readAddByReaderCard(a){addRdrRecord();vBase64Image=1;setJsonData(null,a);if(a.photourl){$("#photourl").attr("src","data:image/jpeg;base64,"+a.photourl)}}function onJumpCirPage(){if(getValue("keyword").length>0){mystorage.set("cir_index",getValue("index"));mystorage.set("cir_keyword",getValue("keyword"))}if(getValue("rdrno").length>0){mystorage.set("cir_index","rdrno");mystorage.set("cir_keyword",getValue("rdrno"))}parent.addTab("借出处理","circulation/cir_circulation.jsp?type=loan","arrow-circle-right","4101","no")}function autoSearchInfo(){var b=mystorage.get("rdr_keyword");var a=mystorage.get("rdr_index");if(b){mystorage.set("rdr_index",null);mystorage.set("rdr_keyword",null);setValue("keyword",b);searchRdrRecord(null,a)}};