<!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="DKZH"/>
                            </li>
                            <li>
                                <label style="width: 120px;">业务流水号：</label>
                                <input type="text" name="YWLSH"/>
                            </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-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:grdkzhbdxx: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:grdkzhbdxx:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:grdkzhbdxx:remove')}]];
        var prefix = ctx + "system/grdkzhbdxx";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                detailUrl: prefix + "/edit/{id}",
                modalName: "个人贷款账户变动信息",
                columns: [
                {
                    field: 'id',
                    title: '数据主键ID',
                    visible: false
                },
                {
                    field: 'dkzh',
                    title: '贷款账号'
                },
                {
                    field: 'ywlsh',
                    title: '业务流水号'
                },
                {
                    field: 'dkywmxlx',
                    title: '贷款业务明细类型',
                    visible: false
                },
                {
                    field: 'ywfsrq',
                    title: '业务发生日期'
                },
                {
                    field: 'dkyhdm',
                    title: '贷款银行代码'
                },
                {
                    field: 'fse',
                    title: '发生额'
                },
                {
                    field: 'bjje',
                    title: '本金金额'
                },
                {
                    field: 'lxje',
                    title: '利息金额'
                },
                {
                    field: 'fxje',
                    title: '罚息金额'
                },
                {
                    field: 'dqqc',
                    title: '当期期次'
                },
                {
                    field: 'zczyqbjje',
                    title: '正常转逾期本金金额',
                    visible: false
                },
                {
                    field: 'yqzzcbjje',
                    title: '逾期转正常本金金额',
                    visible: false
                },
                {
                    field: 'jzrq',
                    title: '记账日期',
                    visible: false
                },
                {
                    field: 'zxbh',
                    title: '中心编号',
                    visible: false
                },
                    {
                        field: 'cllx',
                        title: '处理类型',
                        formatter: function (value, row, index) {
                            if (value != null) {
                                if (value == '1') {return "插入";}
                                if (value == '2') {return "更新";}
                                if (value == '3') {return "删除";}
                            }
                        }
                    },
                    {
                        field: 'lastUpdateTime',
                        title: '数据归集时间',
                        formatter: function (value, row, index) {
                            if (value != null) {
                                var time = new Date(value);
                                var year = time.getFullYear();
                                var month = time.getMonth() + 1;
                                var date = time.getDate();
                                return year + '-' + month + '-' + date;
                            }
                        }
                    },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-warning btn-xs  ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\''
                            + row.id + '\')"><i class="fa fa-search"></i>详细</a> ');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>