1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- 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();
- }
|