123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- <!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" class="time-input" placeholder="请选择门票日期" name="ticketDate" th:value="${ticketDate}"/>
- </li>
- <li>
- <label>场地名称:</label>
- <input type="text" name="siteName" th:value="${siteName}" data-template="请输入场地名称"/>
- </li>
- <li>
- <label>场地类型:</label>
- <select name="siteType" th:with="type=${@dict.getType('site_type')}">
- <option value="">所有</option>
- <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> 搜索</a>
- <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
- </li>
- </ul>
- </div>
- </form>
- </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('admissionticket:AdmissionTicket:edit')}]];
- var removeFlag = [[${@permission.hasPermi('admissionticket:AdmissionTicket:remove')}]];
- var siteTypeDatas = [[${@dict.getType('site_type')}]];
- var prefix = ctx + "admissionticket";
- $(function() {
- var options = {
- url: prefix + "/list",
- createUrl: prefix + "/add",
- updateUrl: prefix + "/edit/{id}",
- removeUrl: prefix + "/remove",
- exportUrl: prefix + "/export",
- modalName: "约球购票",
- columns: [{
- checkbox: true
- },
- {
- field: 'venueName',
- title: '场馆名称'
- },
- {
- field: 'siteName',
- title: '场地名称'
- },
- {
- field: 'siteType',
- title: '场地类型',
- formatter: function(value, row, index) {
- return $.table.selectDictLabel(siteTypeDatas, value);
- }
- },
- {
- field: 'session',
- title: '场地时段'
- },
- {
- field: 'price',
- title: '时段价格'
- },
- {
- field: 'ticketDate',
- title: '门票日期'
- },
- {
- field: 'admissionTicketStatus',
- title: '预定状态',
- formatter: function (value, row, index) {
- return statusTools(row);
- }
- }]
- };
- $.table.init(options);
- });
- function statusTools(row) {
- if (row.admissionTicketStatus === "0") {
- return '<i class=\"fa fa-toggle-off text-info fa-2x\" onclick="enable(\'' + row.id + '\')"></i> ';
- }else if(row.admissionTicketStatus === "1"){
- return '<i class=\"fa fa-toggle-on text-info fa-2x\" onclick="disable(\'' + row.id + '\')"></i> ';
- }else if(row.admissionTicketStatus === "2"){
- return "已预定"
- }else if(row.admissionTicketStatus === "3"){
- return "已锁定"
- }
- /*else {
- return '<i class=\"fa fa-toggle-on text-info fa-2x\" onclick="disable(\'' + row.id + '\')"></i> ';
- }*/
- }
- /* 用户管理-停用 */
- function disable(id) {
- $.operate.post(prefix + "/makeAnAppointment", { "id": id, "admissionTicketStatus": "0" });
- }
- /* 用户管理启用 */
- function enable(id) {
- $.operate.post(prefix + "/makeAnAppointment", { "id": id, "admissionTicketStatus": "1" });
- }
- </script>
- </body>
- </html>
|