var url = CMS_SystemConfig.VirtualDirectoryPath + "/FreeSelectionCourseApprove/Details"; var mnu = ""; //加载 $(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); }) //获取选中的数据 function validChoose() { var d = []; $.each($("#dgFreeSelectionCourseApproveList").cmsXDataTable("getSelections"), function (index) { d.push(this); }); return d; } //明细 function Details(rowindex, rowdata) { redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/FreeSelectionCourseApprove/Details?MNU=" + mnu + "&freeSelectionCourseApplyID=" + rowdata.FreeSelectionCouseApplyID + "&MNU=" + mnu; $.popupTopWindow("开课审核信息", redirectTo, 750, 550, null, null); } //Excel导出 function FreeSelectionCourseApprove_Export() { $("#formQuery").submit(); } //审核信息 function FreeSelectionCourse_Approve() { var d = validChoose(); if (d.length == 0) { $.messager.alert("系统提示", "请选择您要审核的信息。"); return; } var approveStatus = d[0].ApprovalStatus; if ($.grep(d, function (v, i) { return v.ApprovalStatus != approveStatus; }).length > 0) { $.messager.alert("系统提示", "请选择相同状态的信息进行审核。"); return; } var firstID = d[0].FreeSelectionCouseApplyID; $.popupTopWindow('审核信息', CMS_SystemConfig.VirtualDirectoryPath + '/Common/ApproveHandler?TableName=EM_FreeSelectionCouseApply&FormID=' + firstID, 400, 300, FreeSelectionCourse_Approve_Confirm); } //审核提交 function FreeSelectionCourse_Approve_Confirm(action) { if (!action) return; var d = $.map(validChoose(), function (x) { return x.FreeSelectionCouseApplyID; }).join(','); $.post(CMS_SystemConfig.VirtualDirectoryPath + "/FreeSelectionCourseApprove/Approve", { formIDs: d, actionID: action.Action, comment: action.Comment }, function (data) { $.messager.alert("系统提示", data.Message); if (data.IsSuccess) { reload(); } }, 'json'); } function reload() { $("#dgFreeSelectionCourseApproveList").cmsXDataTable("load", $.getDataGridParams("dgFreeSelectionCourseApproveList")); } //校区查询下拉 function QueryCampusComboGridList() { var campusID = $("#CampusDropdown").combogridX("getValue"); if (campusID != nonSelect) { var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})"; $("#CollegeDropdown").combogridX("reload", eval(jsonString)); } reload(); } //院系所查询下拉 function QueryCollegeComboGridList() { var collegeID = $("#CollegeDropdown").combogridX("getValue"); if (collegeID != nonSelect) { var jsonString = "({'QueryParamsDatas':'CollegeDropdown|*|" + collegeID + "|@|'})"; $("#DepartmentDropdown").combogridX("reload", eval(jsonString)); } reload(); } //教研室查询下拉 function QueryDepartmentComboGridList() { reload(); } //点击上课周次信息收缩 function swapWeekSettings() { if ($("#weekExpander").attr("expanded") == "0") { $("#weekExpander").css("background", "url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -50px 0"); $("#weekExpander").closest("tr") .next().css("display", "") .next().css("display", "") .next().css("display", "") .next().css("display", ""); $("#weekExpander").attr("expanded", "1"); } else { $("#weekExpander").css("background", "url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -32px 0"); $("#weekExpander").closest("tr") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none"); $("#weekExpander").attr("expanded", "0"); } }