123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149 |
- @{
- Layout = null;
- }
- @using NIU.Forum.Common;
- <!DOCTYPE html>
- <html>
- <head>
- <title>地区管理</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <link href="~/Static/css/bootstrap.min.css" rel="stylesheet" />
- <link href="~/Static/css/font-awesome.min.css" rel="stylesheet" />
- <link href="~/Static/css/style.css" rel="stylesheet" />
- <script src="~/Static/custom/jquery.min.js"></script>
- <script src="~/Static/custom/jquery.easyui.min.js"></script>
- <script src="~/Static/custom/easyui-lang-zh_CN.js"></script>
- <link href="~/Static/custom/uimaker/easyui.css" rel="stylesheet" />
- <link href="~/Static/custom/uimaker/icon.css" rel="stylesheet" />
- <script src="~/Static/js/bootstrap.min.js"></script>
- <script src="~/static/js/jquery.form.js"></script>
- <script src="~/Static/js/validate/jquery.validate.min.js"></script>
- <script src="~/Static/js/validate/messages_zh.min.js"></script>
- <script src="~/Static/js/serializeObj.js"></script>
- <script src="~/Static/js/common.js"></script>
- <script src="~/Static/js/DateTimeOverFlowFormat.js"></script>
- <script src="~/Static/layer/layer.min.js"></script>
- </head>
- <body>
- <div class="easyui-layout" fit="true">
- <div data-options="region:'center'" border="false">
- <table id="Ctr_DataGrid"></table>
- <div id="Ctr_Toolbar">
- <a href="@Url.Action("new")" class="easyui-linkbutton" style="color:green;"><i class="fa fa-plus-circle"></i>新增</a>
- <a href="javaScript:void(0)" onclick="FunRefresh()" class="easyui-linkbutton" style="color:green;"><i class="fa fa-refresh"></i>刷新</a>
- </div>
- </div>
- </div>
- <script type="text/javascript">
- $(function () {
- initData();
- });
- function initData() {
- $('#Ctr_DataGrid').datagrid({
- title: "地区列表",
- url: "@Url.Action("GetList","Area")",
- toolbar: '#Ctr_Toolbar',
- rownumbers: true,
- loadMsg: "玩命儿加载中...",
- striped: true,
- nowrap: false,
- fit: true,
- fitColumns: true,
- singleSelect: true,
- checkOnSelect: true,
- selectOnCheck: true,
- pagination: true,
- pageNumber: 1,
- pageSize: 10,
- pageList: [10, 15, 20, 25, 30],
- frozenColumns: [[
- {
- field: 'checked', checkbox: true, title: '选择', align: 'center'
- },
- {
- field: 'name', title: '名称', width: '10%', formatter: formatContent
- },
- {
- field: 'title', title: 'Title', width: '10%', formatter: formatContent
- },
- {
- field: 'descriptions', title: 'Desc', width: '10%', formatter: formatContent
- },
- {
- field: 'keywords', title: 'Key', width: '10%', formatter: formatContent
- },
- ]],
- columns: [[
- {
- field: 'seq', title: '排序号', width: '10%', align: 'center', formatter: formatContent
- },
- {
- field: 'cdate', title: '更新时间', width: '20%', align: 'center', formatter: changeIntToDateTime,
- },
- {
- field: 'type', title: '操作', width: '20%', align: 'center',
- formatter: function (value, row) {
- if (value == 1) {
- var btns = '<button style="margin-right:10px;" onclick="funEdit(' + row.areaid + ')">修改</button><button style="margin-right:10px;" onclick="funDel(' + row.areaid + ')">删除</button><button onclick="funCzList(' + row.areaid +')">彩种集</button>';
- return btns;
- }
- }
- },
- ]],
- onLoadSuccess: function (row, data) {
- $('#Ctr_DataGrid').treegrid("collapseAll");
- }
- });
- }
- function funEdit(id) {
- window.location.href = "/Area/Edit" + "?id=" + id;
- }
- function funDel(id) {
- layer.confirm('您确定要删除吗?', {
- icon: 4,
- title: '提示' //按钮
- }, function () {
- $.post("/Area/Delete",
- {
- id: id
- },
- function (data) {
- if (data.Ret == 0) {
- layer.msg("删除成功", { icon: 1 });
- FunRefresh();
- } else {
- layer.alert(data.Msg, { icon: 6 });
- }
- }, "json");
- });
- }
- function funCzList(id) {
- window.location.href = "/Area/CzList" + "?id=" + id;
- }
- //刷新
- function FunRefresh() {
- $('#Ctr_DataGrid').treegrid({
- url: "@Url.Action("GetList","Area")",
- });
- }
- </script>
- </body>
- </html>
|