Edit D:\rfid\apache-tomcat-8.5.32\webapps\libsystem\page\collection\js\holdprocess.js
var jsonFormatDesign={code:"I_HLDIMPORTDATA"};var holdId=0;var holdrow=undefined;var datafilename;var bibid=0;var _curBarcode;var _configid=0;var _configparamjson;$(function(){$(".show-result-msg").hide();setHandlerField();setInitPageElementData();getPageConfig("page_type",callSetParaResult);$("#barcode").textbox("textbox").focus();$(".easyui-panel-resize").panel("resize");enterEvent("barcode",onHandlerConfirm);enterEvent("newbarcode",onHandlerRecord);$("#holdDataGridList").datagrid({rowStyler:rowHldStyler});getEnumByHldStatus()});function getEnumByHldStatus(){var b="";var a=base_path+"par/common/getInitData.do";var c={};c.key="hldstatus";$.post(a,c,function(g){var f=g.rows;var d=[];for(var e in f){if("0,1,3,4,5,6,7,8,a,z".indexOf(f[e].code)>-1){d.push(f[e])}}$("#status").combobox({data:d,valueField:"code",textField:"name"});$("#batch_status").combobox({data:d,valueField:"code",textField:"name"});setValue("status","5");$("#batch_status").combobox({data:d,valueField:"code",textField:"name"});setValue("batch_status","5")},"json");return b}function rowHldStyler(a,b){if(vType!="2"){if(b.barcode==_curBarcode){return"color:red;"}}else{if(b.barcode==_curBarcode){return"color:red;"}}}function setInitPageElementData(){setValue("checkdate",getCurDateYMD());var a=[{key:"libcode",condition:"code",value:vLibcode},{key:"hldstatus"},{code:"docsources",key:"docsources"},{code:"curlocation,location",key:"location",condition:"libcode",value:vLibcode},{key:"doctype",condition:"libcode",value:vLibcode}];_myPage.prototype.initData(a);$("#curlocation").combobox({onChange:function(c,b){if(c){setDefaultDoctype(c)}}})}_myPage.prototype.onLoadSuccess=function(a,b){_fmtGridDataRows=a;_myPage.prototype.getOperatorParam()};_myPage.prototype.initComboxByOperatorParm=function(c){var f=_fmtGridDataRows.rows[0].libcode;var a=getValue("page_nextlocation");var g=_fmtGridDataRows.rows[0].location;if(a&&a!="1"){var h;for(var d=0;d<f.length;d++){if(f[d].code==vLibcode){h=f[d].name;break}}g=[];var j=_fmtGridDataRows.rows[0].location;for(var d=0;d<j.length;d++){if(j[d].group==h){g.push(j[d])}}}if(c.showacqloccode){var e=[];for(var d=0;d<g.length;d++){var k=","+g[d].code+",";c.showacqloccode=","+c.showacqloccode;if(c.showacqloccode.indexOf(k)>-1){e.push(g[d])}}g=e}var b={};b.code="";b.name="??????????";g.splice(0,0,b);$("#location").combobox("loadData",g);$("#curlocation").combobox("loadData",g)};function onHldBacthHandler(){var b=$("#curlocation").combobox("getData");$("#batch_curlocation").combobox({data:b,valueField:"code",textField:"name",groupField:"group",});$("#batch_location").combobox({data:b,valueField:"code",textField:"name",groupField:"group"});var a=$("#doctype").combobox("getData");$("#batch_doctype").combobox({data:a,valueField:"code",textField:"name",groupField:"group"});onResetAcceptFormatDesignPage();$("#hldBatchDlg").window("open")}function setDefaultDoctype(c){var a=base_path+"par/location/get.do";var b={};b.pk=c;$.post(a,b,function(d){if(d.total>0){var e=d.rows[0];if(e.defdoctype){setValue("doctype",e.defdoctype)}else{setValue("doctype","")}}},"json")}function onStartHldBatch(a){$(".error-msg-result").html("");if(datafilename){if(!a){$.messager.progress({title:"????????",msg:"?????????,?????..."})}var c=getJsonData("batch_","record");c=getParamByType(c);if(a){c=a}else{errorcount=0;handlecount=0;successcount=0;c.opertype=vType;c.filename=datafilename.filelist[0];c.page=1;c.rows=500}var b=base_path+"hld/holding/handleHoldingByFile.do";$.post(b,c,function(d){$.messager.progress("close");if(d.status=="0"){var e=d.rows[0];if(e){errorfile=e.errorfile;errorcount+=e.errorcount;successcount+=e.successcount;handlecount+=parseInt(e.handlecount);if(e.nextfile){$.messager.progress({title:"????????",msg:"?????"+handlecount+"]?????,??????????? ..."});c.errorfile=e.errorfile;c.filename=e.nextfile;onStartHldBatch(c)}else{saveHldConfig(successcount);$(".handlecount").html("?????"+handlecount+"]?????");$(".successcount").html("???["+successcount+"]??");$(".errorcount").html("???["+errorcount+"]??");$("#checkerrorfile").show();$("#acceptFileResultDlg").dialog("open")}}}else{openMessageDlg(d.message)}},"json").error(function(){$(".error-msg-result").html("?????????????,???????????!");$(".handlecount").html("?????"+handlecount+"]?????");$(".successcount").html("???["+successcount+"]??");$(".errorcount").html("???["+errorcount+"]??");$("#checkerrorfile").show();$("#acceptFileResultDlg").dialog("open");$.messager.progress("close")})}else{openMessageDlg("?????????????????")}}function getParamByType(a){if(vType=="0"){a.status="1";a.checkdate=""}else{if(vType=="1"){a.status="";a.checkdate=""}else{if(vType=="2"){a={}}else{if(vType=="3"){a.status=a.status}else{if(vType=="4"){a.status=""}}}}}return a}function onPerviewData(c){$("#showPerviewOrgMarcData").html("");if(datafilename){var a=getJsonData("batch_","record");a.filename=datafilename.filelist[0];var b=base_path+"com/webuploader/perviewTextData.do";$.post(b,a,function(d){if(d.status=="0"){setDataToPageShowPerview(d)}else{if(d.status=="9003"){openMessageDlg(d.message)}else{openMessageDlg(d.message)}}},"json")}else{openMessageDlg("?????????????????")}}function setDataToPageShowPerview(d){var c=d.rows;if(c.length>0){var b="";for(var a=0;a<c.length;a++){b+="<div class='div-book-record'><strong>"+(a+1)+"</strong>,"+c[a]+"</div>"}$("#showPerviewOrgMarcData").html(b)}}function onHandlerConfirm(){holdId=0;if(vType=="2"){getHoldByBarcode()}else{onHandlerRecord()}}function onHandlerRecord(){if(getValue("barcode").length==0){return openMessageDlg("???????????")}if(vType=="2"){if(getValue("newbarcode").length==0){return openMessageDlg("???????????")}onHandlerMian()}else{getHoldByBarcode()}}function getHoldByBarcode(){if(getValue("barcode").length==0){return openMessageDlg("???????????")}var a=getValue("barcode");if(a.length>=0){var b=base_path+"hld/holding/getCheckHoldBarcode.do";var c={};c.barcode=a;$.post(b,c,function(e){if(e.status=="0"){if(e.total>0){holdId=e.rows[0].id;holdrow=e.rows[0];bibid=e.rows[0].bibid;_curBarcode=e.rows[0].barcode;bindDataGridListByBibId(e.rows[0].bibid,"hold");bindDataToBiBByBibId(e.rows[0].bibid);var f=["???","???","???","???/????"];if(holdrow.status=="2"||holdrow.status=="3"){return openMessageDlg("??????["+f[parseInt(holdrow.status)]+"]????,????????????")}if(vType=="3"){if(holdrow.status!="0"&&holdrow.status!="1"){return openMessageDlg("???????????????????,????????????")}}var d=getValue("page_confirm");if(d=="1"){$.messager.confirm("??????","?????????????????",function(g){if(g){onHandlerMian()}})}else{if(vType!="2"){onHandlerMian()}}if(vType=="2"){$("#newbarcode").textbox("setValue","");$("#newbarcode").textbox("enable");$("#barcode").textbox("disable");$("#newbarcode").textbox().next("span").find("input").focus().keydown(function(g){if(g.keyCode==13){onHandlerRecord()}})}}else{return openMessageDlg("??????????????")}}else{openMessageDlg(e.message)}},"json")}}function bindDataToBiBByBibId(c){var a=base_path+"lib/biblios/get.do";var b={};b.id=c;$.post(a,b,function(d){if(d.status=="0"){setBibHtmlShow(d)}else{$(".bib-html-data").html(d.message)}},"json")}function setBibHtmlShow(d){var e=d.rows[0];var c="";var b=[{code:"title",name:"?? ??",color:"red"},{code:"author",name:"?? ??"},{code:"isbn",name:" ISBN ",color:"red"},{code:"price",name:"?? ??"},{code:"classno",name:"?????"},{code:"publish",name:"?????"},{code:"publishdate",name:"?????"}];for(var a=0;a<b.length;a++){c+="<div class='div-book-record'>??"+b[a].name+"?? ";if(b[a].color){c+="<lable style='color:"+b[a].color+"'>"}c+=(e[b[a].code]==null?"":e[b[a].code]);if(b[a].color){c+="</lable>"}c+="</div>"}$(".bib-html-data").html(c)}function bindDataGridListByBibId(a,c){if(a>0){var b=base_path+"hld/holding/page.do";var d={};d.bibid=a;d.rows=10;d.page=1;$("#"+c+"DataGridList").datagrid({url:b,queryParams:d,onLoadSuccess:function(e){if(e.total>0){$("#"+c+"DataGridList").datagrid("getPanel").panel("setTitle","?????????(<lable style='color:red;font-weight:900;'>"+e.total+"</lable>)")}},method:"post"})}else{deleteGridData(""+c+"DataGridList")}}function onHandlerMian(){if(holdId>0){var a={};if(vType=="0"){a.status="1";a=getLocalAndDocType(a)}else{if(vType=="1"){a=getLocalAndDocType(a);if(getValue("shelfno").length>0){a.shelfno=getValue("shelfno")}if(!a.curlocation&&!a.doctype&&!a.location){return openMessageDlg("???????????????????????????????")}}else{if(vType=="2"){a.barcode=getValue("newbarcode")}else{if(vType=="3"){a=getLocalAndDocType(a);a.status=getValue("status");a.hldnote=getValue("hldnote")}else{if(vType=="4"){a=getLocalAndDocType(a);a.checkdate=getValue("checkdate")}}}}}a.id=holdId;a.handletype=vType;var b=base_path+"hld/holding/handleHolding.do";$.post(b,a,function(c){if(c.status=="0"){showHoldHandlerResult(c,a);saveHldConfig(1)}else{openMessageDlg(c.message)}},"json")}else{openMessageDlg("????????????")}}function showHoldHandlerResult(f,b){var e="";var d="";var g=f.rows[0];var a=" ";var c="????? ??<lable style='color:red;font-weight:900;'>"+_curBarcode+"</lable>??";if(vType=="0"){e="??????";d=c+a+e+"???,?????????????<lable style='color:red;font-weight:900;'>???</lable>?????"+getHoldOtherInfo(g,b)}else{if(vType=="1"){e="??????";d=c+a+e+"???"+getHoldOtherInfo(g,b)}else{if(vType=="2"){setValue("barcode","");$("#newbarcode").textbox("disable");$("#barcode").textbox("enable");e="??????";d=e+"???,???????<lable style='color:green;font-weight:900;'>"+holdrow.barcode+"</lable>??????????????<lable style='color:red;font-weight:900;'>"+g.barcode+"</lable>??"}else{if(vType=="3"){e="??????????";d=c+a+e+"???,?????????????<lable style='color:red;font-weight:900;'>"+getStautsNameByCode(b.status)+"</lable>??"+getHoldOtherInfo(g,b)}else{if(vType=="4"){e="??????";d=c+a+e+"???,??????"+fmtStringToDate(b.checkdate)+getHoldOtherInfo(g,b)}}}}}if(vType!="2"){$("#barcode").textbox("textbox").focus().select()}else{$("#barcode").textbox().next("span").find("input").focus().keydown(function(h){if(h.keyCode==13){onHandlerConfirm()}})}$(".hold-result-data").prepend("<div class='div-book-record'>"+d+"</div>");bindDataGridListByBibId(bibid,"hold")}function clearHldData(){if(_configid>0){saveHldConfig(0,"clear")}}function saveHldConfig(d,f){var b={};b.type="set_hldconfgi_data";var c=base_path+"lib/config/insert.do";if(_configid>0){c=base_path+"lib/config/update.do";b.id=_configid}var a=_configparamjson;var e={};e.data=0;e.date=getCurDateYMD();if(a[vType]){e=a[vType]}if(!e.date){e.date=getCurDateYMD()}e.data+=d;if(f){e.data=0;e.date=""}a[vType]=e;b.paramjson=JSON.stringify(a);$.post(c,b,function(g){if(g.status=="0"){getShowResultData()}},"json")}function getShowResultData(){var b="";if(vType=="0"){b="??????"}else{if(vType=="1"){b="??????"}else{if(vType=="2"){b="??????"}else{if(vType=="3"){b="??????????"}else{if(vType=="4"){b="??????"}}}}}var c={};c.type="set_hldconfgi_data";var a=base_path+"lib/config/page.do";$.post(a,c,function(e){_configparamjson={};if(e.status=="0"&&e.rows[0]){_configparamjson=JSON.parse(e.rows[0].paramjson);_configid=e.rows[0].id;var d=_configparamjson[vType];if(d){$(".show-result-msg").show();$(".show-result").html("??"+b+"<strong style='color:red;'>??"+d.data+"??</strong>??,??????<strong style='color:red;'>??"+d.date+"??</strong>")}}},"json")}function getStautsNameByCode(a){return onGridShowNameBycode("batch_status",a)}function getHoldOtherInfo(c,a){var b="";if(a.location){b+=",??????????<lable style='color:green;font-weight:900;'>"+getCurLocationNameByCode(holdrow.location)+"</lable>???????<lable style='color:red;font-weight:900;'>"+getCurLocationNameByCode(c.location)+"</lable>??"}if(a.curlocation){b+=",??????????<lable style='color:green;font-weight:900;'>"+getCurLocationNameByCode(holdrow.curlocation)+"</lable>???????<lable style='color:red;font-weight:900;'>"+getCurLocationNameByCode(c.curlocation)+"</lable>??"}if(a.doctype){b+=",??????????<lable style='color:green;font-weight:900;'>"+getDocTypeNameByCode(holdrow.doctype)+"</lable>???????<lable style='color:red;font-weight:900;'>"+getDocTypeNameByCode(c.doctype)+"</lable>??"}if(a.shelfno){b+=",????????<lable style='color:green;font-weight:900;'>"+holdrow.shelfno+"</lable>???????<lable style='color:red;font-weight:900;'>"+c.shelfno+"</lable>??"}return b}function getCurLocationNameByCode(a){return onGridShowNameBycode("curlocation",a)}function getDocTypeNameByCode(a){return onGridShowNameBycode("doctype",a)}function getLocalAndDocType(a){if(getValue("curlocation").length>0){a.curlocation=getValue("curlocation")}if(getValue("location").length>0){a.location=getValue("location")}if(getValue("doctype").length>0){a.doctype=getValue("doctype")}return a}function setHandlerField(){if(vType=="0"){showLocDoc(true)}else{if(vType=="1"){showLocDoc(true)}else{if(vType=="2"){showLocDoc(false);$(".newbarcode").show();$("#newbarcode").textbox("disable")}else{if(vType=="3"){showLocDoc(false);$(".status").show();$(".location").show()}else{if(vType=="4"){showLocDoc(true);$(".checkdate").show()}}}}}var a=$(window).height();var b=a-160;$(".datagrid-div").css("height",b+"px");$("#hldProLayOut").layout("resize");getLayWHByResize("hldProLayOut");getShowResultData()}function ikownDlg(){$("#global-message-dlg").dialog("close");$("#barcode").textbox("textbox").focus().select()}function showLocDoc(a){if(a){$(".location").show();$(".doctype").show()}else{$(".location").hide();$(".doctype").hide()}$(".status").hide();$(".checkdate").hide();$(".newbarcode").hide()}function callSetParaResult(c){if(c.status=="0"){var b=c.rows[0];var a=JSON.parse(b.paramjson);setJsonData("page_",a)}}function setPara(){$("#pageconfig_setpara_dlg").window("open")}function onShowHoldStatusName(a,b){return onGridShowNameBycode("hldstatus",a)}function onResetAcceptFormatDesignPage(){$(".acceptTextTip").show();if(vType=="2"){$(".acceptTextTip").html("????????????????xt???,?????????????????,?????????????????:0001 0002")}else{$(".acceptTextTip").html("????????????????xt???,??????????")}$("#showPerviewOrgMarcData").html("")}function uploadSuccessHandler(a,b){if(b.status==0){datafilename=b.rows[0]}else{openMessageDlg(b.message)}}function onResizeByNorth(b,a){if(a!=66){setLayWHByResize("hldProLayOut","north",b,a)}};
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de