ProjectInformationList.js 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + "/ProjectInformation/Edit";
  2. var bathval = "";
  3. var mnu;
  4. $(function () {
  5. mnu = $.SystemGeneral.getUrlParam("MNU");
  6. });
  7. //发布
  8. function ProjectInformation_Add() {
  9. var redirectTo = url + "?MNU=" + mnu;
  10. $.popupTopWindow('项目资讯', redirectTo, 850, 600, null, null);
  11. }
  12. function reload() {
  13. $("#dgProjectInformationList").cmsXDataTable("load", $.getDataGridParams("dgProjectInformationList"));
  14. }
  15. //获取选中的数据
  16. function validChoose() {
  17. var d = [];
  18. $.each($("#dgProjectInformationList").cmsXDataTable("getSelections"), function (index) {
  19. d.push(this.AnnouncementID);
  20. });
  21. return d;
  22. }
  23. //修改按钮
  24. function ProjectInformation_Update() {
  25. var d = validChoose();
  26. if (d.length == 0) {
  27. $.messager.alert("系统提示", "请选择您要修改的项目资讯。");
  28. return;
  29. }
  30. if (d.length > 1) {
  31. $.messager.alert("系统提示", "只能选择单个记录进行修改。");
  32. return;
  33. }
  34. var redirectTo = url + "?AnnouncementID=" + d + "&MNU=" + mnu;
  35. $.popupTopWindow('项目资讯修改', redirectTo, 850, 600, null, null);
  36. }
  37. //删除
  38. function ProjectInformation_Delete() {
  39. var d = validChoose().join(',');
  40. if (d == "") {
  41. $.messager.alert("系统提示", "请选择您要删除的项目资讯。");
  42. return;
  43. }
  44. $.messager.confirm("系统提示", "您确定要删除该项目资讯?", function (r) {
  45. if (r) {
  46. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/Announcement/Delete', { announcementIDs: d }, function (data) {
  47. if (data == "删除成功!") {
  48. $.messager.alert("系统提示", data);
  49. $("#dgProjectInformationList").cmsXDataTable('load');
  50. } else {
  51. $.messager.alert("系统提示", data);
  52. }
  53. });
  54. }
  55. });
  56. }
  57. function Announcement_SetTop() {
  58. var d = validChoose().join(',');
  59. if (d == "") {
  60. $.messager.alert("系统提示", "请选择您要置顶的项目资讯。");
  61. return;
  62. }
  63. $.messager.confirm("系统提示", "您确定要置顶选择的项目资讯?", function (r) {
  64. if (r) {
  65. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/Announcement/AnnouncementSetTop', { announcementIDs: d }, function (data) {
  66. if (data == "设置成功") {
  67. $.messager.alert("系统提示", data);
  68. $("#dgProjectInformationList").cmsXDataTable('load');
  69. } else {
  70. $.messager.alert("系统提示", data);
  71. }
  72. });
  73. }
  74. });
  75. }
  76. function viewAnnouncement(rowindex, rowdata) {
  77. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/Announcement/AnnouncementView?MNU=" + mnu + "&announcementID=" + rowdata.AnnouncementID;
  78. top.$('#sysWindow').dialog({
  79. title: '项目资讯',
  80. width: 750,
  81. height: 450,
  82. content: '<iframe id="iframe1" frameborder="0" scrolling="auto" src=' + redirectTo + '></iframe>',
  83. modal: true,
  84. });
  85. }