Edit D:\rfid\apache-tomcat-8.5.32\webapps\libsystem\page\global\js\singleScreenEdit.js
var bibController=function(){};var selectEditBibId=0;var noEditBibGridByCode=false;bibController.prototype.search=function(b,a){if(!_setConfig.prototype.check()){return}if(isUpdateData){$.messager.confirm("??????","?????????????????,??????????????????",function(c){if(c){bibController.prototype.searchOk(b,a);isUpdateData=false}})}else{bibController.prototype.searchOk(b,a)}};bibController.prototype.clear=function(a){};bibController.prototype.searchOk=function(b,a){bibController.prototype.clear(1);selectEditBibId=0;$(".showBibGrid-tip").html("");var c=bibGlobalController.prototype.getSearchCondtion(b,a);if($("#keyword").length>0){$("#keyword").textbox("textbox").focus().select()}if(vPageNameFlag=="??????"){c={};_subscribeOrderPageObj.prototype.getParam(c,b,a);bibController.prototype.searchPost(c,b,a)}else{if(($("#keyword").length>0&&getValue("keyword").length==0)&&!a){$.messager.confirm("??????","?????????,??????????????",function(d){if(d){bibController.prototype.searchPost(c,b,a)}})}else{bibController.prototype.searchPost(c,b,a)}}};bibController.prototype.searchPost=function(f,d,c){var b=0;var e=$("#acqDataGridList").datagrid("getSelected");if(e){b=$("#acqDataGridList").datagrid("getRowIndex",e)}if(c){b=0}var a=base_path+"lib/biblios/page.do";if(vPageNameFlag=="??????"){a=base_path+"acq/collect/page.do"}bibController.prototype.searchPostBefore();$("#acqDataGridList").datagrid({url:a,queryParams:f,onLoadSuccess:function(g){if(g.status=="0"){bibController.prototype.searchPostAfter(g,b)}else{if(g.status=="9006"){openMessageDlg(g.message)}}},method:"post"})};bibController.prototype.searchPostBefore=function(){};bibController.prototype.searchPostAfter=function(b,a){updataGridBibFlag(b,"acqDataGridList");$("#tabsGrid").tabs("select",0);bibGlobalController.prototype.onLoadGridSuccess("acqDataGridList",b,a)};bibController.prototype.add=function(){if(isUpdateData){$.messager.confirm("??????","?????????????????,??????????????????",function(a){if(a){bibController.prototype.addOk();isUpdateData=false}})}else{bibController.prototype.addOk()}};bibController.prototype.addOk=function(){isUpdateData=true;_linkbuttonObj.prototype.status(false);selectEditBibId=0;if(!_setConfig.prototype.check()){return}var b=cataConfigData.template;if(b){bibController.prototype.addOkBefore();var a=base_path+"par/template/getTemplate.do?pk="+b;var c={};$.post(a,c,function(f){if(f.status=="0"){if(f.total>0){var d=JSON.parse(f.rows[0].paramjson);var e=d.rows;bibController.prototype.addOkAfter(e)}}else{openMessageDlg(f.message)}},"json")}};bibController.prototype.addOkBefore=function(){};bibController.prototype.addOkAfter=function(a){bibGlobalController.prototype.setDataToEditBibGrid("editBibGrid",a);bibController.prototype.addAttrCtrlNO()};bibController.prototype.addAttrCtrlNO=function(){var b=cataConfigData.editmodel;$(".showEditbib-tip").html("??"+addStyleHtmlNoSplit("?????")+"??");if(b=="marc"){var d=cataConfigData.ctrlno;if(d){var a=base_path+"par/ctrlno/get.do?pk="+d;var c={};$.post(a,c,function(e){if(e.status=="0"){if(e.total>0){$("#editBibGrid").datagrid("insertRow",{index:1,row:{field:"001",indicator:"",data:e.rows[0].currentctrlno}})}}else{openMessageDlg(e.message)}},"json")}}editIndex=undefined;$("#saveBibRecord").linkbutton({disabled:false})};bibController.prototype.initEditGridView=function(){if(!$("#editBibGrid").attr("class")){initEidtBiBModel(cataConfigData.editmodel)}};bibController.prototype.save=function(g){if(!_setConfig.prototype.check()){return}accept();var h={};var b=base_path+"lib/biblios/saveMarcRecord.do";if(vPageNameFlag=="??????"){b=base_path+"acq/collect/saveMarcRecord.do";h.catacode=getValue("catacode");if(!h.catacode){return openMessageDlg("??????????????")}}var e=$("#editBibGrid").datagrid("getRows");if(e.length>0){if(!g){if(cataConfigData.choose&&cataConfigData.choose=="1"){pinyinController.prototype.pyfun(e);return}}var f=0;for(var c=0;c<e.length;c++){var a=e[c].data;a=pinyinController.prototype.tagdata(a,g,e,f,c);h["marcRowList["+c+"].field"]=e[c].field;h["marcRowList["+c+"].indicator"]=e[c].indicator;h["marcRowList["+c+"].data"]=a}var d="add";if(selectEditBibId>0){h.id=selectEditBibId;d="update"}h.sysid=cataConfigData.sysid;if(cataConfigData.choose){h.choose=cataConfigData.choose}if(checkMarcRequiredfields()){if(cataConfigData.checkmarcfld&&cataConfigData.checkmarcfld=="1"){bibController.prototype.checkMarcRecord(b,h,d);return}bibController.prototype.savePosting(b,h,d)}}};function checkMarcRequiredfields(){if(!_jdMarcRequiredfields){return true}var g=_jdMarcRequiredfields.split(",");if(cataConfigData.editmodel&&cataConfigData.editmodel=="simple"){var f=$("#editBibGrid").datagrid("getRows");for(var a=0;a<g.length;a++){var d=g[a];var e=false;for(var c=0;c<f.length;c++){if(f[c].indicator==d&&f[c].data){e=true;break}}if(!e){var b=getSimpleFieldComBoxDataName(d);openMessageDlg("["+b.replace("**","")+"]???????????????");return false}}return true}else{return true}}bibController.prototype.checkMarcRecord=function(a,d,c){var b=base_path+"lib/biblios/checkMarcRecord.do";$.post(b,d,function(h){if(h.status=="0"){bibController.prototype.savePosting(a,d,c)}else{var g=h.rows;if(g.length>0){var f="";for(var e=0;e<g.length;e++){f+="<div class='div-book-record'>"+g[e]+"</div>"}$.messager.confirm("??????",f+"?????????????????????",function(i){if(i){bibController.prototype.savePosting(a,d,c)}});$(".messager-icon").hide()}else{openMessageDlg(h.message)}}},"json")};bibController.prototype.savePosting=function(a,c,b){$.post(a,c,function(d){if(d.status=="0"){openMessageDlg(d.message);isUpdateData=false;selectEditBibId=d.rows[0].id;bibController.prototype.saveAftersearch(b)}else{openMessageDlg(d.message)}},"json")};bibController.prototype.saveAftersearch=function(a){if(a=="delete"){bibController.prototype.setDataByGirdSelect(0)}else{if(a=="add"&&selectEditBibId>0){bibController.prototype.search("ID",selectEditBibId)}else{if(a=="update"&&selectEditBibId>0){bibController.prototype.setDataByGirdSelect(selectEditBibId);bibController.prototype.updateGridRowForBibList(selectEditBibId)}else{bibController.prototype.search()}}}};bibController.prototype.updateGridRowForBibList=function(d){var b=base_path+"lib/biblios/page.do";if(vPageNameFlag=="??????"){b=base_path+"acq/collect/page.do"}var c={};var a=0;c["limit["+a+"].condition"]="id";c["limit["+a+"].value"]=d;$.post(b,c,function(f){if(f.status=="0"){var e=f.rows[0];var g=$("#acqDataGridList").datagrid("getSelected");var h=$("#acqDataGridList").datagrid("getRowIndex",g);$("#acqDataGridList").datagrid("updateRow",{index:h,row:e})}else{openMessageDlg(f.message)}},"json")};bibController.prototype.trash=function(){if(!_setConfig.prototype.check()){return}var b=$("#acqDataGridList").datagrid("getSelected");if(!b){return openMessageDlg("????????????????,??????")}var a=$("#acqDataGridList").datagrid("getRowIndex",b);$.messager.confirm("??????","???????????????["+selectEditBibId+"]???????????",function(d){if(d){var c=base_path+"lib/biblios/delete.do";if(vPageNameFlag=="??????"){c=base_path+"acq/collect/delete.do"}var e={};e.id=selectEditBibId;$.post(c,e,function(f){if(f.status=="0"){$("#acqDataGridList").datagrid("deleteRow",a);bibController.prototype.saveAftersearch("delete");openMessageDlg(f.message)}else{openMessageDlg(f.message)}},"json")}})};bibController.prototype.accept=function(){if(!_setConfig.prototype.check()){return}if(selectEditBibId>0){var d=$("#acqDataGridList").datagrid("getSelected");var b=$("#acqDataGridList").datagrid("getRowIndex",d);if(!d.classno){return openMessageDlg("??????????????????????????,???????????????????????!")}var a=base_path+"lib/biblios/review.do";var c={};c.id=selectEditBibId;c.status="1";$.post(a,c,function(e){if(e.status=="0"){bibController.prototype.acceptAfter(b);openMessageDlg(e.message)}else{openMessageDlg(e.message)}},"json")}};bibController.prototype.acceptAfter=function(a){$(".showEditbib-tip").html("");$("#acqDataGridList").datagrid("deleteRow",a);bibController.prototype.clear();$(".showBibGrid-tip").html("??????????"+selectEditBibId+"??");bibGlobalController.prototype.loadEidtGridByPost(selectEditBibId,"centerDataGridDetail");selectEditBibId=0};bibController.prototype.paste=function(){if(!_setConfig.prototype.check()){return}bibController.prototype.pasteBefore()};bibController.prototype.pasteBefore=function(){$("#pasteMarcDlg").dialog("open")};bibController.prototype.pasteResult=function(){var f=getValue("nclmarc");if(!f){return openMessageDlg("???????????????")}selectEditBibId=0;f=JSON.stringify(f);var h=f.split("\\n");var b=[{field:"HEA",indicator:"",data:"nam a2200000 a 4500"}];var a=/^[0-9 ]+.?[0-9 ]*$/;for(var c=0;c<h.length;c++){var d=h[c];if(d.length==0){continue}var j=d.split("\\t");if(j.length>=2){var g=j[0];if(g&&g.length>2){if(a.test(g)){var e={};e.field=g.substr(0,3);e.indicator=g.substr(3,2);if(j[1]){e.data=j[1].replace(new RegExp(/\|/g,"gm"),"$")}b.push(e)}}}}bibGlobalController.prototype.setDataToEditBibGrid("editBibGrid",b);setValue("nclmarc","");$("#pasteMarcDlg").dialog("close")};bibController.prototype.set=function(){$("#pageconfig_setpara_dlg").dialog("open")};bibController.prototype.setDataByGirdSelect=function(a){selectEditBibId=a;if(a==0){$(".showEditbib-tip").html("");clearGridData("editBibGrid")}else{$(".showEditbib-tip").html("??????????"+selectEditBibId+"??");bibGlobalController.prototype.loadEidtGridByPost(selectEditBibId,"editBibGrid")}};bibController.prototype.updateEditGridLeftTip=function(a){$(".showEditbib-tip").html(a)};var bibGlobalController=function(){};bibGlobalController.prototype.onLoadGridSuccess=function(c,b,a){if(b.total>0&&b.total>a){$("#"+c).datagrid("selectRow",a)}else{if(b.total>0){$("#"+c).datagrid("selectRow",0)}}};bibGlobalController.prototype.loadEidtGridByPost=function(d,b){var a=base_path+"lib/biblios/getMarcRecordForEdit.do";if(vPageNameFlag=="??????"){a=base_path+"acq/collect/getMarcRecordForEdit.do"}var c={};c.id=d;$.post(a,c,function(f){if(f.status=="0"){var e=f.rows;bibGlobalController.prototype.setDataToEditBibGrid(b,e)}else{openMessageDlg(f.message)}},"json")};bibGlobalController.prototype.setDataToEditBibGrid=function(b,a){$("#"+b).datagrid({data:a,onLoadSuccess:function(c){$("#"+b).datagrid("resize")}})};bibGlobalController.prototype.loadGridData=function(b,j,h,g,c,k){if(b>0){var f=0;var l=$("#"+j+"DataGridList").datagrid("getSelected");if(l){f=$("#"+j+"DataGridList").datagrid("getRowIndex",l)}var a=base_path+"acq/"+j+"/list.do";if(h&&h==1){a=base_path+"per/"+j+"/list.do"}if(j=="hold"){a=base_path+"hld/holding/list.do"}var d={};d.rows=10;d.page=1;d.orderBy=" id desc ";var e=0;d["limit["+e+"].condition"]="bibid";d["limit["+e+"].value"]=b;e++;if($("#libcodeSelect").length>0){var i=getValue("libcodeSelect");if(i){d["limit["+e+"].condition"]="libcode";d["limit["+e+"].value"]=vLibcode;e++}else{d=getParamLibForNoLimitLib(d,e)}}$("#"+j+"DataGridList").datagrid({url:a,queryParams:d,onLoadSuccess:function(m){bibGlobalController.prototype.onLoadGridSuccess(j+"DataGridList",m,f);if(g&&k){bibGlobalController.prototype.updateTabsGridTitByIndex(g,c,k,m.total)}bibGlobalController.prototype.onLoadGridSuccessAfter(j,m)},method:"post"})}else{if(g&&k){bibGlobalController.prototype.updateTabsGridTitByIndex(g,c,k,0)}deleteGridData(""+j+"DataGridList")}};bibGlobalController.prototype.onLoadGridSuccessAfter=function(a,b){};bibGlobalController.prototype.updateTabsGridTitByIndex=function(d,b,e,a){var f=e+"???"+addStyleHtml(a);var c=$("#"+d).tabs("getTab",b);$("#"+d).tabs("update",{tab:c,options:{title:f}})};bibGlobalController.prototype.getSearchCondtion=function(e,d){var f={};f.rows=10;f.page=1;f.orderBy="";if(cataConfigData&&cataConfigData.datashowtype&&cataConfigData.datashowtype=="1"){f.datashowtype=vLibcode}if($("#bibindexSortFld").length>0){if(getValue("bibindexSortFld")=="ORDERNO"||getValue("bibindexSortFld")=="UNIFIEDNO"){f.orderBy=f.orderBy+" F_UNIFIEDNO("+getValue("bibindexSortFld")+") "+getValue("bibindexSortType")}else{f.orderBy=f.orderBy+" "+getValue("bibindexSortFld")+" "+getValue("bibindexSortType")+" "}}else{f.orderBy=f.orderBy+" id desc "}var c=0;f["limit["+c+"].condition"]="sysid";f["limit["+c+"].value"]=cataConfigData.sysid;c++;f.condition=getValue("bibindex");f.value=getValue("keyword");if($("#searchhandler").length>0){f.typeHandler=getValue("searchhandler")}var g=$("#libcodeSelect");if(g.length>0&&getValue("libcodeSelect").length>0){f["limit["+c+"].condition"]="libcode";f["limit["+c+"].value"]=getValue("libcodeSelect");c++}var b=$("#orderbatchno");if(b.length>0&&getValue("orderbatchno").length>0){if(vType=="1"){f["limit["+c+"].condition"]="PERBATCHNO"}else{f["limit["+c+"].condition"]="ORDBATCHNO"}f["limit["+c+"].value"]=getValue("orderbatchno");c++}var a=$("#checkbatchno");if(a.length>0&&getValue("checkbatchno").length>0){if(vType=="1"){f["limit["+c+"].condition"]="BIND.BATCHNO";f["limit["+c+"].value"]=getValue("checkbatchno");c++}}if($("#titlekey").length>0){if(getValue("titlekey").length>0){f["limit["+c+"].condition"]=getValue("bibindextitle");f["limit["+c+"].typeHandler"]=getValue("titlehandler");f["limit["+c+"].value"]=getValue("titlekey");c++}if(getValue("authorkey").length>0){f["limit["+c+"].condition"]=getValue("bibindexauthor");f["limit["+c+"].typeHandler"]=getValue("authorhandler");f["limit["+c+"].value"]=getValue("authorkey");c++}}if(e){f.condition=e;f.value=d}return f};bibGlobalController.prototype.updateLayOutTitle=function(c,b,d){var a=$("#"+c).layout("panel",b);a.panel("setTitle",d)};bibGlobalController.prototype.updateDataGridTitle=function(a,b){$("#"+a).datagrid("getPanel").panel("setTitle",b)};function copyFLdToLeftScreen(a){bibGlobalController.prototype.copy(a)}bibGlobalController.prototype.copy=function(d){if(d){rows=d}if(rows.length>0){for(var c=0;c<rows.length;c++){if(rows[c].field=="HEA"){continue}if(rows[c].field!="001"){var b=cataConfigData.delfld;if(b){if(b.indexOf(rows[c].field)<0){$("#editBibGrid").datagrid("appendRow",rows[c])}}else{$("#editBibGrid").datagrid("appendRow",rows[c])}}}var a=$("#editBibGrid").datagrid("getRows");$("#editBibGrid").datagrid("selectRow",a.length-1);$("#editBibGrid").datagrid("scrollTo",a.length-1)}};var holdGlobalTools=function(){};holdGlobalTools.prototype.holdFilter=function(h,g,c,i){var b=selectEditBibId;if(b>0){var f=0;var j=$("#holdDataGridList").datagrid("getSelected");if(j){f=$("#holdDataGridList").datagrid("getRowIndex",j)}var a=base_path+"hld/holding/page.do";var d={};d.rows=10;d.page=1;d.orderBy=" id desc ";var e=0;d["limit["+e+"].condition"]="bibid";d["limit["+e+"].value"]=b;e++;if(h==0){d["limit["+e+"].condition"]="libcode";d["limit["+e+"].value"]=vLibcode;e++}else{d["limit["+e+"].condition"]="libcode";d["limit["+e+"].typeHandler"]="3";d["limit["+e+"].value"]=getLibLimitForNoLimitLib()}$("#holdDataGridList").datagrid({url:a,queryParams:d,onLoadSuccess:function(k){if(g&&i){bibGlobalController.prototype.updateTabsGridTitByIndex(g,c,i,k.total)}if(k.total>0&&k.total>f){$("#holdDataGridList").datagrid("selectRow",f)}else{if(k.total>0){$("#holdDataGridList").datagrid("selectRow",0)}}},method:"post"})}};function getCallnoByClassnoForCallno(){var h=$("#acqDataGridList").datagrid("getSelected");var f=$("#tabsGrid").tabs("getSelected");var c=$("#tabsGrid").tabs("getTabIndex",f);var e=$("#editBibGrid").datagrid("getRows");if(c==1&&$("#centerDataGridList").length>0){h=$("#centerDataGridList").datagrid("getSelected");e=$("#centerDataGridDetail").datagrid("getRows")}var a=h.callno;var d=[];d.push(h.id);var g={};g.ids=d.join(",");var b=base_path+"lib/biblios/selectCallnoByIds.do";$.post(b,g,function(l){if(l.status=="0"){a=l.rows[0].callno;var k=h.classno;if(cataConfigData&&cataConfigData.getCallnoForFld&&cataConfigData.getCallnoForFld=="905"){var q=false;for(var m=0;m<e.length;m++){var p=e[m];if(p.field=="905"){var n=p.data;var r=getDataDirect(n,"a");var j=getDataDirect(n,"d");if(r==vLibcode&&j&&a){var o=a.split(";");q=true;for(var m=0;m<o.length;m++){if(o[m].split("/")[0]==j.split("/")[0]){return false}}return o[o.length-1]}}}if(!q){if(a&&k){var o=a.split(";");for(var m=0;m<o.length;m++){if(o[m].split("/")[0]==k.split("/")[0]){return false}}return o[o.length-1]}}}else{if(a&&k){var o=a.split(";");for(var m=0;m<o.length;m++){if(o[m].split("/")[0]==k.split("/")[0]){return false}}return o[o.length-1]}}return a}},"json")}function getCataConfigData(){return cataConfigData};
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de