Edit D:\rfid\libsystem\page\application\js\bookcaseloan.js
var onCloseCallFunName=undefined;var VPAGEFIN="circulation";$(function(){var a=[{key:"rdrtype",condition:"libcode",value:vLibcode},{code:"libcode,curlibcode",key:"libcode",condition:"code",value:vLibcode},{code:"rdrstatus",key:"rdrstatus"},{code:"page_sysid",key:"sysid"},{code:"page_z3950",key:"z3950",condition:"libcode",value:vLibcode},];_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("4");initIndexCommbox();$(".easyui-panel").panel("resize");$("#page_dataSource").combobox({onChange:function(c,b){if(c=="z3950"){$(".z3950tr").hide()}else{$(".z3950tr").hide()}}})});_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);if(a.order_batchno){setValue("batchno",a.order_batchno)}if(a.order_batchno){setValue("dataSource",a.dataSource)}setWebSocket(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){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 b=0;var e=$("#acqDataGridList").datagrid("getSelected");if(e){b=$("#acqDataGridList").datagrid("getRowIndex",e)}deleteGridData("acqDataGridList");var d={};if(getValue("barcode").length==0){return openMessageDlg("????????????")}d.rows=10;d.page=1;d.condition=getValue("bibindex");d.value=getValue("barcode");var a=base_path+"lib/biblios/page.do";var c=getValue("dataSource");if(c=="lib_acq_collectbib"){a=base_path+"acq/collect/page.do"}if(c=="rfiddata"){a=base_path+"cat/rfid/query.do";if(d.condition!="ISBN"){return openMessageDlg("?????????????ISBN")}}if(c=="z3950"){a=base_path+"cat/z3950/query.do";d.condition=getValue("bibindex");if(d.condition!="ISBN"&&d.condition!="TITLE"&&d.condition!="AUTHOR"&&d.condition!="SUBJECT"){d.condition="ANY"}}if(c=="z3950"||c=="rfiddata"){if(getValue("page_sysid").length>0){d.sysid=getValue("page_sysid")}}else{if(getValue("page_sysid").length>0){d["limit[0].condition"]="sysid";d["limit[0].value"]=getValue("page_sysid")}}$("#acqDataGridList").datagrid("hideColumn","orderno");$("#acqDataGridList").datagrid("hideColumn","unifiedno");$("#acqDataGridList").datagrid({url:a,queryParams:d,onLoadSuccess:function(f){if(f.total>0){$("#acqDataGridList").datagrid("selectRow",b)}else{openCirMessageDlg(f.message,getFocusHoldins)}},method:"post"})}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 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,d){var b=getValue("page_order_batchno");if(b.length==0){return openCirMessageDlg("????????????????????")}setValue("batchno",b);var c="???????????????????????";if(!a){c="?????????????????????"}$.messager.confirm("??????",c,function(f){if(f){var e=base_path+"cir/speloan/bcloan.do";var g={};if(getValue("rdrno").length==0){return openCirMessageDlg("?????????????",getFocusReader)}g.rdrid=getValue("rdrid");g.rdrno=getValue("rdrno");g.price=getNumPrice(getValue("price"));g.title=getValue("title");g.author=getValue("author");g.isbn=getValue("isbn");g.classno=getValue("classno");g.publish=getValue("publish");g.publishaddress=getValue("publishaddress");g.publishdate=getValue("publishdate");g.loankey=getValue("barcode");g.bookseller=getValue("service");g.batchno=b;$.post(e,g,function(h){if(!a){$("#addNewBookbarDlg").dialog("close")}if(h.status=="0"){$("#tabsGrid").tabs("select",0);var i=h.rows[0];updateDataGirdList(i);setValue("curloan",parseInt(getValue("curloan"))+1)}else{openCirMessageDlg(h.message,getFocusHoldins)}},"json")}})}function addNewBook(){$("#addNewBookbarDlg").window("open");var a=$('[verify="fld-null"]');a.each(function(b,c){var d=c.id;setValue(d,"")})}function addNewBookToLoan(){if(verifyRequiredFields()){openMessageDlg("??????????????");return}var a=$('[verify="fld-null"]');a.each(function(b,c){var d=c.id;if(getValue(d)){setValue(d.replace("loan",""),getValue(d))}});onDblClickAcqFun()}function onOpenAddNewBookDlg(){$("#loantitle").textbox("textbox").focus()}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 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){if(d.total>0){setValue("curloan",d.total)}},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();$("#addNewBook").hide();$(".loan-barcode-tip").hide();$("#keyword").textbox("textbox").focus().select()}function getFocusBarCode(){if(vType=="loan"){$("#barcode").next().show();$(".loan-barcode-tip").show();$("#addNewBook").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"})}function verifyRequiredFields(){var b=false;var a=$('[verify="fld-null"]');a.each(function(c,d){var e=d.id;if(!getValue(e)){b=true;return false}});return b};
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de