Edit D:\rfid\libsystem\page\global\js\importxlsfun.js
var indexComBoxData=[];var comGroupFieldIndex;var jsonGridColumns=getJsonGridColumns();function getJsonGridColumns(){var a=[{field:"field",title:"??????",width:"20%",formatter:onShowJosnComBoxData,editor:{type:"combobox",options:{valueField:"code",textField:"name",panelHeight:"200",groupField:"group",data:setGroupFieldComBoxData(),onChange:function(d,b){if(d!=undefined&&d!=b){setOtherFormatDesignBox(d);var e=eidtorGridObject.datagrid("getEditor",{index:eidtorGridIndex,field:"table"});if(e){if(e.target){for(var c=0;c<fieldComBoxData.length;c++){if(d==fieldComBoxData[c].code){$(e.target).textbox("setValue",fieldComBoxData[c].table);break}}}}}}}}},{field:"index",title:"???",width:"20%",editor:{type:"combobox",options:{valueField:"code",textField:"name",panelHeight:"200",data:getIndexComBoxData(),onChange:function(d,b){if(d!=undefined&&d!=b){var e=eidtorGridObject.datagrid("getEditor",{index:eidtorGridIndex,field:"indexname"});if(e){if(e.target){if(_SheetRows){$(e.target).textbox("setValue","");for(var c=0;c<_SheetRows.length&&c<indexComBoxData.length;c++){if(d==indexComBoxData[c].code){$(e.target).textbox("setValue",_SheetRows[c]);break}}}}}}}}}},{field:"indexname",title:"???",width:"20%",formatter:onShowIndexName,editor:{type:"textbox",options:{}}},{field:"defvalue",title:"?????",width:"20%",editor:{type:"textbox",options:{}}},{field:"table",title:"???",hidden:true,editor:{type:"textbox"}},{field:"flag",title:"???",hidden:true,editor:{type:"textbox"}},{field:"map",title:"??????",width:"20%"}];return a}var _SheetRows;$(function(){setCurImportDataGridHeight(140);$("#autogetxlsheader").change(function(){var a=getValue("autogetxlsheader");if(a=="1"){if(_SheetRows){autoSetDataToFormatDesign(_SheetRows)}}})});function getIndexComBoxData(){for(var a=0;a<26;a++){indexComBoxData.push({code:String.fromCharCode(65+a),name:String.fromCharCode(65+a)})}for(var a=0;a<26;a++){var b="A"+String.fromCharCode(65+a);indexComBoxData.push({code:b,name:b})}return indexComBoxData}function setCurImportDataGridHeight(b){var a=$(window).height();var c=a-b;$(".import-data-div").css("height",c+"px");$("#importDataGridList").datagrid("resize");$(".easyui-panel").panel("resize")}function onPerviewData(){if(getValue("acceptFormatDesignSheet").length==0){return openMessageDlg("?????????????xcel?????")}if(getValue("acceptFormatDesignIndex").length==0){return openMessageDlg("????????????????")}if(filelist){var b=getAcceptParam();var a=base_path+"com/webuploader/"+jsonFormatDesign.perviewReaderData;$("#importDataGridList").datagrid({url:a,queryParams:b,onLoadSuccess:function(c){if(c.status=="0"){}else{openMessageDlg(c.message)}},method:"post"})}}function onAcceptData(a){$(".error-msg-result").html("");if(!a){errorcount=0;handlecount=0;successcount=0;if(getValue("acceptFormatDesignSheet").length==0){return openMessageDlg("?????????????xcel?????")}if(getValue("acceptFormatDesignIndex").length==0){return openMessageDlg("????????????????")}$.messager.progress({title:"??????",msg:"?????????,?????..."})}if(filelist){var c={};if(a){c=a}else{c=getAcceptParam()}var b=base_path+"com/webuploader/"+jsonFormatDesign.insertReaderData;$.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.nextfile){$.messager.progress({title:"??????",msg:"?????"+handlecount+"]?????,???["+successcount+"]??,???["+errorcount+"]??,??????????? ..."});c.errorfile=e.errorfile;c.filename=e.nextfile;onAcceptData(c)}else{$(".handlecount").html("?????"+handlecount+"]?????");$(".successcount").html("???["+successcount+"]??");$(".errorcount").html("???["+errorcount+"]??");if(errorcount>0){$("#checkerrorfile").show()}else{$("#checkerrorfile").hide()}$("#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")})}}function getAcceptParam(){var a=getJsonData(null,"record");a.filename=filelist[0];a.page=1;a.rows=500;a.keycode=getValue("acceptFormatDesignIndex");a.sheet_name=getValue("acceptFormatDesignSheet");a.pk_field=getValue("pk_field");a.startindex=getValue("startindex");return a}function onResetAcceptFormatDesignPage(){$("#acceptFormatDesignSheet").combobox({data:[]});deleteGridData("importDataGridList");setCurImportDataGridHeight(150)}function uploadSuccessHandler(b,c){if(c.status==0){var a=c.rows[0].sheetlist;var e=a[0].sheetRows;_SheetRows=e;var d=getValue("autogetxlsheader");if(d=="1"){autoSetDataToFormatDesign(e)}filelist=c.rows[0].filelist;$("#acceptFormatDesignSheet").combobox({data:c.rows[0].sheetlist,valueField:"sheetName",textField:"sheetName",panelHeight:"auto",onLoadSuccess:function(){var f=$(this).combobox("getData");if(f.length>0){$(this).combobox("select",f[0].sheetName)}}})}else{openMessageDlg(c.message)}}function autoSetDataToFormatDesign(f){$("#pageFormatDesignDlg").dialog({title:jsonFormatDesign.title,width:jsonFormatDesign.width,height:jsonFormatDesign.height,top:jsonFormatDesign.top,left:jsonFormatDesign.left});$("#otherFormatDesignPanel").panel("setTitle",jsonFormatDesign.othertitle);var d=$(".basicFormatDesignBox").height();var c=100+d;var e=jsonFormatDesign.height-c;$(".editFormatDesignBox").css("height",e+"px");$(".otherFormatDesignBox").css("height",e+"px");$("#otherFormatDesignPanel").panel("resize");$("#pageFormatDesignGrid").datagrid("resize");$("#pageFormatDesignDlg").dialog("open");deleteGridData("pageFormatDesignGrid");for(var b=0;b<f.length;b++){var a={};a.index=indexComBoxData[b].code;a.indexname=f[b];appendEidtorGridRow(a)}}function onShowIndexName(c,d,a){if(c&&c.length>0){return c}if(!d.index){return c}if(_SheetRows){for(var b=0;b<_SheetRows.length&&b<indexComBoxData.length;b++){if(d.index==indexComBoxData[b].code){return _SheetRows[b]}}}return c};
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de