LevelSetting.js 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. $(function () {
  2. mnu = $.SystemGeneral.getUrlParam("MNU");
  3. })
  4. function reload() {
  5. $("#dgLevelSettingList").cmsXDataTable("load", $.getDataGridParams("dgLevelSettingList"));
  6. }
  7. // 获取选中的数据
  8. function validChoose() {
  9. var d = [];
  10. $.each($("#dgLevelSettingList").cmsXDataTable("getSelections"), function (index) {
  11. d.push(this.LevelSettingID);
  12. });
  13. return d;
  14. }
  15. function LevelSetting_Add() {
  16. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/LevelSetting/Edit?MNU=" + mnu;
  17. $.popupTopWindow('增加等级设置', redirectTo, 650, 385, null, null);
  18. }
  19. function LevelSetting_Edit() {
  20. var d = validChoose();
  21. if (d == "") {
  22. $.messager.alert("系统提示", "请选择您要修改的设置信息。");
  23. return;
  24. }
  25. if (d.length > 1) {
  26. $.messager.alert("系统提示", "只能选择单个记录进行修改。");
  27. return;
  28. }
  29. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/LevelSetting/Edit?LevelSettingID=" + d + "&MNU=" + mnu;
  30. $.popupTopWindow('等级设置信息', redirectTo, 650, 430, null, null);
  31. }
  32. function LevelSetting_Delete() {
  33. var records = $("#dgLevelSettingList").cmsXDataTable("getSelections");
  34. var msg = "";
  35. var d = validChoose().join(',');
  36. if (d == "") {
  37. $.messager.alert("系统提示", "请选择您要删除的信息!!");
  38. return;
  39. }
  40. $.messager.confirm("系统提示", msg + "您确定要删除所勾选的信息?", function (r) {
  41. if (r) {
  42. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/LevelSetting/Delete', { levelSettingIDs: d }, function (data) {
  43. if (data == "删除成功") {
  44. $.messager.alert("系统提示", "删除成功!");
  45. $("#dgLevelSettingList").cmsXDataTable('load');
  46. } else {
  47. $.messager.alert("系统提示", data);
  48. }
  49. });
  50. }
  51. });
  52. // $.post(CMS_SystemConfig.VirtualDirectoryPath + '/NewStudent/Verification', { newStudentIDs: d }, function (data) {
  53. // if (data == "1") {
  54. // msg = "所选信息存在已分配的新生,";
  55. // }
  56. // $.messager.confirm("系统提示", msg + "您确定要删除所选择的新生信息?", function (r) {
  57. // if (r) {
  58. // $.post(CMS_SystemConfig.VirtualDirectoryPath + '/NewStudent/Delete', { newStudentIDs: d }, function (data) {
  59. // if (data == "删除成功") {
  60. // $.messager.alert("系统提示", "删除成功!");
  61. // $("#dgLevelSettingList").cmsXDataTable('load');
  62. // } else {
  63. // $.messager.alert("系统提示", data);
  64. // }
  65. // });
  66. // }
  67. // });
  68. // });
  69. }