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 showtypeComBoxData=[{code:"0",name:"名称"},{code:"1",name:"代码"},{code:"2",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)}else{if(b.rows.length>0){setValue("formatdesign_index",b.rows[0].keycode)}}setDefaultParam()}function setDefaultParam(){var b=mystorage.get("opcondtion");if($("#operid").length>0&&b&&b=="1"){var a=mystorage.get("operid");setValue("operid",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"}b.paramjson=$.base64.encode(b.paramjson);$.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(c){var b=getJsonDataByTypeHandler();var e=getValue("acceptFormatDesignIndex");if(e.length==0){return openMessageDlg("请选择输出的格式")}b.keycode=e;b.account=mystorage.get("account");var d=getJsonCondtionByTypeHandler();if(d.length>0){b.jsonText=d}var a=getTimeFmtStatus();if(a){if(!b["limit[0].condition"]){$.messager.confirm("提示消息","您还没有选择查询条件,确定要执行查询吗?",function(f){if(f){if(c){openPostWindow("../statistics/statistics.jsp",b)}else{openPostWindow("statistics.jsp",b)}}})}else{if(c){openPostWindow("../statistics/statistics.jsp",b)}else{openPostWindow("statistics.jsp",b)}}}}function setDeftValueData(a){var b=getValue("formatdesign_item_field"+a);if(b!=undefined){if(b!="不限"){setValue("formatdesign_item_value"+a,"");setMultilineTextValue(b,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","")}else{if(a=="不限"&&getValue("formatdesign_item_value1").length==0){setValue("formatdesign_item_value1","")}}}},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","")}else{if(a=="不限"&&getValue("formatdesign_item_value2").length==0){setValue("formatdesign_item_value2","")}}}},onClick:function(b,a){autoSelect=false}})}function setMultilineTextValue(c,d){if(c=="不限"){return}for(var b=0;b-1)){var e=initJson[b];get2LevelLibData(d);break}else{if(c==initJson[b].code){var e=initJson[b];var a=base_path+"par/common/getInitData.do";$.post(a,e,function(i){var h=i.rows;if(h.length>0){var g="";for(var f=0;f0){var e="";for(var d=0;d-1){c+=e.code+","}}if(c.length>0){c=c.substr(0,c.length-1)}return c};