1234567891011121314151617181920212223242526272829303132333435363738 |
- var isFirstLoadBuildings = true;
- function QueryBuildingsDropdownList(data) {
- if (((data.length && data.length > 0) || data)) {
- if (isFirstLoadBuildings) {
- var opts = $.data($("#BuildingsDropdown")[0], "combogridX").options;
- isFirstLoadBuilding = false;
- if (data.rows.length > 0) {
- $("#BuildingsDropdown").combogridX("setValue", data.rows[0][opts.valueField], reload);
- }
- }
- }
- }
- function Report_Search() {
- var schoolYearID = $("#SchoolYearDropdown").combobox("getValue");
- var buildingID = $("#BuildingsDropdown").combogridX("getValue");
- if (buildingID == -1 || buildingID == "") {
- $.messager.alert("系统信息", "请选择所在建筑物");
- //$("#ClassroomDropdown").combogridX("reload", eval("({'QueryParamsDatas':'BuildingsDropdown|*|" + $("#BuildingsDropdown").combogridX("getValue") + "|@|'})"));
- }
- else {
- if (CMS_SystemConfig.ReportType == 1) {
- $("#reportContent").attr("src", CMS_SystemConfig.ReportPagePath + "?ReportFolder=%2fEducationScheduling%2fClassroomSchedulingPrintView&BuildingsInfoID_RAP=" + buildingID + "&SchoolyearID_RAP=" + schoolYearID);
- }
- if (CMS_SystemConfig.ReportType == 2) {
- var fileUrl = CMS_SystemConfig.VirtualDirectoryPath + "/EducationSchedulingReport/ClassroomPrintReportPDF?BuildingsInfoID=" + buildingID + "&SchoolyearID=" + schoolYearID;
- $("#reportContent").attr("src", CMS_SystemConfig.VirtualDirectoryPath + "/Scripts/pdf.js/web/viewer.html?file=" + encodeURIComponent(fileUrl));
- }
- }
- }
- //function reload() {
- // var schoolYearID = $("#SchoolYearDropdown").combobox("getValue");
- // var buildingID = $("#BuildingsDropdown").combogridX("getValue");
- // if (buildingID != nonSelect) {
- // $("#reportContent").attr("src", CMS_SystemConfig.ReportPagePath + "?ReportFolder=%2fEducationScheduling%2fClassroomSchedulingPrintView&BuildingsInfoID_RAP=" + buildingID + "&SchoolyearID_RAP=" + schoolYearID);
- // }
- //}
|