var mnu = ""; //加载 $(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); }) function validChoose() { var d = []; $.each($("#dgEducationSchedulingStopList").cmsXDataTable("getSelections"), function (index) { d.push(this); }); return d; } function reload() { $("#dgEducationSchedulingStopList").cmsXDataTable("load", $.getDataGridParams("dgEducationSchedulingStopList")); } function queryTeacher(data) { try { var jsonString = "({'QueryParamsDatas':'"; var collegeID = $("#ddlCollege").combobox("getValue"); if (collegeID != nonSelect) { jsonString += "CollegeDropdown|*|" + collegeID + "|@|"; } jsonString += "'})"; $("#cgbTeacher").combogridX("reload", eval(jsonString)); reload(); } catch (e) { } } function EducationSchedulingStop_Add() { $.popupTopWindow('新增停课记录', CMS_SystemConfig.VirtualDirectoryPath + '/EducationSchedule/StopScheduling?MNU=' + mnu, 1024, 768, reload, null); } function EducationSchedulingStop_Update() { var d = validChoose(); if (d.length == 0) { $.messager.alert("系统提示", "请选择要修改的记录。"); return; } if (d.length > 1) { $.messager.alert("系统提示", "只能选择单个记录进行修改。"); return; } if (d[0].RecordStatus != startStatusID && $.grep(backpointIDList, function (x) { return x == d[0].RecordStatus }).length == 0) { $.messager.alert("系统提示", "该记录已经提交,无法修改。"); return; } $.popupTopWindow('修改停课记录', CMS_SystemConfig.VirtualDirectoryPath + '/EducationSchedule/StopEdit?EducationSchedulingStopID=' + d[0].EducationSchedulingStopID + "&MNU=" + mnu, 480, 250, reload, null); } function EducationSchedulingStop_Delete() { var d = $.map(validChoose(), function (x) { return x.EducationSchedulingStopID; }).join(','); if (d.length == 0) { $.messager.alert("系统提示", "请选择要删除的记录。"); return; } $.postWithLoading('/EducationSchedule/StopDelete', { educationSchedulingStopIDs: d }, function (data) { if (data.IsSuccess) { $.messager.alert("系统提示", "删除成功!"); reload(); } else { $.messager.alert("系统提示", data.Message); } }); } function EducationSchedulingStop_Submit() { var d = $.map(validChoose(), function (x) { return x.EducationSchedulingStopID; }).join(','); if (d.length == 0) { $.messager.alert("系统提示", "请选择要提交的记录。"); return; } $.postWithLoading('/EducationSchedule/StopSubmit', { educationSchedulingStopIDs: d }, function (data) { if (data.IsSuccess) { $.messager.alert("系统提示", "提交成功!"); reload(); } else { $.messager.alert("系统提示", data.Message); } }); } function EducationSchedulingStop_Excel() { var d = validChoose(); if (d.length == 0) { $("[name='hidEducationSchedulingStopID']").val(""); } else { $("[name='hidEducationSchedulingStopID']").val($.map(d, function (x) { return x.EducationSchedulingStopID; }).join(',')) } $("#formQuery").submit(); }