OptionalCoursePlan.js 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + "/OptionalCoursePlan/Edit";
  2. var mnu = "";
  3. //加载
  4. $(function () {
  5. mnu = $.SystemGeneral.getUrlParam("MNU");
  6. })
  7. //新增
  8. function OptionalCoursePlan_Add() {
  9. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/OptionalCoursePlan/Add?MNU=" + mnu;
  10. $.popupTopWindow('限选计划信息', redirectTo, 800, 400, null, null);
  11. }
  12. function reload() {
  13. $("#dgOptionalCoursePlanList").cmsXDataTable("load", $.getDataGridParams("dgOptionalCoursePlanList"));
  14. }
  15. //获取选中的数据
  16. function validChoose() {
  17. var d = [];
  18. $.each($("#dgOptionalCoursePlanList").cmsXDataTable("getSelections"), function (index) {
  19. d.push(this.OptionalCourseID);
  20. });
  21. return d;
  22. }
  23. //点击列表更新
  24. function edit(rowindex, rowdata) {
  25. var redirectTo = url + "?optionalCoursePlanID=" + rowdata.OptionalCourseID + "&MNU=" + mnu;
  26. $.popupTopWindow('限选计划信息', redirectTo, 800, 600, null, null);
  27. }
  28. //修改按钮
  29. function OptionalCoursePlan_Update() {
  30. var d = validChoose();
  31. if (d == "") {
  32. $.messager.alert("系统信息", "请选择您要修改的限选计划信息。");
  33. return;
  34. }
  35. if (d.length > 1) {
  36. $.messager.alert("系统信息", "只能选择单个记录进行修改。");
  37. return;
  38. }
  39. var redirectTo = url + "?optionalCoursePlanID=" + d + "&MNU=" + mnu;
  40. $.popupTopWindow('限选计划信息', redirectTo, 800, 600, null, null);
  41. }
  42. //删除
  43. function OptionalCoursePlan_Delete() {
  44. var d = validChoose().join(',');
  45. if (d == "") {
  46. $.messager.alert("系统信息", "请选择您要删除的限选计划信息!!");
  47. return;
  48. }
  49. $.messager.confirm("系统提示", "您确定要删除该限选计划信息?", function (r) {
  50. if (r) {
  51. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/OptionalCoursePlan/Delete', { optionalCoursePlanIDs: d }, function (data) {
  52. if (data == "删除成功") {
  53. $.messager.alert("系统提示", "删除成功!");
  54. $("#dgOptionalCoursePlanList").cmsXDataTable('load');
  55. } else {
  56. $.messager.alert("系统提示", data);
  57. }
  58. });
  59. }
  60. });
  61. }
  62. function OptionalCoursePlan_Export() {
  63. $("#formQuery").submit();
  64. }
  65. function QueryCoursematerialComboGrid(data) {
  66. reload();
  67. }
  68. function QuerySpecialtyComboGrid(data) {
  69. reload();
  70. }
  71. function QuerySchoolYearNumDropdownList(data) {
  72. reload();
  73. }
  74. function QueryStarttermDropdownList(data) {
  75. reload();
  76. }
  77. function QueryIsEnableDropdownList(data) {
  78. reload();
  79. }
  80. function QueryIsOpenDropdownList(data) {
  81. reload();
  82. }
  83. var url = CMS_SystemConfig.VirtualDirectoryPath + "/OptionalCoursePlan/Edit";
  84. var mnu = "";
  85. //加载
  86. $(function () {
  87. mnu = $.SystemGeneral.getUrlParam("MNU");
  88. })
  89. //新增
  90. function OptionalCoursePlan_Add() {
  91. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/OptionalCoursePlan/Add?MNU=" + mnu;
  92. $.popupTopWindow('限选计划信息', redirectTo, 800, 450, null, null);
  93. }
  94. function reload() {
  95. $("#dgOptionalCoursePlanList").cmsXDataTable("load", $.getDataGridParams("dgOptionalCoursePlanList"));
  96. }
  97. //获取选中的数据
  98. function validChoose() {
  99. var d = [];
  100. $.each($("#dgOptionalCoursePlanList").cmsXDataTable("getSelections"), function (index) {
  101. d.push(this.OptionalCourseID);
  102. });
  103. return d;
  104. }
  105. //点击列表更新
  106. function edit(rowindex, rowdata) {
  107. var redirectTo = url + "?optionalCoursePlanID=" + rowdata.OptionalCourseID + "&MNU=" + mnu;
  108. $.popupTopWindow('限选计划信息', redirectTo, 800, 450, null, null);
  109. }
  110. //修改按钮
  111. function OptionalCoursePlan_Update() {
  112. var d = validChoose();
  113. if (d == "") {
  114. $.messager.alert("系统信息", "请选择您要修改的限选计划信息。");
  115. return;
  116. }
  117. if (d.length > 1) {
  118. $.messager.alert("系统信息", "只能选择单个记录进行修改。");
  119. return;
  120. }
  121. var redirectTo = url + "?optionalCoursePlanID=" + d + "&MNU=" + mnu;
  122. $.popupTopWindow('限选计划信息', redirectTo, 800, 450, null, null);
  123. }
  124. //删除
  125. function OptionalCoursePlan_Delete() {
  126. var d = validChoose().join(',');
  127. if (d == "") {
  128. $.messager.alert("系统信息", "请选择您要删除限选计划信息!!");
  129. return;
  130. }
  131. $.messager.confirm("系统提示", "您确定要删除该限选计划信息?", function (r) {
  132. if (r) {
  133. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/OptionalCoursePlan/Delete', { optionalCoursePlanIDs: d }, function (data) {
  134. if (data == "删除成功") {
  135. $.messager.alert("系统提示", "删除成功!");
  136. $("#dgOptionalCoursePlanList").cmsXDataTable('load');
  137. } else {
  138. $.messager.alert("系统提示", data);
  139. }
  140. });
  141. }
  142. });
  143. }
  144. function OptionalCoursePlan_Export() {
  145. $("#formQuery").submit();
  146. }
  147. function QueryCampusDropdownList(data) {
  148. $("#CollegeDropdown").combobox("reload", CMS_SystemConfig.VirtualDirectoryPath + "/College/CollegeDropdownListBanid?campusID=" + data.Value + "");
  149. reload();
  150. }
  151. function QueryCollegeDropdownList(data) {
  152. reload();
  153. }
  154. function QuerySchoolyearDictionaryList(data) {
  155. reload();
  156. }
  157. function QuerySchoolyearDropdownList(data) {
  158. reload();
  159. }
  160. function QueryComboGridList(data) {
  161. reload();
  162. }
  163. function QueryHandleModeDictionaryDropDown(data) {
  164. reload();
  165. }