<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('用户交易记录列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="formId">
                <div class="select-list">
                    <ul>
                        <li>
                            <label>用户id：</label>
                            <input type="text" name="userId"/>
                        </li>
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>

        <div class="btn-group-sm" id="toolbar" role="group">
            <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:record:remove">
                <i class="fa fa-remove"></i> 删除
            </a>
            <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:record:export">
                <i class="fa fa-download"></i> 导出
            </a>
        </div>
        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
    var editFlag = [[${@permission.hasPermi('system:record:edit')}]];
    var removeFlag = [[${@permission.hasPermi('system:record:remove')}]];
    var prefix = ctx + "system/playlet/record";

    $(function() {
        var options = {
            url: prefix + "/list",
            createUrl: prefix + "/add",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            exportUrl: prefix + "/export",
            modalName: "用户交易记录",
            columns: [{
                checkbox: true
            },
                {
                    field: 'id',
                    title: '用户提现记录表主键id',
                    visible: false
                },
                {
                    field: 'userId',
                    title: '用户id'
                },
                {
                    field: 'userName',
                    title: '用户昵称'
                },
                {
                    field: 'withdrawOrder',
                    title: '提现订单号'
                },
                {
                    field: 'accountingTime',
                    title: '到账时间'
                },
                {
                    field: 'withdrawBankId',
                    title: '用户提现卡号'
                },
                {
                    field: 'withdrawBank',
                    title: '提现银行'
                },
                {
                    field: 'withdrawOpeningBank',
                    title: '提现银行开户行地址'
                },
                {
                    field: 'status',
                    title: '提现状态 1 申请提现 2 审批通过 3 交易完成 4 审批不通过'
                },
                {
                    field: 'withdrawApplyTime',
                    title: '申请提现时间'
                },
                {
                    field: 'withdrawApplyTotal',
                    title: '提现申请总金额，单位分'
                },
                {
                    field: 'withdrawRealityTotal',
                    title: '实际提现金额,单位分'
                },
                {
                    field: 'withdrawCharge',
                    title: '提现手续费，单位分'
                },
                {
                    field: 'remark',
                    title: '备注'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
        };
        $.table.init(options);
    });
</script>
</body>
</html>