$(function(){var a=[{code:"formatdesign_libcode",key:"libcode"},{code:"formatdesign_operid",key:"operid"}];_myPage.prototype.initData(a);initFormatDesignGrid();bindPageFormatDesignDataGridList()});function bindPageFormatDesignDataGridList(a){var b=base_path+"lib/design/page.do";var c={};c.code=jsonFormatDesign.code;c.rows=100;c.page=1;$.post(b,c,function(d){if(d.status=="0"){initFormatDesignComboboxByCode(d,a)}else{openMessageDlg(d.message)}},"json")}function initFormatDesignComboboxByCode(b,a){$("#formatdesign_index").combobox({data:b.rows,valueField:"keycode",textField:"name",panelHeight:"auto",onChange:function(d,c){if(d!=undefined&&d!=c&&d.length>0){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"){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 setOtherFormatDesignBox(c){$(".otherFormatDesignPanelBody").html("自定义");for(var b=0;b0){var b="";for(var a=0;a'+c[a].code+"|"+c[a].name+" , "}$(".otherFormatDesignPanelBody").html(b)}setFormatDesignLayout()}function onInitEidtorGridDefaultValue(a){var b=eidtorGridObject.datagrid("getEditor",{index:eidtorGridIndex,field:"defvalue"});$(b.target).textbox("setValue",a)}function setFormatDesignLayout(){}function onSearchData(){var a=getJsonDataByTypeHandler();var b=getValue("acceptFormatDesignIndex");if(b.length==0){return openMessageDlg("请选择输出的格式")}a.keycode=b;a.count=99999;openPostWindow("exportlabelresult.jsp",a)};