| | |
| | | <div class="layui-col-md10"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">电话号码:</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" placeholder="电话号码" name="phone" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">昵称:</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" placeholder="昵称" name="nickName" autocomplete="off" class="layui-input"> |
| | |
| | | <a lay-event="edit" shiro:hasPermission="user:update"><i |
| | | class="layui-icon febs-edit-area febs-blue"></i></a> |
| | | </script> |
| | | <script type="text/html" id="switchIsRobot"> |
| | | {{# if(d.isRobot === 1) { }} |
| | | <input type="checkbox" value={{d.userId}} lay-text="是|否" checked lay-skin="switch" lay-filter="switchIsRobot"> |
| | | <script type="text/html" id="switchGetBoom"> |
| | | {{# if(d.getBoom === 1) { }} |
| | | <input type="checkbox" value={{d.userId}} lay-text="是|否" checked lay-skin="switch" lay-filter="switchGetBoom"> |
| | | {{# } else { }} |
| | | <input type="checkbox" value={{d.userId}} lay-text="是|否" lay-skin="switch" lay-filter="switchIsRobot"> |
| | | <input type="checkbox" value={{d.userId}} lay-text="是|否" lay-skin="switch" lay-filter="switchGetBoom"> |
| | | {{# } }} |
| | | </script> |
| | | <style> |
| | |
| | | background-color: #5FB878 !important; |
| | | } |
| | | </style> |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" lay-event="registerMember">添加会员</button> |
| | | <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" lay-event="balance">拨付余额</button> |
| | | </div> |
| | | </script> |
| | | <!--<script type="text/html" id="toolbar">--> |
| | | <!-- <div class="layui-btn-container">--> |
| | | <!-- <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" lay-event="registerMember">添加会员</button>--> |
| | | <!-- <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" lay-event="balance">拨付余额</button>--> |
| | | <!-- </div>--> |
| | | <!--</script>--> |
| | | <!-- 表格操作栏 end --> |
| | | <script data-th-inline="none" type="text/javascript"> |
| | | // 引入组件并初始化 |
| | |
| | | // 获取查询参数 |
| | | function getQueryParams() { |
| | | return { |
| | | phone: $searchForm.find('input[name="phone"]').val().trim(), |
| | | nickName: $searchForm.find('input[name="nickName"]').val().trim(), |
| | | inviteId: $searchForm.find('input[name="inviteId"]').val().trim(), |
| | | status: $searchForm.find("select[name='status']").val() |
| | |
| | | cols: [[ |
| | | {type: 'checkbox'}, |
| | | {field: 'userId', title: '标识', minWidth: 150,align:'left'}, |
| | | {field: 'nickName', title: '昵称', minWidth: 100,align:'left', totalRowText: '合计:',align:'center'}, |
| | | {field: 'phone', title: '电话号码', minWidth: 100,align:'left', totalRowText: '合计:',align:'center'}, |
| | | {field: 'nickName', title: '昵称', minWidth: 100,align:'left',}, |
| | | {field: 'inviteId', title: '邀请码', minWidth: 100,align:'left',align:'center'}, |
| | | {field: 'phone', title: '注册号码', minWidth: 150,align:'left',align:'center'}, |
| | | {field: 'totalAmount', title: '账户总额', minWidth: 80,align:'left',totalRow: '{{= parseInt(d.totalAmount) }}',align:'center'}, |
| | |
| | | {field: 'groupRedBagNum', title: '群红包数', minWidth: 80,align:'left'}, |
| | | {field: 'redBagTotalAmount', title: '红包总额', minWidth: 80,align:'left'}, |
| | | {field: 'redBagAvaAmount', title: '未领取', minWidth: 80,align:'left'}, |
| | | // {field: 'isRobot', title: '机器人', templet: '#switchIsRobot', minWidth: 80,align:'center'}, |
| | | {field: 'getBoom', title: '中雷', templet: '#switchGetBoom', minWidth: 80,align:'center'}, |
| | | {field: 'createTime', title: '注册时间', minWidth: 180,align:'center'}, |
| | | ]] |
| | | }); |
| | |
| | | }); |
| | | } |
| | | |
| | | form.on('switch(switchIsRobot)', function (data) { |
| | | form.on('switch(switchGetBoom)', function (data) { |
| | | if (data.elem.checked) { |
| | | openSwitchIsRobot(data.value); |
| | | openSwitchGetBoom(data.value); |
| | | } else { |
| | | closeSwitchIsRobot(data.value); |
| | | closeSwitchGetBoom(data.value); |
| | | } |
| | | }) |
| | | function openSwitchIsRobot(userId) { |
| | | febs.get(ctx + 'admin/chat/openSwitchIsRobot/' + userId, null, function () { |
| | | function openSwitchGetBoom(userId) { |
| | | febs.get(ctx + 'admin/chat/openSwitchGetBoom/' + userId, null, function () { |
| | | febs.alert.success('操作成功'); |
| | | $reset.click(); |
| | | }); |
| | | } |
| | | function closeSwitchIsRobot(userId) { |
| | | febs.get(ctx + 'admin/chat/closeSwitchIsRobot/' + userId, null, function () { |
| | | function closeSwitchGetBoom(userId) { |
| | | febs.get(ctx + 'admin/chat/closeSwitchGetBoom/' + userId, null, function () { |
| | | febs.alert.success('操作成功'); |
| | | $reset.click(); |
| | | }); |