var payMoney;var rdrRecord;var VPAGEFIN="reader";var uploader;var uploaderFile;var vServiceStatus=0;var vPrintTicketStatus=0;var vBase64Image=0;var initJson;$(function(){var a=$("#page_fineticket");if(a.length>0){bindPrintFDByCode("page_acceptDepositFormatDesignIndex","E_PRINTTICKET");bindPrintFDByCode("page_acceptDebtFormatDesignIndex","E_PRINTTICKETDEBT")}_myInitCombox.prototype.autobar();initJson=[{key:"rdrtype",condition:"libcode",value:vLibcode},{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.initData(initJson);showRdrFldName();_myPage.prototype.onLoadAllLibDataNoLimit({code:"showlibcode",key:"libcode"});enterEvent("keyword",searchRdrRecord);$("#rdrDataGridList").datagrid({rowStyler:rowStylerIsUpdateByLibcode,onSelect:onSelectRdrDataGridList});$("#serviceDataGridList").datagrid({onSelect:onSelectService});$("#keyword").textbox("textbox").focus();$("#cirDataGridList").datagrid("hideColumn","name");$("#cirDataGridList").datagrid("hideColumn","rdrno");getReaderPhoto();autoSearchInfo();$(".easyui-panel").panel("resize")});_myPage.prototype.onLoadSuccess=function(a,b){getPageConfig("page_type",callSetParaResult);_fmtGridDataRows=a;_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)}};var _myInitCombox=function(){};_myInitCombox.prototype.autobar=function(){if($("#page_autordr").length>0){var b={};b.libcode=vLibcode;var a=base_path+"par/autordr/page.do";$.post(a,b,function(c){$("#page_autordr").combobox({data:c.rows,valueField:"code",textField:"name",panelHeight:"auto",loadFilter:function(d){var e={};e.code="";e.name="不限";d.splice(0,0,e);return d},onLoadSuccess:function(){$(this).combobox("select","")}})},"json")}};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(f){if(f.rows.length>0&&f.rows[0].id){saveImageByCode(f.rows[0].id,"0")}if(f.status=="0"){if(c){$("#lost-change-dlg").dialog("close");$("#card-delay-dlg").dialog("close")}openMessageDlg(f.message);searchRdrRecord("id",f.rows[0].id);if(vPrintTicketStatus==1){printTicketHandler("deposit",f.rows[0]);vPrintTicketStatus=0}}else{if(f.status=="3001"){payMoney=f.rows[0];var h=0;$(".payfin-addrdr-body").html("");var e='';if(payMoney.deposit){var g="交";if(payMoney.deposit<0){g="退"}e+='";h+=parseFloat(payMoney.deposit)}if(payMoney.gong_ben_fei){e+='";h+=parseFloat(payMoney.gong_ben_fei)}if(payMoney.yan_zheng_fei){e+='";h+=parseFloat(payMoney.yan_zheng_fei)}else{e+=''}e+='';var g="交";if(h<0){g="退"}e+='
此读者证需要处理以下款项:
'+g+"押金:"+Math.abs(payMoney.deposit).toFixed(2)+"元
交工本费:'+payMoney.gong_ben_fei+"元
交验证费:'+payMoney.yan_zheng_fei+"元
  
合计共'+g+":"+Math.abs(h).toFixed(2)+"元
";$(".payfin-addrdr-body").append(e);$("#payfin-addrdr-dlg").window("open")}else{openMessageDlg(f.message)}}},"json")}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}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){getCirDataGridList(a);$("#cur-borrow-dlg").window("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){getHistoryBorrowDataGridList();$("#history-borrow-dlg").window("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(){onSerachRdrBarcode();$("#pageconfig_setpara_dlg").window("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}var f=getValue("page_depositticket");if(f=="1"){var d=getValue("page_acceptDepositFormatDesignIndex");if(!d){return openMessageDlg("您还没与选择打印押金小票格式!")}}var e=getValue("page_fineticket");if(e=="1"){var c=getValue("page_acceptDebtFormatDesignIndex");if(!c){return openMessageDlg("您还没与选择打印罚款小票格式!")}}var b=base_path+"lib/pageconfig/save.do";$.post(b,a,function(g){if(g.status=="0"){openMessageDlg(g.message);$("#pageconfig_setpara_dlg").dialog("close");savePageConfigCallBack()}else{openMessageDlg(g.message)}},"json")}function savePageConfigCallBack(){getPageConfig("page_type",callSetParaResult)}function callSetParaResult(c){if(c.status=="0"){var b=c.rows[0];var a=JSON.parse(b.paramjson);setValue("index",a.serachtype);setJsonData("page_",a);if($("#sfzbanzheng").length>0){setWebSocket(a)}}}function sohwService(){var a=getValue("id");if(a>0){getServiceDataGridList();$("#servicedlg").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";d+=parseFloat(c.deposit);var b="交";a+='
合计共'+b+":"+Math.abs(d).toFixed(2)+"元
";$(".payfin-service-body").append(a);$("#payfin-service-dlg").window("open")}else{}}else{openMessageDlg("请选中一条专项服务记录进行操作!")}}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(){var b=base_path+"cir/reader/openService.do";if(vServiceStatus==0||vServiceStatus==2){b=base_path+"cir/reader/cancelService.do"}onHnadlerSvaeBntScreen(null,true);var d={};d.rdrid=getValue("id");if(vServiceStatus==2){c=$("#depositDataGridList").datagrid("getSelected");d.rulecode=c.resefld1;d.deposit=c.money}else{var c=$("#serviceDataGridList").datagrid("getSelected");var a=$("#serviceDataGridList").datagrid("getRowIndex",c);d.rulecode=c.code;d.deposit=c.deposit}d.payway="0";$.post(b,d,function(e){onHnadlerSvaeBntScreen(null,false);if(e.status=="0"){openMessageDlg(e.message);var f=e.rows[0];setValue("paramjson",f.paramjson);$("#payfin-service-dlg").window("close");if(vServiceStatus==2){finDepositHandle()}else{getServiceDataGridList()}}else{openMessageDlg(e.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){getPeccancyDataGridList();$("#peccancydlg").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 c=getValue("id");if(c>0){var a=base_path+"cir/speloan/pageCurLoan.do";var b={};clearGridData("seploanDataGridList");b.rows=10;b.page=1;b.rdrid=c;$("#seploanDataGridList").datagrid({url:a,queryParams:b,onLoadSuccess:function(d){},method:"post"});$("#seploandlg").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=getValue("page_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/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)}};