懒羊羊
2023-08-30 1ac2bc1590406d9babec036e154d8d08f34a6aa1
提交 | 用户 | 时间
1ac2bc 1 <!doctype html>
2 <html>
3 <head>
4     <title>Activiti Editor</title>
5     <meta charset="utf-8"/>
6     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
7     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
8     <link rel="stylesheet" href="${ctxPath}/assets/common/libs/layui/css/layui.css?v=${constants.getReleaseVersion()}"/>
9     <link rel="stylesheet" href="${ctxPath}/assets/common/module/admin.css?v=${constants.getReleaseVersion()}" media="all"/>
10     <link rel="stylesheet" href="${ctxPath}/assets/expand/css/style.css?v=${constants.getReleaseVersion()}" media="all"/>
11 </head>
12 <body>
13 <div class="layui-card">
14     <div class="layui-card-body">
15         <div class="layui-form toolbar">
16             <div class="layui-form-item">
17                 <input id="account" value="" type="hidden"/>
18                 <div class="layui-inline">
19                     <input id="name" class="layui-input" type="text" placeholder="账号/姓名/手机号"/>
20                 </div>
21                 <div class="layui-inline">
22                     <input id="timeLimit" class="layui-input" type="text" placeholder="注册时间"/>
23                 </div>
24                 <div class="layui-inline">
25                     <button id="btnSearch" class="layui-btn icon-btn"><i class="layui-icon">&#xe615;</i>搜索</button>
26                 </div>
27             </div>
28         </div>
29         <table class="layui-table" id="selectDealerTable" lay-filter="selectDealerTable"></table>
30     </div>
31 </div>
32 </body>
33 </html>
34 <script type="text/javascript">
35     var Feng = {
36         ctxPath: "${ctxPath}",
37         version: '${constants.getReleaseVersion()}'
38     };
39 </script>
40
41 <script type="text/javascript" src="${ctxPath}/assets/common/libs/layui/layui.js?v=${constants.getReleaseVersion()}"></script>
42 <script type="text/javascript" src="${ctxPath}/assets/common/js/common.js?v=${constants.getReleaseVersion()}"></script>
43 <script>
44     layui.use(['jquery', 'table', 'laydate'], function () {
45
46         var $ = layui.jquery;
47         var table = layui.table;
48         var laydate = layui.laydate;
49
50         var SelectDealerTable = {
51             tableId: "selectDealerTable"
52         };
53
54         SelectDealerTable.initColumn = function () {
55             return [[
56                 {type: 'numbers', title: "No"},
57                 {field: "account", title: "账号"},
58                 {field: "name", title: "姓名"},
59                 {field: "deptName", title: "部门"}
60             ]]
61         };
62
63         //渲染时间选择框
64         laydate.render({
65             elem: '#timeLimit',
66             range: true,
67             max: Feng.currentDate()
68         });
69
70         // 搜索按钮点击事件
71         $('#btnSearch').click(function () {
72             SelectDealerTable.search();
73         });
74
75         /**
76          * 点击查询按钮
77          */
78         SelectDealerTable.search = function () {
79             var queryData = {};
80             queryData['deptId'] = "";
81             queryData['name'] = $("#name").val();
82             queryData['timeLimit'] = $("#timeLimit").val();
83             table.reload(SelectDealerTable.tableId, {
84                 where: queryData, page: {curr: 1}
85             });
86         };
87
88         table.render({
89             elem: '#' + SelectDealerTable.tableId,
90             url: Feng.ctxPath + '/mgr/list',
91             page: true,
92             height: "full-98",
93             cellMinWidth: 100,
94             cols: SelectDealerTable.initColumn()
95         });
96
97         table.on('rowDouble(selectDealerTable)', function (obj) {
98             //缓存account
99             top.layui.data('tempIndex', {
100                 key: 'account', value: obj.data.account
101             });
102
103             //关闭窗口
104             top.layer.close(top.layui.data('tempIndex').userIndex);
105         });
106     });
107 </script>
108