ClassroomPrintingReport.js 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. var isFirstLoadBuildings = true;
  2. function QueryBuildingsDropdownList(data) {
  3. if (((data.length && data.length > 0) || data)) {
  4. if (isFirstLoadBuildings) {
  5. var opts = $.data($("#BuildingsDropdown")[0], "combogridX").options;
  6. isFirstLoadBuilding = false;
  7. if (data.rows.length > 0) {
  8. $("#BuildingsDropdown").combogridX("setValue", data.rows[0][opts.valueField], reload);
  9. }
  10. }
  11. }
  12. }
  13. function Report_Search() {
  14. var schoolYearID = $("#SchoolYearDropdown").combobox("getValue");
  15. var buildingID = $("#BuildingsDropdown").combogridX("getValue");
  16. if (buildingID == -1 || buildingID == "") {
  17. $.messager.alert("系统信息", "请选择所在建筑物");
  18. //$("#ClassroomDropdown").combogridX("reload", eval("({'QueryParamsDatas':'BuildingsDropdown|*|" + $("#BuildingsDropdown").combogridX("getValue") + "|@|'})"));
  19. }
  20. else {
  21. if (CMS_SystemConfig.ReportType == 1) {
  22. $("#reportContent").attr("src", CMS_SystemConfig.ReportPagePath + "?ReportFolder=%2fEducationScheduling%2fClassroomSchedulingPrintView&BuildingsInfoID_RAP=" + buildingID + "&SchoolyearID_RAP=" + schoolYearID);
  23. }
  24. if (CMS_SystemConfig.ReportType == 2) {
  25. var fileUrl = CMS_SystemConfig.VirtualDirectoryPath + "/EducationSchedulingReport/ClassroomPrintReportPDF?BuildingsInfoID=" + buildingID + "&SchoolyearID=" + schoolYearID;
  26. $("#reportContent").attr("src", CMS_SystemConfig.VirtualDirectoryPath + "/Scripts/pdf.js/web/viewer.html?file=" + encodeURIComponent(fileUrl));
  27. }
  28. }
  29. }
  30. //function reload() {
  31. // var schoolYearID = $("#SchoolYearDropdown").combobox("getValue");
  32. // var buildingID = $("#BuildingsDropdown").combogridX("getValue");
  33. // if (buildingID != nonSelect) {
  34. // $("#reportContent").attr("src", CMS_SystemConfig.ReportPagePath + "?ReportFolder=%2fEducationScheduling%2fClassroomSchedulingPrintView&BuildingsInfoID_RAP=" + buildingID + "&SchoolyearID_RAP=" + schoolYearID);
  35. // }
  36. //}