| | |
| | | <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"> |
| | |
| | | <option value="">请选择</option> |
| | | <option value="Y">正常</option> |
| | | <option value="N">禁用</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">机器人:</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="isRobot"> |
| | | <option value="">请选择</option> |
| | | <option value="1">是</option> |
| | | <option value="0">否</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | // 查询按钮 |
| | | $query.on('click', function () { |
| | | var params = $.extend(getQueryParams(), {field: sortObject.field, order: sortObject.type}); |
| | | tableIns.reload({where: params, page: {curr: currPageUser}}); |
| | | tableIns.reload({where: params, page: {curr: 1}}); |
| | | }); |
| | | |
| | | // 刷新按钮 |
| | |
| | | // 获取查询参数 |
| | | 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() |
| | | status: $searchForm.find("select[name='status']").val(), |
| | | isRobot: $searchForm.find("select[name='isRobot']").val() |
| | | }; |
| | | } |
| | | |
| | |
| | | totalRow: true ,// 开启合计行 |
| | | cols: [[ |
| | | {type: 'checkbox'}, |
| | | {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: 'userId', title: '标识', minWidth: 40,align:'center', totalRowText: '合计:'}, |
| | | {field: 'phone', title: '注册号码', minWidth: 150,align:'center'}, |
| | | {field: 'nickName', title: '昵称', minWidth: 100}, |
| | | {field: 'inviteId', title: '邀请码', minWidth: 100,align:'center'}, |
| | | {field: 'totalAmount', title: '账户总额', minWidth: 80,totalRow: '{{= parseInt(d.totalAmount) }}',align:'center'}, |
| | | {field: 'avaAmount', title: '账户余额', minWidth: 80,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: 'modelType', title: '模式', templet: '#switchModelType', minWidth: 80,align:'center'}, |
| | |
| | | function openCreateGroup(userId) { |
| | | febs.get(ctx + 'admin/chat/openCreateGroup/' + userId, null, function () { |
| | | febs.alert.success('操作成功'); |
| | | $query.click(); |
| | | $reset.click(); |
| | | }); |
| | | } |
| | | function closeCreateGroup(userId) { |
| | | febs.get(ctx + 'admin/chat/closeCreateGroup/' + userId, null, function () { |
| | | febs.alert.success('操作成功'); |
| | | $query.click(); |
| | | $reset.click(); |
| | | }); |
| | | } |
| | | |
| | |
| | | function openModelType(userId) { |
| | | febs.get(ctx + 'admin/chat/openModelType/' + userId, null, function () { |
| | | febs.alert.success('操作成功'); |
| | | $query.click(); |
| | | $reset.click(); |
| | | }); |
| | | } |
| | | function closeModelType(userId) { |
| | | febs.get(ctx + 'admin/chat/closeModelType/' + userId, null, function () { |
| | | febs.alert.success('操作成功'); |
| | | $query.click(); |
| | | $reset.click(); |
| | | }); |
| | | } |
| | | |
| | |
| | | function openAccount(userId) { |
| | | febs.get(ctx + 'admin/chat/openAccount/' + userId, null, function () { |
| | | febs.alert.success('操作成功'); |
| | | $query.click(); |
| | | $reset.click(); |
| | | }); |
| | | } |
| | | function closeAccount(userId) { |
| | | febs.get(ctx + 'admin/chat/closeAccount/' + userId, null, function () { |
| | | febs.alert.success('操作成功'); |
| | | $query.click(); |
| | | $reset.click(); |
| | | }); |
| | | } |
| | | |
| | |
| | | function openSwitchIsRobot(userId) { |
| | | febs.get(ctx + 'admin/chat/openSwitchIsRobot/' + userId, null, function () { |
| | | febs.alert.success('操作成功'); |
| | | $query.click(); |
| | | $reset.click(); |
| | | }); |
| | | } |
| | | function closeSwitchIsRobot(userId) { |
| | | febs.get(ctx + 'admin/chat/closeSwitchIsRobot/' + userId, null, function () { |
| | | febs.alert.success('操作成功'); |
| | | $query.click(); |
| | | $reset.click(); |
| | | }); |
| | | } |
| | | |