red.html 3.56 KB
<!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 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var prefix = ctx + "business/info";

        var entityId = [[${entityId}]];

        var subTypeDatas = [[${@dict.getType('eit_red_list_type')}]];

        $(function() {
            var options = {
                url: prefix + "/red/list/" + entityId,
                showSearch: false,
                showRefresh: false,
                showToggle: false,
                showColumns: false,
                detailView: true,
                detailFormatter: detailFormatter,
                columns: [{
                    checkbox: false
                },
                {
                    field: 'id',
                    title: '自增id',
                    visible: false
                },
                {
                    field: 'subType',
                    title: '红名单类型',
                    formatter: function(value, row, index) {
                        return $.table.selectDictLabel(subTypeDatas, value);
                    }
                },
                {
                    field: 'enterpriseName',
                    title: '企业名称'
                },
                {
                    field: 'legalRepresentativeName',
                    title: '法定代表人姓名'
                },
                {
                    field: 'creditCode',
                    title: '统一社会信用代码'
                },
                {
                    field: 'recognitionDate',
                    title: '认定日期'
                },
                {
                    field: 'validityPeriod',
                    title: '有效期'
                }]
            };
            $.table.init(options);
        });

        const showMap = new Map();
        showMap.set('subType', '红名单类型');
        showMap.set('regulatoryArea', '监管领域');
        showMap.set('economicIndustryClassification', '国民经济行业分类');
        showMap.set('enterpriseName', '企业名称');
        showMap.set('legalRepresentativeName', '法定代表人姓名');

        showMap.set('creditCode', '统一社会信用代码');
        showMap.set('registerCode', '工商注册登记号');
        showMap.set('creditworthyBehavior', '守信行为');
        showMap.set('awardsReceived', '获得奖励');
        showMap.set('recognitionDepartment', '认定部门');

        showMap.set('recognitionBasis', '认定依据');
        showMap.set('recognitionDate', '认定日期');
        showMap.set('validityPeriod', '有效期');

        function detailFormatter(index, row) {
            var html = [];
            $.each(row, function(key, value) {
                var showKey = showMap.get(key);
                if (showKey) {
                    if (key == 'subType') {
                        value = $.table.selectDictLabel(subTypeDatas, value);
                    }
                    html.push('<pre><b style="width: 250px;display: inline-block;text-align: right;">' + showKey + ':</b> ' + value + '</pre>');
                }
            });
            return html.join('');
        }
    </script>
</body>
</html>