| | |
| | | <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="isTest">
|
| | | <option value=""></option>
|
| | | <option value="1">正常账号</option>
|
| | | <option value="2">测试账号</option>
|
| | | </select>
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-col-md2 layui-col-sm12 layui-col-xs12 table-action-area">
|
| | |
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | <script type="text/html" id="isSuAccount">
|
| | | {{#
|
| | | var isSuAccount = {
|
| | | "1": {title: '是' , color: 'green'},
|
| | | "0": {title: '否' , color: 'red' }
|
| | | }[d.isSuAccount];
|
| | | }}
|
| | | <span class="layui-badge febs-tag-{{isSuAccount.color}}">{{ isSuAccount.title }}</span>
|
| | | <!-- 表格操作栏 start -->
|
| | | <script type="text/html" id="user-option">
|
| | | <span shiro:lacksPermission="user:view,user:update,user:delete">
|
| | | <span class="layui-badge-dot febs-bg-orange"></span> 无权限
|
| | | </span>
|
| | | <a lay-event="edit" shiro:hasPermission="user:update"><i
|
| | | class="layui-icon febs-edit-area febs-blue"></i></a>
|
| | | </script>
|
| | | <!-- 表格操作栏 end -->
|
| | | <script data-th-inline="none" type="text/javascript">
|
| | | // 引入组件并初始化
|
| | | layui.use(['dropdown', 'jquery', 'laydate', 'form', 'table', 'febs', 'treeSelect'], function () {
|
| | | layui.use([ 'jquery', '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();
|
| | | // 初始化表格操作栏各个按钮功能
|
| | | table.on('tool(userTable)', function (obj) {
|
| | | var data = obj.data,
|
| | | layEvent = obj.event;
|
| | | if (layEvent === 'examine') {
|
| | | febs.modal.open( '个人数据详情', 'modules/member/memberDetailInfo/' + data.inviteId, {
|
| | | maxmin: true,
|
| | | });
|
| | | }
|
| | | });
|
| | |
|
| | | // 查询按钮
|
| | | $query.on('click', function () {
|
| | |
| | | // 刷新按钮
|
| | | $reset.on('click', function () {
|
| | | $searchForm[0].reset();
|
| | | 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 + 'tradeManage/memberAccountInfo',
|
| | | totalRow: true,
|
| | | cols: [[
|
| | | {field: 'phone', title: '手机号', minWidth: 100,align:'left'},
|
| | | {field: 'realName', title: '姓名', minWidth: 120,align:'left'},
|
| | | {field: 'email', title: '邮箱', minWidth: 200,align:'left'},
|
| | | {field: 'inviteId', title: '邀请码UID', minWidth: 80,align:'center'},
|
| | | {field: 'walletCoinAvailableBalance', title: '币币可用', minWidth: 80,align:'center'},
|
| | | {field: 'walletCoinFrozenBalance', title: '币币冻结', minWidth: 80,align:'center'},
|
| | | {field: 'walletCoinTotalBalance', title: '币币总金额', minWidth: 80,align:'center'},
|
| | | {field: 'walletAvailableBalance', title: '合约可用', minWidth: 80,align:'center'},
|
| | | {field: 'walletFrozenBalance', title: '合约冻结', minWidth: 80,align:'center'},
|
| | | {field: 'walletTotalBalance', title: '合约总金额', minWidth: 80,align:'center'},
|
| | | {title: '是否是代理', templet: '#isSuAccount', minWidth: 100,align:'center'},
|
| | | {field: 'agentAvailableBalance', title: '代理账户', minWidth: 80,align:'center'}
|
| | | {field: 'inviteId', title: '邀请码UID',
|
| | | templet: function (d) {
|
| | | return '<a lay-event="examine" shiro:hasPermission="user:update">'+d.inviteId+'</a>'
|
| | | }, minWidth: 80,align:'center'},
|
| | | {field: 'rewardratioByMid', title: '盈亏',
|
| | | templet: function (d) {
|
| | | if (d.rewardratioByMid > 0) {
|
| | | return '<span style="color:green;">'+d.rewardratioByMid+'</span>'
|
| | | } else {
|
| | | return '<span style="color:red;">'+d.rewardratioByMid+'</span>'
|
| | | } |
| | | }, minWidth: 80,align:'center',totalRow: true},
|
| | | {field: 'walletAvailableBalance', title: '币币可用', minWidth: 80,align:'center',totalRow: true},
|
| | | {field: 'walletFrozenBalance', title: '币币冻结', minWidth: 80,align:'center',totalRow: true},
|
| | | {field: 'walletCoinAvailableBalance', title: '合约可用', minWidth: 80,align:'center',totalRow: true},
|
| | | {field: 'walletCoinFrozenBalance', title: '合约冻结', minWidth: 80,align:'center',totalRow: true},
|
| | | {field: 'walletCoinTotalBalance', title: '合约总金额', minWidth: 80,align:'center',totalRow: true},
|
| | | {field: 'isSuAccount', title: '是否是代理',
|
| | | templet: function (d) {
|
| | | if (d.isSuAccount === 1) {
|
| | | return '<span style="color:green;">是</span>'
|
| | | } else if (d.isSuAccount === 0) {
|
| | | return '<span style="color:red;">否</span>'
|
| | | } else {
|
| | | return ''
|
| | | }
|
| | | }, minWidth: 80,align:'center',totalRow: true},
|
| | | {field: 'accountType', title: '账号类型',
|
| | | templet: function (d) {
|
| | | if (d.accountType === 2) {
|
| | | return '<span style="color:red;">测试账号</span>'
|
| | | } else if (d.accountType === 1) {
|
| | | return '<span style="color:green;">正常账号</span>'
|
| | | }
|
| | | },minWidth: 100,align:'center'},
|
| | | {field: 'agentAvailableBalance', title: '代理账户', minWidth: 80,align:'center',totalRow: true}
|
| | | ]]
|
| | | });
|
| | | }
|
| | |
| | | function getQueryParams() {
|
| | | return {
|
| | | account: $searchForm.find('input[name="account"]').val().trim(),
|
| | | isTest: $searchForm.find("select[name='isTest']").val(),
|
| | | };
|
| | | }
|
| | |
|