CourseScheduleSetting.js 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + '/CourseScheduleSetting/Edit';
  2. var mnu = "";
  3. //加载
  4. $(function () {
  5. mnu = $.SystemGeneral.getUrlParam("MNU");
  6. })
  7. //新增
  8. function CourseScheduleSetting_Add() {
  9. var redirectTo = url + "?MNU=" + mnu;
  10. $.popupTopWindow('课程可排时间设置新增', redirectTo, 800, 600, null, null);
  11. }
  12. function reload() {
  13. $("#dgCourseScheduleSettingList").cmsXDataTable("load", $.getDataGridParams("dgCourseScheduleSettingList"));
  14. }
  15. //获取选中的数据
  16. function validChoose() {
  17. var d = [];
  18. $.each($("#dgCourseScheduleSettingList").cmsXDataTable("getSelections"), function (index) {
  19. d.push(this.CoursematerialID);
  20. });
  21. return d;
  22. }
  23. //点击列表更新
  24. function edit(rowindex, rowdata) {
  25. var redirectTo = url + "?coursematerialID=" + rowdata.CoursematerialID + "&MNU=" + mnu + '&isView=1';
  26. $.popupTopWindow('课程可排时间设置详情', redirectTo, 800, 600, null, null);
  27. }
  28. //修改按钮
  29. function CourseScheduleSetting_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 + "?coursematerialID=" + d + "&MNU=" + mnu;
  40. $.popupTopWindow('课程可排时间设置修改', redirectTo, 800, 600, null, null);
  41. }
  42. //删除
  43. function CourseScheduleSetting_Delete() {
  44. var d = validChoose().join(',');
  45. if (d.length == 0) {
  46. $.messager.alert("系统信息", "请选择您要重置课程的可排时间设置数据!!");
  47. return;
  48. }
  49. $.messager.confirm("系统提示", "您确定要重置课程的可排时间设置数据?", function (r) {
  50. if (r) {
  51. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/CourseScheduleSetting/Delete', { coursematerialIDs: d }, function (data) {
  52. if (data == "删除成功") {
  53. $.messager.alert("系统提示", "重置成功!");
  54. $("#dgCourseScheduleSettingList").cmsXDataTable('load');
  55. } else {
  56. $.messager.alert("系统提示", data);
  57. }
  58. });
  59. }
  60. });
  61. }
  62. function QueryCoursematerialComboGrid() {
  63. reload();
  64. }
  65. function QueryCourseLevelDropdownList() {
  66. reload();
  67. }
  68. function QueryCourseScienceDropdownList() {
  69. reload();
  70. }