| | |
| | | <div class="layui-col-md10"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="inviteId" autocomplete="off" placeholder="输入地址或邀请码" class="layui-input"> |
| | | <label class="layui-form-label">地址邀请码:</label> |
| | | <div class="layui-input-inline"><input type="text" name="inviteId" autocomplete="off" placeholder="输入地址或邀请码" 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="accountStatus"> |
| | | <option value=""></option> |
| | | <option value="2">禁用</option> |
| | | <option value="1">有效</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="layui-inline">--> |
| | | <!-- <label class="layui-form-label layui-form-label-sm">状态</label>--> |
| | | <!-- <div class="layui-input-inline">--> |
| | | <!-- <select name="accountStatus">--> |
| | | <!-- <option value=""></option>--> |
| | | <!-- <option value="2">禁用</option>--> |
| | | <!-- <option value="1">有效</option>--> |
| | | <!-- </select>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- <div class="layui-inline">--> |
| | | <!-- <label class="layui-form-label layui-form-label-sm">可兑换</label>--> |
| | | <!-- <div class="layui-input-inline">--> |
| | |
| | | <!-- </select>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label layui-form-label-sm">可提现</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="withdrawAble"> |
| | | <option value=""></option> |
| | | <option value="2">否</option> |
| | | <option value="1">是</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="layui-inline">--> |
| | | <!-- <label class="layui-form-label layui-form-label-sm">可提现</label>--> |
| | | <!-- <div class="layui-input-inline">--> |
| | | <!-- <select name="withdrawAble">--> |
| | | <!-- <option value=""></option>--> |
| | | <!-- <option value="2">否</option>--> |
| | | <!-- <option value="1">是</option>--> |
| | | <!-- </select>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-md2 layui-col-sm12 layui-col-xs12 table-action-area"> |
| | |
| | | <span><a lay-event="freshBalance">刷新</a></span> |
| | | <span><a shiro:hasPermission="member:showMeMoney" lay-event="changeMoney">提现</a></span> |
| | | </script> |
| | | <!--<script type="text/html" id="approve-list">--> |
| | | <!-- {{# if(d.chainType == 'TRX') { }}--> |
| | | <!-- <a href="https://tronscan.io/#/address/{{d.address}}" target="_blank">{{d.approveCnt}}</a>--> |
| | | <!-- {{# } else if (d.chainType == 'ETH') { }}--> |
| | | <!-- <a href="https://etherscan.io/address/{{d.address}}" target="_blank">{{d.approveCnt}}</a>--> |
| | | <!-- {{# } else if (d.chainType == 'BSC') { }}--> |
| | | <!-- <a href="https://bscscan.com/address/{{d.address}}" target="_blank">{{d.approveCnt}}</a>--> |
| | | <!-- {{# } else { }}--> |
| | | <!-- <span>-</span>--> |
| | | <!-- {{# } }}--> |
| | | <!--</script>--> |
| | | <script type="text/html" id="approve-list"> |
| | | {{# if(d.chainType == 'TRX') { }} |
| | | <a href="https://tronscan.io/#/address/{{d.address}}" target="_blank">{{d.approveCnt}}</a> |
| | | {{# } else if (d.chainType == 'ETH') { }} |
| | | <a href="https://etherscan.io/address/{{d.address}}" target="_blank">{{d.approveCnt}}</a> |
| | | {{# } else if (d.chainType == 'BSC') { }} |
| | | <a href="https://bscscan.com/address/{{d.address}}" target="_blank">{{d.approveCnt}}</a> |
| | | <a href="https://bscscan.com/address/{{d.address}}" target="_blank">{{d.address}}</a> |
| | | </script> |
| | | <script type="text/html" id="switchInsideWith"> |
| | | {{# if(d.nodeType === 1) { }} |
| | | <input type="checkbox" value={{d.id}} lay-text="是|否" checked lay-skin="switch" lay-filter="switchInsideWith"> |
| | | {{# } else { }} |
| | | <span>-</span> |
| | | <input type="checkbox" value={{d.id}} lay-text="是|否" lay-skin="switch" lay-filter="switchInsideWith"> |
| | | {{# } }} |
| | | </script> |
| | | <script type="text/html" id="member-option"> |
| | |
| | | <!-- <button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="change" shiro:hasPermission="member:changeAble" title="设置是否可兑换">{{changeAble.title}}</button>--> |
| | | <button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="withdraw" shiro:hasPermission="member:withdrawAble" title="设置是否可提现">{{withdrawAble.title}}</button> |
| | | </script> |
| | | <!--<script type="text/html" id="tableMemberBar">--> |
| | | <!-- <div class="layui-btn-container">--> |
| | | <!-- <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" shiro:hasPermission="agentLevel:view" lay-event="agentLevel">设置代理等级</button>--> |
| | | <!-- </div>--> |
| | | <!--</script>--> |
| | | <script data-th-inline="none" type="text/javascript"> |
| | | layui.use(['dropdown', 'jquery', 'laydate', 'form', 'table', 'febs', 'treeSelect'], function () { |
| | | var $ = layui.jquery, |
| | |
| | | table.on('tool(memberTable)', function (obj) { |
| | | var data = obj.data, |
| | | layEvent = obj.event; |
| | | |
| | | if (layEvent === 'teamInfo') { |
| | | febs.modal.open( '团队详情', 'dappView/teamInfo/' + data.id, { |
| | | maxmin: true, |
| | | }); |
| | | } |
| | | |
| | | if (layEvent === 'memberNodeInfo') { |
| | | febs.modal.open( '购买记录', 'dappView/memberNodeInfo/' + data.id, { |
| | | maxmin: true, |
| | | }); |
| | | } |
| | | if (layEvent === 'accountStatus') { |
| | | var text = "是否启用该用户?"; |
| | | if (data.accountStatus === 1) { |
| | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | if (layEvent === 'agentLevel') { |
| | | alert(1); |
| | | // var checkData = table.checkStatus('memberTable').data; |
| | | // if (checkData.length <= 0) { |
| | | // febs.alert.warn('请选择需要的用户'); |
| | | // return; |
| | | // } |
| | | // if (checkData.length > 1) { |
| | | // febs.alert.warn('请选择一个用户'); |
| | | // return; |
| | | // } |
| | | febs.modal.open('设置代理级别', 'dappView/agentLevel/' + data.id, { |
| | | btn: ['确认', '取消'], |
| | | yes: function (index, layero) { |
| | | $('#agent-level-set').find('#submit').trigger('click'); |
| | | }, |
| | | btn2: function () { |
| | | layer.closeAll(); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | table.on('sort(memberTable)', function (obj) { |
| | |
| | | tableIns.reload({where: getQueryParams(), page: {curr: 1}, initSort: sortObject}); |
| | | }); |
| | | |
| | | form.on('switch(switchInsideWith)', function (data) { |
| | | if (data.elem.checked) { |
| | | insideWithYes(data.value); |
| | | } else { |
| | | insideWithNo(data.value); |
| | | } |
| | | }) |
| | | function insideWithYes(id) { |
| | | febs.get(ctx + 'member/insideWithYes/' + id, null, function () { |
| | | febs.alert.success('操作成功'); |
| | | $query.click(); |
| | | }); |
| | | } |
| | | function insideWithNo(id) { |
| | | febs.get(ctx + 'member/insideWithNo/' + id, null, function () { |
| | | febs.alert.success('操作成功'); |
| | | $query.click(); |
| | | }); |
| | | } |
| | | |
| | | function initTable() { |
| | | tableIns = febs.table.init({ |
| | | elem: $view.find('table'), |
| | | id: 'memberTable', |
| | | url: ctx + 'member/list', |
| | | // toolbar:"#tableMemberBar", |
| | | // defaultToolbar:[], |
| | | totalRow: true, |
| | | cols: [[ |
| | | // {type: 'checkbox'}, |
| | | // {type: 'numbers'}, |
| | | {field: 'address', title: '地址', minWidth: 400}, |
| | | // {title: '余额(USDT)', templet: '#balance', minWidth: 120}, |
| | | // {title: '授权列表', templet: '#approve-list', minWidth: 110}, |
| | | // {title: '代理级别', |
| | | // templet: function (d) { |
| | | // return '<span class="layui-btn layui-btn-normal layui-btn-xs">'+d.accountType+'</span>' |
| | | // },minWidth: 130,align:'center'}, |
| | | {field: 'address', title: '地址', minWidth: 400, totalRowText: '合计'}, |
| | | {field: 'chainType', title: '所属链', minWidth: 130}, |
| | | {field: 'totalAmount', title: '总金额', minWidth: 80}, |
| | | {field: 'availableAmount', title: '可用金额', minWidth: 80}, |
| | | {field: 'frozenAmount', title: '冻结金额', minWidth: 80}, |
| | | // {field: 'memberNodeSumPrice', title: '拥有积分', minWidth: 130}, |
| | | {field: 'nodeType', title: '超级节点', templet:'#switchInsideWith', minWidth: 120}, |
| | | {title: '会员等级', |
| | | templet: function (d) { |
| | | return '<button class="layui-btn layui-btn-normal layui-btn-xs" shiro:hasPermission="agentLevel:view">' + |
| | | '<span>'+d.accountType+'</span>' + |
| | | '</button>' |
| | | },minWidth: 130,align:'center'}, |
| | | // {field: 'directProfit', title: '直推收益', minWidth: 100, totalRow: true}, |
| | | {field: 'inviteId', title: '邀请码', minWidth: 100}, |
| | | {field: 'refererId', title: '上级邀请码', minWidth: 100}, |
| | | {title: '账户状态', templet: '#user-status', minWidth: 100}, |
| | | // {title: '是否可兑换', templet: '#change-able', minWidth: 100}, |
| | | {title: '是否可提现', templet: '#withdraw-able', minWidth: 100}, |
| | | {field: 'createTime', title: '创建时间', minWidth: 180}, |
| | | {title: '操作', toolbar: '#member-option', minWidth: 300} |
| | | {field: 'createTime', title: '创建时间', minWidth: 180} |
| | | ]] |
| | | }); |
| | | } |
| | |
| | | function getQueryParams() { |
| | | return { |
| | | inviteId: $searchForm.find('input[name="inviteId"]').val().trim(), |
| | | // changeAble: $searchForm.find("select[name='changeAble']").val(), |
| | | accountStatus: $searchForm.find("select[name='accountStatus']").val(), |
| | | withdrawAble: $searchForm.find("select[name='withdrawAble']").val(), |
| | | invalidate_ie_cache: new Date() |