var isFirstLoadGrademajor = true; var isFirstLoadClassmajor = true; function Report_Search() { var schoolYearID = $("#SchoolYearDropdown").combobox("getValue"); var collegeID = $("#CollegeDropdown").combobox("getValue"); if (collegeID == -1 || collegeID == "") { $.messager.alert("系统信息", "请选择院系所"); return; } //collegeID = collegeID == -1 ? ":isnull=true" : "=" + collegeID; collegeID = collegeID == -1 ? "=" : "=" + collegeID; var gradeID = $("#DictionarySchoolyear").combobox("getValue"); if (gradeID == -1 || gradeID == "") { $.messager.alert("系统信息", "请选择年级"); return; } gradeID = gradeID == -1 ? "" : gradeID; var classmajorID = $("#ClassmajorDropdown").combogridX("getValue"); if (classmajorID == -1 || classmajorID == "") $.messager.alert("系统信息", "请选择班级"); else { if (CMS_SystemConfig.ReportType == 1) { $("#reportContent").attr("src", CMS_SystemConfig.ReportPagePath + "?ReportFolder=%2fEducationScheduling%2fClassmajorSchedulingView&ClassmajorID_RAP=" + classmajorID + "&CollegeID_RAP" + collegeID + "&SchoolyearID_RAP=" + schoolYearID + "&Years_RAP=" + gradeID); } if (CMS_SystemConfig.ReportType == 2) { var fileUrl = CMS_SystemConfig.VirtualDirectoryPath + "/EducationSchedulingReport/ClassmajorSchedulingPDF?ClassmajorID=" + classmajorID + "&CollegeID" + collegeID + "&SchoolyearID=" + schoolYearID + "&Years=" + gradeID; $("#reportContent").attr("src", CMS_SystemConfig.VirtualDirectoryPath + "/Scripts/pdf.js/web/viewer.html?file=" + encodeURIComponent(fileUrl)); } } } function QueryCollegeDropdownList(data) { // if (((data.length && data.length > 0) || data) // && $("#GrademajorDropdown").length > 0 && $.data($("#GrademajorDropdown")[0], "combobox")) { // var url = CMS_SystemConfig.VirtualDirectoryPath + "/Grademajor/BindDropdownListByCollege?bindType=PleaseSelect"; // var collegeID = $("#CollegeDropdown").combobox("getValue"); // if (collegeID != nonSelect) url += "&collegeID=" + collegeID; // $("#GrademajorDropdown").combobox("reload", url); // } $("#DictionaryStandard").combogridX("setValue", "-1"); var collegeID = $("#CollegeDropdown").combogrid("getValue"); if (collegeID != nonSelect) { var jsonString = "({'QueryParamsDatas':'CollegeDropdown|*|" + collegeID + "|@|'})"; $("#DictionaryStandard").combogridX("reload", eval(jsonString)); } queryClass(); } function SelectGrademajorDropdownList() { var url = CMS_SystemConfig.VirtualDirectoryPath + "/Classmajor/BindDropdownListByGrademajorID?bindType=PleaseSelect"; var grademajorID = $("#GrademajorDropdown").combobox("getValue"); if (grademajorID != nonSelect) url += "&grademajorID=" + grademajorID; $("#ClassmajorDropdown").combobox("reload", url); SelectGrademajorDropdownList } function QueryGrademajorDropdownList(data) { if (((data.length && data.length > 0) || data) && $("#ClassmajorDropdown").length > 0 && $.data($("#ClassmajorDropdown")[0], "combobox")) { var url = CMS_SystemConfig.VirtualDirectoryPath + "/Classmajor/BindDropdownListByGrademajorID?bindType=PleaseSelect"; if (isFirstLoadGrademajor) { isFirstLoadGrademajor = false; } else { if (data.length > 0) { $("#GrademajorDropdown").combobox("setValue", data[0].Value); } else { $("#GrademajorDropdown").combobox("clear"); } } var grademajorID = $("#GrademajorDropdown").combobox("getValue"); if (grademajorID != nonSelect) url += "&grademajorID=" + grademajorID; $("#ClassmajorDropdown").combobox("reload", url); } } function QueryClassmajorDropdownList(data) { if (((data.length && data.length > 0) || data)) { if (isFirstLoadClassmajor) { isFirstLoadClassmajor = false; } else { if (data.length > 0) { $("#ClassmajorDropdown").combobox("setValue", data[0].Value); } else { $("#ClassmajorDropdown").combobox("clear"); } } queryClass(); } } function QueryLearningformDropdownList() { } function SelectClassmajorDropdownList() { // // var url = CMS_SystemConfig.VirtualDirectoryPath + "/Classmajor/BindDropdownListByYearOrStandard?bindType=PleaseSelect"; // var jsonString = "({'QueryParamsDatas':'"; // var year = $("#DictionarySchoolyear").combobox("getValue"); // //if (year != nonSelect) url += "&year=" + year; // if (year != nonSelect) jsonString += "DictionaryGrade|*|" + year + "|@|"; // var standardID = $("#DictionaryStandard").combogridX("getValue"); // //if (standardID != nonSelect) url += "&standardID=" + standardID; // if (standardID != nonSelect) jsonString += "DictionaryStandard|*|" + standardID + "|@|"; // $("#ClassmajorDropdown").combogridX("reload", eval(jsonString + "'})")); queryClass(); } function reload() { var schoolYearID = $("#SchoolYearDropdown").combobox("getValue"); var collegeID = $("#CollegeDropdown").combobox("getValue"); var classmajorID = $("#ClassmajorDropdown").combogridX("getValue"); } function queryClass() { var jsonString = ""; var parameterString = ""; //var campusID = $("#CampusDropdown").combogridX("getValue"); var collegeID = $("#CollegeDropdown").combobox("getValue"); //var educationID = $("#Education").combobox("getValue"); var gradeID = $("#DictionarySchoolyear").combobox("getValue"); var standardID = $("#DictionaryStandard").combogridX("getValue"); //var learningFormID = $("#LearningformDictionaryDropDown").combobox("getValue"); //if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|"; if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|"; //if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|"; if (gradeID != nonSelect) parameterString += "DictionaryGrade|*|" + gradeID + "|@|"; if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|"; //if (learningFormID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningFormID + "|@|"; if (parameterString != "") { jsonString = "({'QueryParamsDatas':'" + parameterString + "'})"; $("#ClassmajorDropdown").combogridX("reload", eval(jsonString)); $("#DictionaryStandard").combogridX("reload", eval(jsonString)); } else { $("#ClassmajorDropdown").combogridX("reload"); $("#DictionaryStandard").combogridX("reload"); } reload(); }