<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('补签详情')" />
</head>
<body class="gray-bg">
<div class="container-div" th:if="${detail != null}">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox">
                <div class="ibox-title"><h5>申请信息</h5></div>
                <div class="ibox-content">
                    <table class="table table-bordered table-striped">
                        <tbody>
                        <tr><td class="col-sm-2">申请ID</td><td th:text="${detail.applyRecordId}">-</td></tr>
                        <tr><td>申请账号</td><td th:text="${detail.userId}">-</td></tr>
                        <tr><td>用户名</td><td th:text="${detail.nickname != null && detail.nickname != '' ? detail.nickname : '-'}">-</td></tr>
                        <tr><td>姓名</td><td th:text="${detail.realName != null && detail.realName != '' ? detail.realName : '-'}">-</td></tr>
                        <tr><td>证件号</td><td th:text="${detail.idCard != null && detail.idCard != '' ? detail.idCard : '-'}">-</td></tr>
                        <tr><td>申请徽章</td><td th:text="${detail.badgeName != null && detail.badgeName != '' ? detail.badgeName : '-'}">-</td></tr>
                        <tr><td>关联演出</td><td th:text="${detail.performanceName != null && detail.performanceName != '' ? detail.performanceName : '-'}">-</td></tr>
                        <tr>
                            <td>申请附件</td>
                            <td>
                                <span th:if="${detail.proofImageUrl == null or detail.proofImageUrl == ''}">-</span>
                                <a th:if="${detail.proofImageUrl != null and detail.proofImageUrl != ''}" th:href="${detail.proofImageUrl}" target="_blank">
                                    <img th:src="${detail.proofImageUrl}" style="max-height: 90px; border-radius: 4px;"/>
                                </a>
                            </td>
                        </tr>
                        <tr>
                            <td>审核状态</td>
                            <td>
                                <span th:if="${detail.auditStatus == 0}" class="label label-warning">待审核</span>
                                <span th:if="${detail.auditStatus == 1}" class="label label-success">已通过</span>
                                <span th:if="${detail.auditStatus == 2}" class="label label-danger">已驳回</span>
                            </td>
                        </tr>
                        <tr><td>申请时间</td><td th:text="${detail.createdAt != null ? #dates.format(detail.createdAt, 'yyyy-MM-dd HH:mm:ss') : '-'}">-</td></tr>
                        <tr><td>审核时间</td><td th:text="${detail.updatedAt != null ? #dates.format(detail.updatedAt, 'yyyy-MM-dd HH:mm:ss') : '-'}">-</td></tr>
                        <tr th:if="${detail.auditStatus == 2}">
                            <td>驳回理由</td>
                            <td th:text="${detail.rejectReason != null && detail.rejectReason != '' ? detail.rejectReason : '-'}">-</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="container-div" th:if="${detail == null}">
    <div class="alert alert-warning">未找到申请信息</div>
</div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
    $(function() {
        // 详情弹窗无需确认按钮，仅保留关闭
        var index = parent.layer.getFrameIndex(window.name);
        if (index) {
            var $layero = parent.$("#layui-layer" + index);
            $layero.find(".layui-layer-btn0").hide();
        }
    });
</script>
</body>
</html>
