SOCTemplate.js 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + "/SOCTemplate/Edit";
  2. var mnu = "";
  3. //加载
  4. $(function () {
  5. mnu = $.SystemGeneral.getUrlParam("MNU");
  6. })
  7. function reload() {
  8. $("#dgSOCTemplateList").cmsXDataTable("load", $.getDataGridParams("dgSOCTemplateList"));
  9. }
  10. //获取选中的数据
  11. function validChoose() {
  12. var d = [];
  13. $.each($("#dgSOCTemplateList").cmsXDataTable("getSelections"), function (index) {
  14. d.push(this.SOCTemplateID);
  15. });
  16. return d;
  17. }
  18. function detail(rowindex, rowdata) {
  19. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/SOCTemplate/TemplateDetail?templateID=" + rowdata.SOCTemplateID + "&MNU=" + mnu;
  20. $.popupTopWindow('课程SOC成果', redirectTo, 800, 600, null, null);
  21. }
  22. function SOCTemplate_Generate() {
  23. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/SOCTemplate/Generate?MNU=" + mnu;
  24. $.popupTopWindow('生成课程信息', redirectTo, 600, 300, null, null);
  25. }
  26. function SOCTemplate_Setting() {
  27. var d = validChoose();
  28. if (d.length == 0) {
  29. $.messager.alert("系统信息", "请选择您要进行设置的信息。");
  30. return;
  31. }
  32. if (d.length > 1) {
  33. $.messager.alert("系统信息", "只能选择单个记录进行设置。");
  34. return;
  35. }
  36. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/SOCTemplate/Edit?templateID=" + d + "&MNU=" + mnu;
  37. $.popupTopWindow('课程SOC设置', redirectTo, 1000, 700, null, null);
  38. }
  39. function SOCTemplate_Add() {
  40. var d = validChoose();
  41. if (d.length > 0) {
  42. $.popupTopWindow('课程SOC设置复制新增', CMS_SystemConfig.VirtualDirectoryPath + '/SOCTemplate/CopyAdd?templateID=' + d[0] + '&MNU=' + mnu, 1000, 700, null, null);
  43. } else {
  44. var redirectTo = url + "?MNU=" + mnu;
  45. $.popupTopWindow('课程SOC设置新增', redirectTo, 1000, 700, null, null);
  46. }
  47. }
  48. function SOCTemplate_Delete() {
  49. var d = validChoose().join(',');
  50. if (d == "") {
  51. $.messager.alert("系统提示", "请选择您要删除的信息。");
  52. return;
  53. }
  54. $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
  55. if (r) {
  56. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/SOCTemplate/Delete', { SOCTemplateIDs: d }, function (data) {
  57. if (data == "删除成功!") {
  58. $.messager.alert("系统提示", data);
  59. $("#dgSOCTemplateList").cmsXDataTable('load');
  60. } else {
  61. $.messager.alert("系统提示", data);
  62. }
  63. });
  64. }
  65. });
  66. }
  67. //Excel导出
  68. function SOCTemplate_Export() {
  69. var d = validChoose().join(',');
  70. $("[name='SelectedID']").val(d);
  71. $("#formQuery").submit();
  72. }