var mnu = ""; //加载 $(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); }) function LessonRecord_Save() { var nowDate = new Date().format('yyyy-MM-dd'); var LessonDate= $("#LessonDate").val(); if (LessonDate > nowDate) { $.messager.alert("系统信息", "只能选择当前时间和之前时间的督导时间。"); return; } //只留提示实际不限制 // if ($("[name='Content']").val().replace(/[\r\n\s]/g, "").length < 100) { // $.messager.alert("系统信息", "教学评价内容字数不够。"); // return; // } // if ($("[name='Record']").val().replace(/[\r\n\s]/g, "").length < 60) { // $.messager.alert("系统信息", "督导情况记录字数不够。"); // return; // } $(document.forms[0]).submit(); } function LessonDateChange(dp) { var week = new Date(dp.cal.newdate.y, dp.cal.newdate.M - 1, dp.cal.newdate.d).getDay(); $("[comboname='Weekday']").combobox('setValue', week); GetClassmajorAndCourse(dp.cal.getNewDateStr()); } function GetClassmajorAndCourse(date) { var schoolyearID = $("#SchoolyearID").combobox('getValue'); var coursesTimeID = $("[comboname='CoursesTimeID']").combobox('getValue'); var teacherUserID = $("[comboname='UserID']").combogridX('getValue'); if (!date || !((typeof date == 'string') && date.constructor == String)) { date = $("[name='LessonDate']").val(); } if (date == '') { return; } if (coursesTimeID == '' || coursesTimeID == nonSelect) { return; } if (teacherUserID == '' || teacherUserID == nonSelect) { return; } $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/EducationSchedule/GetEducationMissionClassViewBySchedule', { schoolyearID:schoolyearID, date: date, coursesTimeID: coursesTimeID, teacherUserID: teacherUserID }, function (data) { if (data) { $("[comboname='ClassmajorID']").combogridX('setValue', data.MainScheduleClassID); $("[comboname='CoursematerialID']").combogridX('setValue', data.CoursematerialID); } }); } function LessonRecord_SeletcRecord() { $.popupTopWindow('评价建议', CMS_SystemConfig.VirtualDirectoryPath + '/ProjectRecord/SelectAdvise?FromMNU=' + mnu, 900, 500, AddRecord); } function AddRecord(data) { var advise = $("#Record").val(); data = advise + ";" + data; if (advise == "" || advise == null) { data = data.substr(1, (data.length - 1)); } $("#Record").val(data); }