1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/Announcement/Edit";
- var bathval = "";
- var mnu;
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- });
- //发布
- function Announcement_Add() {
- var redirectTo = url + "?MNU=" + mnu;
- $.popupTopWindow('公告发布', redirectTo, 880, 660, 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, 880, 660, 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);
- }
- });
- }
- });
- }
|