SchedulingClassmajorList.js 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + "/EducationSchedule/Edit";
  2. //加载
  3. $(function () {
  4. mnu = $.SystemGeneral.getUrlParam("MNU");
  5. })
  6. function reload() {
  7. $("#dgClassmajorList").cmsXDataTable("load", $.getDataGridParams("dgClassmajorList"));
  8. }
  9. //获取选中的数据
  10. function validChoose() {
  11. var d = [];
  12. $.each($("#dgClassmajorList").cmsXDataTable("getSelections"), function (index) {
  13. d.push(this);
  14. });
  15. return d;
  16. }
  17. //点击列表更新
  18. function edit(rowindex, rowdata) {
  19. var fullUrl = url + '?classmajorID=' + rowdata.ClassmajorID + '&grademajorID=' + rowdata.GrademajorID + '&collegeID=' + rowdata.CollegeID + '&yearID=' + rowdata.SchoolyearID + '&standardID=' + rowdata.StandardID + '&FromMNU=' + mnu;
  20. $.popupTopWindow('手动排课', fullUrl, window.screen.availWidth, window.screen.availHeight - 60, reload);
  21. }
  22. //修改按钮
  23. function Classmajor_Update() {
  24. var d = validChoose();
  25. if (d.length == 0) {
  26. $.messager.alert("系统提示", "请选择您要修改的班级信息。");
  27. return;
  28. }
  29. if (d.length > 1) {
  30. $.messager.alert("系统提示", "只能选择单个记录进行修改。");
  31. return;
  32. }
  33. var fullUrl = url + '?classmajorID=' + d[0].ClassmajorID + '&grademajorID=' + d[0].GrademajorID + '&collegeID=' + d[0].CollegeID+
  34. '&yearID=' + d[0].SchoolyearID + '&MNU=' + mnu;
  35. $.popupTopWindow('手动排课', fullUrl, window.screen.availWidth, window.screen.availHeight - 20, reload);
  36. }
  37. function QueryCampusDropdownList(data) {
  38. $("#CollegeDropdown").combobox("reload", CMS_SystemConfig.VirtualDirectoryPath + "/College/CollegeDropdownListBanid?campusID=" + data.Value + "");
  39. reload();
  40. }
  41. //function QueryCollegeDropdownList(data) {
  42. // reload();
  43. //}
  44. //function QueryStandardDropdownList(data) {
  45. // reload();
  46. //}
  47. function QueryEducationDropdownList(data) {
  48. reload();
  49. }
  50. function QueryLearningformDropdownList(data) {
  51. reload();
  52. }
  53. //function QuerySchoolyearDropdownList(data) {
  54. // reload();
  55. //}
  56. function queryCollege(data) {
  57. //var campusID = $("#CampusDropdown").combogridX("getValue");
  58. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  59. var jsonString = "({'QueryParamsDatas':";
  60. jsonString += "'CollegeDropdown|*|" + collegeID + "|@|'})";
  61. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  62. $("#DictionaryStandard").combogridX("reload", eval(jsonString));
  63. // if (campusID != nonSelect) {
  64. // var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})";
  65. // $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  66. // }
  67. queryClass();
  68. reload();
  69. }
  70. function queryGrademajor() {
  71. queryClass();
  72. }
  73. function queryClass() {
  74. var jsonString = "";
  75. var parameterString = "";
  76. //var campusID = $("#CampusDropdown").combogridX("getValue");
  77. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  78. //var educationID = $("#Education").combobox("getValue");
  79. var schoolYearID = $("#DictionarySchoolyear").combobox("getValue");
  80. var standardID = $("#DictionaryStandard").combogridX("getValue");
  81. //var learningFormID = $("#LearningformDictionaryDropDown").combobox("getValue");
  82. //if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|";
  83. if (collegeID != nonSelect && collegeID != "") parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  84. //if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|";
  85. if (schoolYearID != nonSelect && schoolYearID != "") parameterString += "DictionaryGrade|*|" + schoolYearID + "|@|";
  86. if (standardID != nonSelect && standardID != "") parameterString += "DictionaryStandard|*|" + standardID + "|@|";
  87. //if (learningFormID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningFormID + "|@|";
  88. if (parameterString != "") {
  89. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  90. $("#DictionaryStandard").combogridX("reload", eval(jsonString));
  91. //$("#cgClassmajor").combogridX("reload", eval(jsonString));
  92. } else {
  93. $("#DictionaryStandard").combogridX("reload");
  94. //$("#cgClassmajor").combogridX("reload");
  95. }
  96. reload();
  97. }