| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <div class="layui-fluid">
- <div class="layui-card">
- <div class="layui-card-body">
- <div style="padding-bottom: 10px;">
- <button class="layui-btn layuiadmin-btn" data-type="export">导出</button>
- </div>
- <table id="{$lay_table}" lay-filter="{$lay_table}"></table>
- </div>
- </div>
- </div>
- <script>
- layui.use(['index', 'admin', 'form', 'table'], function () {
- const $ = layui.$;
- const form = layui.form;
- const table = layui.table;
- form.render();
- table.render({
- elem: '#{$lay_table}',
- url: "{:url('seat/listApply')}?seat_id={$id}",
- cols: [
- [
- {field: 'name', title: '姓名', width: 120},
- {field: 'mobile', title: '手机号', width: 160},
- {field: 'no', title: '号数', width: 80},
- {field: 'seat', title: '座位'},
- {field: 'create_time', title: '选座时间', width: 160, align: 'center'},
- ]
- ],
- page: true,
- limit: 50,
- cellMinWidth: 150,
- text: '对不起,加载出现异常!'
- });
- //事件
- const active = {
- export: function () {
- window.open("{:url('seat/exportApply')}?seat_id={$id}");
- }
- };
- $('.layui-btn.layuiadmin-btn').on('click', function () {
- const type = $(this).data('type');
- active[type] ? active[type].call(this) : '';
- });
- });
- </script>
|