123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 |
- var mnu = "";
- var selectStudentList;
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- });
- //新增
- function BatchSuspend_Add() {
- $.popupTopWindow('选择批量休学的学生', CMS_SystemConfig.VirtualDirectoryPath + "/Common/StudentBatchSelect", 1024, 768, BatchSuspend_Add_Confirm, null);
- }
- function BatchSuspend_Add_Confirm(studentList) {
- if (studentList) {
- selectStudentList = studentList;
- PopupReturnSchoolyearSelect();
- }
- }
- function PopupReturnSchoolyearSelect() {
- $.popupTopWindow('选择复学的学年学期', CMS_SystemConfig.VirtualDirectoryPath + "/StudentBatchSuspend/ReturnSchoolyearSelect?MNU=" + mnu, 320, 200, PopupReturnSchoolyearSelect_Confirm, null);
- }
- function PopupReturnSchoolyearSelect_Confirm(schoolyearID) {
- if (schoolyearID) {
- var ids = $.map(selectStudentList, function (x) { return x.UserID });
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/StudentBatchSuspend/BatchAdd', { studentIDs: ids.join(','), returnSchoolyearID: schoolyearID }, 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 BatchSuspend_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 + '/StudentBatchSuspend/Delete', { differentDynamicIDs: ids.join(',') }, function (data) {
- $.messager.alert("系统提示", data.Message);
- if (data.IsSuccess) {
- $("#dgList").cmsXDataTable('load');
- }
- });
- }
- });
- }
- //提交
- function BatchSuspend_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 + '/StudentBatchSuspend/Submit', { differentDynamicIDs: ids.join(',') }, function (data) {
- $.messager.alert("系统提示", data.Message);
- if (data.IsSuccess) {
- $("#dgList").cmsXDataTable('load');
- }
- });
- }
- });
- }
- //提交
- function BatchSuspend_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 + '/StudentBatchSuspend/Approve', { differentDynamicIDs: ids.join(',') }, function (data) {
- $.messager.alert("系统提示", data.Message);
- if (data.IsSuccess) {
- $("#dgList").cmsXDataTable('load');
- }
- });
- }
- });
- }
- function BatchSuspend_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 + '/StudentBatchSuspend/DifferentDynamicBatchSuspendReport?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
- });
- }
- function BatchSuspend_Export() {
- $("#formQuery").submit();
- }
|