MinorGraduationConditionPackage.js 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + "/MinorGraduationConditionPackage/Edit";
  2. var mnu = "";
  3. //加载
  4. $(function () {
  5. mnu = $.SystemGeneral.getUrlParam("MNU");
  6. })
  7. //刷新
  8. function reload() {
  9. $("#dgMinorGraduationConditionPackageList").cmsXDataTable("load", $.getDataGridParams("dgMinorGraduationConditionPackageList"));
  10. }
  11. //获取选中的数据
  12. function validChoose() {
  13. var d = [];
  14. $.each($("#dgMinorGraduationConditionPackageList").cmsXDataTable("getSelections"), function (index) {
  15. d.push(this.MinorGraduationConditionPackageID);
  16. });
  17. return d;
  18. }
  19. //新增
  20. function MinorGraduationConditionPackage_Add() {
  21. var d = validChoose();
  22. if (d.length > 0) {
  23. $.popupTopWindow('辅修毕业公式复制新增', CMS_SystemConfig.VirtualDirectoryPath + '/MinorGraduationConditionPackage/CopyAdd?minorGraduationConditionPackageID=' + d[0] + '&MNU=' + mnu, 750, 480, null, null);
  24. } else {
  25. var redirectTo = url + "?MNU=" + mnu;
  26. $.popupTopWindow('辅修毕业公式新增', redirectTo, 750, 480, null, null);
  27. }
  28. }
  29. //修改
  30. function MinorGraduationConditionPackage_Update() {
  31. var d = validChoose();
  32. if (d == "") {
  33. $.messager.alert("系统提示", "请选择您要修改的信息。");
  34. return;
  35. }
  36. if (d.length > 1) {
  37. $.messager.alert("系统提示", "只能选择单个记录进行修改。");
  38. return;
  39. }
  40. var redirectTo = url + "?minorGraduationConditionPackageID=" + d + "&MNU=" + mnu;
  41. $.popupTopWindow('辅修毕业公式修改', redirectTo, 750, 480, null, null);
  42. }
  43. //删除
  44. function MinorGraduationConditionPackage_Delete() {
  45. var d = validChoose().join(',');
  46. if (d == "") {
  47. $.messager.alert("系统提示", "请选择您要删除的信息。");
  48. return;
  49. }
  50. $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
  51. if (r) {
  52. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/MinorGraduationConditionPackage/Delete', { minorGraduationConditionPackageIDs: d }, function (data) {
  53. if (data == "删除成功。") {
  54. $.messager.alert("系统提示", data);
  55. $("#dgMinorGraduationConditionPackageList").cmsXDataTable('load');
  56. } else {
  57. $.messager.alert("系统提示", data);
  58. }
  59. });
  60. }
  61. });
  62. }
  63. //查看明细
  64. function detail(rowindex, rowdata) {
  65. var redirectTo = url + "?minorGraduationConditionPackageID=" + rowdata.MinorGraduationConditionPackageID + "&Type=1";
  66. $.popupTopWindow('毕业公式信息', redirectTo, 750, 480, null, null);
  67. }
  68. //Excel导出
  69. function MinorGraduationConditionPackage_Export() {
  70. var d = validChoose().join(',');
  71. $("[name='SelectedID']").val(d);
  72. $("#formQuery").submit();
  73. }