wzp
2021-07-19 e65183d31755a0e5fae4bf428435d2e0fd6afdc5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
 
@{ ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_LayoutList.cshtml";
}
 
<!--模糊搜索区域-->
<div class="layui-row">
    <form class="layui-form layui-col-md12 ok-search">
        <div class="layui-input-inline">
            <input class="layui-input" placeholder="请输入账户" name="Account" autocomplete="off">
        </div>
 
        <div class="layui-input-inline">
            <input class="layui-input" placeholder="日期范围" autocomplete="off" name="StartEndDate" id="StartEndDate">
        </div>
        @Html.SearchBtnHtml("查询")
        @Html.ResetBtnHtml()
    </form>
</div>
<!--数据表格-->
<table class="layui-hide" id="tableId" lay-filter="tableFilter"></table>
<script>
    layui.use(["element", "table", "form", "laydate", "okLayer", "okUtils"], function () {
        let table = layui.table;
        let form = layui.form;
        let laydate = layui.laydate;
        let okLayer = layui.okLayer;
        let okUtils = layui.okUtils;
        laydate.render({
            elem: '#StartEndDate'
            , range: '~'
        });
 
        let AllTable = table.render({
            elem: "#tableId",
            url: "/SmsManager/Lg_Sm/List",
            limit: 20,
            page: true,
            toolbar: "#toolbarTpl",
            size: "sm",
            cols: [[
                { field: "Op_Mid", title: "OP提交ID", width: 150},
                { field: "Sp_Id", title: "账号", width: 75 },
                { field: "Op_Id", title: "通道", width: 75 },
                { field: "Ap_Submit_Time", title: "提交时间", width: 150, templet: '<span>{{showDate(d.Ap_Submit_Time)}}<span>' },
                { field: "Op_Submit_Time", title: "发送时间", width: 150, templet: '<span>{{showDate(d.Op_Submit_Time)}}<span>' },
                { field: "Op_Deliver_Time", title: "状态时间", width: 150, templet: '<span>{{showDate(d.Op_Deliver_Time)}}<span>' },
                { field: "Mobile", title: "手机号码", width: 120 },
                { field: "Stat", title: "发送状态", width: 100 },
                { field: "Msg_Content", title: "内容", width: 400 }
            ]],
            done: function (res, curr, count) {
                console.log(res, curr, count);
            }
        });
 
        form.on("submit(search)", function (data) {
            AllTable.reload({
                where: data.field,
                page: { curr: 1 }
            });
            return false;
        });
    })
</script>
<!-- 头工具栏模板 -->
<script type="text/html" id="toolbarTpl">
    @Html.TopToolBarHtml(ViewData["TopButtonList"])
</script>
<!-- 行工具栏模板 -->
<script type="text/html" id="operationTpl">
    @Html.RightToolBarHtml(ViewData["RightButtonList"])
</script>