ClassmajorPrintingReport.js 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. }
  14. }
  15. function Report_Search() {
  16. var schoolYearID = $("#SchoolYearDropdown").combobox("getValue");
  17. var collegeID = $("#CollegeDropdown").combobox("getValue");
  18. var year = "";
  19. if (collegeID == -1 || collegeID == "") {
  20. $.messager.alert("系统信息", "请选择院系所");
  21. return;
  22. }
  23. collegeID = collegeID == -1 ? "=" : "=" + collegeID;
  24. var classmajorID = $("#ClassmajorDropdown").combogridX("getValue");
  25. if (classmajorID == -1 || classmajorID == "")
  26. $.messager.alert("系统信息", "请选择班级");
  27. else {
  28. if (CMS_SystemConfig.ReportType == 1) {
  29. $("#reportContent").attr("src", CMS_SystemConfig.ReportPagePath + "?ReportFolder=%2fEducationScheduling%2fClassmajorSchedulingPrintView&CollegeID_RAP=" + collegeID + "&SchoolyearID_RAP=" + schoolYearID + "&Years_RAP=" + year + "&ClassmajorID_RAP=" + year);
  30. }
  31. if (CMS_SystemConfig.ReportType == 2) {
  32. var fileUrl = CMS_SystemConfig.VirtualDirectoryPath + "/EducationSchedulingReport/ClassmajorPrintingSchedulingPDF?CollegeID" + collegeID + "&SchoolyearID=" + schoolYearID + "&Years=" + year;
  33. $("#reportContent").attr("src", CMS_SystemConfig.VirtualDirectoryPath + "/Scripts/pdf.js/web/viewer.html?file=" + encodeURIComponent(fileUrl));
  34. }
  35. }
  36. }
  37. //function reload() {
  38. // var schoolYearID = $("#SchoolYearDropdown").combobox("getValue");
  39. // var collegeID = $("#CollegeDropdown").combobox("getValue");
  40. // var year = "";
  41. // $("#reportContent").attr("src", CMS_SystemConfig.ReportPagePath + "?ReportFolder=%2fEducationScheduling%2fClassmajorSchedulingPrintView&CollegeID_RAP=" + collegeID + "&SchoolyearID_RAP=" + schoolYearID + "&Years_RAP=" + year + "&ClassmajorID_RAP=" + year);
  42. //}