Edit D:\rfid\libsystem\page\catalogue\js\bib_import_data.js
var jsonFormatDesign={code:"I_BIBIMPORTDATA"+vBibType,title:"????????????",gridtitle:"???????????????",othertitle:"???????????",perviewtitle:"????????????",width:"800",height:"600",top:80,left:180};var fieldComBoxData=[{code:"id",name:"????????"},{code:"libcode",name:"????????",param:[{key:"libcode",condition:"code",value:vLibcode}]},{code:"curlibcode",name:"???????????",param:[{key:"libcode",condition:"code",value:vLibcode}]},{code:"barcode",name:"?????"},{code:"assetno",name:"?????"},{code:"status",name:"???????",param:[{code:"status",key:"hldstatus"}]},{code:"callno",name:"?????"},{code:"location",name:"??????????",param:[{key:"location",condition:"libcode",value:vLibcode}]},{code:"curlocation",name:"?????????",param:[{key:"location",condition:"libcode",value:vLibcode}]},{code:"doctype",name:"??????",param:[{key:"doctype",condition:"libcode",value:vLibcode}]},{code:"senddate",name:"??????"},{code:"bindtype",name:"??????",param:[{key:"bindtype"}]},{code:"docsources",name:"??????",param:[{key:"docsources"}]},{code:"mediatype",name:"??????",param:[{key:"mediatype"}]},{code:"price",name:"???????"},{code:"totalprice",name:"???????"},{code:"volumenum",name:"???"},{code:"volumeinfo",name:"??????"},{code:"rdrid",name:"????D"},{code:"loandate",name:"??????"},{code:"loantime",name:"??????"},{code:"returndate",name:"??????"},{code:"returndate",name:"??????"},{code:"otherno",name:"??????"},{code:"sumloannum",name:"??????"},{code:"sumrenewnum",name:"???????"},{code:"sumloandays",name:"??????"}];var indexComBoxData=[];var jsonGridColumns=[{field:"field",title:"??????",width:"25%",formatter:onShowJosnComBoxData,editor:{type:"combobox",options:{valueField:"code",textField:"name",panelHeight:"200",required:true,data:fieldComBoxData,onChange:function(b,a){if(b!=undefined&&b!=a){setOtherFormatDesignBox(b)}}}}},{field:"code",title:"??????",width:"25%",editor:{type:"textbox"}},{field:"defvalue",title:"?????",width:"25%",editor:{type:"textbox",options:{}}},{field:"flag",title:"???",hidden:true,editor:{type:"textbox"}},{field:"map",title:"??????",width:"25%"}];var curPerviewIndex=1;var maxPerviewNum=undefined;var stopFlag=0;$(function(){initBibImportDataPageElement();acceptShowData(true);acceptShowData(true,1);perviewShowData(true);$("#checkhold").on("click",function(a){if($("#checkhold").get(0).checked){acceptShowData(false)}else{acceptShowData(true)}});$("#acqtype").combobox({onChange:function(b,a){if(b=="order"||b=="check"){acceptShowData(false,1)}else{acceptShowData(true,1)}}});bindAcqFormatDesignCombox(vBibType)});function bindAcqFormatDesignCombox(c){var b=getValue("acqkeycode");var a=base_path+"lib/design/list.do";var d={};d["limit[0].condition"]="code";d["limit[0].value"]="I_BIBIMPORTACQDATA"+c;d.rows=100;d.page=1;$.post(a,d,function(f){if(f.status=="0"){var e="auto";if(f.rows.length>10){e="200px"}$("#acqkeycode").combobox({data:f.rows,valueField:"keycode",textField:"name",panelHeight:e,onChange:function(h,g){if(h!=undefined&&h!=g&&h.length>0){bindAcqAcceptFormatDesignDataByKeyCode(h)}}});setValue("acqkeycode",b)}else{openMessageDlg(f.message)}},"json")}function bindAcqAcceptFormatDesignDataByKeyCode(a){var b=base_path+"lib/design/get.do";var c={};c.pk=a;$.post(b,c,function(d){if(d.status=="0"){var e=d.rows[0];setAcqDataToPageElement(e)}else{openMessageDlg(d.message)}},"json")}function setAcqDataToPageElement(e){var g=[{field:"lib_acq_check.libcode",code:"libcode",name:"??????",param:[{key:"libcode",condition:"code",value:vLibcode}]},{field:"lib_acq_check.orderno",code:"orderno",name:"?????"},{field:"lib_acq_check.batchno",code:"batchno",name:"???"},{field:"lib_acq_check.copies",code:"copies",name:"?????"},{field:"lib_acq_check.ncy",code:"ncy",name:"???????",param:[{key:"ncy"}]},{field:"lib_acq_check.price",code:"price",name:"???"},{field:"lib_acq_check.totalprice",code:"totalprice",name:"???"},{field:"lib_acq_check.orderncy",code:"orderncy",name:"???????",param:[{key:"ncy"}]},{field:"lib_acq_check.orderprice",code:"orderprice",name:"??????"},{field:"lib_acq_check.ordertotalprice",code:"ordertotalprice",name:"??????"},{field:"lib_acq_check.binding",code:"binding",name:"??????",param:[{key:"bindtype"}]},{field:"lib_acq_check.docsources",code:"docsources",name:"??????",param:[{key:"docsources"}]},{field:"lib_acq_check.finsources",code:"finsources",name:"??????",param:[{key:"finsources"}]},{field:"lib_acq_check.mediatype",code:"mediatype",name:"??????",param:[{key:"mediatype"}]},{field:"lib_acq_check.bookseller",code:"bookseller",name:"??????",param:[{key:"bookseller"}]},{field:"lib_acq_check.checkdate",code:"checkdate",name:"??????"},{field:"lib_acq_check.operid",code:"operid",name:"?????"},{field:"lib_acq_check.volumes",code:"volumes",name:"???"},{field:"lib_acq_check.volinfo",code:"volinfo",name:"??????"},{field:"lib_acq_check.billno",code:"billno",name:"?????"},{field:"lib_acq_check.note",code:"note",name:"???"}];var f=JSON.parse(e.paramjson);var d=[];var c=80;if(f.grid.length>0){c=(100/f.grid.length)+"%"}for(var b=0;b<f.grid.length;b++){for(var a=0;a<g.length;a++){if(f.grid[b].field==g[a].code){d.push({field:g[a].code,title:g[a].name,width:c})}}}$("#acqDataGridList").datagrid({iconCls:"e-icon fa fa-table",title:"?????????",fit:true,fitColumns:true,singleSelect:true,border:true,nowrap:false,striped:true,rownumbers:true,columns:[d]})}function onAcqFormatDesign(){$(".acq-formatFrame").show();var a=getValue("acqkeycode");acqformatFrame.onFormatDesign(a)}function onCloseFormatDesignDlg(a){bindAcqFormatDesignCombox(a);$(".acq-formatFrame").hide()}function acceptShowData(a,b){if(!b){$("#bntFormatDesign").linkbutton({disabled:a});$("#acceptFormatDesignIndex").combobox({disabled:a})}if(b){$("#bntAcqFormatDesign").linkbutton({disabled:a});$("#acqkeycode").combobox({disabled:a})}}function perviewShowData(a){$("#bntPerviewNextRecord").linkbutton({disabled:a});$("#bntPerviewPrevRecord").linkbutton({disabled:a})}function initBibImportDataPageElement(){var b={key:"sysid",condition:"type",value:vBibType};initPageDataSingleElement("sysid",b,sysidCallFun);var a=[{id:"repeatid",key:"repeatid",condition:"sysid",value:null}];initNextSelectCombobox("sysid",a);setCurImportDataGridHeight(190)}function sysidCallFun(){var b=getValue("sysid");var a={key:"repeatid",condition:"sysid",value:b};initPageDataSingleElement("repeatid",a,null)}function setCurImportDataGridHeight(b){var a=$(window).height();var c=a-b;$(".import-data-div").css("height",c+"px");$("#tabsGrid").tabs("resize")}function onPerviewData(c){curPerviewIndex=1;maxPerviewNum=undefined;$("#showPerviewOrgMarcData").html("");$("#showPerviewTagMarcData").html("");if(filelist){var a=getJsonData(null,"record");a.filename=filelist[0];if(c){curPerviewIndex=c}else{curPerviewIndex=1}a.index=curPerviewIndex;a.hldkeycode=getValue("acceptFormatDesignIndex");a.acqkeycode=getValue("acqkeycode");a.acqtype=getValue("acqtype");var b=base_path+"com/webuploader/perviewMarcData.do";$.post(b,a,function(d){if(d.status=="0"){setDataToPageShowPerview(d)}else{if(d.status=="9003"){maxPerviewNum="max";openMessageDlg(d.message)}else{openMessageDlg(d.message)}}},"json")}else{openMessageDlg("?????????????????")}}function onPerviewNextData(){if(maxPerviewNum){return openMessageDlg("??????????¤????")}if(curPerviewIndex<500){onPerviewData(curPerviewIndex+1)}else{openMessageDlg("????????500??")}}function onPerviewPrevData(){if(curPerviewIndex>1){onPerviewData(curPerviewIndex-1);maxPerviewNum=undefined}else{openMessageDlg("???????????")}}function getFormatDate(){var b=new Date();var e=b.getFullYear();var f=b.getMonth()+1<10?"0"+(b.getMonth()+1):b.getMonth()+1;var d=b.getDate()<10?"0"+b.getDate():b.getDate();var a=b.getHours()<10?"0"+b.getHours():b.getHours();var g=b.getMinutes()<10?"0"+b.getMinutes():b.getMinutes();var c=b.getSeconds()<10?"0"+b.getSeconds():b.getSeconds();return e+"-"+f+"-"+d+" "+a+":"+g+":"+c}function stopAccept(){stopFlag=1;$.messager.progress("close");$.messager.progress({title:"?????????",msg:"???????????????,???????¤??????,?????..."})}function onAcceptData(a){$(".error-msg-result").html("");var e=getFormatDate();var c='<br/><div style="text-align: center;margin:10px auto;"><a class="easyui-linkbutton" onclick=\'stopAccept()\'>??????</a></div>';if(!a){console.log("???????arc??? ??"+e);errorcount=0;handlecount=0;successcount=0;hldhandlecount=0;hldsuccesscount=0;acqhandlecount=0;acqsuccesscount=0;errorfilerows=0;if($("#checkhold").get(0).checked&&getValue("acceptFormatDesignIndex").length==0){return openMessageDlg("????????????????????")}stopFlag=0;$.messager.progress({title:"?????????",msg:"?????????,?????..."+c})}if(filelist){var d=getJsonData(null,"record");if(a){d=a}else{d.filename=filelist[0];d.page=1;d.rows=500;d.hldkeycode=getValue("acceptFormatDesignIndex");d.acqkeycode=getValue("acqkeycode");d.acqtype=getValue("acqtype")}var b=base_path+"com/webuploader/insertMarcData.do";$.post(b,d,function(f){$.messager.progress("close");if(f.status=="0"){var g=f.rows[0];if(g){errorfile=g.errorfile;errorcount+=g.errorcount;handlecount+=g.handlecount;successcount+=g.successcount;hldhandlecount+=g.hld_handlecount;hldsuccesscount+=g.hld_successcount;acqhandlecount+=g.acq_handlecount;acqsuccesscount+=g.acq_successcount;errorfilerows=g.errorfilerows;if(g.nextfile&&stopFlag==0){$.messager.progress({title:"?????????",msg:"?????"+handlecount+"]?????,???["+successcount+"]??,???["+errorcount+"]??,??????????? ..."+c});d.errorfile=g.errorfile;d.filename=g.nextfile;onAcceptData(d)}else{console.log("??????marc??? ??"+e);$(".handlecount").html("?????"+handlecount+"]????????");$(".successcount").html("???["+successcount+"]??");$(".errorcount").html("???["+errorcount+"]??");if(hldhandlecount>0){$(".hldhandlecount").html("???????????"+hldhandlecount+"]??,???["+hldsuccesscount+"]??,???["+(hldhandlecount-hldsuccesscount)+"]??")}else{$(".hldhandlecount").html("")}if(acqhandlecount>0){$(".acqhandlecount").html("???????????"+acqhandlecount+"]??,???["+acqsuccesscount+"]??,???["+(acqhandlecount-acqsuccesscount)+"]??")}else{$(".acqhandlecount").html("")}$("#checkerrorfile").show();$("#acceptFileResultDlg").dialog("open")}}}else{openMessageDlg(f.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")})}}function setDataToPageShowPerview(e){var f=e.rows[0];if(f){$("#importDataGridList").datagrid("loadData",[]);$("#acqDataGridList").datagrid("loadData",[]);perviewShowData(false);var d=f.orgmarc.split(/[\n\r]/g);var c="<div>"+curPerviewIndex+"</div>";for(var b=0;b<d.length;b++){c+='<div style="word-break: break-all; word-wrap:break-word;width: 100%;white-space:normal;">'+d[b].replace(/[$]([A-Za-z0-9])/g,'<font color="#A60020">$$$1</font>')+"</div>"}$("#showPerviewOrgMarcData").html(c);if(f.tagmarc){var a=f.tagmarc.split(/[\n\r]/g);c="<div>"+curPerviewIndex+"</div>";for(var b=0;b<a.length;b++){c+='<div style="word-break: break-all; word-wrap:break-word;width: 100%;white-space:normal;">'+a[b].replace(/[$]([A-Za-z0-9])/g,'<font color="#A60020">$$$1</font>')+"</div>"}$("#showPerviewTagMarcData").html(c)}$("#importDataGridList").datagrid("loadData",f.hlds);$("#acqDataGridList").datagrid("loadData",f.acqs)}}function onResetAcceptFormatDesignPage(){$(".acceptTextTip").html("???????????????????");setCurImportDataGridHeight(260);perviewShowData(true);curPerviewIndex=1;maxPerviewNum=undefined;$("#showPerviewOrgMarcData").html("");$("#showPerviewTagMarcData").html("");$("#importDataGridList").datagrid("loadData",[])}function uploadSuccessHandler(a,b){if(b.status==0){filelist=b.rows[0].filelist}else{openMessageDlg(b.message)}};
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de