Edit D:\rfid\libsystem\page\application\js\cirspeloan.js
var onCloseCallFunName=undefined;var VPAGEFIN="circulation";$(function(){var a=[{key:"rdrtype",condition:"libcode",value:vLibcode},{key:"libcode",condition:"code",value:vLibcode},{key:"biblibcode",condition:"code",value:vLibcode},{code:"rdrstatus",key:"rdrstatus"},{code:"page_sysid",key:"sysid"}];_myPage.prototype.initData(a);$("#cirDataGridList").datagrid({onSelect:onSelectCirDataGridList,onDblClickRow:onDblClickCirDataGridListRow,rowStyler:rowCirOverdueStyler});$("#acqDataGridList").datagrid({onSelect:onSelectAcqDataGridList,onDblClickRow:onDblClickAcqFun});enterEvent("keyword",searchRdrRecord);enterEvent("barcode",serachBibOk);enterEvent("destoryMoney",destoryBook);enterEvent("curlostRate",lostBook);circurlationHandler(vType);initServiceSelect();initIndexCommbox();$(".easyui-panel").panel("resize")});_myPage.prototype.onLoadSuccess=function(a,b){getPageConfig("page_type",callSetParaResult);_fmtGridDataRows=a};function callSetParaResult(c){if(c.status=="0"){var b=c.rows[0];var a=JSON.parse(b.paramjson);setValue("index",a.rdrSearchWay);setValue("bibindex",a.bookSearchWay);setJsonData("page_",a)}}function initIndexCommbox(){var b={key:"bibindex"};var a=base_path+"par/common/getInitData.do";$.post(a,b,function(c){$("#bibindex").combobox({data:c.rows,valueField:"code",textField:"name",loadFilter:function(d){var e={};e.code="BARCODE";e.name="?????";d.splice(0,0,e);e={};e.code="CALLNO";e.name="?????";d.splice(0,0,e);e={};e.code="SPM";e.name="?????";d.splice(0,0,e);return d},onLoadSuccess:function(){$(this).combobox("select","ISBN")}});$("#page_bookSearchWay").combobox({data:c.rows,valueField:"code",textField:"name",onLoadSuccess:function(){$(this).combobox("select","ISBN")}})},"json")}function serachBibOk(){$("#tabsGrid").tabs("select",1);var c=0;var e=$("#acqDataGridList").datagrid("getSelected");if(e){c=$("#acqDataGridList").datagrid("getRowIndex",e)}var d={};var b=base_path+"lib/biblios/page.do";deleteGridData("acqDataGridList");if(getValue("barcode").length==0){return openMessageDlg("????????????")}d.rows=10;d.page=1;d.condition=getValue("bibindex");d.value=getValue("barcode");if(getValue("page_sysid").length>0){d["limit[0].condition"]="sysid";d["limit[0].value"]=getValue("page_sysid")}if(d.condition=="SPM"){if(d.value.length!=15||d.value.toString().substr(0,3)!="977"){return openCirMessageDlg("?????????",getFocusHoldins)}d.condition="ISBN"}if(d.value.indexOf("|")>0){var a=d.value.split("|");if(a&&a.length>0){d.value=a[0]}}$("#acqDataGridList").datagrid({url:b,queryParams:d,onLoadSuccess:function(f){if(f.total>0){$("#acqDataGridList").datagrid("selectRow",c)}else{openCirMessageDlg("??????????????!",getFocusHoldins)}},method:"post"})}function initServiceSelect(){var a=base_path+"par/special/list.do";var b={};b["limit[0].condition"]="spetype";b["limit[0].value"]="1";$.post(a,b,function(d){if(d.status=="0"){var c=d.rows;$("#service").combobox({data:c,valueField:"code",textField:"name",onLoadSuccess:function(){var e=$(this).combobox("getData");if(e.length>0){$(this).combobox("select",e[0].code)}}})}else{openMessageDlg(d.message)}},"json")}function rowCirOverdueStyler(a,b){if(b.returndate<getCurDateYMD()){return"color:red;"}}function onSelectCirDataGridList(a,b){setJsonData(null,b);if(vType=="return"||vType=="barrenew"){$("#barcode").textbox("textbox").focus()}}function onSelectAcqDataGridList(a,b){setJsonData(null,b)}function onDblClickCirDataGridListRow(a,b){if(vType=="return"){openConfirmDlg("???????????????????,????????????",null,returnBookRecordResult,null)}else{if(vType=="cardrenew"){openConfirmDlg("???????????????????,?????????????",null,renewBookRecordResult,null)}else{if(vType=="destory"){openConfirmDlg("???????????????????,????????????",null,destoryBookRecordResult,null)}else{if(vType=="lost"){openConfirmDlg("???????????????????,????????????",null,lostBookRecordResult,null)}}}}}function circurlationHandler(a){$(".returndate-div").hide();vType=a;var c;var b;if(a=="loan"){c="??";b="???"}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(c){$("#tabsGrid").tabs("select",0);setValue("rdrid","");var a=base_path+"cir/speloan/checkReaderBeforeLoan.do";var b={};if(getValue("keyword").length==0){return openCirMessageDlg("????????????",getFocusReader)}if(c){b.rdrno=c.rdrno}else{b[""+getValue("index")+""]=getValue("keyword")}b.rulecode=getValue("service");$.post(a,b,function(d){if(d.status=="0"){getFocusBarCode();searchRdrRecordResult(d)}else{if(d.status=="3100"){var e=d.rows[0];if(e.debt>0){$("#fin_debt_dlg").window("open");searchDepositGridList(e,"debt")}searchRdrRecordResult(d)}else{if(d.total>0){searchRdrRecordResult(d)}if(vType=="loan"){openCirMessageDlg(d.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 openCirMessageDlg("???????????",getFocusHoldins)}b.barcode=getValue("barcode");$.post(a,b,function(c){if(c.status=="0"){var d=c.rows[0];setJsonData(null,d);cirHandlerApp()}else{openCirMessageDlg(c.message,getFocusHoldins)}},"json")}function cirHandlerApp(){if(vType=="loan"){loanBook()}}function onDblClickAcqFun(a,b){$.messager.confirm("??????","???????????????????????",function(d){if(d){var c=base_path+"cir/speloan/loan.do";var e={};if(getValue("rdrno").length==0){return openCirMessageDlg("?????????????",getFocusReader)}e.rdrno=getValue("rdrno");e.bibid=b.id;e.loankey=getValue("barcode");e.rulecode=getValue("service");$.post(c,e,function(f){if(f.status=="0"){$("#tabsGrid").tabs("select",0);var g=f.rows[0];updateDataGirdList(g);setValue("curloan",parseInt(getValue("curloan"))+1)}else{openCirMessageDlg(f.message,getFocusHoldins)}},"json")}})}function loanBook(){var a=base_path+"cir/speloan/loan.do";var b={};if(getValue("rdrno").length==0){return openCirMessageDlg("?????????????",getFocusReader)}b.rdrno=getValue("rdrno");b.bibid=getValue("bibid");b.rulecode=getValue("service");$.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 returnBookRecordResult(b){var a=base_path+"cir/speloan/return.do";var d={};var c=$("#cirDataGridList").datagrid("getSelected");if(c){d.id=c.id;$.post(a,d,function(e){if(e.status=="0"){var f=e.rows[0];updateDataGirdList(f);if(parseInt(getValue("curloan"))>0){setValue("curloan",parseInt(getValue("curloan"))-1)}}else{openCirMessageDlg(e.message,getFocusHoldins)}},"json")}}function barRenewBook(){if(getValue("barcode").length==0){return openCirMessageDlg("???????????",getFocusHoldins)}renewBookRecordResult()}function renewBookRecordResult(a){var b=base_path+"cir/speloan/renew.do";var d={};var c=$("#cirDataGridList").datagrid("getSelected");if(c){d.id=c.id;$.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/speloan/damage.do";var b={};b.id=c.id;b.money=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","");$("#lostHandlerDlg").window("open")}function onOpenLostDlg(){$("#curlostRate").textbox("textbox").focus()}function lostBook(){var c=$("#cirDataGridList").datagrid("getSelected");var a=base_path+"cir/speloan/lost.do";var b={};b.id=c.id;b.money=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")}function insertCirResultDataGridListRow(b){var a="";if(b.debt_1>0){a+="????????"+b.overdays+"]??,????????"+b.debt_1+"]????"}if(b.debt_2>0){a+="??????,????????"+b.debt_2+"]????"}if(b.debt_3>0){a+="??????,????????"+b.debt_3+"]????"}if(b.debt_1>0||b.debt_2>0||b.debt_3>0){$("#fin_debt_dlg").window("open");b.id=b.rdrid;searchDepositGridList(b,"debt")}b.note=a;$("#cirResultDataGridList").datagrid("insertRow",{index:0,row:b})}function updateDataGirdList(a){getCirDataGridList(a.rdrid);setValue("index","rdrno");setValue("keyword",a.rdrno);searchRdrRecord(a);insertCirResultDataGridListRow(a)}function getCirDataGridList(b){var a=base_path+"cir/speloan/pageCurLoan.do";var c={};clearGridData("cirDataGridList");c.rows=10;c.page=1;c.rdrid=b;c.location=getValue("service");$("#cirDataGridList").datagrid({url:a,queryParams:c,onLoadSuccess:function(d){},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){$("#keyword").next().show();$("#index").next().show();$("#barcode").next().hide();$(".loan-barcode-tip").hide();$("#keyword").textbox("textbox").focus().select()}function getFocusBarCode(){if(vType=="loan"){$("#barcode").next().show();$(".loan-barcode-tip").show();$("#barcode").textbox("textbox").focus().select()}}function getFocusHoldins(){$("#barcode").textbox("textbox").focus().select()}function getFocusReader(){$("#keyword").textbox("textbox").focus().select();$("#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&type=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&type=type&value=0";var b={};$("#holdBarcodeDataGridList").datagrid({url:a,queryParams:b,onLoadSuccess:function(c){},method:"post"})};
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de