ClassroomSelect.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. 
  2. function reload() {
  3. $("#dgClassroomList").cmsXDataTable("load", $.getDataGridParams("dgClassroomList"));
  4. }
  5. //获取选中的数据
  6. function validChoose() {
  7. var d = [];
  8. $.each($("#dgClassroomList").cmsXDataTable("getSelections"), function (index) {
  9. d.push(this);
  10. });
  11. return d;
  12. }
  13. function QueryCampusComboGridList() {
  14. var campusID = $("#CampusDropdown").combogridX("getValue");
  15. if (campusID != nonSelect) {
  16. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})";
  17. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  18. }
  19. reload();
  20. }
  21. function QueryCollegeComboGridList() {
  22. // var collegeID = $("#CollegeDropdown").combogridX("getValue");
  23. // if (collegeID != nonSelect) {
  24. // var jsonString = "({'QueryParamsDatas':'CollegeDropdown|*|" + collegeID + "|@|'})";
  25. // $("#BuildingsDropdown").combogridX("reload", eval(jsonString));
  26. // }
  27. reload();
  28. }
  29. function QueryBuildingsDropdownList(data) {
  30. reload();
  31. }
  32. function QueryIsSpecialDropdownList(data) {
  33. reload();
  34. }
  35. function Classroom_Confirm() {
  36. var d = validChoose();
  37. var windowID = $.SystemGeneral.getUrlParam("WindowID");
  38. var maxSelect = $.SystemGeneral.getUrlParam("MaxSelect");
  39. if (!maxSelect || isNaN(maxSelect)) maxSelect = 0;
  40. if (d.length == 0) {
  41. $.messager.alert("系统提示", "请选择教室。");
  42. return;
  43. }
  44. if (maxSelect > 0 && d.length > maxSelect) {
  45. $.messager.alert("系统提示", "只能选择" + maxSelect + "项记录。");
  46. return;
  47. }
  48. top.$("#" + windowID).data("resultData", d);
  49. top.$("#" + windowID).dialog("close");
  50. }