123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- 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");
- }
- }
|