var url = CMS_SystemConfig.VirtualDirectoryPath + "/ChangeResult/Edit"; var mnu = ""; //加载 $(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); }) //刷新 function reload() { $("#dgChangeResultList").cmsXDataTable("load", $.getDataGridParams("dgChangeResultList")); } //获取选中的数据 function validChoose() { var d = []; $.each($("#dgChangeResultList").cmsXDataTable("getSelections"), function (index) { d.push(this.StudentChangeID); }); return d; } //查看明细 function edit(rowindex, rowdata) { var redirectTo = url + "?studentChangeID=" + rowdata.StudentChangeID + "&MNU=" + mnu + "&type=detail"; $.popupTopWindow('异动结果信息', redirectTo, 720, 550, null, null); } //删除 function ChangeResult_Delete() { var d = validChoose().join(','); if (d == "") { $.messager.alert("系统提示", "请选择您要删除的信息。"); return; } $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) { if (r) { $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/ChangeResult/Delete', { studentChangeIDs: d }, function (data) { if (data.IsSuccess) { $.messager.alert("系统提示", data.Message); $("#dgChangeResultList").cmsXDataTable('load'); } else { $.messager.alert("系统提示", data.Message); } }); } }); } //设置列颜色为红色 function SetRedColumn(index, row, value) { return " " + value + ""; } //Excel导出 function ChangeResult_Export() { $("#formQuery").submit(); } //Excel导入 function ChangeResult_Import() { var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/ChangeResult/Import?MNU=' + mnu; $.popupTopWindow('学籍异动信息导入', redirectTo, 420, 300, reload); } //联动查询 function queryCampus(data) { var campusID = $("#CampusDropdown").combogridX("getValue"); var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})"; $("#CollegeDropdown").combogridX("reload", eval(jsonString)); queryClass(); } 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)); $("#DictionaryStandard").combogridX("reload", eval(jsonString)); queryClass(); } function queryGrade(data) { queryClass(); } function queryStandard(data) { queryClass(); } function queryLearnSystem(data) { queryClass(); } function queryGrademajor(data) { queryClass(); } function queryClass() { var jsonString = ""; var parameterString = ""; var campusID = $("#CampusDropdown").combogridX("getValue"); var collegeID = $("#CollegeDropdown").combogridX("getValue"); var gradeID = $("#DictionaryGrade").combogridX("getValue"); var standardID = $("#DictionaryStandard").combogridX("getValue"); var educationID = $("#DictionaryEducation").combogridX("getValue"); var learningformID = $("#DictionaryLearningform").combogridX("getValue"); var learnSystem = $("#DictionaryLearnSystem").combogridX("getValue"); //var grademajorID = $("#GrademajorComboGrid").combogridX("getValue"); if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|"; if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|"; if (gradeID != nonSelect) parameterString += "DictionaryGrade|*|" + gradeID + "|@|"; if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|"; if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|"; if (learningformID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningformID + "|@|"; if (learnSystem != nonSelect) parameterString += "DictionaryLearnSystem|*|" + learnSystem + "|@|"; //if (grademajorID != nonSelect) parameterString += "GrademajorComboGrid|*|" + grademajorID + "|@|"; if (parameterString != "") { jsonString = "({'QueryParamsDatas':'" + parameterString + "'})"; $("#DictionaryStandard").combogridX("reload", eval(jsonString)); //$("#GrademajorComboGrid").combogridX("reload", eval(jsonString)); $("#ClassmajorComboGrid").combogridX("reload", eval(jsonString)); } else { $("#DictionaryStandard").combogridX("reload"); //$("#GrademajorComboGrid").combogridX("reload"); $("#ClassmajorComboGrid").combogridX("reload"); } reload(); }