<!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('会员用卡流水列表')" th:value="${id}"/>
</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>
                                <input type="hidden" name="id" th:value="${id}"/>
                            </li>
                        </ul>
                    </div>
                </form>
<!--            </div>-->
<!--            <div class="btn-group-sm" id="toolbar" role="group">-->
<!--                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:stream:add">-->
<!--                    <i class="fa fa-plus"></i> 添加-->
<!--                </a>-->
<!--                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:stream:edit">-->
<!--                    <i class="fa fa-edit"></i> 修改-->
<!--                </a>-->
<!--                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:stream:remove">-->
<!--                    <i class="fa fa-remove"></i> 删除-->
<!--                </a>-->
<!--                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:stream:export">-->
<!--                    <i class="fa fa-download"></i> 导出-->
<!--                </a>-->
<!--            </div>-->
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:stream:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:stream:remove')}]];
        var cardType = [[${@dict.getType('site_type')}]];
        var prefix = ctx + "card";

        $(function() {
            var options = {
                url: prefix + "/stream",
                modalName: "会员用卡流水",
                columns: [{
                    field: 'username',
                    title: '用户账户'
                },
                {
                    field: 'mobile',
                    title: '手机号码'
                },
                {
                    field: 'cardName',
                    title: '卡种名称'
                },
                {
                    field: 'cardType',
                    title: '卡种类型',
                    formatter: function (value, row, index) {
                        return $.table.selectDictLabel(cardType, value);
                    }
                },
                {
                    field: 'type',
                    title: '类型',
                    formatter: function (value, row, index) {
                        if (value ==='0'){
                            return '约场';
                        }else {
                            return '退场'
                        }
                    }
                },
                {
                    field: 'createTime',
                    title: '时间'
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>
