var isFirstLoadDepartment = true; var isFirstLoadStaff = true; function Report_Search() { var schoolYearID = $("#SchoolYearDropdown").combobox("getValue"); var collegeID = $("#CollegeDropdown").combobox("getValue"); collegeID = collegeID == -1 ? "=" : "=" + collegeID; var userID = $("#StaffDropdown").combogridX("getValue"); if (userID == -1 || userID == "") $.messager.alert("系统信息", "请选择教师"); else { if (CMS_SystemConfig.ReportType == 1) { $("#reportContent").attr("src", CMS_SystemConfig.ReportPagePath + "?ReportFolder=%2fEducationScheduling%2fTeacherSchedulingView&CollegeID_RAP" + collegeID + "&UserID_RAP=" + userID + "&SchoolyearID_RAP=" + schoolYearID); } if (CMS_SystemConfig.ReportType == 2) { var fileUrl = CMS_SystemConfig.VirtualDirectoryPath + "/EducationSchedulingReport/TeacherSchedulingPDF?CollegeID=" + collegeID + "&UserID=" + userID + "&SchoolyearID=" + schoolYearID; $("#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) && $("#DepartmentDropdown").length > 0 && $.data($("#DepartmentDropdown")[0], "combobox")) { var url = CMS_SystemConfig.VirtualDirectoryPath + "/Department/DepartmentDropdownListBanid?bindType=PleaseSelect"; // "/Department/DepartmentDropdownListBanid?bindType=2"; var collegeID = $("#CollegeDropdown").combobox("getValue"); if (collegeID != nonSelect) url += "&collegeID=" + collegeID; $("#DepartmentDropdown").combobox("reload", url); } } function SelectDepartmentDropdownList() { var url = CMS_SystemConfig.VirtualDirectoryPath + "/Staff/GetDepartmentStaffDataBind?bindType=PleaseSelect"; //"/Staff/GetDepartmentStaffDataBind?bindType=2"; var departmentID = $("#DepartmentDropdown").combobox("getValue"); if (departmentID != nonSelect) url += "&DepartmentDropdown=" + departmentID; // $("#StaffDropdown").combobox("reload", url); var jsonString = "({'QueryParamsDatas':'DepartmentDropdown|*|" + departmentID + "|@|'})"; $("#StaffDropdown").combogridX("reload", eval(jsonString)); } function QueryDepartmentDropdownList(data) { if (((data.length && data.length > 0) || data) && $("#StaffDropdown").length > 0 && $.data($("#StaffDropdown")[0], "combobox")) { var url = CMS_SystemConfig.VirtualDirectoryPath + "/Staff/DepartmentDropdown?bindType=PleaseSelect"; //"/Staff/DepartmentDropdown?bindType=2"; if (isFirstLoadDepartment) { isFirstLoadDepartment = false; } else { if (data.length > 0) { $("#DepartmentDropdown").combobox("setValue", data[0].Value); } else { $("#DepartmentDropdown").combobox("clear"); } } var departmentID = $("#DepartmentDropdown").combobox("getValue"); if (departmentID != nonSelect) url += "&departmentID=" + departmentID; $("#StaffDropdown").combogridX("reload", url); } } function QueryStaffDropdownList(data) { if (((data.length && data.length > 0) || data)) { if (isFirstLoadStaff) { isFirstLoadStaff = false; } else { if (data.length > 0) { $("#StaffDropdown").combogridX("setValue", data[0].Value, reload); } else { $("#StaffDropdown").combogridX("clear"); } } } } function reload() { var schoolYearID = $("#SchoolYearDropdown").combobox("getValue"); var collegeID = $("#CollegeDropdown").combobox("getValue"); var userID = $("#StaffDropdown").combogridX("getValue"); }