var mnu = ""; //加载 $(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); }) //获取选中的数据 function validChoose() { var d = []; $.each($("#dgRetakePlanStudentList").cmsXDataTable("getSelections"), function (index) { d.push(this.FinallyScoreID); }); return d; } //刷新 function reload() { //课程类型 var courseTypeIDs = document.getElementsByName("CourseTypeID"); if (courseTypeIDs.length > 0) { var courseTypeIDList = ""; for (i = 0; i < courseTypeIDs.length; i++) { if (courseTypeIDs[i].checked) { var courseType = courseTypeIDs[i].value; courseTypeIDList = courseTypeIDList + courseType + ','; } } jsonString = "({'QueryParamsDatas':'" + $.getDataGridParams("dgRetakePlanStudentList").QueryParamsDatas + "|@|CourseTypeID|*|" + courseTypeIDList + "|@|" + "'})"; $("#dgRetakePlanStudentList").cmsXDataTable("load", eval(jsonString)); } else { $("#dgRetakePlanStudentList").cmsXDataTable("load", $.getDataGridParams("dgRetakePlanStudentList")); } } //重修任务生成 function RetakePlan_Generate() { var d = validChoose(); if (d == "") { $.messager.alert("系统提示", "请选择您要生成的信息。"); return; } var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/RetakePlanPrescanGeneral/Generate?MNU=" + mnu; $.popupTopWindow('重修任务生成', redirectTo, 420, 230, null, d); } //导出Excel function RetakePlan_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(); }