<!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 hidden type="text" name="performancesId" th:value="${id}">
                <div class="select-list">
                    <ul>
                        <li>
                            <label>订单号：</label>
                            <input type="text" name="orderCode"/>
                        </li>
                        <li>
                            <label>订单号ID：</label>
                            <input type="text" name="orderTicketsId"/>
                        </li>
                        <li>
                            <label>购买人电话：</label>
                            <input type="text" name="userMobile"/>
                        </li>
                        <li>
                            <label>购买人姓名：</label>
                            <input type="text" name="userName"/>
                        </li>
                        <li>
                            <label>订单状态：</label>
                            <select name="orderStatus" th:with="type=${@dict.getType('zhengzai_order_status')}">
                                <option value="">所有</option>
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
                                        th:value="${dict.dictValue}"></option>
                            </select>
                        </li>
                        <li>
                            <label>快递状态：</label>
                            <select name="expressStatus" th:with="type=${@dict.getType('zhengzai_express_status')}">
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
                                        th:value="${dict.dictValue}"></option>
                            </select>
                        </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="col-sm-12 select-table table-bordered">
            <table id="bootstrap-table"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var prefix = ctx + "kylin/performancesExpress";

    var orderStatusDic = [[${@dict.getType('zhengzai_order_status')}]];

    $(function () {
        var options = {
            url: prefix + "/performanceOrderList",
            modalName: "演出订单",
            columns: [{
                checkbox: true
            },
                {
                    field: 'orderTicketsId',
                    title: '订单ID'
                },
                {
                    field: 'orderCode',
                    title: '订单号'
                },
                {
                    field: 'status',
                    title: '订单状态',
                    formatter: function (value, row, index) {
                        return $.table.selectDictLabel(orderStatusDic, value);
                    }
                },
                {
                    field: 'priceActual',
                    title: '总价格'
                },
                {
                    field: 'number',
                    title: '购票量'
                },
                {
                    field: 'userId',
                    title: '用户ID'
                },
                {
                    field: 'userMobile',
                    title: '账户名'
                },
                {
                    field: 'userMobile',
                    title: '手机号'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function (value, row, index) {
                        var actions = [];
                        // actions.push('<a class="btn btn-warning btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.orderTicketsId + '\')"><i class="fa fa-search"></i>详细</a>');
                        return actions.join('');
                    }
                }]
        };
        $.table.init(options);
    });

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