var isFirstLoadCollege = true; $(function () { $("#txtGroupCount").on("change", reload); }) function QueryCollegeDropdownList(data) { if (((data.length && data.length > 0) || data)) { if (isFirstLoadCollege) { isFirstLoadCollege = false; } else { if (data.length > 0) { $("#CollegeDropdown").combobox("setValue", data[0].Value); } else { $("#CollegeDropdown").combobox("clear"); } } reload(); } } function reload() { var schoolYearID = $("#SchoolYearDropdown").combobox("getValue"); var collegeID = $("#CollegeDropdown").combobox("getValue"); var groupCount = $("#txtGroupCount").val(); if (groupCount == "" || isNaN(groupCount)) { $.messager.alert("系统信息", "填写正确的分组数"); } if (collegeID == -1 || collegeID == "") { $("#reportContent").attr("src", CMS_SystemConfig.ReportPagePath + "?ReportFolder=%2fEducationScheduling%2fGrademajorSchedulingView&CollegeID_RAP=&SchoolyearID_RAP=" + schoolYearID + "&GroupCount_RAP=" + groupCount); } else { $("#reportContent").attr("src", CMS_SystemConfig.ReportPagePath + "?ReportFolder=%2fEducationScheduling%2fGrademajorSchedulingView&CollegeID_RAP=" + collegeID + "&SchoolyearID_RAP=" + schoolYearID + "&GroupCount_RAP=" + groupCount); } }