123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgRetakePlanResultList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.RetakePlanStudentID);
- });
- return d;
- }
- //获取选中的数据
- function validChooseUserID() {
- var d = [];
- $.each($("#dgRetakePlanResultList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.UserID);
- });
- return d;
- }
- //获取选中的重修任务状态
- function validChooseStatus() {
- var d = [];
- $.each($("#dgRetakePlanResultList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.RecordStatus);
- });
- return d;
- }
- function reload() {
- $("#dgRetakePlanResultList").cmsXDataTable("load", $.getDataGridParams("dgRetakePlanResultList"));
- }
- //取消报名(删除)
- function RetakePlanResultList_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;
- }
- }
- $.messager.confirm("系统提示", "您确定要对选择的信息取消报名?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/RetakePlanResult/Delete', { RetakePlanStudentIDs: retakePlanStudentIDs.join(',') }, function (data) {
- $.messager.alert("系统提示", data.Message);
- if (data.IsSuccess) {
- $("#dgRetakePlanResultList").cmsXDataTable('load');
- }
- });
- }
- });
- }
- //列颜色设置为红色
- function SetRedtColumn(index, row, value) {
- return " <span style=\"color: red;\">" + value + "</span>";
- }
- //Excel导出
- function RetakePlanResultList_Excel() {
- $("#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();
- }
|