|  |  |  | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="layui-inline"> | 
|---|
|  |  |  | <label class="layui-form-label layui-form-label-sm">账号类型</label> | 
|---|
|  |  |  | <div class="layui-input-inline"> | 
|---|
|  |  |  | <select name="isTest"> | 
|---|
|  |  |  | <option value=""></option> | 
|---|
|  |  |  | <option value="1">正常账号</option> | 
|---|
|  |  |  | <option value="2">测试账号</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="isInsideOption"> | 
|---|
|  |  |  | <option value=""></option> | 
|---|
|  |  |  | <option value="1">是</option> | 
|---|
|  |  |  | <option value="0">否</option> | 
|---|
|  |  |  | <option value="Y">是</option> | 
|---|
|  |  |  | <option value="N">否</option> | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <!-- 表格字段状态格式化 start --> | 
|---|
|  |  |  | <script type="text/html" id="isInside-table"> | 
|---|
|  |  |  | {{# | 
|---|
|  |  |  | var isInside = { | 
|---|
|  |  |  | Y: {title: '是' , color: 'red'}, | 
|---|
|  |  |  | N: {title: '否' , color: 'green'}, | 
|---|
|  |  |  | }[d.isInside]; | 
|---|
|  |  |  | }} | 
|---|
|  |  |  | <span class="layui-badge febs-tag-{{isInside.color}}">{{ isInside.title }}</span> | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  | <script type="text/html" id="status-table"> | 
|---|
|  |  |  | {{# | 
|---|
|  |  |  | var status = { | 
|---|
|  |  |  | 1: {title: '等待审核' , color: 'blue'}, | 
|---|
|  |  |  | 2: {title: '同意', color: 'green'}, | 
|---|
|  |  |  | 3: {title: '拒绝' , color: 'red'} | 
|---|
|  |  |  | }[d.status]; | 
|---|
|  |  |  | }} | 
|---|
|  |  |  | <span class="layui-badge febs-tag-{{status.color}}">{{ status.title }}</span> | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!-- 表格字段状态格式化 start --> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!-- 表格操作栏 start --> | 
|---|
|  |  |  | <script type="text/html" id="user-option"> | 
|---|
|  |  |  | <span shiro:lacksPermission="user:view,user:update,user:delete"> | 
|---|
|  |  |  | 
|---|
|  |  |  | <!-- 表格操作栏 end --> | 
|---|
|  |  |  | <script data-th-inline="none" type="text/javascript"> | 
|---|
|  |  |  | // 引入组件并初始化 | 
|---|
|  |  |  | layui.use(['dropdown', 'jquery', 'laydate', 'form', 'table', 'febs', 'treeSelect'], function () { | 
|---|
|  |  |  | layui.use(['jquery', 'laydate', 'form', 'table', 'febs'], function () { | 
|---|
|  |  |  | var $ = layui.jquery, | 
|---|
|  |  |  | laydate = layui.laydate, | 
|---|
|  |  |  | febs = layui.febs, | 
|---|
|  |  |  | form = layui.form, | 
|---|
|  |  |  | table = layui.table, | 
|---|
|  |  |  | treeSelect = layui.treeSelect, | 
|---|
|  |  |  | dropdown = layui.dropdown, | 
|---|
|  |  |  | $view = $('#febs-user'), | 
|---|
|  |  |  | $query = $view.find('#query'), | 
|---|
|  |  |  | $reset = $view.find('#reset'), | 
|---|
|  |  |  | 
|---|
|  |  |  | // 表格初始化 | 
|---|
|  |  |  | initTable(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 下拉框选择器 | 
|---|
|  |  |  | treeSelect.render({ | 
|---|
|  |  |  | elem: $view.find('#dept'), | 
|---|
|  |  |  | type: 'get', | 
|---|
|  |  |  | data: ctx + 'dept/select/tree', | 
|---|
|  |  |  | placeholder: '请选择', | 
|---|
|  |  |  | search: false | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 初始化表格操作栏各个按钮功能 | 
|---|
|  |  |  | table.on('tool(userTable)', function (obj) { | 
|---|
|  |  |  | $query.click(); | 
|---|
|  |  |  | var data = obj.data, | 
|---|
|  |  |  | layEvent = obj.event; | 
|---|
|  |  |  | if (layEvent === 'confirm') { | 
|---|
|  |  |  | 
|---|
|  |  |  | cancelUsers(data.id); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (layEvent === 'examine') { | 
|---|
|  |  |  | febs.modal.open( '个人数据详情', 'modules/member/memberInfoDetail/' + data.id, { | 
|---|
|  |  |  | maxmin: true, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | function confirmUsers(id) { | 
|---|
|  |  |  | febs.get(ctx + 'member/memberWithdrawCoinConfirm/' + id, null, function () { | 
|---|
|  |  |  | 
|---|
|  |  |  | $query.click(); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 查询按钮 | 
|---|
|  |  |  | $query.on('click', function () { | 
|---|
|  |  |  | var params = $.extend(getQueryParams(), {field: sortObject.field, order: sortObject.type}); | 
|---|
|  |  |  | 
|---|
|  |  |  | // 刷新按钮 | 
|---|
|  |  |  | $reset.on('click', function () { | 
|---|
|  |  |  | $searchForm[0].reset(); | 
|---|
|  |  |  | treeSelect.revokeNode('dept'); | 
|---|
|  |  |  | sortObject.type = 'null'; | 
|---|
|  |  |  | tableIns.reload({where: getQueryParams(), page: {curr: 1}, initSort: sortObject}); | 
|---|
|  |  |  | tableIns.reload({where: getQueryParams(), page: {curr: 1}}); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | function initTable() { | 
|---|
|  |  |  | 
|---|
|  |  |  | elem: $view.find('table'), | 
|---|
|  |  |  | id: 'userTable', | 
|---|
|  |  |  | url: ctx + 'member/memberWithdrawCoin', | 
|---|
|  |  |  | totalRow: true, | 
|---|
|  |  |  | cols: [[ | 
|---|
|  |  |  | {field: 'phone', title: '手机号码', minWidth: 120,align:'left'}, | 
|---|
|  |  |  | {field: 'phone', title: '手机号码', minWidth: 120,align:'left',totalRowText: '合计'}, | 
|---|
|  |  |  | {field: 'realName', title: '姓名', minWidth: 120,align:'left'}, | 
|---|
|  |  |  | {field: 'email', title: '邮箱', minWidth: 200,align:'left'}, | 
|---|
|  |  |  | {field: 'memberId', title: '邀请码UID', minWidth: 100,align:'center'}, | 
|---|
|  |  |  | {field: 'accountType', title: '账号类型', | 
|---|
|  |  |  | templet: function (d) { | 
|---|
|  |  |  | if (d.accountType === 2) { | 
|---|
|  |  |  | return '<span style="color:red;">测试账号</span>' | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | return '<span style="color:green;">正常账号</span>' | 
|---|
|  |  |  | } | 
|---|
|  |  |  | },minWidth: 100,align:'center'}, | 
|---|
|  |  |  | {field: 'inviteId', title: '邀请码UID', minWidth: 80,align:'center'}, | 
|---|
|  |  |  | {field: 'symbol', title: '币种', minWidth: 100,align:'center'}, | 
|---|
|  |  |  | {field: 'amount', title: '提币数量', minWidth: 120,align:'center'}, | 
|---|
|  |  |  | {field: 'isInside', title: '内部转账', | 
|---|
|  |  |  | templet: function (d) { | 
|---|
|  |  |  | if (d.isInside === 'Y') { | 
|---|
|  |  |  | return '<span style="color:red;">是</span>' | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | return '<span style="color:green;">否</span>' | 
|---|
|  |  |  | } | 
|---|
|  |  |  | },minWidth: 100,align:'center'}, | 
|---|
|  |  |  | {field: 'amount', title: '提币数量', minWidth: 120,align:'center' ,totalRow: true}, | 
|---|
|  |  |  | {field: 'realAmount', title: '到账金额', minWidth: 120,align:'center' ,totalRow: true}, | 
|---|
|  |  |  | {field: 'address', title: '提币地址', minWidth: 300,align:'center'}, | 
|---|
|  |  |  | {field: 'feeAmount', title: '提币手续费', minWidth: 100,align:'center'}, | 
|---|
|  |  |  | {field: 'feeAmount', title: '提币手续费', minWidth: 100,align:'center', totalRow: true}, | 
|---|
|  |  |  | {field: 'createTime', title: '提币时间', minWidth: 180,align:'center'}, | 
|---|
|  |  |  | {title: '内部转账', templet: '#isInside-table', minWidth: 100,align:'center'}, | 
|---|
|  |  |  | {title: '状态', templet: '#status-table', minWidth: 100,align:'center'}, | 
|---|
|  |  |  | {title: '操作', toolbar: '#user-option', minWidth: 150, fixed : 'right'} | 
|---|
|  |  |  | {field: 'status', title: '状态', | 
|---|
|  |  |  | templet: function (d) { | 
|---|
|  |  |  | if (d.status === 1) { | 
|---|
|  |  |  | return '<span style="color:blue;"> 等待审核 </span>' | 
|---|
|  |  |  | } else if (d.status === 2) { | 
|---|
|  |  |  | return '<span style="color:green;">同意 </span>' | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | return '<span style="color:red;">拒绝</span>' | 
|---|
|  |  |  | } | 
|---|
|  |  |  | },minWidth: 100,align:'center'}, | 
|---|
|  |  |  | {title: '操作', | 
|---|
|  |  |  | templet: function (d) { | 
|---|
|  |  |  | if (d.status === 1) { | 
|---|
|  |  |  | return '<a lay-event="confirm" shiro:hasPermission="user:delete">确认</a>' | 
|---|
|  |  |  | +'<i class="layui-icon febs-edit-area febs-blue"></i>' | 
|---|
|  |  |  | +'<a lay-event="cancel" shiro:hasPermission="user:delete">拒绝</a>' | 
|---|
|  |  |  | +'<a lay-event="examine" shiro:hasPermission="user:delete">查看</a>' | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | return '<a lay-event="examine" shiro:hasPermission="user:delete">查看</a>' | 
|---|
|  |  |  | } | 
|---|
|  |  |  | },minWidth: 200,align:'center'} | 
|---|
|  |  |  | ]] | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | account: $searchForm.find('input[name="account"]').val().trim(), | 
|---|
|  |  |  | status: $searchForm.find("select[name='statusOption']").val(), | 
|---|
|  |  |  | isTest: $searchForm.find("select[name='isTest']").val(), | 
|---|
|  |  |  | isInside: $searchForm.find("select[name='isInsideOption']").val() | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | } | 
|---|