|
|
@@ -1,62 +1,65 @@
|
|
|
<!DOCTYPE html>
|
|
|
-<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
|
|
+<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
|
|
<head>
|
|
|
- <th:block th:include="include :: header('约球购票列表')" />
|
|
|
+ <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 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>
|
|
|
- <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";
|
|
|
+</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
|
|
|
- },
|
|
|
+ $(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: '场馆名称'
|
|
|
@@ -68,7 +71,7 @@
|
|
|
{
|
|
|
field: 'siteType',
|
|
|
title: '场地类型',
|
|
|
- formatter: function(value, row, index) {
|
|
|
+ formatter: function (value, row, index) {
|
|
|
return $.table.selectDictLabel(siteTypeDatas, value);
|
|
|
}
|
|
|
},
|
|
|
@@ -90,37 +93,52 @@
|
|
|
formatter: function (value, row, index) {
|
|
|
return statusTools(row);
|
|
|
}
|
|
|
+ }, {
|
|
|
+ title: '操作',
|
|
|
+ align: 'center',
|
|
|
+ formatter: function (value, row, index) {
|
|
|
+ var actions = [];
|
|
|
+ if(row.admissionTicketStatus==="2"){
|
|
|
+ actions.push('<a class="btn btn-danger btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="confirm(\'' + row.id + '\')"><i class="fa fa-edit"></i>核销</a>');
|
|
|
+ }
|
|
|
+ return actions.join('');
|
|
|
+ }
|
|
|
}]
|
|
|
- };
|
|
|
- $.table.init(options);
|
|
|
- });
|
|
|
+ };
|
|
|
+ $.table.init(options);
|
|
|
+ })
|
|
|
+ ;
|
|
|
|
|
|
- function statusTools(row) {
|
|
|
- if (row.admissionTicketStatus === "0") {
|
|
|
- return '<i class=\"fa fa-toggle-on text-info fa-2x\" onclick="disable(\'' + row.id + '\')"></i> ';
|
|
|
- }else if(row.admissionTicketStatus === "1"){
|
|
|
- return '<i class=\"fa fa-toggle-off text-info fa-2x\" onclick="enable(\'' + row.id + '\')"></i> ';
|
|
|
- }else if(row.admissionTicketStatus === "2"){
|
|
|
- return "已预定"
|
|
|
- }else if(row.admissionTicketStatus === "3"){
|
|
|
- return "已锁定"
|
|
|
- }else if(row.admissionTicketStatus === "4"){
|
|
|
- return "已核销"
|
|
|
- }
|
|
|
- /*else {
|
|
|
- return '<i class=\"fa fa-toggle-on text-info fa-2x\" onclick="disable(\'' + row.id + '\')"></i> ';
|
|
|
- }*/
|
|
|
+ function statusTools(row) {
|
|
|
+ if (row.admissionTicketStatus === "0") {
|
|
|
+ return '<i class=\"fa fa-toggle-on text-info fa-2x\" onclick="disable(\'' + row.id + '\')"></i> ';
|
|
|
+ } else if (row.admissionTicketStatus === "1") {
|
|
|
+ return '<i class=\"fa fa-toggle-off text-info fa-2x\" onclick="enable(\'' + row.id + '\')"></i> ';
|
|
|
+ } else if (row.admissionTicketStatus === "2") {
|
|
|
+ return "已预定"
|
|
|
+ } else if (row.admissionTicketStatus === "3") {
|
|
|
+ return "已锁定"
|
|
|
+ } else if (row.admissionTicketStatus === "4") {
|
|
|
+ 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": "1" });
|
|
|
- }
|
|
|
+ function confirm(id){
|
|
|
+ $.operate.post(prefix + "/confirm", {"id": id, "admissionTicketStatus": "4"});
|
|
|
+ }
|
|
|
|
|
|
- /* 用户管理启用 */
|
|
|
- function enable(id) {
|
|
|
- $.operate.post(prefix + "/makeAnAppointment", { "id": id, "admissionTicketStatus": "0" });
|
|
|
- }
|
|
|
- </script>
|
|
|
+ /* 用户管理-停用 */
|
|
|
+ function disable(id) {
|
|
|
+ $.operate.post(prefix + "/makeAnAppointment", {"id": id, "admissionTicketStatus": "1"});
|
|
|
+ }
|
|
|
+
|
|
|
+ /* 用户管理启用 */
|
|
|
+ function enable(id) {
|
|
|
+ $.operate.post(prefix + "/makeAnAppointment", {"id": id, "admissionTicketStatus": "0"});
|
|
|
+ }
|
|
|
+</script>
|
|
|
</body>
|
|
|
</html>
|