<!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('观演人信息修改记录')"/>
    <style>
        .img-circle {
            border-radius: 0 !important; /* 覆盖 border-radius 样式，设置为0 */
        }
    </style>
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 select-table table-bordered">
            <table id="bootstrap-table"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: bootstrap-suggest-js"/>
<th:block th:include="include :: bootstrap-typeahead-js"/>
<script th:inline="javascript">
    var prefix = ctx + "kylin/order";
    var id = [[${id}]];
    var certificateType = [[${@dict.getType('zhengzai_certificate_type')}]];

    $(function () {
        var options = {
            url: prefix + "/enterEditList/" + id,
            modalName: "观演人信息修改记录",
            columns: [{
                    field: 'createdAt',
                    title: '时间',
                    formatter: function (value, row, index) {
                        return $.common.sprintf("<span>%s</span>", null != value ? value.replace("T"," ").substring(0, 19) : value);
                    }
                },
                {
                    field: 'formatter',
                    title: '原信息',
                    formatter: function (value, row, index) {
                        return  '证件类型: ' + $.table.selectDictLabel(certificateType, row.enterTypeOld) + '<br>' +
                        '姓名: ' + row.enterNameOld + '<br>' +
                        '证件号: ' + row.enterIdCodeOld + '<br>';
                    }
                },
                {
                    field: 'formatter',
                    title: '变更信息',

                    formatter: function (value, row, index) {
                        return  '证件类型: ' + $.table.selectDictLabel(certificateType, row.enterType) + '<br>' +
                            '姓名: ' + row.enterName + '<br>' +
                            '证件号: ' + row.enterIdCode + '<br>';
                    }
                },
                {
                    field: 'remark',
                    title: '备注原因'
                },
                {
                    field: 'images',
                    title: '变更凭证',
                    formatter: function(value, row, index) {
                        var arr = value.split(",");
                        var str = "";
                        for(var i=0;i<arr.length;i++){
                            str += $.table.imageView(arr[i],"300", "600");
                        }
                        return str;
                    }
                },
                {
                    field: 'sysUserName',
                    title: '操作人'
                }]
        };
        $.table.init(options);
    });

</script>
</body>
</html>