Edit D:\rfid\libsystem\page\circulation\js\readerbacth.js
var fieldComBoxData;var jsonGridColumns;var curPerviewIndex=1;var maxPerviewNum=undefined;$(function(){setCurImportDataGridHeight(350);var a=[{key:"rdrtype",condition:"libcode",value:vLibcode},{key:"libcode",condition:"code",value:vLibcode},{key:"rdrfld1",condition:"parentid",value:"1"},{key:"rdrfld2",condition:"parentid",value:"2"},{key:"rdrfld3",condition:"parentid",value:"3"},{key:"rdrfld4",condition:"parentid",value:"4"}];_myPage.prototype.initData(a);showRdrFldName();getReaderFldResult()});_myPage.prototype.onLoadSuccess=function(a,b){getReaderFldResult()};function getReaderFldResult(){fieldComBoxData=[{code:"libcode",name:"??????",param:[{key:"libcode",condition:"code",value:vLibcode}]},{code:"rdrno",name:"???????"},{code:"name",name:"???????"},{code:"idcard",name:"??????"},{code:"otherno",name:"??????"},{code:"password",name:"???????",param:[{key:"rdrdefpwd"}]},{code:"status",name:"???????",data:[{code:"0",name:"???"},{code:"1",name:"???"},{code:"2",name:"???"},{code:"3",name:"???"},{code:"4",name:"???"}]},{code:"rdrtype",name:"???????",param:[{key:"rdrtype",condition:"libcode",value:vLibcode}]},{code:"rdrfld1",name:mystorage.get("rdr_fld1"),param:[{key:"rdrfld1",condition:"parentid",value:"1"}]},{code:"rdrfld2",name:mystorage.get("rdr_fld2"),param:[{key:"rdrfld2",condition:"parentid",value:"2"}]},{code:"rdrfld3",name:mystorage.get("rdr_fld3"),param:[{key:"rdrfld3",condition:"parentid",value:"3"}]},{code:"rdrfld4",name:mystorage.get("rdr_fld4"),param:[{key:"rdrfld4",condition:"parentid",value:"4"}]},{code:"birthday",name:"???"},{code:"gender",name:"???",data:[{code:"0",name:"??"},{code:"1",name:"??"}]},{code:"hobby",name:"???"},{code:"specialty",name:"???"},{code:"telephone",name:"??????"},{code:"email",name:"email"},{code:"nation",name:"???"},{code:"nativeplace",name:"???"},{code:"address",name:"??????"},{code:"unit",name:"??????"},{code:"createdate",name:"??????"},{code:"startdate",name:"??????"},{code:"enddate",name:"??????"},{code:"canceldate",name:"??????"},{code:"note",name:"???"}];jsonGridColumns=[{field:"field",title:"??????",width:"80",formatter:onShowJosnComBoxData,editor:{type:"combobox",options:{valueField:"code",textField:"name",panelHeight:"200",required:true,editable:false,groupField:"group",data:fieldComBoxData,loadFilter:function(c){var b=[];for(var a=0;a<c.length;a++){if(c[a].code!="rdrno"&&c[a].code!="idcard"){b.push(c[a])}}return b},onChange:function(b,a){if(b!=undefined&&b!=a){setOtherFormatDesignBox(b)}}}}},{field:"defvalue",title:"?????",width:"80",editor:"textbox"},];initFormatDesignGrid()}function setOtherFormatDesignBox(c){$(".otherFormatDesignPanelBody").html("?????");for(var b=0;b<fieldComBoxData.length;b++){if(c==fieldComBoxData[b].code){if(fieldComBoxData[b].param){var d=fieldComBoxData[b].param[0];var a=base_path+"par/common/getInitData.do";$.post(a,d,function(e){setOtherFormatDesignPanelBodyHtml(e.rows)},"json")}else{if(fieldComBoxData[b].data){setOtherFormatDesignPanelBodyHtml(fieldComBoxData[b].data)}}}}}function setOtherFormatDesignPanelBodyHtml(c){if(c.length>0){var b="";for(var a=0;a<c.length;a++){b+="<div class='div-book-record'><a href=\"JavaScript:onInitEidtorGridDefaultValue('"+c[a].code+'\')" style="text-decoration:none;cursor:pointer;">'+c[a].code+"|"+c[a].name+"</a></div>"}$(".otherFormatDesignPanelBody").html(b)}}function onInitEidtorGridDefaultValue(a){var b=eidtorGridObject.datagrid("getEditor",{index:eidtorGridIndex,field:"defvalue"});$(b.target).textbox("setValue",a)}function showRdrFldName(){$(".show-rdrfld1").html(mystorage.get("rdr_fld1"));$(".show-rdrfld2").html(mystorage.get("rdr_fld2"));$(".show-rdrfld3").html(mystorage.get("rdr_fld3"));$(".show-rdrfld4").html(mystorage.get("rdr_fld4"))}function initFormatDesignGrid(){eidtorGridObject=$("#setFldHandlerGrid");eidtorGridObject.datagrid({iconCls:"e-icon fa fa-cog",fit:true,title:"????????????",fitColumns:true,singleSelect:true,border:false,nowrap:false,striped:true,toolbar:toolbar,onClickRow:onClickEditorRow,columns:[jsonGridColumns]})}function onPerviewData(c){$("#showPerviewOrgMarcData").html("");$("#showPerviewTagMarcData").html("");var a=getCurPageRecord();if(!a){return openMessageDlg("????????????????????")}if(a){if(c){curPerviewIndex=c}else{curPerviewIndex=1}a.index=curPerviewIndex;var b=base_path+"com/handlebatch/previewReader.do";$.post(b,a,function(d){if(d.status=="0"){setDataToPageShowPerview(d)}else{if(d.status=="9003"){maxPerviewNum="max";openMessageDlg(d.message)}else{if(d.total>0){curPerviewIndex=d.total+1}openMessageDlg(d.message)}}},"json")}}function getCurPageRecord(){var b=getJsonDataByTypeHandler();if(!b["limit[0].condition"]){return openMessageDlg("????????????????????")}var c=getSqlConditionInByLibcode();if(c.length>0){b["limit[20].condition"]="libcode";b["limit[20].typeHandler"]="3";b["limit[20].value"]=c}b.opertype=getValue("opertype");if(b.opertype=="0"){acceptEidtorGrid();var a=eidtorGridObject.datagrid("getRows");if(a.length==0){return openMessageDlg("?????????????????")}for(var d=0;d<a.length;d++){b[""+a[d].field+""]=a[d].defvalue}}return b}function setDataToPageShowPerview(c){var j=eidtorGridObject.datagrid("getRows");var h=c.rows[0];if(h){var f=h.oldrecord;var e="<div class='div-book-record'>"+curPerviewIndex+"</div>";for(var d=0;d<fieldComBoxData.length;d++){if(f[fieldComBoxData[d].code]){e+="<div class='div-book-record'>"+fieldComBoxData[d].name+":"+f[fieldComBoxData[d].code]+"</div>"}}$("#showPerviewOrgMarcData").html(e);if(h.newrecord){var g=h.newrecord;e="<div class='div-book-record'>"+curPerviewIndex+"</div>";for(var d=0;d<fieldComBoxData.length;d++){if(g[fieldComBoxData[d].code]){var b="";for(var a=0;a<j.length;a++){if(fieldComBoxData[d].code==j[a].field){b="color:red";break}}e+="<div class='div-book-record' style='"+b+"'>"+fieldComBoxData[d].name+":"+g[fieldComBoxData[d].code]+"</div>"}}$("#showPerviewTagMarcData").html(e)}}}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 onHandlerBacth(a){var b=getCurPageRecord();if(!b){return openMessageDlg("????????????????????")}if(a){onBacthMianFun(a,b)}else{$.messager.confirm("??????","??????????????????",function(c){if(c){onBacthMianFun(a,b)}})}}function checkErrorFile(){var c=base_path+"com/webuploader/download.do?filename="+errorfile;var b=window.open(c)}function onBacthMianFun(a,c){$(".error-msg-result").html("");if(!a){errorcount=0;handlecount=0;successcount=0;$.messager.progress({title:"???????????",msg:"?????????,?????..."})}if(a){c=a}else{c.rows=200;c.page=1}var b=base_path+"com/handlebatch/executeReader.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;handlecount+=e.handlecount;successcount+=e.successcount;if(e.nextpage&&e.nextpage>0){$.messager.progress({title:"???????????",msg:"?????"+handlecount+"]?????,???["+successcount+"]??,???["+errorcount+"]??,??????????? ..."});c.page=e.nextpage;onHandlerBacth(c)}else{$(".handlecount").html("?????"+handlecount+"]?????");$(".successcount").html("???["+successcount+"]??");$(".errorcount").html("???["+errorcount+"]??");$("#checkerrorfile").show();$("#acceptFileResultDlg").dialog("open")}}else{openMessageDlg(d.message)}}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")})}function setCurImportDataGridHeight(b){var a=$(window).height();var c=a-b;$(".import-data-div").css("height",c+"px");$("#perviewlayout").layout("resize");$(".acceptTextTip").hide()};
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de