|  |  |  | 
|---|
|  |  |  | <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="isType"> | 
|---|
|  |  |  | {{# | 
|---|
|  |  |  | var type = { | 
|---|
|  |  |  | "1": {title: '币币资产' , color: 'red'}, | 
|---|
|  |  |  | "2": {title: '合约资产' , color: 'green'}, | 
|---|
|  |  |  | "3": {title: '代理资产' , color: 'blue' } | 
|---|
|  |  |  | }[d.type]; | 
|---|
|  |  |  | }} | 
|---|
|  |  |  | <span class="layui-badge febs-tag-{{type.color}}">{{ type.title }}</span> | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  | <script type="text/html" id="status"> | 
|---|
|  |  |  | {{# | 
|---|
|  |  |  | var status = { | 
|---|
|  |  |  | "2": {title: '失败' , color: 'red'}, | 
|---|
|  |  |  | "1": {title: '成功' , color: 'green'}, | 
|---|
|  |  |  | "0": {title: '待审核' , color: 'blue' } | 
|---|
|  |  |  | }[d.status]; | 
|---|
|  |  |  | }} | 
|---|
|  |  |  | <span class="layui-badge febs-tag-{{status.color}}">{{ status.title }}</span> | 
|---|
|  |  |  | </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'), | 
|---|
|  |  |  | 
|---|
|  |  |  | // 刷新按钮 | 
|---|
|  |  |  | $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/memberAgentReturnInfo', | 
|---|
|  |  |  | totalRow: true, | 
|---|
|  |  |  | cols: [[ | 
|---|
|  |  |  | {field: 'phone', title: '手机号', minWidth: 100,align:'left'}, | 
|---|
|  |  |  | {field: 'phone', title: '手机号', minWidth: 100,align:'left',totalRowText: '合计'}, | 
|---|
|  |  |  | {field: 'realName', title: '姓名', minWidth: 120,align:'left'}, | 
|---|
|  |  |  | {field: 'email', title: '邮箱', minWidth: 200,align:'left'}, | 
|---|
|  |  |  | {field: 'inviteId', title: '邀请码UID', minWidth: 80,align:'center'}, | 
|---|
|  |  |  | {field: 'symbol', title: '币种', minWidth: 80,align:'center'}, | 
|---|
|  |  |  | {field: 'amount', title: '金额', minWidth: 80,align:'center'}, | 
|---|
|  |  |  | {field: 'amount', title: '金额', minWidth: 80,align:'center',totalRow: true}, | 
|---|
|  |  |  | {field: 'content', title: '记录内容', minWidth: 80,align:'center'}, | 
|---|
|  |  |  | {field: 'createTime', title: '时间', minWidth: 80,align:'center'}, | 
|---|
|  |  |  | {title: '状态', templet: '#status', minWidth: 100,align:'center'}, | 
|---|
|  |  |  | {title: '类型', templet: '#isType', minWidth: 100,align:'center'}, | 
|---|
|  |  |  | {field: 'status', title: '状态', | 
|---|
|  |  |  | templet: function (d) { | 
|---|
|  |  |  | if (d.status === 0) { | 
|---|
|  |  |  | return '<span style="color:blue;">待审核</span>' | 
|---|
|  |  |  | } else if (d.status === 1) { | 
|---|
|  |  |  | return '<span style="color:green;">成功</span>' | 
|---|
|  |  |  | }else if (d.status === 2) { | 
|---|
|  |  |  | return '<span style="color:red;">失败</span>' | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | return '' | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, minWidth: 80,align:'center'}, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | {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: 'type', title: '类型', | 
|---|
|  |  |  | templet: function (d) { | 
|---|
|  |  |  | if (d.type === 1) { | 
|---|
|  |  |  | return '<span>币币资产</span>' | 
|---|
|  |  |  | } else if (d.type === 2) { | 
|---|
|  |  |  | return '<span>合约资产</span>' | 
|---|
|  |  |  | }else if (d.type === 3) { | 
|---|
|  |  |  | return '<span>代理资产</span>' | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | return '' | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, minWidth: 80,align:'center'} | 
|---|
|  |  |  | ]] | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | function getQueryParams() { | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | account: $searchForm.find('input[name="account"]').val().trim(), | 
|---|
|  |  |  | isTest: $searchForm.find("select[name='isTest']").val(), | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|