var mnu = ""; //加载 $(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); }) function validChoose() { var d = []; $.each($("#dgEducationSchedulingAdjustmentList").cmsXDataTable("getSelections"), function (index) { d.push(this); }); return d; } function startTimeChanged(dp) { $("#txtStartTime").val($dp.cal.getNewDateStr()); reload(); } function endTimeChanged(dp) { $("#txtEndTime").val($dp.cal.getNewDateStr()); reload(); } function reload() { $("#dgEducationSchedulingAdjustmentList").cmsXDataTable("load", $.getDataGridParams("dgEducationSchedulingAdjustmentList")); } function queryTeacher(data) { if (((data.length && data.length > 0) || data) && $("#cgbTeacher").length > 0 && $.data($("#cgbTeacher")[0], "combogridX")) { var jsonString = "({'QueryParamsDatas':'"; var collegeID = $("#ddlCollege").combobox("getValue"); if (collegeID != nonSelect) { jsonString += "CollegeDropdown|*|" + collegeID + "|@|"; } jsonString += "'})"; $("#cgbTeacher").combogridX("reload", eval(jsonString)); } } function EducationSchedulingAdjustment_Approve() { var d = validChoose(); if (d.length == 0) { $.messager.alert("系统提示", "请选择要审核的记录。"); return; } var firstStatus = d[0].RecordStatus; if ($.grep(d, function (x) { return x.RecordStatus != firstStatus }).length > 0) { $.messager.alert("系统提示", "请选择相同状态的记录进行审核。"); return; } var firstID = d[0].EducationSchedulingAdjustmentID; $.popupTopWindow('审核信息', CMS_SystemConfig.VirtualDirectoryPath + '/Common/ApproveHandler?TableName=ES_EducationSchedulingAdjustment&FormID=' + firstID, 400, 300, EducationSchedulingAdjustment_Approve_Confirm); } function EducationSchedulingAdjustment_Approve_Confirm(action) { if (!action) return; if (action.ActionID == "") return; var d = $.map(validChoose(), function (x) { return x.EducationSchedulingAdjustmentID; }).join(','); $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + "/EducationSchedule/AdjustmentApprove", { educationSchedulingAdjustmentIDs: d, actionID: action.Action, comment: action.Comment }, function (data) { $.messager.alert("系统提示", data.Message.replace(/;/g, '
')); if (data.IsSuccess) { reload(); } }, 'json'); } function EducationSchedulingAdjustment_Excel() { var d = validChoose(); if (d.length == 0) { $("[name='hidEducationSchedulingAdjustmentID']").val(""); } else { $("[name='hidEducationSchedulingAdjustmentID']").val($.map(d, function (x) { return x.EducationSchedulingAdjustmentID; }).join(',')) } $("#formQuery").submit(); }