Helius
2020-12-28 7ba7366a8c6ce8019339e433b218386645cb5312
src/main/resources/templates/febs/views/modules/trademanage/agentReturnInfo.html
@@ -12,6 +12,16 @@
                                            <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">
@@ -30,37 +40,14 @@
        </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'),
@@ -82,8 +69,7 @@
        // 刷新按钮
        $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() {
@@ -94,14 +80,46 @@
                totalRow: true,
                cols: [[
                    {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',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'}
                ]]
            });
        }
@@ -110,6 +128,7 @@
        function getQueryParams() {
            return {
                account: $searchForm.find('input[name="account"]').val().trim(),
                isTest: $searchForm.find("select[name='isTest']").val(),
            };
        }