123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- function getNotUseCoursesTime() {
- $("#loading").show();
- var weekday = $("[name='Weekday']").val();
- var toWeekday = $("[comboname='ToWeekday']").combobox('getValue');
- var courseTimeID = $("[name='CoursesTimeID']").val();
- var weekNum = $("[name='WeekNum']").val();
- var toWeekNum = $("[comboname='ToWeekNum']").combobox('getValue');
- var fromTeacherID = $("[name='UserID']").val();
- var replaceTeacherID = $("#ToUserID").combogridX('getValue');
- if (!toWeekNum || toWeekNum == nonSelect) {
- $.messager.alert("系统提示", "请选择调整后的周次。");
- $("#loading").hide();
- return false;
- }
- var url = CMS_SystemConfig.VirtualDirectoryPath + '/EducationSchedule/GetNotUseCoursesTimeDropDown?bindType=0'
- url += '&schoolyearID=' + schoolyearID;
- url += '&weekday=' + weekday;
- url += '&toWeekday=' + toWeekday;
- url += '&courseTimeID=' + courseTimeID;
- url += '&weekNum=' + weekNum;
- url += '&toWeekNum=' + toWeekNum;
- url += '&fromTeacherID=' + fromTeacherID;
- if (replaceTeacherID != nonSelect && replaceTeacherID != "") {
- url += '&replaceTeacherID=' + replaceTeacherID;
- }
- url += '&educationMissionClassID=' + educationMissionClassID;
- $("[comboname='ToCoursesTimeID']").combobox('clear');
- $("[comboname='ToCoursesTimeID']").combobox('reload', url);
- }
- function getNotUseClassroom(toCoursesTimeID) {
- $("#loading").show();
- var weekday = $("[name='Weekday']").val();
- var toWeekday = $("[comboname='ToWeekday']").combobox('getValue');
- var coursesTimeID = $("[name='CoursesTimeID']").val();
- var weekNum = $("[name='WeekNum']").val();
- var toWeekNum = $("[comboname='ToWeekNum']").combobox('getValue');
- var classroomTypeID = $("[comboname='ToClassroomTypeID']").combobox('getValue');
- if (!toWeekNum || toWeekNum == nonSelect) {
- $.messager.alert("系统提示", "请选择调整后的周次。");
- $("#loading").hide();
- return false;
- }
- if (!toCoursesTimeID || typeof toCoursesTimeID != "string") {
- toCoursesTimeID = $("[comboname='ToCoursesTimeID']").combobox('getValue');
- }
- if (toCoursesTimeID == "" || toCoursesTimeID == nonSelect) {
- $.messager.alert("系统提示", "请选择调整后的节次。");
- $("#loading").hide();
- return false;
- }
- try {
- var jsonString = "({'QueryParamsDatas':'";
- if (schoolyearID != nonSelect) {
- jsonString += "SchoolyearID|*|" + schoolyearID + "|@|";
- }
- if (weekday != nonSelect) {
- jsonString += "Weekday|*|" + weekday + "|@|";
- }
- if (toWeekday != nonSelect) {
- jsonString += "ToWeekday|*|" + toWeekday + "|@|";
- }
- if (coursesTimeID != nonSelect) {
- jsonString += "CoursesTimeID|*|" + coursesTimeID + "|@|";
- }
- if (toCoursesTimeID != nonSelect) {
- jsonString += "ToCoursesTimeID|*|" + toCoursesTimeID + "|@|";
- }
- if (weekNum != nonSelect) {
- jsonString += "WeekNum|*|" + weekNum + "|@|";
- }
- if (toWeekNum != nonSelect) {
- jsonString += "ToWeekNum|*|" + toWeekNum + "|@|";
- }
- if (classroomTypeID != nonSelect) {
- jsonString += "ClassroomTypeID|*|" + classroomTypeID + "|@|";
- }
- if (educationMissionClassID != nonSelect) {
- jsonString += "EducationMissionClassID|*|" + educationMissionClassID + "|@|";
- }
- jsonString += "'})";
- $("[comboname='ToClassroomID']").combogridX("reload", eval(jsonString));
- //reload();
- } catch (e) { }
- }
- function clearSelections() {
- $("[comboname='ToWeekday']").combobox('setValue', nonSelect);
- var url = CMS_SystemConfig.VirtualDirectoryPath + '/SchoolYear/GetFutureWeekListDropdown?bindType=0'
- var toWeekNum = $("[comboname='ToWeekNum']").combobox('getValue');
- if (toWeekNum && toWeekNum != nonSelect) {
- url += "&weekNum=" + toWeekNum;
- $("[comboname='ToWeekday']").combobox('clear');
- $("[comboname='ToWeekday']").combobox('reload', url);
- }
- $("[comboname='ToCoursesTimeID']").combobox('clear');
- $("[comboname='ToClassroomTypeID']").combobox('setValue', $("[name='ClassroomTypeID']").val());
- $("[comboname='ToClassroomID']").combogridX('setValue', nonSelect);
- }
- function Adjustment_Save() {
- var toWeekNum = $("[comboname='ToWeekNum']").combobox('getValue');
- if (!toWeekNum || toWeekNum == nonSelect) {
- $.messager.alert("系统提示", "请选择调整后的周次。");
- $("#loading").hide();
- return false;
- }
- $(document.forms[0]).submit();
- }
- function commonLoadComplete() {
- $("#loading").hide();
- }
- $.parser.onComplete = function (context) {
- if (isEdit) {
- getNotUseCoursesTime();
- var toCoursesTimeID = $("[comboname='ToCoursesTimeID']").combobox('options').value;
- getNotUseClassroom(toCoursesTimeID);
- }
- };
|