Edit D:\rfid\libsystem\page\circulation\js\circulation.js
var onCloseCallFunName=undefined;var VPAGEFIN="circulation";$(function(){var b=$("#page_fineticket");if(b.length>0){bindPrintFDByCode("page_acceptDebtFormatDesignIndex","E_PRINTTICKETDEBT")}var a=[{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.initData(a);$("#cirDataGridList").datagrid({rowStyler:rowStylerIsUpdateByLibcode,onSelect:onSelectCirDataGridList,onDblClickRow:onDblClickCirDataGridListRow,rowStyler:rowCirOverdueStyler});$("#cir_tabsGrid").tabs({onSelect:cirTabsGridselect});enterEvent("keyword",searchRdrRecord);enterEvent("barcode",searchHoldRecord);enterEvent("destoryMoney",destoryBook);enterEvent("curlostRate",lostBook);circurlationHandler(vType);autoSetGrid();autoSearchInfo();$(".easyui-panel").panel("resize")});_myPage.prototype.onLoadSuccess=function(a,b){getPageConfig("page_type",callSetParaResult);_fmtGridDataRows=a};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&&getValue("page_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)}}},"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"&&getValue("page_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){if(e.total>0){var d=$("#cir_tabsGrid").tabs("getTab",0);$("#cir_tabsGrid").tabs("update",{tab:d,options:{title:'???????(<span style="color:red;">'+e.total+"</span>)"}})}},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){if(e.total>0){var d=$("#cir_tabsGrid").tabs("getTab",1);$("#cir_tabsGrid").tabs("update",{tab:d,options:{title:'?????????(<span style="color:red;">'+e.total+"</span>)"}})}},method:"post"})}function getFocusByPara(){var b=getValue("page_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 setPara(){onSerachRdrBarcode();$("#pageconfig_setpara_dlg").window("open")}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 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.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/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