懒羊羊
2023-08-30 1ac2bc1590406d9babec036e154d8d08f34a6aa1
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!doctype html>
<html>
<head>
    <title>Activiti Editor</title>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="${ctxPath}/assets/common/libs/layui/css/layui.css?v=${constants.getReleaseVersion()}"/>
    <link rel="stylesheet" href="${ctxPath}/assets/common/module/admin.css?v=${constants.getReleaseVersion()}" media="all"/>
    <link rel="stylesheet" href="${ctxPath}/assets/expand/css/style.css?v=${constants.getReleaseVersion()}" media="all"/>
</head>
<body>
<div class="layui-card">
    <div class="layui-card-body">
        <div class="layui-form toolbar">
            <div class="layui-form-item">
                <input id="account" value="" type="hidden"/>
                <div class="layui-inline">
                    <input id="name" class="layui-input" type="text" placeholder="账号/姓名/手机号"/>
                </div>
                <div class="layui-inline">
                    <input id="timeLimit" class="layui-input" type="text" placeholder="注册时间"/>
                </div>
                <div class="layui-inline">
                    <button id="btnSearch" class="layui-btn icon-btn"><i class="layui-icon">&#xe615;</i>搜索</button>
                </div>
            </div>
        </div>
        <table class="layui-table" id="selectDealerTable" lay-filter="selectDealerTable"></table>
    </div>
</div>
</body>
</html>
<script type="text/javascript">
    var Feng = {
        ctxPath: "${ctxPath}",
        version: '${constants.getReleaseVersion()}'
    };
</script>
 
<script type="text/javascript" src="${ctxPath}/assets/common/libs/layui/layui.js?v=${constants.getReleaseVersion()}"></script>
<script type="text/javascript" src="${ctxPath}/assets/common/js/common.js?v=${constants.getReleaseVersion()}"></script>
<script>
    layui.use(['jquery', 'table', 'laydate'], function () {
 
        var $ = layui.jquery;
        var table = layui.table;
        var laydate = layui.laydate;
 
        var SelectDealerTable = {
            tableId: "selectDealerTable"
        };
 
        SelectDealerTable.initColumn = function () {
            return [[
                {type: 'numbers', title: "No"},
                {field: "account", title: "账号"},
                {field: "name", title: "姓名"},
                {field: "deptName", title: "部门"}
            ]]
        };
 
        //渲染时间选择框
        laydate.render({
            elem: '#timeLimit',
            range: true,
            max: Feng.currentDate()
        });
 
        // 搜索按钮点击事件
        $('#btnSearch').click(function () {
            SelectDealerTable.search();
        });
 
        /**
         * 点击查询按钮
         */
        SelectDealerTable.search = function () {
            var queryData = {};
            queryData['deptId'] = "";
            queryData['name'] = $("#name").val();
            queryData['timeLimit'] = $("#timeLimit").val();
            table.reload(SelectDealerTable.tableId, {
                where: queryData, page: {curr: 1}
            });
        };
 
        table.render({
            elem: '#' + SelectDealerTable.tableId,
            url: Feng.ctxPath + '/mgr/list',
            page: true,
            height: "full-98",
            cellMinWidth: 100,
            cols: SelectDealerTable.initColumn()
        });
 
        table.on('rowDouble(selectDealerTable)', function (obj) {
            //缓存account
            top.layui.data('tempIndex', {
                key: 'account', value: obj.data.account
            });
 
            //关闭窗口
            top.layer.close(top.layui.data('tempIndex').userIndex);
        });
    });
</script>