| | |
| | | }} |
| | | <span class="layui-badge febs-bg-{{status.color}}">{{ status.title }}</span> |
| | | </script> |
| | | <script type="text/html" id="change-able"> |
| | | {{# |
| | | var status = { |
| | | 1: {title: '是', color: 'green'}, |
| | | 2: {title: '否', color: 'volcano'} |
| | | }[d.changeAble]; |
| | | }} |
| | | <span class="layui-badge febs-bg-{{status.color}}">{{ status.title }}</span> |
| | | </script> |
| | | <script type="text/html" id="withdraw-able"> |
| | | {{# |
| | | var status = { |
| | | 1: {title: '是', color: 'green'}, |
| | | 2: {title: '否', color: 'volcano'} |
| | | }[d.withdrawAble]; |
| | | }} |
| | | <span class="layui-badge febs-bg-{{status.color}}">{{ status.title }}</span> |
| | | </script> |
| | | <script type="text/html" id="user-sex"> |
| | | {{# |
| | | var sex = { |
| | | 2: {title: '保密'}, |
| | | 1: {title: '女'}, |
| | | 0: {title: '男'} |
| | | }[d.sex]; |
| | | }} |
| | | <span>{{ sex.title }}</span> |
| | | </script> |
| | | <script type="text/html" id="balance"> |
| | | <span name="balance">{{ d.balance }}</span></br> |
| | | <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"> |
| | | <a href="https://bscscan.com/address/{{d.address}}" target="_blank">{{d.address}}</a> |
| | | </script> |
| | | <script type="text/html" id="switchActiveStatus"> |
| | | {{# if(d.activeStatus === 1) { }} |
| | | <input type="checkbox" value={{d.id}} lay-text="是|否" checked lay-skin="switch" lay-filter="switchActiveStatus"> |
| | |
| | | </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="mallSystemPay:update" lay-event="coinAmount">拨付余额</button> |
| | | <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" shiro:hasPermission="mallSystemPay:update" lay-event="scoreAmount">拨付赠送积分</button> |
| | | <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" shiro:hasPermission="agentLevelSet:update" lay-event="balance">拨付资产包</button> |
| | | <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" shiro:hasPermission="agentLevelSet:update" lay-event="agentLevel">设置代理等级</button> |
| | | <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" shiro:hasPermission="agentLevel:view" lay-event="coinAmount">拨付余额</button> |
| | | <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" shiro:hasPermission="agentLevel:view" lay-event="scoreAmount">拨付赠送积分</button> |
| | | <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" shiro:hasPermission="agentLevel:view" lay-event="balance">拨付资产包</button> |
| | | </div> |
| | | </script> |
| | | |
| | | <script type="text/html" id="mallmember-option"> |
| | | <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" shiro:hasPermission="agentLevel:view" lay-event="agentLevel">设置代理等级</button> |
| | | <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" shiro:hasPermission="agentLevel:view" lay-event="agentLevel">设置会员级别</button> |
| | | <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" shiro:hasPermission="agentLevel:view" lay-event="memberFlow">个人流水</button> |
| | | </script> |
| | | <script data-th-inline="none" type="text/javascript"> |
| | | layui.use(['dropdown', 'jquery', 'laydate', 'form', 'table', 'febs', 'treeSelect'], function () { |
| | |
| | | |
| | | initTable(); |
| | | |
| | | // table.on('tool(memberTable)', function (obj) { |
| | | // var data = obj.data, |
| | | // layEvent = obj.event; |
| | | // if (layEvent === 'agentLevel') { |
| | | // 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('tool(memberTable)', function (obj) { |
| | | var data = obj.data, |
| | | layEvent = obj.event; |
| | | if (layEvent === 'agentLevel') { |
| | | febs.modal.open('设置代理级别', 'dappView/agentLevel/' + data.id, { |
| | | btn: ['确认', '取消'], |
| | | yes: function (index, layero) { |
| | | $('#agent-level-set').find('#submit').trigger('click'); |
| | | }, |
| | | btn2: function () { |
| | | layer.closeAll(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | if (layEvent === 'memberFlow') { |
| | | febs.modal.open( '订单流水', 'dappView/memberFlow/' + data.id, { |
| | | maxmin: true, |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | table.on('sort(memberTable)', function (obj) { |
| | | sortObject = obj; |
| | |
| | | |
| | | function initTable() { |
| | | tableIns = febs.table.init({ |
| | | |
| | | elem: $view.find('table'), |
| | | id: 'memberTable', |
| | | url: ctx + 'member/list', |
| | | // toolbar:"#tableMemberBar", |
| | | toolbar:"#tableMemberBar", |
| | | defaultToolbar:[], |
| | | totalRow: true, |
| | | totalRow: true ,// 开启合计行 |
| | | cols: [[ |
| | | {type: 'checkbox'}, |
| | | // {title: '代理级别', |
| | |
| | | var data = obj.data, |
| | | layEvent = obj.event; |
| | | |
| | | if (layEvent === 'coinAmount') { |
| | | var checkData = table.checkStatus('memberTable').data; |
| | | if (checkData.length <= 0) { |
| | | febs.alert.warn('请选择需要的用户'); |
| | | return; |
| | | } |
| | | if (checkData.length > 1) { |
| | | febs.alert.warn('请选择一个用户'); |
| | | return; |
| | | } |
| | | systemPay("余额", checkData[0].id, 1); |
| | | } |
| | | |
| | | if (layEvent === 'scoreAmount') { |
| | | var checkData = table.checkStatus('memberTable').data; |
| | | if (checkData.length <= 0) { |
| | | febs.alert.warn('请选择需要的用户'); |
| | | return; |
| | | } |
| | | if (checkData.length > 1) { |
| | | febs.alert.warn('请选择一个用户'); |
| | | return; |
| | | } |
| | | systemPay("赠送积分", checkData[0].id, 2); |
| | | } |
| | | |
| | | if (layEvent === 'balance') { |
| | | var checkData = table.checkStatus('userTable').data; |
| | | var checkData = table.checkStatus('memberTable').data; |
| | | if (checkData.length <= 0) { |
| | | febs.alert.warn('请选择需要的用户'); |
| | | return; |
| | |
| | | febs.alert.warn('请选择一个用户'); |
| | | return; |
| | | } |
| | | systemPay("修改余额", checkData[0].id, 1); |
| | | } |
| | | |
| | | if (layEvent === 'voucherUpdate') { |
| | | var checkData = table.checkStatus('userTable').data; |
| | | if (checkData.length <= 0) { |
| | | febs.alert.warn('请选择需要的用户'); |
| | | return; |
| | | } |
| | | if (checkData.length > 1) { |
| | | febs.alert.warn('请选择一个用户'); |
| | | return; |
| | | } |
| | | voucherUpdate("拨付绿色凭证", checkData[0].id, 1); |
| | | } |
| | | |
| | | if (layEvent === 'score') { |
| | | var checkData = table.checkStatus('userTable').data; |
| | | if (checkData.length <= 0) { |
| | | febs.alert.warn('请选择需要的用户'); |
| | | return; |
| | | } |
| | | if (checkData.length > 1) { |
| | | febs.alert.warn('请选择一个用户'); |
| | | return; |
| | | } |
| | | systemPay("修改赠送积分", checkData[0].id, 2); |
| | | } |
| | | |
| | | if (layEvent === 'prizeScore') { |
| | | var checkData = table.checkStatus('userTable').data; |
| | | if (checkData.length <= 0) { |
| | | febs.alert.warn('请选择需要的用户'); |
| | | return; |
| | | } |
| | | if (checkData.length > 1) { |
| | | febs.alert.warn('请选择一个用户'); |
| | | return; |
| | | } |
| | | systemPay("修改竞猜积分", checkData[0].id, 3); |
| | | } |
| | | |
| | | if (layEvent === 'agentLevel') { |
| | | var checkData = table.checkStatus('userTable').data; |
| | | if (checkData.length <= 0) { |
| | | febs.alert.warn('请选择需要的用户'); |
| | | return; |
| | | } |
| | | if (checkData.length > 1) { |
| | | febs.alert.warn('请选择一个用户'); |
| | | return; |
| | | } |
| | | febs.modal.open('设置代理级别', 'modules/mallMember/agentLevelSet/' + checkData[0].id, { |
| | | btn: ['确认', '取消'], |
| | | yes: function (index, layero) { |
| | | $('#agent-level-set').find('#submit').trigger('click'); |
| | | }, |
| | | btn2: function () { |
| | | layer.closeAll(); |
| | | } |
| | | }); |
| | | systemPay("资产包", checkData[0].id, 3); |
| | | } |
| | | }); |
| | | |
| | | function systemPay(text, id, type) { |
| | | febs.modal.open('text', 'modules/mallMember/mallSystemPay/' + type +'/'+ id, { |
| | | btn: ['提交', '取消'], |
| | | febs.modal.open(text, 'dappView/mallSystemPay/' + type +'/'+ id, { |
| | | btn: ['确认', '取消'], |
| | | yes: function (index, layero) { |
| | | $('#systemPay-update').find('#submit').trigger('click'); |
| | | }, |