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;c0){$("#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;b0){return c}if(!d.index){return c}if(_SheetRows){for(var b=0;b<_SheetRows.length&&b