<!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>中心编号：</label>
                                <input type="text" name="ZXBH"/>
                            </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:grdkyqxx: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:grdkyqxx:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:grdkyqxx:remove')}]];
        var prefix = ctx + "system/grdkyqxx";

        $(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: '主键',
                    visible: false
                },
                {
                    field: 'idxh',
                    title: 'ID序号',
                    visible: false
                },
                {
                    field: 'dkzh',
                    title: '贷款账号'
                },
                {
                    field: 'yqqc',
                    title: '逾期期次'
                },
                {
                    field: 'yqbj',
                    title: '逾期本金'
                },
                {
                    field: 'yqlx',
                    title: '逾期利息'
                },
                {
                    field: 'yqfx',
                    title: '逾期罚息'
                },
                {
                    field: 'ssrq',
                    title: '实收日期'
                },
                {
                    field: 'hkqc',
                    title: '还款期次'
                },
                {
                    field: 'ssyqbjje',
                    title: '实收逾期本金金额',
                    visible: false
                },
                {
                    field: 'ssyqlxje',
                    title: '实收逾期利息金额',
                    visible: false
                },
                {
                    field: 'ssyqfxje',
                    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>