Edit D:\rfid\libsystem\page\catalogue\js\com_cataholdings-old.js
var initflag;var initJson;var auto_callno;$(function(){initflag="page_,hold_";initJson=[{key:"sysid",condition:"type",value:vType},{key:"ctrlno",condition:"libcode",value:vLibcode},{key:"z3950",condition:"libcode",value:vLibcode},{key:"bookseller",condition:"libcode",value:vLibcode},{key:"location",condition:"libcode",value:vLibcode},{key:"doctype",condition:"libcode",value:vLibcode},{key:"libcode",condition:"code",value:vLibcode}];$("#holdDataGridList").datagrid({onDblClickRow:updateHoldings});$(".order_batchno").hide();$(".check_batchno").hide();$(".bind_batchno").hide();$("#acqDataGridList").datagrid("showColumn","status")});function checkBarcodeRepeat(){var a=getValue("hold_barcode");var c=getValue("hold_id");if(c.length==0||c=="0"){if(a>=0){var b=base_path+"hld/holding/getCheckHoldBarcode.do";var d={};d.barcode=a;$.post(b,d,function(e){if(e.status=="0"){if(e.total>0){openMessageDlg("?????????,????????")}}else{openMessageDlg(e.message)}},"json")}}}function onCloseMessageFun(){if($(".global-message-body").html()=="?????????,????????"){$("#hold_barcode").textbox({prompt:"?????"+getValue("hold_barcode")+"]?????,????????"});setValue("hold_barcode","");$("#hold_barcode").textbox("textbox").focus();$("#hold_barcode").textbox("textbox").blur(function(a){checkBarcodeRepeat()})}}function closeHoldDlg(){setValue("hold_barcode","");$("#hold_dlg").dialog("close")}function onSelectTabsGrid(b,a){if(a==1){$("#deleteHoldRecord").show()}else{$("#deleteHoldRecord").hide()}}function updateHoldings(b,a){onHandlerHoldingsRecord(a)}function onHandlerHoldingsRecord(c){var a="??????";$("#hold_barcode").textbox({prompt:"?????????"});$("#hold_barcode").textbox("textbox").blur(function(f){checkBarcodeRepeat()});cleanJsonData("hold_record");if(!c){var d=$("#acqDataGridList").datagrid("getSelected");if(!d){return openMessageDlg("????????????????,?????????")}if(!d.classno){return openMessageDlg("???????????????????????????,???????????????????????!")}getCallnoToCheckCallno(d);var b=getCurDateYMD();setValue("hold_id","");setValue("hold_senddate",b);setHoldTextByBibData(d,"hold_");$(".hold_tip").html("???:????????????????????????????"+d.id+"??");bibDataToDlgData(d,"hold_",a)}else{$(".hold_tip").html("");gridDataToDlgData(c,"hold_",a)}}function setHoldTextByBibData(k,g){try{if(k.price){var c=/(\d{1,3})+(?:\.\d+)?/g;var h=k.price.match(c);setValue(""+g+"price",h[0]);setValue(""+g+"totalprice",h[0])}if(!k.page){setValue(g+"volumenum",1)}else{var c=/(\d{1,3})+(?:\.\d+)?/g;var h=k.page.match(c);var b=/[\u4e00-\u9fa5]/g;var f=k.page.match(b);var j=0;for(var a=0;a<h.length;a++){if(f){if(f[a]){if("?????".indexOf(f[a])>-1){j+=parseInt(h[a])}}}}if(j>0){setValue(g+"volumenum",j)}else{setValue(g+"volumenum",1)}}}catch(d){}}function saveHoldingsRecord(){var a=getJsonData("hold_","record");if(!getValue("page_sysid")){openMessageDlg("????????????????");return}if(!a){openMessageDlg("??????");return}if(!a.barcode){openMessageDlg("????????????");return}if(!a.price){openMessageDlg("???????????");return}if(!a.doctype){openMessageDlg("??????????????");return}if(!a.location){openMessageDlg("??????????????");return}var e=$("#holdDataGridList").datagrid("getSelected");var d;if(e){d=$("#holdDataGridList").datagrid("getRowIndex",e)}a.sysid=getValue("page_sysid");if(auto_callno){a.auto_callno=auto_callno}var c=getValue("hold_id");var b=base_path+"hld/holding/saveHolding.do";$.post(b,a,function(f){if(f.status=="0"){holdDataGridListByBibId(f.rows[0].bibid,"hold",d);openMessageDlg(f.message,5000);$("#hold_dlg").dialog("close");$("#tabsGrid").tabs("select",1)}else{openMessageDlg(f.message)}},"json")}function onOpenholdDlg(){$("#hold_barcode").textbox("textbox").focus()}function setCheckCallNo(){var b={};var a=getValue("hold_callno");if(a.length>0&&a.substr(a.length-1,1)=="/"){b=$("#acqDataGridList").datagrid("getSelected");a=a.substr(0,a.length-1);b.classno=a;getCallnoToCheckCallno(b)}else{openMessageDlg("??????????/]?????????????????1/")}}function getCallnoToCheckCallno(a){var b=base_path+"cat/titlenum/getCurCallno.do";var c={};c.classno=a.classno;c.bibid=!a.bibid?a.id:a.bibid;$.post(b,c,function(e){if(e.status=="0"){if(e.total==0){setValue("hold_callno",a.classno+"/1")}else{var d=e.rows[0];auto_callno=d.auto_callno;if(d.classno){setValue("hold_callno",d.classno+"/"+d.titnum)}}}else{openMessageDlg(e.message)}},"json")}function gridDataToDlgData(c,a,d){var b=$('[item-type="'+a+'record"]');b.each(function(e,g){var f=g.id.replace(a,"");if(c[f]){setValue(g.id,c[f])}});$("#"+a+"dlg").dialog("setTitle",d);$("#"+a+"dlg").dialog("open")}function bibDataToDlgData(d,b,c){setValue(""+b+"id","0");if(!d){return openMessageDlg("?????????????,?????????")}var a=$('[item-type="page_paramjson"]');setValue(""+b+"libcode",vLibcode);setValue(""+b+"bibid",d.id);a.each(function(f,g){var e=getValue(g.id);var i=""+b+""+g.id.replace("page_","");var h=$("#"+i);if(h){if(g.id=="page_binding"){setValue("hold_bindtype",e)}else{setValue(i,e)}}});$("#"+b+"dlg").dialog("setTitle",c);$("#"+b+"dlg").dialog("open")}function onSelectAcqDataGridList(b,a){if(!isUpdateByLibcode(a.libcode)){setBntIsShowByLibcode(true)}else{setBntIsShowByLibcode(false);if(a.status=="1"){$("#saveBibRecord").linkbutton({disabled:true});$("#deleteBibRecord").linkbutton({disabled:true});$("#appendRecord").linkbutton({disabled:true});$("#insertRow").linkbutton({disabled:true});$("#removeit").linkbutton({disabled:true});$("#editBibGrid").datagrid({title:"??????????????????"})}else{$("#saveBibRecord").linkbutton({disabled:false});$("#deleteBibRecord").linkbutton({disabled:false});$("#appendRecord").linkbutton({disabled:false});$("#insertRow").linkbutton({disabled:false});$("#removeit").linkbutton({disabled:false});$("#editBibGrid").datagrid({title:"????????????"})}}setValue("bibStatus",a.status);bindAcqDataGridDetailById(a.id);getInitGridDataByBibId(a.id)}function getInitGridDataByBibId(a){holdDataGridListByBibId(a,"hold")}function holdDataGridListByBibId(b,d,a){if(b>0){var c=base_path+"hld/holding/page.do";var e={};e.bibid=b;e.rows=10;e.page=1;$("#"+d+"DataGridList").datagrid({url:c,queryParams:e,onLoadSuccess:function(f){if(a>-1){$("#holdDataGridList").datagrid("selectRow",a);$("#holdDataGridList").datagrid("scrollTo",a)}},method:"post"})}else{deleteGridData(""+d+"DataGridList")}}function deleteHoldRecord(){var a=$("#holdDataGridList").datagrid("getSelected");if(!a){return openMessageDlg("????????????????,??????")}openConfirmDlg("???????????????["+a.id+"]???????????",null,deleteHoldRecordResult,null)}function deleteHoldRecordResult(){var c=$("#holdDataGridList").datagrid("getSelected");var b={};b.pk=c.id;var a=base_path+"hld/holding/delete.do";$.post(a,b,function(d){if(d.status=="0"){openMessageDlg(d.message,5000);holdDataGridListByBibId(c.bibid,"hold")}else{openMessageDlg(d.message)}},"json")}function searchCenterDataGridList(){}function clearComBibGridData(){selectEditBibId=0;setValue("bibStatus","0");$("#saveBibRecord").linkbutton({disabled:false});$("#deleteBibRecord").linkbutton({disabled:false});$("#appendRecord").linkbutton({disabled:false});$("#insertRow").linkbutton({disabled:false});$("#removeit").linkbutton({disabled:false});clearGridData("editBibGrid,acqDataGridList,holdDataGridList");$("#tabsGrid").tabs("select",0)}function setPerPara(){$("#pageconfig_setpara_dlg").dialog("open")};
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de