TeacherPrintingReport.js 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. var isFirstLoadCollege = true;
  2. function QueryCollegeDropdownList(data) {
  3. if (((data.length && data.length > 0) || data)) {
  4. if (isFirstLoadCollege) {
  5. isFirstLoadCollege = false;
  6. } else {
  7. if (data.length > 0) {
  8. $("#CollegeDropdown").combobox("setValue", data[0].Value);
  9. } else {
  10. $("#CollegeDropdown").combobox("clear");
  11. }
  12. }
  13. //reload();
  14. }
  15. }
  16. function Report_Search() {
  17. var schoolYearID = $("#SchoolYearDropdown").combobox("getValue");
  18. var collegeID = $("#CollegeDropdown").combobox("getValue");
  19. collegeID = collegeID == -1 ? "=" : "=" + collegeID;
  20. if (collegeID == -1 || collegeID == "")
  21. $.messager.alert("系统信息", "请选择院系所");
  22. else {
  23. if (CMS_SystemConfig.ReportType == 1) {
  24. $("#reportContent").attr("src", CMS_SystemConfig.ReportPagePath + "?ReportFolder=%2fEducationScheduling%2fTeacherSchedulingPrintView&CollegeID_RAP" + collegeID + "&SchoolyearID_RAP=" + schoolYearID);
  25. }
  26. if (CMS_SystemConfig.ReportType == 2) {
  27. var fileUrl = CMS_SystemConfig.VirtualDirectoryPath + "/EducationSchedulingReport/TeacherPrintSchedulingPDF?CollegeID=" + collegeID + "&SchoolyearID=" + schoolYearID;
  28. $("#reportContent").attr("src", CMS_SystemConfig.VirtualDirectoryPath + "/Scripts/pdf.js/web/viewer.html?file=" + encodeURIComponent(fileUrl));
  29. }
  30. }
  31. }
  32. //function reload() {
  33. // var schoolYearID = $("#SchoolYearDropdown").combobox("getValue");
  34. // var collegeID = $("#CollegeDropdown").combobox("getValue");
  35. // $("#reportContent").attr("src", CMS_SystemConfig.ReportPagePath + "?ReportFolder=%2fEducationScheduling%2fTeacherSchedulingPrintView&CollegeID_RAP=" + collegeID + "&SchoolyearID_RAP=" + schoolYearID);
  36. //}