| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">微聊号:</label> |
| | | <label class="layui-form-label">邀请码:</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" placeholder="微聊号" name="chatNo" autocomplete="off" class="layui-input"> |
| | | <input type="text" placeholder="邀请码" name="inviteId" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | |
| | | <input type="checkbox" value={{d.userId}} lay-text="正常|禁用" checked lay-skin="switch" lay-filter="switchStatus"> |
| | | {{# } else { }} |
| | | <input type="checkbox" value={{d.userId}} lay-text="正常|禁用" lay-skin="switch" lay-filter="switchStatus"> |
| | | {{# } }} |
| | | </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"> |
| | | {{# } else { }} |
| | | <input type="checkbox" value={{d.userId}} lay-text="是|否" lay-skin="switch" lay-filter="switchIsRobot"> |
| | | {{# } }} |
| | | </script> |
| | | <style> |
| | |
| | | function getQueryParams() { |
| | | return { |
| | | nickName: $searchForm.find('input[name="nickName"]').val().trim(), |
| | | chatNo: $searchForm.find('input[name="chatNo"]').val().trim(), |
| | | inviteId: $searchForm.find('input[name="inviteId"]').val().trim(), |
| | | status: $searchForm.find("select[name='status']").val() |
| | | }; |
| | | } |
| | |
| | | totalRow: true ,// 开启合计行 |
| | | cols: [[ |
| | | {type: 'checkbox'}, |
| | | {field: 'userId', title: '标识', minWidth: 150,align:'left', totalRowText: '合计:',align:'center'}, |
| | | {field: 'nickName', title: '昵称', minWidth: 100,align:'left',align:'center'}, |
| | | {field: 'chatNo', title: '微聊号', minWidth: 150,align:'left',align:'center'}, |
| | | // {field: 'userId', title: '标识', minWidth: 150,align:'left'}, |
| | | {field: 'nickName', title: '昵称', minWidth: 100,align:'left', totalRowText: '合计:',align:'center'}, |
| | | {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: 'avaAmount', title: '账户余额', minWidth: 80,align:'left',totalRow: '{{= parseInt(d.avaAmount) }}',align:'center'}, |
| | | {field: 'status', title: '账号状态', templet: '#switchStatus', minWidth: 80,align:'center'}, |
| | | {field: 'isRobot', title: '机器人', templet: '#switchIsRobot', minWidth: 80,align:'center'}, |
| | | {field: 'createTime', title: '注册时间', minWidth: 180,align:'center'}, |
| | | ]] |
| | | }); |
| | |
| | | }); |
| | | } |
| | | |
| | | form.on('switch(switchIsRobot)', function (data) { |
| | | if (data.elem.checked) { |
| | | openSwitchIsRobot(data.value); |
| | | } else { |
| | | closeSwitchIsRobot(data.value); |
| | | } |
| | | }) |
| | | function openSwitchIsRobot(userId) { |
| | | febs.get(ctx + 'admin/chat/openSwitchIsRobot/' + userId, null, function () { |
| | | febs.alert.success('操作成功'); |
| | | $query.click(); |
| | | }); |
| | | } |
| | | function closeSwitchIsRobot(userId) { |
| | | febs.get(ctx + 'admin/chat/closeSwitchIsRobot/' + userId, null, function () { |
| | | febs.alert.success('操作成功'); |
| | | $query.click(); |
| | | }); |
| | | } |
| | | |
| | | }) |
| | | </script> |