<!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">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>订单号：</label>
                                <input type="text" name="orderTicketsId"/>
                            </li>
                            <li>
                                <label>退款编号：</label>
                                <input type="text" name="orderRefundCode"/>
                            </li>
                            <li>
                                <label>退款状态：</label>
                                <select name="status">
                                    <option value="">全部</option>
                                    <option value="0">请求退款</option>
                                    <option value="2">取消退款</option>
                                    <option value="1">一审审核通过</option>
                                    <option value="5">一审驳回退款</option>
                                    <option value="7">等待退款</option>
                                    <option value="3">正在退款</option>
                                    <option value="4">完成退款</option>
                                    <option value="6">退款失败</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="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="kylin:performances:add">
                    <i class="fa fa-plus"></i> 批量一审
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="kylin:performances:edit">
                    <i class="fa fa-edit"></i> 批量二审
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="kylin:performances:remove">
                    <i class="fa fa-remove"></i> 批量取消
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="kylin:performances:export">
                    <i class="fa fa-download"></i> 批量重新提交
                </a>
            </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 detailFlag = [[${@permission.hasPermi('kylin:performances:detail')}]];

        var detailFlag = [[${@permission.hasPermi('kylin:performances:detail')}]];
        var detailFlag = [[${@permission.hasPermi('kylin:performances:detail')}]];
        var detailFlag = [[${@permission.hasPermi('kylin:performances:detail')}]];
        var detailFlag = [[${@permission.hasPermi('kylin:performances:detail')}]];
        var prefix = ctx + "kylin/refund";

        $(function() {
            var options = {
                url: prefix + "/list",
                detailUrl: prefix + "/details/{id}",
                modalName: "退款详情",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'orderTicketsId',
                    title: '票务订单id'
                },
                {
                    field: 'title',
                    title: '演出名称'
                },
                {
                    field: 'price',
                    title: '退款金额'
                },
                {
                    field: 'statusName',
                    title: '退款状态'
                },
                {
                    field: 'createdAt',
                    title: '申请时间'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detailTab(\'' + row.orderRefundsId + '\')"><i class="fa fa-edit"></i>查看</a> ');

                        actions.push('<a class="btn btn-success btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detailTab(\'' + row.orderRefundsId + '\')"><i class="fa fa-edit"></i>一审</a> ');
                        actions.push('<a class="btn btn-success btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detailTab(\'' + row.orderRefundsId + '\')"><i class="fa fa-edit"></i>二审</a> ');
                        actions.push('<a class="btn btn-success btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detailTab(\'' + row.orderRefundsId + '\')"><i class="fa fa-edit"></i>取消</a> ');
                        actions.push('<a class="btn btn-success btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detailTab(\'' + row.orderRefundsId + '\')"><i class="fa fa-edit"></i>重新提交</a> ');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>