ClassmajorScheduleSetting.js 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + '/ClassmajorScheduleSetting/Edit';
  2. var mnu = "";
  3. //加载
  4. $(function () {
  5. mnu = $.SystemGeneral.getUrlParam("MNU");
  6. })
  7. function reload() {
  8. $("#dgClassmajorScheduleSettingList").cmsXDataTable("load", $.getDataGridParams("dgClassmajorScheduleSettingList"));
  9. }
  10. //获取选中的数据
  11. function validChoose() {
  12. var d = [];
  13. $.each($("#dgClassmajorScheduleSettingList").cmsXDataTable("getSelections"), function (index) {
  14. d.push(this.ClassmajorID);
  15. });
  16. return d;
  17. }
  18. //点击列表更新
  19. function edit(rowindex, rowdata) {
  20. var redirectTo = url + "?classmajorID=" + rowdata.ClassmajorID + "&MNU=" + mnu + '&isView=1';
  21. $.popupTopWindow('班级可排时间设置详情', redirectTo, 800, 400, null, null);
  22. }
  23. //修改按钮
  24. function ClassmajorScheduleSetting_Update() {
  25. var d = validChoose();
  26. if (d == "") {
  27. $.messager.alert("系统信息", "请选择您要修改的班级可排时间设置。");
  28. return;
  29. }
  30. if (d.length > 1) {
  31. $.messager.alert("系统提示", "只能选择单个记录进行修改。");
  32. return;
  33. }
  34. var redirectTo = url + "?classmajorID=" + d + "&MNU=" + mnu;
  35. $.popupTopWindow('班级可排时间设置修改', redirectTo, 800, 400, null, null);
  36. }
  37. //删除
  38. function ClassmajorScheduleSetting_Delete() {
  39. var d = validChoose().join(',');
  40. if (d.length == 0) {
  41. $.messager.alert("系统信息", "请选择您要重置班级的可排时间设置数据!!");
  42. return;
  43. }
  44. $.messager.confirm("系统提示", "您确定要重置班级的可排时间设置数据?", function (r) {
  45. if (r) {
  46. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/ClassmajorScheduleSetting/Delete', { classmajorIDs: d }, function (data) {
  47. if (data == "删除成功") {
  48. $.messager.alert("系统提示", "重置成功!");
  49. $("#dgClassmajorScheduleSettingList").cmsXDataTable('load');
  50. } else {
  51. $.messager.alert("系统提示", data);
  52. }
  53. });
  54. }
  55. });
  56. }
  57. function QueryClassmajorComboGrid() {
  58. reload();
  59. }
  60. function QueryCollegeComboGrid() {
  61. reload();
  62. }
  63. function QueryGrademajorComboGrid() {
  64. reload();
  65. }
  66. function queryClass() {
  67. var jsonString = "";
  68. var parameterString = "";
  69. //var campusID = $("#CampusDropdown").combogridX("getValue");
  70. var collegeID = $("#CollegeComboGrid").combogridX("getValue");
  71. //var educationID = $("#Education").combobox("getValue");
  72. var schoolYearID = $("#SchoolyearDictionaryDropDown").combobox("getValue");
  73. var standardID = $("#DictionaryStandard").combogridX("getValue");
  74. //var learningFormID = $("#LearningformDictionaryDropDown").combobox("getValue");
  75. //if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|";
  76. if (collegeID != nonSelect && collegeID != "") parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  77. //if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|";
  78. if (schoolYearID != nonSelect && schoolYearID != "") parameterString += "DictionaryGrade|*|" + schoolYearID + "|@|";
  79. if (standardID != nonSelect && standardID != "") parameterString += "DictionaryStandard|*|" + standardID + "|@|";
  80. //if (learningFormID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningFormID + "|@|";
  81. if (parameterString != "") {
  82. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  83. $("#DictionaryStandard").combogridX("reload", eval(jsonString));
  84. $("#ClassmajorComboGrid").combogridX("reload", eval(jsonString));
  85. } else {
  86. $("#DictionaryStandard").combogridX("reload");
  87. $("#ClassmajorComboGrid").combogridX("reload");
  88. }
  89. reload();
  90. }