SOCDetailGroupGroup.js 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. var mnu = "";
  2. //加载
  3. $(function () {
  4. mnu = $.SystemGeneral.getUrlParam("MNU");
  5. })
  6. function SOCDetailGroup_Add() {
  7. var SOCDetailID = $("#SOCDetailID").val();
  8. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/SOCDetailGroup/AddGroup?SOCDetailID=" + SOCDetailID + "&MNU=" + mnu;
  9. $.popupTopWindow('新建分组', redirectTo, 700, 500, reload);
  10. }
  11. //获取选中的数据
  12. function validChoose() {
  13. var d = [];
  14. $.each($("#dgSOCDetailGroupList").cmsXDataTable("getSelections"), function (index) {
  15. d.push(this.SOCDetailGroupID);
  16. });
  17. return d;
  18. }
  19. function SOCDetailGroup_StudentEdit() {
  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 = "/SOCDetailGroup/StudentEdit?SOCDetailGroupID=" + d + "&MNU=" + mnu;
  30. $.popupTopWindow('学生名单', redirectTo, 850, 480, reload);
  31. }
  32. function SOCDetailGroup_Delete() {
  33. var d = validChoose().join(',');
  34. if (d == "") {
  35. $.messager.alert("系统提示", "请选择您要删除的信息。");
  36. return;
  37. }
  38. $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
  39. if (r) {
  40. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/SOCDetailGroup/SOCDetailGroupDelete', { SOCDetailGroupIDs: d }, function (data) {
  41. if (data == "删除成功!") {
  42. $.messager.alert("系统提示", data);
  43. $("#dgSOCDetailGroupList").cmsXDataTable('load');
  44. } else {
  45. $.messager.alert("系统提示", data);
  46. }
  47. });
  48. }
  49. });
  50. }
  51. function reload() {
  52. $("#dgSOCDetailGroupList").cmsXDataTable("load", $.getDataGridParams("dgSOCDetailGroupList"));
  53. }
  54. function SOCDetailGroupGroup_Export() {
  55. $("#formQuery").submit();
  56. }