<!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">
                <input type="hidden" th:value="${flag}"/>
                <div class="select-list">
                    <ul>
                        <li>
                            <label>登记编号：</label>
                            <input type="text" name="djbh"/>
                        </li>
                        <li>
                            <label>权利人：</label>
                            <input type="text" name="qlrmc"/>
                        </li>
                        <li>
                            <label>坐落：</label>
                            <input type="text" name="fwzl"/>
                        </li>
                        <!--<li>-->
                        <!--<label>证书编号：</label>-->
                        <!--<input type="text" name="zsbh"/>-->
                        <!--</li>-->
                        <!--<li>-->
                        <!--<label>权证号：</label>-->
                        <!--<input type="text" name="qzh"/>-->
                        <!--</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:bdcdjzxx: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:bdcdjzxx:edit')}]];
    var removeFlag = [[${@permission.hasPermi('system:bdcdjzxx:remove')}]];
    var prefix = ctx + "system/bdcdjzxx";

    var flag = [[${flag}]];
    var urlV;
    if (flag == "bdczz") {//不动产住宅
        urlV = prefix + "/bdczzList";
    }
    if (flag == "bdcbg") {//不动产办公
        urlV = prefix + "/bdcbgList";
    }
    if (flag == "bdcsyfw") {//不动产商业服务
        urlV = prefix + "/bdcsyfwList";
    }
    if (flag == "bdcqt") {//不动产其他
        urlV = prefix + "/bdcqtList";
    }
    if (flag == "") {//不动产其他
        urlV = prefix + "/list";
    }

    $(function () {
        var options = {
            // url: prefix + "/list",
            url: urlV,
            createUrl: prefix + "/add",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            exportUrl: prefix + "/export",
            detailUrl: prefix + "/edit/{id}",
            modalName: "不动产登记证信息",
            columns: [{
                checkbox: true
            },
                {
                    field: 'id',
                    title: '序号',
                    visible: false
                },
                {
                    field: 'cdBatch',
                    title: '批次号',
                    visible: false
                },
                {
                    field: 'cdOperation',
                    title: '操作状态',
                    visible: false
                },
                {
                    field: 'cdSource',
                    title: '数据来源',
                    visible: false
                },
                {
                    field: 'djbh',
                    title: '登记编号'
                },
                {
                    field: 'qlrmc',
                    title: '权利人'
                },
                {
                    field: 'gyfs',
                    title: '共有方式',
                    visible: false
                },
                {
                    field: 'fwzl',
                    title: '坐落'
                },
                {
                    field: 'bdcdyh',
                    title: '不动产单元号',
                    visible: false
                },
                {
                    field: 'zsbh',
                    title: '证书编号',
                    visible: false
                },
                {
                    field: 'yt',
                    title: '用途'
                },
                {
                    field: 'mj',
                    title: '面积/抵押总面积',
                    visible: false
                },
                {
                    field: 'qzh',
                    title: '权证号',
                    visible: false
                },
                {
                    field: 'bz',
                    title: '附记',
                    visible: false
                },
                {
                    field: 'tsdw',
                    title: '推送单位',
                    visible: false
                },
                {
                    field: 'fwxz',
                    title: '房屋性质'
                },
                {
                    field: 'dbsj',
                    title: '登记日期',
                    visible: false
                },
                {
                    field: 'dyqr',
                    title: '抵押权人',
                    visible: false
                },
                {
                    field: 'dyr',
                    title: '抵押人',
                    visible: false
                },
                {
                    field: 'dyzts',
                    title: '抵押总套数',
                    visible: false
                },
                {
                    field: 'cqje',
                    title: '债权金额',
                    visible: false
                },
                {
                    field: 'zwlxqs',
                    title: '债务履行起始',
                    visible: false
                },
                {
                    field: 'zwlxqz',
                    title: '债务履行终止',
                    visible: false
                },
                {
                    field: 'txqzh',
                    title: '他项权证号',
                    visible: false
                },
                {
                    field: 'dyygqlr',
                    title: '抵押预告登记权利人',
                    visible: false
                },
                {
                    field: 'dyygywr',
                    title: '抵押预告登记义务人',
                    visible: false
                },
                {
                    field: 'dyygzmh',
                    title: '抵押预告证明号',
                    visible: false
                },
                {
                    field: 'dyygdjlx',
                    title: '抵押预告登记类型',
                    visible: false
                },
                {
                    field: 'ygqlr',
                    title: '预告登记权利人',
                    visible: false
                },
                {
                    field: 'ygywr',
                    title: '预告登记义务人',
                    visible: false
                },
                {
                    field: 'ygzmh',
                    title: '预告证明号',
                    visible: false
                },
                {
                    field: 'ygdjlx',
                    title: '预告登记类型',
                    visible: false
                },
                {
                    field: 'cs',
                    title: '层次',
                    visible: false
                },
                {
                    field: 'fwjg',
                    title: '结构',
                    visible: false
                },
                {
                    field: 'hh',
                    title: '房号',
                    visible: false
                },
                {
                    field: 'zcs',
                    title: '总层数',
                    visible: false
                },
                {
                    field: 'szc',
                    title: '所在层',
                    visible: false
                },
                {
                    field: 'scjzmj',
                    title: '建筑面积',
                    visible: false
                },
                {
                    field: 'sczyjzmj',
                    title: '套内面积',
                    visible: false
                },
                {
                    field: 'scftjzmj',
                    title: '分摊面积',
                    visible: false
                },
                {
                    field: 'xz',
                    title: '土地性质',
                    visible: false
                },
                {
                    field: 'lx',
                    title: '土地使用取得方式',
                    visible: false
                },
                {
                    field: 'tdyt',
                    title: '土地用途',
                    visible: false
                },
                {
                    field: 'tdsyqxks',
                    title: '土地使用开始',
                    visible: false
                },
                {
                    field: 'tdsyqxjs',
                    title: '土地使用结束',
                    visible: false
                },
                {
                    field: 'ywms',
                    title: '业务类型',
                    visible: false
                },
                {
                    field: 'zsmc',
                    title: '证书名称'
                },
                {
                    field: 'createTime',
                    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();
                            var hours = time.getHours();
                            if (hours == '') {
                                hours = "00"
                            }
                            var minute = time.getMinutes();
                            if (minute == '') {
                                minute = "00"
                            }
                            var second = time.getSeconds();
                            if (second == '') {
                                second = "00"
                            }
                            // return year + '-' + month + '-' + date + ' ' + hours + ":" + minute + ":" + second;
                            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>