123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171 |
- 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
- });
-
- }
|