var mnu = ""; //加载 $(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); }); //新增 function BatchQuit_Add() { $.popupTopWindow('选择批量退学的学生', CMS_SystemConfig.VirtualDirectoryPath + "/Common/StudentBatchSelect", 1024, 768, BatchQuit_Add_Confirm, null); } function BatchQuit_Add_Confirm(studentList) { if (studentList) { var ids = $.map(studentList, function (x) { return x.UserID }); $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/StudentBatchQuit/BatchAdd', { studentIDs: ids.join(',') }, function (data) { $.messager.alert("系统提示", data.Message); if (data.IsSuccess) { $("#dgList").cmsXDataTable('load'); } }); } } //联动查询 function queryStandard(data) { reload(); } function queryCollege(data) { var campusID = $("#cbgCampus").combogridX("getValue"); var collegeID = $("#cbgCollege").combogridX("getValue"); var collegeJsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})"; $("#cbgCollege").combogridX("reload", eval(collegeJsonString)); var standardJsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|"; standardJsonString += "CollegeDropdown|*|" + collegeID + "|@|'})"; $("#cbgStandard").combogridX("reload", eval(standardJsonString)); reload(); } function reload() { $("#dgList").cmsXDataTable("load", $.getDataGridParams("dgList")); } //获取选中的数据 function validChoose() { var d = []; $.each($("#dgList").cmsXDataTable("getSelections"), function (index) { d.push(this.EntityID); }); return d; } //删除 function BatchQuit_Delete() { var selected = $("#dgList").cmsXDataTable("getSelections"); if (selected.length == 0) { $.messager.alert("系统提示", "请选择您要删除的批量退学信息!"); return; } var ids = []; for (var i = 0; i < selected.length; i++) { ids.push(selected[i].EntityID); } $.messager.confirm("系统提示", "您确定要删除该批量退学信息?", function (r) { if (r) { $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/StudentBatchQuit/Delete', { differentDynamicIDs: ids.join(',') }, function (data) { $.messager.alert("系统提示", data.Message); if (data.IsSuccess) { $("#dgList").cmsXDataTable('load'); } }); } }); } //提交 function BatchQuit_Submit() { var selected = $("#dgList").cmsXDataTable("getSelections"); if (selected.length == 0) { $.messager.alert("系统提示", "请选择您要提交的批量退学信息!"); return; } var ids = []; for (var i = 0; i < selected.length; i++) { ids.push(selected[i].EntityID); } $.messager.confirm("系统提示", "您确定要提交该批量退学信息?提交后将无法删除,是否确定?", function (r) { if (r) { $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/StudentBatchQuit/Submit', { differentDynamicIDs: ids.join(',') }, function (data) { $.messager.alert("系统提示", data.Message); if (data.IsSuccess) { $("#dgList").cmsXDataTable('load'); } }); } }); } //提交 function BatchQuit_Approve() { var selected = $("#dgList").cmsXDataTable("getSelections"); if (selected.length == 0) { $.messager.alert("系统提示", "请选择您要审核的批量退学信息!"); return; } var ids = []; for (var i = 0; i < selected.length; i++) { ids.push(selected[i].EntityID); } $.messager.confirm("系统提示", "您确定要审核该批量退学信息?", function (r) { if (r) { $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/StudentBatchQuit/Approve', { differentDynamicIDs: ids.join(',') }, function (data) { $.messager.alert("系统提示", data.Message); if (data.IsSuccess) { $("#dgList").cmsXDataTable('load'); } }); } }); } function BatchQuit_Export() { $("#formQuery").submit(); } function BatchQuit_Print() { var d = []; $.each($("#dgList").cmsXDataTable("getSelections"), function (index) { d.push(this.EntityID); }); var selected = $("#dgList").cmsXDataTable("getSelections"); for (var i = 0; i < selected.length; i++) { if (selected[i].EntityApprovalStatus == 1) { $.messager.alert("系统提示", "所选数据中含有未提交的数据,该部分数据将不能进行申请表的生成,请先进行提交!"); return; } } var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/StudentBatchQuit/DifferentDynamicBatchQuitReport?MNU=' + mnu; var DifferentDynamicID = d.join(','); var SchoolyearID = $("#ddlSchoolYear").combobox("getValue"); var CollegeID = $("#cbgCollege").combogridX("getValue"); var yearID = $("#ddlYear").combobox("getValue"); var StandardID = $("#cbgStandard").combogridX("getValue"); var LearningformID = $("#ddlLearningform").combobox("getValue"); var EducationID = $("#ddlEducation").combobox("getValue"); var LearnSystem = null; var ClassmajorID = null; var DifferentDynamicType = null; var ApprovalStatus = $("#ddlStatus").combobox("getValue"); $.popupTopWindow('批量退学表', redirectTo, 750, 650, null, { SchoolyearID: SchoolyearID, CollegeID: CollegeID, yearID: yearID, StandardID: StandardID, LearningformID: LearningformID, EducationID: EducationID, LearnSystem: LearnSystem, ClassmajorID: ClassmajorID, DifferentDynamicType: DifferentDynamicType, ApprovalStatus: ApprovalStatus, DifferentDynamicID: DifferentDynamicID }); }