var url = CMS_SystemConfig.VirtualDirectoryPath + "/EducationMissionClass/Edit"; var mnu = ""; //加载 $(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); }) function reload() { $("#dgEducationMissionClassList").cmsXDataTable("load", $.getDataGridParams("dgEducationMissionClassList")); } //获取选中的数据 function validChoose() { var d = []; $.each($("#dgEducationMissionClassList").cmsXDataTable("getSelections"), function (index) { d.push(this.EducationMissionClassID); }); return d; } //获取选中的数据 function validChooseObj() { var d = []; $.each($("#dgEducationMissionClassList").cmsXDataTable("getSelections"), function (index) { d.push(this); }); return d; } //获取选中的数据 function OrderNovalidChoose() { var d = []; $.each($("#dgEducationMissionClassList").cmsXDataTable("getSelections"), function (index) { d.push(this.OrderNo); }); return d; } //获取选中的状态 function ApprovalStatusvalidChoose() { var d = []; $.each($("#dgEducationMissionClassList").cmsXDataTable("getSelections"), function (index) { d.push(this.ApprovalStatus); }); return d; } //获取选中的教室类型 function ClassroomTypeNamevalidChoose() { var d = []; $.each($("#dgEducationMissionClassList").cmsXDataTable("getSelections"), function (index) { d.push(this.ClassroomTypeName); }); return d; } function collegeIDChoose() { var d = []; $.each($("#dgEducationMissionClassList").cmsXDataTable("getSelections"), function (index) { d.push(this.CollegeID); }); return d; } function SchoolyearIDChoose() { var d = []; $.each($("#dgEducationMissionClassList").cmsXDataTable("getSelections"), function (index) { d.push(this.SchoolyearID); }); return d; } //排课分班 function EducationMissionClass_Separate() { var d = validChooseObj(); var idList = validChoose(); var dstate = ApprovalStatusvalidChoose().join(','); if (d.length == 0) { $.messager.alert("系统提示", "请选择教学任务进行分班!"); return; } if (d.length > 1) { $.messager.alert("系统提示", "只能选择单个记录进行分班设置!"); return; } for (var i = 0; i < dstate.split(',').length; i++) { if (dstate.split(',')[i] == scheduled) { $.messager.alert("系统提示", "您选择的排课分班存在状态已排课数据!"); return; } if (dstate.split(',')[i] == submitted) { $.messager.alert("系统提示", "您选择的排课分班存在状态已提交数据!"); return; } } $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/EducationMissionClass/CheckEducationMissionClassOpenControl', { educationMissionClassIDs: idList.join(',') }, function (data) { if (data.IsSuccess) { var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/EducationMissionClass/DivideIntoClassesEdit?educationMissionClassID=" + d[0].EducationMissionClassID + "&MNU=" + mnu; $.popupTopWindow('分班设置', redirectTo, 800, 250, null, null); } else { $.messager.alert("系统提示", data.Message); return; } }); } function EducationMissionClass_Add() { var d = validChooseObj(); var idList = validChoose(); if (d.length == 0) { $.messager.alert("系统提示", "请选择教学任务!"); return; } if (d.length > 1) { $.messager.alert("系统提示", "只能选择单个记录进行设置!"); return; } //var approvalStatus = ApprovalStatusvalidChoose(); //if (approvalStatus != scheduled) { // $.messager.alert("系统提示", "未进行排课,无法设置任课老师!"); // return; //} if (d[0].IsCollegeScheduleSubmitted && d[0].ApprovalStatus == scheduled) { $.messager.alert("系统提示", "该课程属于" + d[0].CollegeName + ",并且已排课,他们的院系课表已经提交,不能进行设置,请先撤销课表的提交后再进行设置。"); return; } $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/EducationMissionClass/CheckEducationMissionClassOpenControl', { educationMissionClassIDs: idList.join(',') }, function (data) { if (data.IsSuccess) { var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/EducationMissionClass/SetTeacher" + "?educationMissionClassID=" + d[0].EducationMissionClassID + "&MNU=" + mnu; $.popupTopWindow('设置教师', redirectTo, 800, 600, null, null); } else { $.messager.alert("系统提示", data.Message); return; } }); } function EducationMissionClass_Schedule() { var d = validChooseObj(); var idList = validChoose(); var dstate = ApprovalStatusvalidChoose(); if (d == "") { $.messager.alert("系统提示", "请选择教学任务进行排课。"); return; } if (d.length > 1) { $.messager.alert("系统提示", "只能选择单个记录进行排课。"); return; } if (dstate[0] == notSubmitted) { $.messager.alert("系统提示", "任务班未提交,请提交后再进行排课。"); return; } $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/EducationMissionClass/CheckEducationMissionClassOpenControl', { educationMissionClassIDs: idList.join(',') }, function (data) { if (data.IsSuccess) { var fullUrl = CMS_SystemConfig.VirtualDirectoryPath + '/EducationSchedule/Edit?classmajorID=' + d[0].MainScheduleClassID + '&grademajorID=' + d[0].MainScheduleClassGrademajorID + '&collegeID=' + d[0].MainScheduleClassCollegeID + '&schoolyearID=' + d[0].SchoolyearID + '&standardID=' + d[0].StandardID + '&yearID=' + d[0].GradeYearID + '&FromMNU=' + mnu; $.popupTopWindow('手动排课', fullUrl, window.screen.availWidth, window.screen.availHeight - 60, reload); } else { $.messager.alert("系统提示", data.Message); return; } }); } function EducationMissionClass_DepartmentSchedule() { var d = validChooseObj(); var idList = validChoose(); var dstate = ApprovalStatusvalidChoose(); if (d == "") { $.messager.alert("系统提示", "请选择教学任务进行排课。"); return; } if (d.length > 1) { $.messager.alert("系统提示", "只能选择单个记录进行排课。"); return; } if (dstate[0] == notSubmitted) { $.messager.alert("系统提示", "任务班未提交,请提交后再进行排课。"); return; } $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/EducationMissionClass/CheckEducationMissionClassOpenControl', { educationMissionClassIDs: idList.join(',') }, function (data) { if (data.IsSuccess) { var fullUrl = CMS_SystemConfig.VirtualDirectoryPath + '/EducationSchedule/DepartmentEdit?collegeID=' + d[0].CollegeID + '&departmentID=' + d[0].DepartmentID + '&schoolyearID=' + d[0].SchoolyearID + '&handleMode=' + d[0].HandleModeID + '&FromMNU=' + mnu; $.popupTopWindow('教研室排课', fullUrl, window.screen.availWidth, window.screen.availHeight - 60, reload); } else { $.messager.alert("系统提示", data.Message); return; } }); } function EducationMissionClass_Save() { var d = $.map(validChooseObj(), function (x) { return x.EducationMissionClassID; }).join(','); var orderno = OrderNovalidChoose().join(','); var dstate = ApprovalStatusvalidChoose().join(','); if (d.length == 0) { $.messager.alert("系统提示", "请选择保存的教学任务!"); return; } for (var i = 0; i < dstate.split(',').length; i++) { if (dstate.split(',')[i] == scheduled) { $.messager.alert("系统提示", "保存失败,您选择的教学任务班存在已排课数据!"); return; } } $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/EducationMissionClass/CheckEducationMissionClassOpenControl', { educationMissionClassIDs: d }, function (data) { if (data.IsSuccess) { $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/EducationMissionClass/TeachingScheduleEdit', { educationMissionClassIDs: d, orderNos: orderno }, function (data) { if (data == "成功") { $.messager.alert("系统提示", "保存成功!"); reload(); } else { $.messager.alert("系统提示", data); } }); } else { $.messager.alert("系统提示", data.Message); return; } }); } function EducationMissionClass_Arrange() { var d = validChooseObj(); var idList = validChoose(); if (d.length == 0) { $.messager.alert("系统提示", "请选择教学任务!"); return; } if (d.length > 1) { $.messager.alert("系统提示", "只能选择单个记录进行教学安排设置!"); return; } var redirectTo = url + "?educationMissionClassID=" + d[0].EducationMissionClassID + "&MNU=" + mnu; $.popupTopWindow('教学安排设置', redirectTo, 800, 600, null, null); } function EducationMissionClassSchedule_Delete() { var d = $.map(validChooseObj(), function (x) { return x.EducationMissionClassID; }).join(','); var state = ApprovalStatusvalidChoose().join(','); var classroomTypeName = ClassroomTypeNamevalidChoose().join(','); if (d.length == 0) { $.messager.alert("系统提示", "请选择您要撤销的任务班排课!"); return; } for (var i = 0; i < state.split(',').length; i++) { if (state.split(',')[i] != scheduled) { $.messager.alert("系统提示", "撤销失败,您选择的教学任务班包含未提交或已提交状态!"); return; } } $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/EducationMissionClass/CheckEducationMissionClassOpenControl', { educationMissionClassIDs: d }, function (data) { if (data.IsSuccess) { $.messager.confirm("系统提示", "您确定要撤销任务班排课?", function (r) { if (r) { $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/EducationMissionClassSchedule/Delete', { educationMissionClassIDs: d }, function (data) { if (data.IsSuccess) { $.messager.alert("系统提示", "撤销成功!"); reload(); } else { $.messager.alert("系统提示", data.Message); } }); } }); } else { $.messager.alert("系统提示", data.Message); return; } }); } function EducationMissionClass_Delete() { var d = $.map(validChooseObj(), function (x) { return x.EducationMissionClassID; }).join(','); var state = ApprovalStatusvalidChoose().join(','); var classroomTypeName = ClassroomTypeNamevalidChoose().join(','); if (d.length == 0) { $.messager.alert("系统提示", "请选择您要删除的任务班!"); return; } for (var i = 0; i < state.split(',').length; i++) { if (state.split(',')[i] == submitted) { $.messager.alert("系统提示", "您选择的任务班存在状态已提交数据!"); return; } } $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/EducationMissionClass/CheckEducationMissionClassOpenControl', { educationMissionClassIDs: d }, function (data) { if (data.IsSuccess) { var ExecutableFreeSelectionCouseIDs = []; $.each($("#dgEducationMissionClassList").cmsXDataTable("getSelections"), function (index) { ExecutableFreeSelectionCouseIDs.push(this.ExecutableFreeSelectionCouseID); }); $.messager.confirm("系统提示", "您确定要删除该任务班?", function (r) { if (r) { $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/EducationMissionClass/Delete', { educationMissionClassIDs: d }, function (data) { if (data.IsSuccess) { $.messager.alert("系统提示", "删除成功!"); reload(); } else { $.messager.alert("系统提示", data.Message); } }); } }); } else { $.messager.alert("系统提示", data.Message); return; } }); //for (var i = 0; i < state.split(',').length; i++) { // if (state.split(',')[i] != notSubmitted) { // $.messager.alert("系统提示", "您选择的任务班存在非未提交数据!"); // return; // } //} } //提交 function EducationMissionClass_Submit() { var d = $.map(validChooseObj(), function (x) { return x.EducationMissionClassID; }).join(','); var state = ApprovalStatusvalidChoose().join(','); var classroomTypeName = ClassroomTypeNamevalidChoose().join(','); var collegeID = collegeIDChoose().join(','); var SchoolyearID = SchoolyearIDChoose().join(','); if (d.length == 0) { $.messager.alert("系统提示", "请选择您要提交的任务班!"); return; } for (var i = 0; i < classroomTypeName.split(',').length; i++) { if (classroomTypeName.split(',')[i] == "") { $.messager.alert("系统提示", "您选择的教学任务班存在教室类型为空数据,请检查!"); return; } } for (var i = 0; i < state.split(',').length; i++) { if (state.split(',')[i] == submitted) { $.messager.alert("系统提示", "您选择的任务班存在状态已提交数据!"); return; } } $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/EducationMissionClass/CheckEducationMissionClassOpenControl', { educationMissionClassIDs: d }, function (data) { if (data.IsSuccess) { $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/EducationMissionClass/EducationMissionClassUpdate', { educationMissionClassIDs: d }, function (data) { if (data == "成功") { $.messager.alert("系统提示", "提交成功!"); reload(); } else { $.messager.alert("系统提示", data); } }); } else { $.messager.alert("系统提示", data.Message); return; } }); } //撤销 function EducationMissionClass_UnSubmit() { var d = $.map(validChooseObj(), function (x) { return x.EducationMissionClassID; }).join(','); var state = ApprovalStatusvalidChoose().join(','); if (d.length == 0) { $.messager.alert("系统提示", "请选择您要撤销提交的任务班!"); return; } for (var i = 0; i < state.split(',').length; i++) { if (state.split(',')[i] != submitted) { $.messager.alert("系统提示", "只能撤销已提交状态的数据!"); return; } } $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/EducationMissionClass/CheckEducationMissionClassOpenControl', { educationMissionClassIDs: d }, function (data) { if (data.IsSuccess) { $.messager.confirm("系统提示", "您确定要撤销提交该任务班?", function (r) { if (r) { $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/EducationMissionClass/UnSubmit', { educationMissionClassIDs: d }, function (data) { $.messager.alert("系统提示", data); if (data == "撤销成功。") { reload(); } }); } }); } else { $.messager.alert("系统提示", data.Message); return; } }); } //排课班级 function SchedulingClassEdit(rowindex, rowdata) { var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/EducationMissionClass/EducationSchedulingClassList?educationMissionClassID=" + rowdata.EducationMissionClassID + "&MNU=" + mnu; $.popupTopWindow('排课班信息', redirectTo, 800, 600, null, null); } //学生总数 function SchedulingClassStudentEdit(rowindex, rowdata) { var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/EducationMissionClass/EducationSchedulingClassCountStudentList?educationMissionClassID=" + rowdata.EducationMissionClassID + "&MNU=" + mnu + "&ApprovalStatusName=" + rowdata.ApprovalStatusName; $.popupTopWindow('学生信息', redirectTo, 800, 600, CloseStudentEdit); } function CloseStudentEdit() { reload(); } function AddStudent_Confirm(studentList) { alert("这边"); } //合班 function EducationMissionClass_Conjunction() { var educationMissionClassList = validChooseObj(); var d = $.map(educationMissionClassList, function (x) { return x.EducationMissionClassID; }); if (d.length < 2) { $.messager.alert("系统提示", "请至少选择两个以上的任务班进行合并。"); return; } for (var i = 0; i < educationMissionClassList.length; i++) { if (educationMissionClassList[i].ApprovalStatus != notSubmitted) { $.messager.alert("系统提示", "只有未提交的教学任务才能进行合班。"); return; } } var courseID = educationMissionClassList[0].CoursematerialID; var schoolyearID = educationMissionClassList[0].SchoolyearID; var teachModeID = educationMissionClassList[0].TeachingModeID; var errorList = $.grep(educationMissionClassList, function (x) { return x.CoursematerialID != courseID || x.SchoolyearID != schoolyearID || x.TeachingModeID != teachModeID }); if (errorList.length > 0) { $.messager.alert("系统提示", "只有同一学年学期上相同课程,授课方式也一致的任务班才可以进行合班。"); return; } $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/EducationMissionClass/CheckEducationMissionClassOpenControl', { educationMissionClassIDs: d.join(',') }, function (data) { if (data.IsSuccess) { var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/EducationMissionClass/EducationMissionClassConjunctionList?MNU=" + mnu; $.popupTopWindow('合班信息', redirectTo, 900, 300, reload, d); } else { $.messager.alert("系统提示", data.Message); return; } }); } function EducationMissionClass_CourseProcess() { var d = validChooseObj(); var idList = validChoose(); if (d.length == 0) { $.messager.alert("系统提示", "请选择修改的教学任务!"); return; } if (d.length > 1) { $.messager.alert("系统提示", "只能选择单个记录进行课程进度设置!"); return; } $.popupTopWindow('课程进度', CMS_SystemConfig.VirtualDirectoryPath + '/EducationMissionClass/CourseProcess?MNU=' + mnu + '&educationMissionClassID=' + d[0].EducationMissionClassID, 620, 430); } //导出Excel function EducationMissionClass_Excel() { var d = validChoose().join(',') if (d != "") { document.getElementById("EducationMissionClassIDs").value = d; } else { document.getElementById("EducationMissionClassIDs").value = ""; } $("#formQuery").submit(); } function QuerySchoolyearDropdownList(data) { reload(); } function QueryComboGridList(data) { reload(); } function QueryComboGridCollegeList(data) { reload(); } function QueryComboGridCampusList(data) { reload(); } function QueryApprovalStatusDropdownList(data) { reload(); } function SelectCollegeComboGrid(data) { CMSFunction.ComboGrid.SetValue($("#GrademajorComboGrid"), "", ""); //清空原有年级专业旧记录 var Year = $("#DictionaryGrade").combobox("getValue"); if (data != null || Year != "-1") { var jsonString = "({'QueryParamsDatas':'CollegeDropdown|*|" + data.CollegeID + "|@|DictionaryGrade|*|" + Year + "|@|'})"; $("#GrademajorComboGrid").combogridX("reload", eval(jsonString)); } reload(); } function SelectDictionaryGrade(data) { CMSFunction.ComboGrid.SetValue($("#GrademajorComboGrid"), "", ""); var collegeID = $("#ComboGridCollege").combogridX("getValue"); if (data.Value != "-1" || data != null) { var jsonString = "({'QueryParamsDatas':'CollegeDropdown|*|" + collegeID + "|@|DictionaryGrade|*|" + data.Value + "|@|'})"; $("#GrademajorComboGrid").combogridX("reload", eval(jsonString)); } reload(); } //点名 function EducationMissionClass_RollCall() { var educationMissionClassIDs = validChoose().join(','); educationMissionClassIDs = (educationMissionClassIDs == "-1" || educationMissionClassIDs == "") ? "=" : "=" + educationMissionClassIDs; var attribute = $("[name='Attribute']").val(); var attributeObj = eval('(' + attribute + ')'); var conditionString = $("[name='Condition']").val(); var value = SystemQueryControl.GetValue(); var condition = '@DynamicAttribute:' + attributeObj.Value + '|@DynamicCondition:' + escape(conditionString) + '|@DynamicValue:' + escape(value); var schoolYearID = $("#SchoolyearDropdown").combobox("getValue") schoolYearID = (schoolYearID == "-1" || schoolYearID == "") ? "=" : "=" + schoolYearID; var collegeID = $("#CollegeDropdown").combogridX("getValue"); collegeID = (collegeID == "-1" || collegeID == "") ? "=" : "=" + collegeID; var year = $("#SchoolyearDictionaryDropDown").combobox("getValue"); year = (year == "-1" || year == "") ? "=" : "=" + year; var grademajorID = $("[comboname='StandardDictionaryDropDown']").combogridX("getValue"); grademajorID = (grademajorID == "-1" || grademajorID == "") ? "=" : "=" + grademajorID; var coursematerialID = $("[comboname='CoursematerialComboGrid']").combogridX("getValue"); coursematerialID = (coursematerialID == "-1" || coursematerialID == "") ? "=" : "=" + coursematerialID; var teachingMethod = $('[comboname="DictionaryTeachingMode"]').combobox("getValue"); teachingMethod = (teachingMethod == "-1" || teachingMethod == "") ? "=" : "=" + teachingMethod; var approvalStatus = $('[comboname="ApprovalStatusDropdownList"]').combobox("getValue"); approvalStatus = (approvalStatus == "-1" || approvalStatus == "") ? "=" : "=" + approvalStatus; var reportUrl = CMS_SystemConfig.ReportPagePath + "?ReportFolder=%2fEducationManage%2fStudentRollCallReport&condition_RAP=" + condition + "&schoolyearID_RAP" + schoolYearID + "&collegeID_RAP" + collegeID + "&year_RAP" + year + "&grademajorID_RAP" + grademajorID + "&coursematerialID_RAP" + coursematerialID + "&teachingMethod_RAP" + teachingMethod + "&educationMissionClassIDs_RAP" + educationMissionClassIDs + "&approvalStatus_RAP" + approvalStatus $.popupTopWindowOutsite('点名册', reportUrl, 900, 700); } SystemBatchModifyControl.OnSubmit = function () { var state = ApprovalStatusvalidChoose().join(','); for (var i = 0; i < state.split(',').length; i++) { if (state.split(',')[i] == scheduled) { $.messager.alert("系统提示", "您选择的教学任务班包含已排课状态!"); return false; } } } function EducationMissionClass_BatchUpdate() { var d = validChoose().join(','); if (d == "") { $.messager.alert("系统提示", "请选择您要修改的教学任务。"); return; } $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/EducationMissionClass/CheckEducationMissionClassOpenControl', { educationMissionClassIDs: d }, function (data) { if (data.IsSuccess) { var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/EducationMissionClass/BatchUpdate?educationMissionClassStr=+' + d + '&MNU=' + mnu; $.popupTopWindow('批量修改课时类别', redirectTo, 450, 200, null, null); } else { $.messager.alert("系统提示", data.Message); return; } }); } //联动查询 function queryStandard(data) { queryClass(); reload(); } function queryCollege(data) { var campusID = $("#CampusDropdown").combogridX("getValue"); var collegeID = $("#CollegeDropdown").combogridX("getValue"); var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|"; jsonString += "CollegeDropdown|*|" + collegeID + "|@|'})"; // $("#CollegeDropdown").combogridX("reload", eval(jsonString)); // $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString)); // if (campusID != nonSelect) { // var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})"; // $("#CollegeDropdown").combogridX("reload", eval(jsonString)); // } queryClass(); reload(); } function queryClass() { var jsonString = ""; var parameterString = ""; var campusID = $("#CampusDropdown").combogridX("getValue"); var collegeID = $("#CollegeDropdown").combogridX("getValue"); //var educationID = $("#Education").combobox("getValue"); var schoolYearID = $("#SchoolyearDictionaryDropDown").combobox("getValue"); var standardID = $("#StandardDictionaryDropDown").combogridX("getValue"); //var learningFormID = $("#LearningformDictionaryDropDown").combobox("getValue"); //if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|"; //if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|"; //if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|"; if (schoolYearID != nonSelect) parameterString += "DictionaryGrade|*|" + schoolYearID + "|@|"; if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|"; //if (learningFormID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningFormID + "|@|"; if (parameterString != "") { jsonString = "({'QueryParamsDatas':'" + parameterString + "'})"; $("#ClassmajorDropdown").combogridX("reload", eval(jsonString)); $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString)); } else { $("#ClassmajorDropdown").combogridX("reload"); $("#StandardDictionaryDropDown").combogridX("reload"); } reload(); } function EducationMissionClass_ClassRoomEdit() { var d = validChooseObj(); var idList = validChoose(); if (d.length == 0) { $.messager.alert("系统提示", "请选择教学任务!"); return; } if (d.length > 1) { $.messager.alert("系统提示", "只能选择单个记录进行设置!"); return; } $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/EducationMissionClass/CheckEducationMissionClassOpenControl', { educationMissionClassIDs: idList.join(',') }, function (data) { if (data.IsSuccess) { var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/EducationMissionClass/ClassRoomEdit" + "?educationMissionClassID=" + d[0].EducationMissionClassID + "&MNU=" + mnu; $.popupTopWindow('修改教室', redirectTo, 800, 200, null, null); } else { $.messager.alert("系统提示", data.Message); return; } }); } function EducationMissionClassStudentList_print() { var educationMissionClassIDs = validChoose().join(','); educationMissionClassIDs = (educationMissionClassIDs == "-1" || educationMissionClassIDs == "") ? "=" : "=" + educationMissionClassIDs; // var attribute = $("[name='Attribute']").val(); // var attributeObj = eval('(' + attribute + ')'); // var conditionString = $("[name='Condition']").val(); // var value = SystemQueryControl.GetValue(); // var condition = '@DynamicAttribute:' + attributeObj.Value + '|@DynamicCondition:' + escape(conditionString) + '|@DynamicValue:' + escape(value); var schoolYearID = $("#SchoolyearDropdown").combobox("getValue") schoolYearID = (schoolYearID == "-1" || schoolYearID == "") ? "=" : "=" + schoolYearID; var collegeID = $("#CollegeDropdown").combogridX("getValue"); collegeID = (collegeID == "-1" || collegeID == "") ? "=" : "=" + collegeID; var year = $("#SchoolyearDictionaryDropDown").combobox("getValue"); year = (year == "-1" || year == "") ? "=" : "=" + year; var grademajorID = $("[comboname='StandardDictionaryDropDown']").combogridX("getValue"); grademajorID = (grademajorID == "-1" || grademajorID == "") ? "=" : "=" + grademajorID; var classmajorID = $("[comboname='ClassmajorDropdown']").combogridX("getValue"); classmajorID = (classmajorID == "-1" || classmajorID == "") ? "=" : "=" + classmajorID; var coursematerialID = $("[comboname='CoursematerialComboGrid']").combogridX("getValue"); coursematerialID = (coursematerialID == "-1" || coursematerialID == "") ? "=" : "=" + coursematerialID; var teachingMethod = $('[comboname="DictionaryTeachingMode"]').combobox("getValue"); teachingMethod = (teachingMethod == "-1" || teachingMethod == "") ? "=" : "=" + teachingMethod; var approvalStatus = $('[comboname="ApprovalStatusDropdownList"]').combobox("getValue"); approvalStatus = (approvalStatus == "-1" || approvalStatus == "") ? "=" : "=" + approvalStatus; var reportUrl = CMS_SystemConfig.ReportPagePath + "?ReportFolder=%2fEducationManage%2fEducationMissionClassStudentList&SchoolyearID_RAP" + schoolYearID + "&CollegeID_RAP" + collegeID + "&YearID_RAP" + year + "&StandardID_RAP" + grademajorID + "&ClassmajorID_RAP" + classmajorID + "&CoursematerialID_RAP" + coursematerialID + "&TeachingModeID_RAP" + teachingMethod + "&EducationMissionClassID_RAP" + educationMissionClassIDs + "&RecordStatus_RAP" + approvalStatus $.popupTopWindowOutsite('点名表', reportUrl, 900, 700); } function EducationMissionClassStudentList_Report() { var d = validChoose().join(','); if (d == "") { $.messager.alert("系统提示", "请选择您要打印考勤表的教学任务。"); return; } $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/EducationMissionClass/GZMSStudentListReport', { educationMissionClassIDList:d }, function (data) { if (data.IsSuccess) { var redirectTo = "../../Scripts/pdf.js/web/viewer.html?file=" + data.Message; $.popupTopWindow('考勤表', redirectTo, 850, 480, reload); } else { $.messager.alert("系统提示", data); } }); }