Edit D:\rfid\libsystem\page\circulation\js\cir_circulation.js
var onCloseCallFunName=undefined;var VPAGEFIN="circulation";var initJson;var cirContorller=function(){};$(function(){cirContorller.prototype.init();cirContorller.prototype.bind()});cirContorller.prototype.bind=function(){enterEvent("keyword",searchRdrRecord);enterEvent("barcode",searchHoldRecord);circurlationHandler(vType);autoSearchInfo()};cirContorller.prototype.init=function(){cirContorller.prototype.initConfig();cirContorller.prototype.initView()};cirContorller.prototype.initConfig=function(){initJson=[{key:"rdrtype"},{code:"libcode,biblibcode,curlibcode,formatdesign_libcode",key:"libcode"},{code:"rdrstatus",key:"rdrstatus"},{code:"finsearchfintype",key:"fintype"},{code:"finsearchrectype",key:"rectype"},{code:"finsearchpayway",key:"payway"},{code:"formatdesign_operid",key:"operid"}];_myPage.prototype.getLoadData(initJson)};_myPage.prototype.getLoadSuccess=function(a,b){_fmtGridDataRows=a;getPageConfig("page_type",callSetParaResult,"cirLoanRetu")};cirContorller.prototype.initView=function(){var a=$(window).height();var c=$(".loan-table-input").width();var d=a-40;$(".cir-circulation").css("height",d+"px");var b=$("#cirlayout").layout("panel","south");b.panel("resize",{height:(d-240)+"px"});$(".easyui-layout").layout("resize");$(".easyui-panel").panel("resize")};cirContorller.prototype.config=function(){var a="../circulation/com/cir_pageconfig.jsp";var b=$("#pageconfig_setpara_dlg").dialog({href:a,onLoad:function(){cirConfig.prototype.init()}}).dialog("open")};function noCardCheck(){$("#noCardDlg").dialog("open");toNoCardRdrno();enterEvent("noCardRdrno",toNoCardPwd);enterEvent("noCardPwd",checkNoCardRdr);setValue("noCardRdrno","");setValue("noCardPwd","")}function toNoCardRdrno(){$("#noCardRdrno").textbox("textbox").focus().select()}function toNoCardPwd(){$("#noCardPwd").textbox("textbox").focus().select()}function checkNoCardRdr(){var a=base_path+"cir/reader/noCardCir.do";var b={};b.rdrno=getValue("noCardRdrno");b.password=getValue("noCardPwd");if(!b.rdrno){return openCirMessageDlg("?????????????",toNoCardRdrno)}if(!b.password){return openCirMessageDlg("?????????????",toNoCardPwd)}$.post(a,b,function(c){if(c.status=="0"){$("#noCardDlg").dialog("close");setValue("keyword",c.rows[0].rdrno);searchRdrRecord(null,"rdrno")}else{openCirMessageDlg(c.message,toNoCardRdrno)}},"json")}function cirRdrList(){$("#cirRdrListDlg").dialog("open");var a=mystorage.get("cir_log_rdrlist");var c="<div class='div-book-record'>?????????</div>";if(a){c="";for(var b=a.length;b>0;b--){c+="<div class='div-book-record' onclick='cirRdrListOnClick(\""+a[b-1].rdrno+"\")' style='cursor: pointer;'>"+a[b-1].time+",???????:"+a[b-1].name+",???????"+a[b-1].rdrno+"</div>"}}$(".cirRdrListBox").html(c)}function cirRdrListOnClick(a){$("#cirRdrListDlg").dialog("close");setValue("keyword",a);searchRdrRecord(null,"rdrno")}function addCirRrdList(e){var f=e.rows[0];if(!f){return}var b=mystorage.get("cir_log_rdrlist");var a;if(!b){b=[];a={rdrno:f.rdrno,name:f.name,time:showCurTime()}}else{var d=false;for(var c=0;c<b.length;c++){if(b[c].rdrno==f.rdrno){d=true;break}}if(!d){a={rdrno:f.rdrno,name:f.name,time:showCurTime()}}}if(a){b.push(a)}mystorage.set("cir_log_rdrlist",b)}function cirTabsGridselect(b,a){if(a==1){createSepGridList()}}function createSepGridList(){var b=[{field:"libcode",title:"????????",formatter:onShowLibName,width:80},{field:"loankey",title:"??????",width:100},{field:"loandate",title:"??????",formatter:onShowFmtDate,width:80},{field:"loantime",title:"??????",formatter:onShowFmtDate,width:80},{field:"returndate",title:"??????",formatter:onShowLibName,width:80},{field:"renewnum",title:"???????",width:60},{field:"title",title:"???",width:200},{field:"isbn",title:"???????",width:80},{field:"author",title:"ISBN??",width:100},{field:"price",title:"???",width:60}];var a=$("#sepDataGridList");if(!a.attr("class")){a.datagrid({iconCls:"e-icon fa fa-table",title:"",fit:true,fitColumns:true,singleSelect:true,border:false,nowrap:false,pagination:true,striped:true,onClickRow:onClickEditorRow,columns:[b]})}}function autoSetGrid(){var a=$(window).height();var b=$(".loan-table-input").width();var c=a-290;$("#cirResultDataGridList").datagrid("resize",{height:"150px",width:b+"px"});$("#cir_tabsGrid").tabs("resize",{height:c+"px",width:b+"px"})}function rowCirOverdueStyler(a,b){if(b.returndate<getCurDateYMD()){return"color:red;"}}function onSelectCirDataGridList(a,b){setJsonData(null,b);if(vType=="return"||vType=="barrenew"){getFocusHoldins()}}function onDblClickCirDataGridListRow(a,b){if(vType=="cardrenew"){openConfirmDlg("????????????["+b.barcode+"]????????,?????????????",null,renewBookRecordResult,null)}else{if(vType=="destory"){openConfirmDlg("????????????["+b.barcode+"]????????,????????????",null,destoryBookRecordResult,null)}else{if(vType=="lost"){openConfirmDlg("????????????["+b.barcode+"]????????,????????????",null,lostBookRecordResult,null)}}}}function circurlationHandler(a){$(".returndate-div").hide();vType=a;var c;var b;if(a=="loan"){c="??";b="???";setValue("rdrid","");setValue("keyword","");cleanJsonData("record")}else{if(a=="return"){c="??";b="???"}else{if(a=="cardrenew"){c="??";b="???????"}else{if(a=="barrenew"){c="??";b="???????"}else{if(a=="destory"){c="??";b="???"}else{if(a=="lost"){c="??";b="???"}else{if(a=="close"){c="??";b="??????"}}}}}}}$(".cir-handler-tip").html(b+"???");$(".cir-handler-title").html(c);focusToTextByType(a)}function searchRdrRecord(d,a){setValue("rdrid","");if(!d){cleanJsonData("record")}var b=base_path+"cir/circulation/checkReaderBeforeLoan.do";if(d){b=base_path+"cir/reader/getFirstReader.do"}var c={};if(vType=="cardrenew"){c.optype="renew"}if(getValue("keyword").length==0){return}if(a){c[a]=getValue("keyword")}else{if(getValue("keyword").length==18&&(cirConfigParamjson&&cirConfigParamjson.idcardsearch&&cirConfigParamjson.idcardsearch=="1")){c.idcard=getValue("keyword")}else{c[""+getValue("index")+""]=getValue("keyword")}}$.post(b,c,function(e){if(e.status=="0"){getFocusBarCode();searchRdrRecordResult(e)}else{if(e.status=="3100"){var f=e.rows[0];if(f.debt>0){$("#fin_debt_dlg").window("open");searchDepositGridList(f,"debt")}searchRdrRecordResult(e)}else{if(e.total>0){searchRdrRecordResult(e)}openCirMessageDlg(e.message,getFocusReader)}}addCirRrdList(e)},"json")}function searchRdrRecordResult(a){var b=a.rows[0];setJsonData(null,b);setValue("rdrstatus",b.status);setValue("rdrid",b.id);getCirDataGridList(b.id)}function searchHoldRecord(){var a=base_path+"hld/holding/getHoldingWithBib.do";var b={};if(getValue("barcode").length==0){return circurlationHandler("loan")}b.barcode=getValue("barcode");$.post(a,b,function(c){if(c.status=="0"){var d=c.rows[0];d.libcode=getValue("libcode");setJsonData(null,d);cirHandlerApp()}else{openCirMessageDlg(c.message,getFocusHoldins)}},"json")}function cirHandlerApp(){if(vType=="loan"){loanBook()}else{if(vType=="return"){returnBook()}else{if(vType=="barrenew"){barRenewBook()}else{if(vType=="close"){var a=getValue("return_date");if(a.length==0){return openMessageDlg("???????????????")}returnBook(a)}}}}}function loanBook(){var a=base_path+"cir/circulation/loan.do";var b={};if(getValue("rdrno").length==0){return openCirMessageDlg("?????????????",getFocusReader)}b.rdrno=getValue("rdrno");b.barcode=getValue("barcode");$.post(a,b,function(c){if(c.status=="0"){var d=c.rows[0];updateDataGirdList(d);setValue("curloan",parseInt(getValue("curloan"))+1)}else{openCirMessageDlg(c.message,getFocusHoldins)}},"json")}function returnBook(b){var a=base_path+"cir/circulation/return.do";var c={};if(getValue("barcode").length==0){return openCirMessageDlg("???????????",getFocusHoldins)}if(b){c.return_date=b}c.barcode=getValue("barcode");$.post(a,c,function(d){if(d.status=="0"){var e=d.rows[0];updateDataGirdList(e);if(parseInt(getValue("curloan"))>0){setValue("curloan",parseInt(getValue("curloan"))-1)}if(e.status=="3"){openCirMessageDlg(d.message+",???????????,??????????????")}}else{openCirMessageDlg(d.message,getFocusHoldins)}},"json")}function barRenewBook(){if(getValue("barcode").length==0){return openCirMessageDlg("???????????",getFocusHoldins)}renewBookRecordResult(getValue("barcode"))}function renewBookRecordResult(a){var b=base_path+"cir/circulation/renew.do";var d={};if(a){d.barcode=a}else{var c=$("#cirDataGridList").datagrid("getSelected");d.barcode=c.barcode}$.post(b,d,function(e){if(e.status=="0"){var f=e.rows[0];updateDataGirdList(f)}else{openCirMessageDlg(e.message,getFocusHoldins)}},"json")}function destoryBookRecordResult(){var a=$("#cirDataGridList").datagrid("getSelected");setValue("bibPrice",a.price);setValue("destoryMoney","");$("#destoryHandlerDlg").window("open")}function onOpenDestoryDlg(){$("#destoryMoney").textbox("textbox").focus()}function destoryBook(){if(getValue("destoryMoney")>0){var c=$("#cirDataGridList").datagrid("getSelected");var a=base_path+"cir/circulation/damage.do";var b={};b.barcode=c.barcode;b.damageMoney=getValue("destoryMoney");$.post(a,b,function(d){if(d.status=="0"){$("#destoryHandlerDlg").window("close");var e=d.rows[0];updateDataGirdList(e)}else{openCirMessageDlg(d.message,getFocusHoldins)}},"json")}else{openMessageDlg("??????????????????0")}}function lostBookRecordResult(){var a=$("#cirDataGridList").datagrid("getSelected");setValue("lostBibPrice",a.price);setValue("curlostRate","");getLostFinRate();$("#lostHandlerDlg").window("open")}function getLostFinRate(){var c=$("#cirDataGridList").datagrid("getSelected");var a=base_path+"cir/circulation/getLoanRule.do";var b={};b.doctype=c.doctype;b.curlocation=c.curlocation;b.rdrtype=getValue("rdrtype");$.post(a,b,function(e){if(e.status=="0"){var f=e.rows[0];var d=JSON.parse(f.paramjson);setValue("lostMinRate",d.zui_xiao_fa_bei);setValue("lostMaxRate",d.zui_da_fa_bei)}else{openCirMessageDlg(e.message,getFocusHoldins)}},"json")}function onOpenLostDlg(){$("#curlostRate").textbox("textbox").focus()}function lostBook(){if(parseFloat(getValue("curlostRate")).toFixed(2)>=getValue("lostMinRate")&&parseFloat(getValue("curlostRate")).toFixed(2)<=getValue("lostMaxRate")){var c=$("#cirDataGridList").datagrid("getSelected");var a=base_path+"cir/circulation/lost.do";var b={};b.barcode=c.barcode;b.rate=getValue("curlostRate");$.post(a,b,function(d){if(d.status=="0"){$("#lostHandlerDlg").window("close");var e=d.rows[0];updateDataGirdList(e)}else{openCirMessageDlg(d.message,getFocusHoldins)}},"json")}else{openMessageDlg("??????????????????????????????????????????????????")}}function insertCirResultDataGridListRow(d){var a="";if(d.debt_1>0){a+="????????"+d.overdays+"]??,????????"+d.debt_1+"]????"}if(d.stopdate&&d.stopdate>0){a+="????????"+d.overdays+"]??,?????["+d.stopdate+"]??"}if(d.debt_2>0){a+="??????,????????"+d.debt_2+"]????"}if(d.debt_3>0){a+="??????,????????"+d.debt_3+"]????"}if(d.debt_1>0||d.debt_2>0||d.debt_3>0){d.id=d.rdrid;if(vType!="return"||(vType=="return"&&(cirConfigParamjson&&cirConfigParamjson.handlerfin&&cirConfigParamjson.handlerfin==0))){$("#fin_debt_dlg").window("open");searchDepositGridList(d,"debt")}}var b="";if(d.opertype=="???"){b="color: #ee7621;"}else{if(d.opertype=="???"){b="color: #00CD66;"}else{b="color: #ff66d5;"}}if($("#jifenchuli").length>0){if(d.bonus){a+="???"+d.bonus+"????"}if(d.over_bonus){a+="??????"+d.over_bonus+"????"}if(d.bonus_message){a+=d.bonus_message}}var c="["+d.opertype+"]??"+d.returndate+"(??)}"+a+"??"+d.rdrno+":"+d.name+"}??"+d.barcode+":"+d.callno+"??"+d.title+"??"+d.author+"}";d.note='<div style="font-size: 18px;'+b+'padding: 4px;font-weight: bolder;font-family: ??????;">'+c+"</div>";$("#cirResultDataGridList").datagrid("insertRow",{index:0,row:d})}function updateDataGirdList(a){getCirDataGridList(a.rdrid);setValue("index","rdrno");setValue("keyword",a.rdrno);searchRdrRecord(a);insertCirResultDataGridListRow(a)}function getCirDataGridList(b){getSepCirDataGridList(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(e){var d=$("#cir_tabsGrid").tabs("getTab",0);updateTabsTitle(d,"???????",e)},method:"post"})}function getSepCirDataGridList(b){createSepGridList();var a=base_path+"cir/speloan/pageCurLoan.do";var c={};clearGridData("sepDataGridList");c.rows=10;c.page=1;c.rdrid=b;$("#sepDataGridList").datagrid({url:a,queryParams:c,onLoadSuccess:function(e){var d=$("#cir_tabsGrid").tabs("getTab",1);updateTabsTitle(d,"?????????",e)},method:"post"})}function updateTabsTitle(a,c,b){if(b.total>0){c=""+c+'(<span style="color:red;">'+b.total+"</span>)"}$("#cir_tabsGrid").tabs("update",{tab:a,options:{title:c}})}function getFocusByPara(){if(cirConfigParamjson&&cirConfigParamjson.barcodetordrno){var b=cirConfigParamjson.barcodetordrno;if(b>0){var a=parseInt(b);setTimeout(getFocusBarcodeToRdrno,a)}}}function getFocusBarcodeToRdrno(){circurlationHandler("???")}function focusToTextByType(a){if(a=="return"||a=="barrenew"||a=="close"){$("#index").next().hide();$("#keyword").next().hide();getFocusBarCode()}else{$("#keyword").next().show();$("#index").next().show();$("#barcode").next().hide();$(".loan-barcode-tip").hide();$("#keyword").textbox("textbox").focus().select()}}function getFocusBarCode(){if(vType=="return"||vType=="barrenew"||vType=="loan"||vType=="close"){$("#barcode").next().show();$(".loan-barcode-tip").show();getFocusHoldins();if(vType=="close"){$(".returndate-div").show()}}}function getFocusHoldins(){setValue("barcode","");$("#barcode").textbox("textbox").focus().select()}function getFocusReader(){$("#keyword").textbox("textbox").focus().select();setValue("barcode","");$("#barcode").next().hide();$(".loan-barcode-tip").hide()}function openCirMessageDlg(b,a){$("#circulationTipDlg").dialog("open");$(".circulation-message-body").html(b);$(".iKnow-close").focus();onCloseCallFunName=a}function onCloseCirTipDlg(){if(onCloseCallFunName){onCloseCallFunName()}}function iKnow(){$("#circulationTipDlg").dialog("close")}function onSerachRdrBarcode(){clearGridData("rdrBarcodeDataGridList,holdBarcodeDataGridList");var a=base_path+"par/common/getInitData.do?key=barformat&condition=type&value=1";var b={};$("#rdrBarcodeDataGridList").datagrid({url:a,queryParams:b,onLoadSuccess:function(c){},method:"post"});a=base_path+"par/common/getInitData.do?key=barformat&condition=type&value=0";var b={};$("#holdBarcodeDataGridList").datagrid({url:a,queryParams:b,onLoadSuccess:function(c){},method:"post"})}function callSetParaResult(c){if(c.status=="0"){var b=c.rows[0];var a=JSON.parse(b.paramjson);setValue("index",a.initindex);setJsonData("page_",a);setWebSocket(a)}}function onJumpRdrPage(){if(getValue("keyword").length>0){mystorage.set("rdr_index",getValue("index"));mystorage.set("rdr_keyword",getValue("keyword"))}parent.addTab("??????????","circulation/new_reader.jsp","vcard","4201","no")}function autoSearchInfo(){var b=mystorage.get("cir_keyword");var a=mystorage.get("cir_index");if(b){mystorage.set("cir_index",null);mystorage.set("cir_keyword",null);setValue("keyword",b);searchRdrRecord(null,a)}};
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de