<!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">
        <button id="fun1" type="button"   class="btn btn-w-m btn-success" href="javascript:void(0)"
                onclick="searchExport()">导出
        </button>
        <table class="col-sm-12 select-table table-bordered table table-stripped small m-t-md">
            <thead>
            <tr>
                <th>
                    <div class="cell">场次</div>
                </th>
                <th>
                    <div class="cell">票种</div>
                </th>
                <th>
                    <div class="cell">预约人数</div>
                </th>

            </tr>
            </thead>
            <tbody>
            <tr th:each="respBean,respBeanStat:${subscribeStaticList}">
                <td>
                    <div class="cell" th:text="${respBean.ticketTimesTitle}">-</div>
                </td>
                <td>
                    <div class="cell" th:text="${respBean.timeTitle}">-</div>
                </td>
                <td>
                    <div class="cell" th:text="${respBean.subscribeTotal}">-</div>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
    var performancesId=[[${performancesId}]];
    var prefix = ctx + "kylin/performances";
    function searchExport(){
        $.modal.loading("正在导出数据，请稍后...");
        $.post(prefix+'/subscribe/export', {performancesId: performancesId}, function(result) {
            if (result.code == web_status.SUCCESS) {
                window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true;
            } else {
                $.modal.alertError(result.msg);
            }
            $.modal.closeLoading();
        });
    }
</script>
</body>
</html>
