123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
-
- @{
- ViewBag.Title = "APPIndex";
- Layout = "~/Views/Shared/_MainLayoutPage.cshtml";
- }
- <!DOCTYPE html>
- <head>
- <meta name="viewport" content="width=device-width" />
- <title>Index</title>
- <script src="~/ViewModels/NoticeManager.js?r=1"></script>
- </head>
- <div class="easyui-layout" fit="true">
- <div data-options="region:'center',title:'App图片公告'" id="center">
- <!--功能按钮和查询-->
- <div class="btn_func" id="btn_func" style="border-top:0px">
- <a href="#" id="btn_add" class="easyui-linkbutton" data-options="iconCls:'fa fa-plus color_blue',plain:true">新建</a>
- @*<a href="#" id="btn_edit" class="easyui-linkbutton" data-options="iconCls:'fa fa-edit color_blue',plain:true">修改</a>*@
- <a href="#" id="btn_del" class="easyui-linkbutton" data-options="iconCls:'fa fa-remove color_blue',plain:true">删除</a>
- <a href="#" id="btn_status" class="easyui-linkbutton" data-options="iconCls:'fa fa-edit color_blue',plain:true">启用/停用</a>
- <a href="#" id="btn_refresh" class="easyui-linkbutton" data-options="iconCls:'fa fa-refresh color_blue',plain:true">刷新</a>
- </div>
- <!--公告详细信息-->
- <table class="easyui-datagrid" id="AppPush"></table>
- </div>
- </div>
- <script type="text/javascript">
- var model = new viewModel();
- model.APPInit();
- //新建
- $("#btn_add").bind("click", function () {
- top.ZLPMS.OpenNewWindow("新建APP图片公告", "/Notice/App_Window", "800px", "450px", function () {
- $("#AppPush").datagrid("load")
- })
- })
- //删除
- $("#btn_del").bind("click", function () {
- var data = $("#AppPush").datagrid("getSelected");
- if (data == null) {
- top.ZLPMS.Msg("请选择一行记录!!");
- return
- }
- top.ZLPMS.Confirm("确认删除该记录?", 3, function () {
- $.get("/Notice/Del_AppNotice/" + data["ID"], function (data) {
- if (data == 1) {
- top.ZLPMS.Msg("删除成功!", 1);
- $("#AppPush").datagrid("reload");
- }
- })
- })
- })
- //刷新
- $("#btn_refresh").bind("click", function () {
- $("#AppPush").datagrid("reload");
- })
- //启用
- $("#btn_status").bind("click", function () {
- var data = $("#AppPush").datagrid("getSelected");
- if (data == null) {
- top.ZLPMS.Msg("请选择一行记录!!");
- return
- }
- $.ajax({
- url: "/Notice/AppNoticeStatus/" + data["ID"],
- success: function (data) {
- if(data==1)
- {
- top.ZLPMS.Msg("启用成功!", 1);
- $("#AppPush").datagrid("reload");
- }
- else if(data==0)
- {
- top.ZLPMS.Msg("停用成功!", 1);
- $("#AppPush").datagrid("reload");
- }
- else {
- top.ZLPMS.Msg("只能同时允许6条公告启用!", 2);
- }
- }
- })
- })
- </script>
|