123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/Announcement/Edit";
- var urlGDCX = CMS_SystemConfig.VirtualDirectoryPath + "/Announcement/EditGDCX";
- var bathval = "";
- var mnu;
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- });
- //发布
- function Announcement_Add() {
- var redirectTo = url + "?MNU=" + mnu;
- $.popupTopWindow('公告发布', redirectTo, 850, 600, null, null);
- }
- //发布
- function AnnouncementGDCX_Add() {
- var redirectTo = urlGDCX + "?MNU=" + mnu;
- $.popupTopWindow('公告发布', redirectTo, 850, 600, null, null);
- }
- function reload() {
- $("#dgAnnouncementList").cmsXDataTable("load", $.getDataGridParams("dgAnnouncementList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgAnnouncementList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.AnnouncementID);
- });
- return d;
- }
- //修改按钮
- function Announcement_Update() {
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统提示", "请选择您要修改的公告。");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统提示", "只能选择单个记录进行修改。");
- return;
- }
- var redirectTo = url + "?AnnouncementID=" + d + "&MNU=" + mnu;
- $.popupTopWindow('公告发布修改', redirectTo, 850, 600, null, null);
- }
- function AnnouncementGDCX_Update() {
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统提示", "请选择您要修改的公告。");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统提示", "只能选择单个记录进行修改。");
- return;
- }
- var redirectTo = urlGDCX + "?AnnouncementID=" + d + "&MNU=" + mnu;
- $.popupTopWindow('公告发布修改', redirectTo, 850, 600, null, null);
- }
- //删除
- function Announcement_Delete() {
- var d = validChoose().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要删除的公告。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要删除该公告?", function (r) {
- if (r) {
- $.post(CMS_SystemConfig.VirtualDirectoryPath + '/Announcement/Delete', { announcementIDs: d }, function (data) {
- if (data == "删除成功!") {
- $.messager.alert("系统提示", data);
- $("#dgAnnouncementList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
- });
- }
- function Announcement_SetTop() {
- var d = validChoose().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要置顶的公告。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要置顶选择的公告?", function (r) {
- if (r) {
- $.post(CMS_SystemConfig.VirtualDirectoryPath + '/Announcement/AnnouncementSetTop', { announcementIDs: d }, function (data) {
- if (data == "设置成功") {
- $.messager.alert("系统提示", data);
- $("#dgAnnouncementList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
- });
- }
- function viewAnnouncement(rowindex, rowdata) {
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/Announcement/AnnouncementView?MNU=" + mnu + "&announcementID=" + rowdata.AnnouncementID;
- top.$('#sysWindow').dialog({
- title: '公告信息',
- width: 750,
- height: 450,
- content: '<iframe id="iframe1" frameborder="0" scrolling="auto" src=' + redirectTo + '></iframe>',
- modal: true,
- });
- }
|