$(function(){initPageLayoutByElement(50);getOpacConfig()});function initPageLayoutByElement(b){var a=$(window).height();var c=a-b;$(".div-body-box").css("height",c+"px");$("#setOpacPara").tabs("resize")}function getOpacConfig(){var a={type:"cirbonus"};var b=base_path+"lib/config/page.do";$.post(b,a,function(c){if(c.status=="0"){saveOpacConfigResult(c)}else{openMessageDlg(c.message)}},"json")}function saveOpacConfig(){var b=getJsonData(null,"record");var a={type:"cirbonus",paramjson:JSON.stringify(b)};var c=base_path+"lib/config/insert.do";if(getValue("id")>0){c=base_path+"lib/config/update.do";a.id=getValue("id")}$.post(c,a,function(d){if(d.status=="0"){openMessageDlg(d.message);saveOpacConfigResult(d)}else{openMessageDlg(d.message)}},"json")}function saveOpacConfigResult(b){if(b.status=="0"){var c=b.rows[0];if(c){setValue("id",c.id);var a=JSON.parse(c.paramjson);setJsonData(null,a)}}};