123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203 |
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- });
- //新增
- function BatchRepeat_Add() {
- $.popupTopWindow('选择批量留级的学生', CMS_SystemConfig.VirtualDirectoryPath + "/Common/StudentBatchSelect", 1024, 768, BatchRepeat_Add_Confirm, null);
- }
- function BatchRepeat_Add_Confirm(studentList) {
- if (studentList) {
- var ids = $.map(studentList, function (x) { return x.UserID });
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/StudentBatchRepeat/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 BatchRepeat_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 + '/StudentBatchRepeat/Delete', { differentDynamicIDs: ids.join(',') }, function (data) {
- $.messager.alert("系统提示", data.Message);
- if (data.IsSuccess) {
- $("#dgList").cmsXDataTable('load');
- }
- });
- }
- });
- }
- //提交
- function BatchRepeat_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 + '/StudentBatchRepeat/Submit', { differentDynamicIDs: ids.join(',') }, function (data) {
- $.messager.alert("系统提示", data.Message);
- if (data.IsSuccess) {
- $("#dgList").cmsXDataTable('load');
- }
- });
- }
- });
- }
- //提交
- function BatchRepeat_Process() {
- 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 + '/StudentBatchRepeat/Process', { differentDynamicIDs: ids.join(',') }, function (data) {
- $.messager.alert("系统提示", data.Message);
- if (data.IsSuccess) {
- $("#dgList").cmsXDataTable('load');
- }
- });
- }
- });
- }
- //提交
- function BatchRepeat_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 + '/StudentBatchRepeat/Approve', { differentDynamicIDs: ids.join(',') }, function (data) {
- $.messager.alert("系统提示", data.Message);
- if (data.IsSuccess) {
- $("#dgList").cmsXDataTable('load');
- }
- });
- }
- });
- }
- function BatchRepeat_Export() {
- $("#formQuery").submit();
- }
- function BatchRepeat_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 Attribute = document.getElementsByName("Attribute")[0].value.split("\"Value\":\"")[1].split("\"")[0]; //获取自定义查询的当前字段
- var redirectTo = "";
- if (d != null) {
- d.join(',');
- redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/DifferentDynamicApply/DifferentDynamicApplyReport?MNU=' + mnu
- + "&DifferentDynamicID=" + d
- + "&SchoolyearID=" + $("#ddlSchoolYear").combobox("getValue")
- + "&CampusID=" + $("#cbgCampus").combogridX("getValue")
- + "&CollegeID=" + $("#cbgCollege").combogridX("getValue")
- + "&yearID=" + $("#ddlYear").combobox("getValue")
- + "&StandardID=" + $("#cbgStandard").combogridX("getValue")
- + "&LearningformID=" + $("#ddlLearningform").combobox("getValue")
- + "&EducationID=" + $("#ddlEducation").combobox("getValue")
- + "&ApprovalStatus=" + $("#ddlStatus").combobox("getValue")
- + "&Attribute=" + Attribute
- + "&Condition=" + document.getElementsByName("Condition")[0].value + "&Value="
- + (document.getElementsByName(Attribute + "_QueryTextBox")[0] != null ? document.getElementsByName(Attribute + "_QueryTextBox")[0].value : document.getElementsByName(Attribute + "_QueryDictionaryDropDownList")[0].value);
- }
- else {
- redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/DifferentDynamicApply/DifferentDynamicApplyReport?MNU=' + mnu
- + "&SchoolyearID=" + $("#ddlSchoolYear").combobox("getValue")
- + "&CampusID=" + $("#cbgCampus").combogridX("getValue")
- + "&CollegeID=" + $("#cbgCollege").combogridX("getValue")
- + "&yearID=" + $("#ddlYear").combobox("getValue")
- + "&StandardID=" + $("#cbgStandard").combogridX("getValue")
- + "&LearningformID=" + $("#ddlLearningform").combobox("getValue")
- + "&EducationID=" + $("#ddlEducation").combobox("getValue")
- + "&ApprovalStatus=" + $("#ddlStatus").combobox("getValue")
- + "&Attribute=" + Attribute
- + "&Condition=" + document.getElementsByName("Condition")[0].value + "&Value="
- + (document.getElementsByName(Attribute + "_QueryTextBox")[0] != null ? document.getElementsByName(Attribute + "_QueryTextBox")[0].value : document.getElementsByName(Attribute + "_QueryDictionaryDropDownList")[0].value);
- }
- $.popupTopWindow('异动申请表', redirectTo, 1100, 550, null, null);
- }
|