Edit D:\rfid\libsystem\page\circulation\js\readerfin.js
$(function(){});function finDepositHandle(){var a=$("#rdrDataGridList").datagrid("getSelected");if(!a){return openMessageDlg("?????????¤??????,????????????")}searchDepositGridList(a,"deposit","fin_deposit_dlg")}function searchDepositGridList(c,a,b){if(!b){b="fin_debt_dlg"}$("#"+b).dialog({onLoad:function(){if(b){setValue("depositMoney","")}var d=base_path+"cir/fine/pageCurFine.do";if(a=="debt"){d=base_path+"cir/fine/pageCurFineUnion.do"}clearGridData(""+a+"DataGridList");$(".fin-"+a+"-tip").html("");$(".fin-total"+a+"-tip").html("");var e="???????:["+c.rdrno+"],???:["+c.name+"]";$(".fin-"+a+"-tip").html(e);setTimeout(function(){var f={};f.rows=10;f.page=1;f.rdrid=c.id;f.type=a;$("#"+a+"DataGridList").datagrid({url:d,queryParams:f,onLoadSuccess:function(k){if(k.total>0){var j=k.rows;var g=0;for(var h=0;h<j.length;h++){g+=parseFloat(j[h].money)}$(".fin-total"+a+"-tip").html("???:["+g.toFixed(2)+"]??")}},method:"post"})},100)}}).dialog("open")}function onOpenFinDepositDlg(){}function payDeposit(){var d=$("#rdrDataGridList").datagrid("getSelected");if(getValue("depositMoney")>0){var b="";var c="???????????????["+d.rdrno+"]?????,??<strong style='color:red;'>["+getValue("depositMoney")+"]</strong>????????";b+="<div class='div-book-record'>"+c+"</div>";var a;if(VPAGEFIN=="reader"){a=rdrConfigParamjson.paybarcode}else{a=cirConfigParamjson.paybarcode}if(a&&a=="1"){b+="<div >???:????????????????????????????????????????????????????????????????????????</div>";b+='<div class="div-book-record"><input id="olpaycode" type="text" style="width:330px;height:20px;"></div>'}openConfirmDlg(b,null,payDepositResult,null,"deposit")}else{openMessageDlg("??????????????0")}}function payDepositResult(){var a=base_path+"cir/fine/pay.do";var c={};var b=$("#rdrDataGridList").datagrid("getSelected");c.type="0";c.rdrid=b.id;c.money=getValue("depositMoney");c.payway="0";if($("#olpaycode").length>0){c.olpaycode=$("#olpaycode").val()}$.post(a,c,function(e){if(e.status=="0"){searchDepositGridList(b,"deposit","fin_deposit_dlg");var d=$("#rdrDataGridList").datagrid("getRowIndex",b);$("#rdrDataGridList").datagrid("selectRow",d)}else{openMessageDlg(e.message)}},"json")}function refundDeposit(){var c=$("#depositDataGridList").datagrid("getRows");var a=0;for(var b=0;b<c.length;b++){if(c[b].type=="0"){a+=parseFloat(c[b].money)}}if(a>0){var d=$("#rdrDataGridList").datagrid("getSelected");openConfirmDlg("???????????????["+d.rdrno+"]?????,??["+a.toFixed(2)+"]????????",null,refundDepositResult,null)}else{openMessageDlg("???????????????0")}}function refundDepositResult(){var d=$("#depositDataGridList").datagrid("getRows");var a=0;for(var c=0;c<d.length;c++){if(d[c].type=="0"){a+=parseFloat(d[c].money)}}rdrRecord={};rdrRecord=getJsonData(null,"record");var b=base_path+"cir/reader/saveReader.do";rdrRecord.status="3";rdrRecord.check="1";rdrRecord.deposit=-a;saveReaderRecord(b,rdrRecord)}function finDebtHandle(){if(VPAGEFIN=="reader"){var b=$("#rdrDataGridList").datagrid("getSelected");if(!b){return openMessageDlg("?????????¤??????,????????????")}}else{var b={};var a=getValue("rdrid");if(a.length==0){return openCirMessageDlg("?????????¤??????,???????????????",getFocusReader)}b.id=getValue("rdrid");b.rdrno=getValue("rdrno");b.name=getValue("name")}searchDepositGridList(b,"debt")}function setFinDebt(){var a={};if(VPAGEFIN=="reader"){var a=$("#rdrDataGridList").datagrid("getSelected");if(!a){return openMessageDlg("?????????¤??????,????????????")}}else{a={};a.rdrno=getValue("rdrno")}if(getValue("debtMoney")>0){openConfirmDlg("???????????????["+a.rdrno+"]?????,??????["+getValue("debtMoney")+"]????????",null,setFinDebtResult,null)}else{openMessageDlg("???????????????0")}}function setFinDebtResult(){var a=base_path+"cir/fine/set.do";var c={};var b=getValue("rdrid");if(VPAGEFIN=="reader"){b=getValue("id")}c.type="4";c.rdrid=b;c.money=getValue("debtMoney");c.note=getValue("debtNote");c.payway="0";$.post(a,c,function(d){if(d.status=="0"){openMessageDlg(d.message);reLoadFinDebtResult()}else{openMessageDlg(d.message)}},"json")}function payFinDebt(){var c=$("#debtDataGridList").datagrid("getSelections");if(c.length==0){return openMessageDlg("???????????????,??????????????")}var b=0;for(var e=0;e<c.length;e++){b+=parseFloat(c[e].money)}var d="";var f="????????["+c.length+"]???,???????<strong style='color:red;'>["+b.toFixed(2)+"]</strong>??,???????????";d+="<div class='div-book-record'>"+f+"</div>";var a;if(VPAGEFIN=="reader"){a=rdrConfigParamjson.paybarcode}else{a=cirConfigParamjson.paybarcode}if(a&&a=="1"){d+="<div >???:????????????????????????????????????????????????????????????????????????</div>";d+='<div class="div-book-record"><input id="olpaycode" type="text" style="width:330px;height:20px;"></div>'}openConfirmDlg(d,null,payFinDebtResult,null,"debt")}function bindOpenConfirmEvent(a){if($("#olpaycode").length>0){$("#olpaycode").focus().select();$("#olpaycode").keydown(function(b){if(b.keyCode==13){closeConfirmDlg();if(a=="deposit"){payDepositResult()}if(a=="debt"){payFinDebtResult()}}})}}function payFinDebtResult(){var e=$("#debtDataGridList").datagrid("getSelections");var a=0;var d="";for(var c=0;c<e.length;c++){if(c==0){d+=""}else{if(c>0){d+=","}}d+=e[c].fineid}var b=base_path+"cir/fine/pay.do";var f={};f.payway="0";f.parentids=d;if($("#olpaycode").length>0){f.olpaycode=$("#olpaycode").val()}$.post(b,f,function(g){if(g.status=="0"){var h;if(VPAGEFIN=="reader"){h=$("#rdrDataGridList").datagrid("getSelected")}else{h=getJsonData(null,"record")}reLoadFinDebtResult();printTicketHandler("debt",h,e);openMessageDlg(g.message)}else{openMessageDlg(g.message)}},"json")}function reLoadFinDebtResult(){var c={};if(VPAGEFIN=="reader"){c=$("#rdrDataGridList").datagrid("getSelected");var a=$("#rdrDataGridList").datagrid("getRowIndex",c);$("#rdrDataGridList").datagrid("selectRow",a)}else{var b=getValue("rdrid");c.id=getValue("rdrid");c.rdrno=getValue("rdrno");c.name=getValue("name")}searchDepositGridList(c,"debt")}function cancleDebt(){var b=$("#debtDataGridList").datagrid("getSelections");if(b.length==0){return openMessageDlg("???????????????,???????????????")}var a=0;for(var c=0;c<b.length;c++){a+=parseFloat(b[c].money)}openConfirmDlg("????????["+b.length+"]???,??????["+a.toFixed(2)+"]??,??????????????",null,cancleDebtResult,null)}function cancleDebtResult(){var e=$("#debtDataGridList").datagrid("getSelections");var a=0;var d="";for(var c=0;c<e.length;c++){if(c==0){d+=""}else{if(c>0){d+=","}}d+=e[c].fineid}var b=base_path+"cir/fine/cancel.do";var f={};f.payway="0";f.parentids=d;$.post(b,f,function(g){if(g.status=="0"){openMessageDlg(g.message);reLoadFinDebtResult()}else{openMessageDlg(g.message)}},"json")}function onOpenFinDebtDlg(){}function onCloseDebtDlg(){if(VPAGEFIN!="reader"){var a=$("#debtDataGridList").datagrid("getRows");if(a.length==0){getFocusBarCode()}}}function finSearchHandle(){var a=getValue("rdrid");if(VPAGEFIN=="reader"){a=getValue("id")}if(a>0){$("#fin_search_dlg").dialog({onLoad:function(){_myPage.prototype.onLoadData(_fmtGridDataRows,initJson);setValue("finsearchrdrno",getValue("rdrno"));bindHistoryFinDataGridList(a)}}).dialog("open")}else{openMessageDlg("????????¤?????????????")}}function onOpenFinSearchDlg(){$("#finsearchrdrno").textbox("textbox").focus()}function searchFinLog(){var a=getValue("rdrid");if(VPAGEFIN=="reader"){a=getValue("id")}bindHistoryFinDataGridList(a)}function onFineRefund(){var a=$("#finLogDataGridList").datagrid("getSelected");if(a){if("1"==a.rectype){openConfirmDlg("???????????????????",null,onFineRefundResult,null)}else{openMessageDlg("???????????????????")}}}function onFineRefundResult(){var c=$("#finLogDataGridList").datagrid("getSelected");var a=base_path+"cir/fine/refund.do";var b={};b.parentids=c.id;$.post(a,b,function(d){if(d.status=="0"){searchFinLog()}else{openMessageDlg(d.message)}},"json")}function bindHistoryFinDataGridList(b){var a=base_path+"cir/fine/pageUnion.do";var c={};clearGridData("finLogDataGridList");c.rows=10;c.page=1;c.rdrid=b;if(getValue("finsearchpayway").length>0){c.payway=getValue("finsearchpayway")}if(getValue("finsearchfintype").length>0){c.type=getValue("finsearchfintype")}if(getValue("finsearchrectype").length>0){c.rectype=getValue("finsearchrectype")}if(getValue("finsearchbegdate").length>0&&getValue("finsearchenddate").length>0){c["limit[0].condition"]="findate";c["limit[0].typeHandler"]="2";c["limit[0].value"]=getValue("finsearchbegdate").replace(new RegExp("-","g"),"");c["limit[0].secondValue"]=getValue("finsearchenddate").replace(new RegExp("-","g"),"")}$("#finLogDataGridList").datagrid({url:a,queryParams:c,onLoadSuccess:function(d){},method:"post"})};
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de