/** * 保存系统公告 */ function saveXtgg(from) { if (validator(xtggForm)) { huimv.showProcessModel('保存数据中'); jQuery('#xtggForm').ajaxSubmit({ dataType : 'json', data : { "jzsj" : $("#jzsj").val() }, success : function(data) { huimv.hideProcessModel(); // 保存成功 if (data.returnCode > 0) { switch (from) { case "view": viewXtgg(data.result.id); break; case "xtggAdd": loadXtggList(); break; } } else { Dialogs.alert(data.result, { title : '提示信息', width : 250, height : 80, top : 200 }); } }, error : function(data) { huimv.showError(data.responseText); huimv.hideProcessModel(); } }); } } /** * 系统公告编辑页面中点击取消按钮时,根据情况选择返回的页面 */ function cancelXtgg(id) { if (id != "") { // 若存在系统公告,则返回查看页面 viewXtgg(id); } else { // 若不存在系统公告,则返回列表页面 loadXtggList("edit"); } }