1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- var isFirstLoadBuilding = true;
- function Report_Search() {
- var schoolYearID = $("#SchoolYearDropdown").combobox("getValue");
- var buildingID = $("#BuildingsDropdown").combogridX("getValue");
- buildingID = buildingID == "" ? "=" : "=" + buildingID;
- var classroomID = $("#ClassroomDropdown").combogridX("getValue");
- if (classroomID == -1 || classroomID == "") {
- $.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%2fClassroomSchedulingView&BuildingsInfoID_RAP" + buildingID + "&ClassroomID_RAP=" + classroomID + "&SchoolyearID_RAP=" + schoolYearID);
- }
- if (CMS_SystemConfig.ReportType == 2) {
- var fileUrl = CMS_SystemConfig.VirtualDirectoryPath + "/EducationSchedulingReport/ClassroomReportPDF?BuildingsInfoID=" + buildingID + "&ClassroomID=" + classroomID + "&SchoolyearID=" + schoolYearID;
- $("#reportContent").attr("src", CMS_SystemConfig.VirtualDirectoryPath + "/Scripts/pdf.js/web/viewer.html?file=" + encodeURIComponent(fileUrl));
- }
- }
- }
- function SelectBuildingsDropdownList() {
- var buildingID = $("#BuildingsDropdown").combogridX("getValue");
- var jsonString = "({'QueryParamsDatas':'BuildingsDropdown|*|" + buildingID + "|@|'})";
- $("#ClassroomDropdown").combogridX("reload", eval(jsonString));
- // if (buildingID != nonSelect) {
- // var jsonString = "({'QueryParamsDatas':'BuildingsDropdown|*|" + buildingID + "|@|'})";
- // $("#ClassroomDropdown").combogridX("reload", eval(jsonString));
- // }
- }
- function QueryBuildingsDropdownList(data) {
- if (((data.length && data.length > 0) || data)
- && $("#ClassroomDropdown").length > 0 && $.data($("#ClassroomDropdown")[0], "combogridX")) {
- if (isFirstLoadBuilding) {
- var opts = $.data($("#BuildingsDropdown")[0], "combogridX").options;
- isFirstLoadBuilding = false;
- if (data.rows.length > 0) {
- $("#BuildingsDropdown").combogridX("setValue", data.rows[0][opts.valueField]);
- }
- } else {
- }
- var buildingID = $("#BuildingsDropdown").combogridX("getValue");
- if (buildingID != nonSelect) {
- var jsonString = "({'QueryParamsDatas':'BuildingsDropdown|*|" + buildingID + "|@|'})";
- $("#ClassroomDropdown").combogridX("reload", eval(jsonString));
- }
- }
- }
- function QueryClassroomDropdownList(data) {
- if (((data.length && data.length > 0) || data)) {
- var opts = $.data($("#ClassroomDropdown")[0], "combogridX").options;
- if (data.rows.length > 0) {
- $("#ClassroomDropdown").combogridX("setValue", data.rows[0][opts.valueField], reload);
- }
- }
- }
- function reload() {
- var schoolYearID = $("#SchoolYearDropdown").combobox("getValue");
- var buildingID = $("#BuildingsDropdown").combogridX("getValue");
- var classroomID = $("#ClassroomDropdown").combogridX("getValue");
- }
|