<!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>关键字：</label>
                                <input type="text" name="keyword" placeholder="请输入流水号"/>
                            </li>
                        </ul>
                        <ul>
                            <li>
                                <label>开户日期：</label>
                                <input type="text" class="time-input" id="startTime" name="startTime"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" name="endTime"/>
                            </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="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: bootstrap-select-js" />
    <th:block th:include="include :: jquery-cxselect-js" />
    <script th:inline="javascript">
        var removeFlag = [[${@permission.hasPermi('per-wallet:remove')}]];
        var prefix = ctx + "manage/com-wallet";

        $(function() {
            var options = {
                url: prefix + "/page-com-wallet-account-detail-list",
                columns: [
                    {field: 'tradeFlowNo', title: '交易流水号'},
                    {field: 'tradeDate', title: '交易时间'},
                    {field: 'flowNo', title: '账务流水号'},
                    {field: 'accountsDealType', title: '账务处理类型'},
                    {field: 'accountsDealDate', title: '账务处理时间'},
                    {field: 'amount', title: '交易金额'},
                    {field: 'balance', title: '交易后余额'},
                    {field: 'direction', title: '资金流向'},
                    {field: 'handStatus', title: '处理状态'},
                    {field: 'createDate', title: '订单创建时间'},
                    {field: 'serviceType', title: '服务类型'},
                    {field: 'tradeType', title: '交易类型'},
                    {field: 'accountIn', title: '收款方账户'},
                    {field: 'accountInName', title: '收款方账户中文'},
                    {field: 'accountOut', title: '付款方账户'},
                    {field: 'accountOutName', title: '付款方账户中文'},
                    {field: 'voucherUrl', title: '电子回单', formatter: function (value, row, index) {
                            var html = '';
                            if(row.voucherUrl!=undefined&&row.voucherUrl!=''){
                                html = '<a class="btn btn-success btn-xs" href="'+row.voucherUrl+'" target="_blank">查看</a>';
                            }
                            return html;
                        }
                    },
                    {field: 'memo', title: '备注'}
                ]
            };
            var _n = new Date();
            var initStart = new Date(_n.getTime()-2592000000);
            $('#startTime').val(initStart.format("yyyy-MM-dd"));
            $('#endTime').val(_n.format("yyyy-MM-dd"));
            $.table.init(options);
        });

    </script>
</body>
</html>