ClassmajorSelector.js 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. function reload() {
  2. $("#dgClassmajorList").cmsXDataTable("load", $.getDataGridParams("dgClassmajorList"));
  3. }
  4. //获取选中的数据
  5. function validChoose() {
  6. var d = [];
  7. $.each($("#dgClassmajorList").cmsXDataTable("getSelections"), function (index) {
  8. d.push(this);
  9. });
  10. return d;
  11. }
  12. function Class_Confirm() {
  13. var d = validChoose();
  14. var windowID = $.SystemGeneral.getUrlParam("WindowID");
  15. var maxSelect = $.SystemGeneral.getUrlParam("MaxSelect");
  16. if (!maxSelect || isNaN(maxSelect)) maxSelect = 0;
  17. if (d.length == 0) {
  18. $.messager.alert("系统提示", "请选择班级。");
  19. return;
  20. }
  21. if (maxSelect > 0 && d.length > maxSelect) {
  22. $.messager.alert("系统提示", "只能选择" + maxSelect + "项记录。");
  23. return;
  24. }
  25. top.$("#" + windowID).data("resultData", d);
  26. top.$("#" + windowID).dialog("close");
  27. }
  28. function QueryCampusComboGridList() {
  29. var campusID = $("#CampusDropdown").combogridX("getValue");
  30. if (campusID != nonSelect) {
  31. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})";
  32. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  33. }
  34. reload();
  35. }
  36. function QueryCollegeComboGridList(data) {
  37. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  38. var yearID = document.getElementsByName("DictionarySchoolyear")[0].value;
  39. //if (collegeID != nonSelect) {
  40. var jsonString = "({'QueryParamsDatas':'CollegeDropdown|*|" + collegeID
  41. + "|@|DictionaryGrade|*|" + yearID
  42. + "|@|'})";
  43. $("#GrademajorComboGrid").combogridX("reload", eval(jsonString));
  44. //}
  45. reload();
  46. }
  47. function QueryStandardDropdownList(data) {
  48. reload();
  49. }
  50. function QueryEducationDropdownList(data) {
  51. reload();
  52. }
  53. function QueryLearningformDropdownList(data) {
  54. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  55. var jsonString = "({'QueryParamsDatas':'DictionaryGrade|*|" + data.Value;
  56. jsonString += "|@|CollegeDropdown|*|" + collegeID;
  57. jsonString += "|@|'})";
  58. $("#GrademajorComboGrid").combogridX("reload", eval(jsonString));
  59. reload();
  60. }