var url = CMS_SystemConfig.VirtualDirectoryPath + "/GraduateCardList/Edit"; var mnu = ""; //加载 $(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); }) //刷新 function reload() { $("#dgGraduateCardList").cmsXDataTable("load", $.getDataGridParams("dgGraduateCardList")); } //获取选中的数据 function validChoose() { var d = []; $.each($("#dgGraduateCardList").cmsXDataTable("getSelections"), function (index) { d.push(this.GraduateCardApplyID); }); return d; } //新增 function GraduateCardList_Add() { var d = validChoose(); if (d.length > 0) { $.popupTopWindow('去向名单复制新增', CMS_SystemConfig.VirtualDirectoryPath + '/GraduateCardList/CopyAdd?graduateCardApplyID=' + d[0] + '&MNU=' + mnu, 680, 385, null, null); } else { var redirectTo = url + "?MNU=" + mnu; $.popupTopWindow('去向名单新增', redirectTo, 680, 385, null, null); } } //修改 function GraduateCardList_Edit() { var d = validChoose(); if (d.length == 0) { $.messager.alert("系统信息", "请选择您要修改的信息。"); return; } if (d.length > 1) { $.messager.alert("系统信息", "只能选择单个记录进行修改。"); return; } var redirectTo = url + "?graduateCardApplyID=" + d + "&MNU=" + mnu; $.popupTopWindow('去向名单修改', redirectTo, 680, 385, null, null); } //删除 function GraduateCardList_Delete() { var d = validChoose().join(','); if (d == "") { $.messager.alert("系统提示", "请选择您要删除的信息。"); return; } $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) { if (r) { $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/GraduateCardList/Delete', { graduateCardApplyIDs: d }, function (data) { if (data.IsSuccess) { $.messager.alert("系统提示", data.Message); $("#dgGraduateCardList").cmsXDataTable('load'); } else { $.messager.alert("系统提示", data.Message); } }); } }); } //学生最终成绩明细 function editFinallyScore(rowindex, rowdata) { redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/GraduateCardList/FinallyScoreList?graduateCardApplyID=" + rowdata.GraduateCardApplyID + "&MNU=" + mnu; $.popupTopWindow('学生最终成绩明细', redirectTo, 1200, 540, null, null); } //设置列颜色为红色 function SetRedColumn(index, row, value) { return " " + value + ""; } //Excel导出 function GraduateCardList_Export() { $("#formQuery").submit(); } //联动查询 function queryCampus(data) { var campusID = $("#CampusDropdown").combogridX("getValue"); if (campusID != nonSelect) { 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 querySchoolyear(data) { queryClass(); } function queryStandard(data) { queryClass(); } function queryClass() { var jsonString = ""; var parameterString = ""; var campusID = $("#CampusDropdown").combogridX("getValue"); var collegeID = $("#CollegeDropdown").combogridX("getValue"); var schoolYearID = $("#DictionarySchoolyear").combogridX("getValue"); var standardID = $("#DictionaryStandard").combogridX("getValue"); var educationID = $("#DictionaryEducation").combogridX("getValue"); var learningFormID = $("#DictionaryLearningform").combogridX("getValue"); if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|"; if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|"; if (schoolYearID != nonSelect) parameterString += "DictionaryGrade|*|" + schoolYearID + "|@|"; if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|"; if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|"; if (learningFormID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningFormID + "|@|"; if (parameterString != "") { jsonString = "({'QueryParamsDatas':'" + parameterString + "'})"; $("#DictionaryStandard").combogridX("reload", eval(jsonString)); } else { $("#DictionaryStandard").combogridX("reload"); } reload(); }