var autoSelect=true;var sortTypeComBoxData=[{code:"asc",name:"升序"},{code:"desc",name:"降序"}];var isShowComBoxData=[{code:"1",name:"是"},{code:"0",name:"否"}];var isZeroComBoxData=[{code:"0",name:"显示"},{code:"1",name:"隐藏"}];var alignTypeComBoxData=[{code:"left",name:"向左对齐"},{code:"center",name:"居中"},{code:"right",name:"向右对齐"}];var fontSizeComBoxData=[{code:"12",name:"小字体"},{code:"14",name:"中号字体"},{code:"16",name:"大字体"}];$.extend($.fn.propertygrid.defaults.columns[0][1],{formatter:function(c,b,d){if(b.name=="字体大小"){for(var a=0;a0){setValue("acceptFormatDesignIndex",d)}}});$("#acceptFormatDesignIndex").combobox({data:b.rows,valueField:"keycode",textField:"name",panelHeight:"auto",onChange:function(d,c){if(d!=undefined&&d!=c&&d.length>0){bindAcceptFormatDesignDataByKeyCode(d);setValue("formatdesign_index",d)}}});if(a){setValue("formatdesign_index",a)}}function bindAcceptFormatDesignDataByKeyCode(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];setDataToPageElement(e)}else{openMessageDlg(d.message)}},"json")}function setDataToPageElement(e){var f=JSON.parse(e.paramjson);setJsonData("formatdesign_",e);eidtorGridObject.datagrid("loadData",f.grid);var d=jsonPropertyGridData.rows;for(var c=0;c0){c=base_path+"lib/design/update.do"}$.post(c,b,function(g){if(g.status=="0"){autoSelect=true;bindPageFormatDesignDataGridList(g.rows[0].keycode);openMessageDlg(g.message,5000)}else{openMessageDlg(g.message)}},"json")}function deleteFormatDesignRecord(){var a=getValue("formatdesign_keycode");if(a.length==0){return openMessageDlg("请先选择要删除格式")}openConfirmDlg("您确定要删除当前选中的格式吗?",null,deleteFormatDesignRecordResult,null)}function deleteFormatDesignRecordResult(){var a=getValue("formatdesign_keycode");var c={};c.pk=a;var b=base_path+"lib/design/delete.do";$.post(b,c,function(d){if(d.status=="0"){openMessageDlg(d.message,5000);bindPageFormatDesignDataGridList()}else{openMessageDlg(d.message)}},"json")}function onSearchStatisticsData(){var a=getJsonDataByTypeHandler();var b=getValue("acceptFormatDesignIndex");if(b.length==0){return openMessageDlg("请选择输出的格式")}a.keycode=b;a.account=mystorage.get("account");if(!a["limit[0].condition"]){$.messager.confirm("提示消息","您还没有选择查询条件,确定要执行查询吗?",function(c){if(c){openPostWindow("statistics.jsp",a)}})}else{openPostWindow("statistics.jsp",a)}}function setFormatDesignFieldComBoxData(){countFormatDesignFieldComBoxData.splice(0,0,{code:"不限",name:"不限"});$("#formatdesign_item_field1").combobox({data:countFormatDesignFieldComBoxData,valueField:"code",textField:"name",onChange:function(b,a){if(b!=undefined&&b!=a){if(a&&a.length>0&&a!="不限"){setValue("formatdesign_item_value1","");setMultilineTextValue(b,1)}else{if(a=="不限"&&getValue("formatdesign_item_value1").length==0){setValue("formatdesign_item_value1","");setMultilineTextValue(b,1)}}}},onClick:function(b,a){autoSelect=false}});$("#formatdesign_item_field2").combobox({data:countFormatDesignFieldComBoxData,valueField:"code",textField:"name",onChange:function(b,a){if(b!=undefined&&b!=a){if(a&&a.length>0&&a!="不限"){setValue("formatdesign_item_value2","");setMultilineTextValue(b,2)}else{if(a=="不限"&&getValue("formatdesign_item_value2").length==0){setValue("formatdesign_item_value2","");setMultilineTextValue(b,2)}}}},onClick:function(b,a){autoSelect=false}})}function setMultilineTextValue(c,d){if(c=="不限"){return}if(!autoSelect){for(var b=0;b0){var g="";for(var f=0;f