<!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="time-form">
                    <div class="select-list">
                        <ul>
                            <input type="hidden" id="comId" name="comId"/>
                            <li>
                                <label>交易时间：</label>
                                <input type="text" class="time-input" id="startTime" name="startDate"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" name="endDate"/>
                            </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('time-form')"><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/bh-account";
        //先判断页面参数
        var pageParam = parent.pageParam;

        if(pageParam.row != null){
            $('#comId').val(pageParam.row.comId);
        }

        $(function() {
            var options = {
                url: prefix + "/page-payment-details-list",
                modalName: "收支明细详情",
                columns: [
                    {field: 'AcctTransSeqNo', title: '流水号'},
                    {field: 'AcctTransDate', title: '交易日期'},
                    {field: 'AppSeqNo', title: '第三方流水号'},
                    {field: 'AppTransDate', title: '第三方交易日期'},
                    {field: 'SubjectCode', title: '交易码'},
                    {field: 'Dorc', title: '借贷标志'},
                    {field: 'DebitAmount', title: '借方金额', formatter: function (value, row, index) {
                            return value !=''&&value != undefined?value:'-';
                        }},
                    {field: 'CebitAmount', title: '贷方金额', formatter: function (value, row, index) {
                            return value !=''&&value != undefined?value:'-';
                        }},
                    {field: 'Ccy', title: '交易币种'},
                    {field: 'AppSettDate', title: '清算日期'},
                    {field: 'TransCifNo', title: '虚拟账户号'},
                    {field: 'BalanceAmt', title: '余额'},
                    {field: 'TransDepartmentId', title: '机构号'},
                    {field: 'OppAcctNo', title: '对方账号'},
                    {field: 'TransRemark', 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>