123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- function validChoose() {
- var d = [];
- $.each($("#dgEducationSchedulingAdjustmentList").cmsXDataTable("getSelections"), function (index) {
- d.push(this);
- });
- return d;
- }
- function startTimeChanged(dp) {
- $("#txtStartTime").val($dp.cal.getNewDateStr());
- reload();
- }
- function endTimeChanged(dp) {
- $("#txtEndTime").val($dp.cal.getNewDateStr());
- reload();
- }
- function reload() {
- $("#dgEducationSchedulingAdjustmentList").cmsXDataTable("load", $.getDataGridParams("dgEducationSchedulingAdjustmentList"));
- }
- 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 EducationSchedulingAdjustment_Add() {
- $.popupTopWindow('新增调课记录', CMS_SystemConfig.VirtualDirectoryPath + '/EducationSchedule/Adjustment?MNU=' + mnu, 1024, 768, reload, null);
- }
- function EducationSchedulingAdjustment_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/AdjustmentEdit?EducationSchedulingAdjustmentID='
- + d[0].EducationSchedulingAdjustmentID + "&MNU=" + mnu, 800, 420, reload, null);
- }
- function EducationSchedulingAdjustment_Delete() {
- var d = $.map(validChoose(), function (x) { return x.EducationSchedulingAdjustmentID; }).join(',');
- if (d.length == 0) {
- $.messager.alert("系统提示", "请选择要删除的记录。");
- return;
- }
- $.postWithLoading('/EducationSchedule/AdjustmentDelete', { educationSchedulingAdjustmentIDs: d }, function (data) {
- if (data.IsSuccess) {
- $.messager.alert("系统提示", "删除成功!");
- reload();
- } else {
- $.messager.alert("系统提示", data.Message);
- }
- });
- }
- function EducationSchedulingAdjustment_Submit() {
- var d = $.map(validChoose(), function (x) { return x.EducationSchedulingAdjustmentID; }).join(',');
- if (d.length == 0) {
- $.messager.alert("系统提示", "请选择要提交的记录。");
- return;
- }
- $.postWithLoading('/EducationSchedule/AdjustmentSubmit', { educationSchedulingAdjustmentIDs: d }, function (data) {
- if (data.IsSuccess) {
- $.messager.alert("系统提示", "提交成功!");
- reload();
- } else {
- $.messager.alert("系统提示", data.Message.replace(/;/g, '<br>'));
- }
- });
-
- }
- function EducationSchedulingAdjustment_Excel() {
- var d = validChoose();
- if (d.length == 0) {
- $("[name='hidEducationSchedulingAdjustmentID']").val("");
- } else {
- $("[name='hidEducationSchedulingAdjustmentID']").val($.map(d, function (x) { return x.EducationSchedulingAdjustmentID; }).join(','))
- }
- $("#formQuery").submit();
- }
|