| | |
| | | <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="name" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" placeholder="手机号" name="account" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label layui-form-label-sm">账户状态</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="level"> |
| | | <option value="">请选择</option> |
| | | <option value="ZERO_LEVEL">未激活</option> |
| | | <option value="FIRST_LEVEL">普通会员</option> |
| | | <option value="SECOND_LEVEL">业务经理</option> |
| | | <option value="THIRD_LEVEL">区域代理</option> |
| | | <option value="FOUR_LEVEL">代理</option> |
| | | <option value="FIFTH_LEVEL">总代</option> |
| | | <option value="SIX_LEVEL">董事</option> |
| | | </select> |
| | | <input type="text" placeholder="登录账户" name="accountLogin" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <a lay-event="edit" shiro:hasPermission="user:update"><i |
| | | class="layui-icon febs-edit-area febs-blue"></i></a> |
| | | </script> |
| | | |
| | | <!-- 表格操作栏 start --> |
| | | <script type="text/html" id="agentList-option"> |
| | | <button class="layui-btn layui-btn-normal layui-btn-xs" type="button" shiro:hasPermission="agentList:tdView">字段显示隐藏</button> |
| | | </script> |
| | | <!-- 表格操作栏 end --> |
| | | <script data-th-inline="none" type="text/javascript"> |
| | | // 引入组件并初始化 |
| | |
| | | $searchForm = $view.find('form'), |
| | | sortObject = {field: 'phone', type: null}, |
| | | tableIns; |
| | | |
| | | let toolbarAgentList = $.trim($("#agentList-option").html())==="" ? true : false; |
| | | |
| | | form.render(); |
| | | |
| | |
| | | if (layEvent === 'activate') { |
| | | febs.modal.confirm('激活', '确认激活该账号?', function () { |
| | | activateAccount(data.id); |
| | | }); |
| | | } |
| | | if (layEvent === 'agentLevelSet') { |
| | | febs.modal.open('设置代理级别', 'modules/mallMember/agentLevelSet/' + data.id, { |
| | | btn: ['确认', '取消'], |
| | | yes: function (index, layero) { |
| | | $('#agent-level-set').find('#submit').trigger('click'); |
| | | }, |
| | | btn2: function () { |
| | | layer.closeAll(); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | |
| | | elem: $view.find('table'), |
| | | id: 'userAgentTable', |
| | | url: ctx + 'admin/mallMember/getAgentList', |
| | | totalRow: true ,// 开启合计行 |
| | | cols: [[ |
| | | {field: 'bindPhone', title: '手机号', minWidth: 150,align:'left'}, |
| | | {field: 'phone', title: '账号', minWidth: 150,align:'left'}, |
| | | {field: 'name', title: '名称', minWidth: 100,align:'left'}, |
| | | {field: 'inviteId', title: '邀请码', minWidth: 100,align:'left'}, |
| | | {field: 'levelName', title: '代理层级', minWidth: 100,align:'left'}, |
| | | {field: 'memberNum', title: '下级', minWidth: 100,align:'left'}, |
| | | {field: 'allMemberNum', title: '我的团队总数', minWidth: 100,align:'left'}, |
| | | {field: 'amount', title: '团队业绩', minWidth: 100,align:'left'}, |
| | | {title: '操作', |
| | | templet: function (d) { |
| | | if (d.level === 'ZERO_LEVEL'){ |
| | | return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="activate" shiro:hasPermission="user:update">激活</button>' |
| | | + '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="agentAllMember" shiro:hasPermission="user:update">全部成员</button>' |
| | | }else{ |
| | | return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="agentAllMember" shiro:hasPermission="user:update">全部成员</button>' |
| | | } |
| | | },minWidth: 300,align:'center'} |
| | | // {field: 'bindPhone', title: '手机号', minWidth: 150,align:'left'}, |
| | | {field: 'accountLogin', title: '登录账号', minWidth: 100,align:'left', totalRowText: '合计:'}, |
| | | {field: 'chargeAmount', title: '充值', minWidth: 100,align:'left',totalRow: '{{= parseInt(d.chargeAmount) }}'}, |
| | | {field: 'withDrawAmount', title: '提现', minWidth: 100,align:'left',totalRow: '{{= parseInt(d.withDrawAmount) }}'}, |
| | | {field: 'balance', title: '余额', minWidth: 100,align:'left',totalRow: '{{= parseInt(d.balance) }}'}, |
| | | {field: 'amountPerk', title: '盈亏', minWidth: 100,align:'left',totalRow: '{{= parseInt(d.amountPerk) }}'}, |
| | | ]] |
| | | }); |
| | | } |
| | |
| | | // 获取查询参数 |
| | | function getQueryParams() { |
| | | return { |
| | | name: $searchForm.find('input[name="name"]').val().trim(), |
| | | account: $searchForm.find('input[name="account"]').val().trim(), |
| | | level: $searchForm.find("select[name='level']").val(), |
| | | accountLogin: $searchForm.find('input[name="accountLogin"]').val().trim(), |
| | | }; |
| | | } |
| | | |