123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgRetakePlanList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.RetakePlanStudentID);
- });
- return d;
- }
- //获取选中的重修任务状态
- function validChooseStatus() {
- var d = [];
- $.each($("#dgRetakePlanList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.RecordStatus);
- });
- return d;
- }
- //刷新
- function reload() {
- $("#dgRetakePlanList").cmsXDataTable("load", $.getDataGridParams("dgRetakePlanList"));
- }
- //删除(重修计划名单)
- function RetakePlanTaskStudent_Delete() {
- var RetakePlanStudentIDs = validChoose();
- var r = validChooseStatus();
- if (RetakePlanStudentIDs.length == 0) {
- $.messager.alert("系统提示", "请选择您要删除的信息。");
- return;
- }
- for (var i = 0; i < r.length; i++) {
- if (r[i] == CreatedStatus) {
- $.messager.alert("系统提示", "无法对已开班状态的信息进行删除。");
- return;
- }
- }
- var d = RetakePlanStudentIDs.join(",");
- $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/RetakePlanTask/IsExistsApplyStudentByRetakePlanStudentID', { retakePlanStudentIDs: d }, function (data) {
- if (data.IsSuccess) {
- if (data.Data) {
- $.messager.defaults = { ok: "继续删除", cancel: "取消" };
- $.messager.confirm("选择提示", "检测到要删除的信息中存在已报名重修的学生名单,是否继续删除?", function (r) {
- if (r) {
- Delete(d);
- }
- else {
- return;
- }
- });
- $.messager.defaults = { ok: "确定", cancel: "取消" };
- }
- else {
- Delete(d);
- }
- }
- else {
- $.messager.alert("系统提示", data.Message);
- }
- });
- }
- });
- }
- //确定删除重修计划名单
- function Delete(d) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/RetakePlanList/Delete', { RetakePlanStudentIDs: d }, function (data) {
- $.messager.alert("系统提示", data.Message);
- if (data.IsSuccess) {
- $("#dgRetakePlanList").cmsXDataTable('load');
- }
- });
- }
- //列颜色设置为红色
- function SetRedtColumn(index, row, value) {
- return " <span style=\"color: red;\">" + value + "</span>";
- }
- //Excel导出
- function RetakePlanTaskStudent_Export() {
- $("#formQuery").submit();
- }
- //联动查询
- function queryStandard(data) {
- queryClass();
- reload();
- }
- function queryCollege(data) {
- var campusID = $("#CampusDropdown").combogridX("getValue");
- var collegeID = $("#CollegeDropdown").combogridX("getValue");
- var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|";
- jsonString += "CollegeDropdown|*|" + collegeID + "|@|'})";
- $("#CollegeDropdown").combogridX("reload", eval(jsonString));
- $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString));
- queryClass();
- reload();
- }
- function queryClass() {
- var jsonString = "";
- var parameterString = "";
- var campusID = $("#CampusDropdown").combogridX("getValue");
- var collegeID = $("#CollegeDropdown").combogridX("getValue");
- var educationID = $("#DictionaryEducation").combobox("getValue");
- var schoolYearID = $("#SchoolyearDictionaryDropDown").combobox("getValue");
- var standardID = $("#StandardDictionaryDropDown").combogridX("getValue");
- var learningFormID = $("#DictionaryLearningform").combobox("getValue");
- if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|";
- if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
- if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|";
- if (schoolYearID != nonSelect) parameterString += "DictionaryGrade|*|" + schoolYearID + "|@|";
- if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|";
- if (learningFormID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningFormID + "|@|";
- if (parameterString != "") {
- jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
- $("#ClassmajorDropdown").combogridX("reload", eval(jsonString));
- $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString));
- } else {
- $("#ClassmajorDropdown").combogridX("reload");
- $("#StandardDictionaryDropDown").combogridX("reload");
- }
- reload();
- }
|