rebook.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. <!--
  2. * @Description:
  3. * @Author: gcz
  4. * @Date: 2025-02-21 14:56:50
  5. * @LastEditors: gcz
  6. * @LastEditTime: 2025-02-21 17:37:41
  7. * @FilePath: \great_webui\src\views\windowTicketSales\rebook.vue
  8. * @Copyright: Copyright (c) 2016~2025 by gcz, All Rights Reserved.
  9. -->
  10. <template>
  11. <div class="app-container app-container-scheduling">
  12. <div class="app-container_flex_auto">
  13. <!-- 搜索区域 -->
  14. <div class="app-container_form">
  15. <el-form :model="queryParams" size="small" ref="queryForm" :inline="true">
  16. <el-form-item label="订单号" prop="orderId">
  17. <el-input v-model="queryParams.orderId" placeholder="请输入订单号" clearable />
  18. </el-form-item>
  19. <el-form-item label="购票人手机号" prop="memberMobile">
  20. <el-input v-model="queryParams.memberMobile" placeholder="请输入手机号" clearable />
  21. </el-form-item>
  22. <el-form-item label="身份证号码" prop="idcard">
  23. <el-input v-model="queryParams.idcard" placeholder="请输入身份证号码" clearable />
  24. </el-form-item>
  25. <el-form-item label="票务名称" prop="goodsName">
  26. <el-input v-model="queryParams.goodsName" placeholder="请输入票务名称" clearable />
  27. </el-form-item>
  28. <el-form-item label="订单状态" prop="status">
  29. <el-select v-model="queryParams.status" placeholder="请选择订单状态" clearable>
  30. <el-option
  31. v-for="dict in dict.type.order_status_type"
  32. :key="dict.value"
  33. :label="dict.label"
  34. :value="dict.value"
  35. />
  36. </el-select>
  37. </el-form-item>
  38. <el-form-item>
  39. <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
  40. <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
  41. </el-form-item>
  42. </el-form>
  43. </div>
  44. <div class="app-container_table" :class="showSearch ? 'mt15' : ''">
  45. <el-row :gutter="10" class="mb8" style="margin-left: 0;">
  46. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  47. </el-row>
  48. <div class="app-container_table_main">
  49. <!-- 数据列表 -->
  50. <el-table v-loading="loading" :data="rebookList" height="100%">
  51. <el-table-column label="序号" type="index" width="50" align="center" />
  52. <el-table-column label="姓名" align="center" prop="memberName" />
  53. <el-table-column label="身份证号码" align="center" prop="idcard" />
  54. <el-table-column label="购票人手机号" align="center" prop="mobile" />
  55. <el-table-column label="订单号" align="center" prop="orderId" />
  56. <el-table-column label="剧目名称" align="center" prop="performName" />
  57. <el-table-column label="票务名称" align="center" prop="goodsName" />
  58. <el-table-column label="票档" align="center" prop="seatTypeName" />
  59. <!-- <el-table-column label="座位信息" align="center" prop="seatTypeName1" /> -->
  60. <el-table-column label="日期" align="center" prop="performDate" />
  61. <el-table-column label="场次" align="center" prop="performInterval" />
  62. <el-table-column label="下单时间" align="center" prop="createTime" />
  63. <el-table-column label="支付金额" align="center" prop="realPrice" />
  64. <el-table-column label="购票渠道" align="center" prop="channelType">
  65. <template slot-scope="scope">
  66. <dict-tag :options="dict.type.channel_type" :value="scope.row.channelType" />
  67. </template>
  68. </el-table-column>
  69. <el-table-column label="订单状态" align="center" prop="status">
  70. <template slot-scope="scope">
  71. <dict-tag :options="dict.type.order_status_type" :value="scope.row.status" />
  72. </template>
  73. </el-table-column>
  74. <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
  75. <template slot-scope="scope">
  76. <el-button
  77. type="primary"
  78. @click="handleRebook(scope.row)"
  79. v-if="hasPermi('windowTicketSales:rebook:rebook') && scope.row.allowReSubmit == 1 && scope.row.status == 3"
  80. >改签</el-button>
  81. </template>
  82. </el-table-column>
  83. </el-table>
  84. </div>
  85. </div>
  86. <div class="app-container_table_page">
  87. <!-- 分页组件 -->
  88. <pagination
  89. :total="total"
  90. :page.sync="queryParams.pageNum"
  91. :limit.sync="queryParams.pageSize"
  92. @pagination="getList"
  93. />
  94. </div>
  95. </div>
  96. <!-- 改签 -->
  97. <rebookBox ref="rebookBox" @getList="getList" />
  98. </div>
  99. </template>
  100. <script>
  101. import { reSubmitPageList } from '@/api/windowTicketSales/rebook'
  102. import rebookBox from './model/rebookBox.vue';
  103. import auth from '@/plugins/auth'
  104. export default {
  105. name: 'Rebook',
  106. dicts: ['order_status_type', 'channel_type'],
  107. components: { rebookBox },
  108. data() {
  109. return {
  110. loading: false,
  111. showSearch: false,
  112. // 查询参数
  113. queryParams: {
  114. pageNum: 1,
  115. pageSize: 10
  116. },
  117. // 改签列表数据
  118. rebookList: [],
  119. // 总条数
  120. total: 0
  121. }
  122. },
  123. created() {
  124. this.queryParams.orderId = this.$route.query.id ? this.$route.query.id : ''
  125. this.getList()
  126. },
  127. methods: {
  128. hasPermi(value){
  129. return auth.hasPermi(value)
  130. },
  131. getList() {
  132. this.loading = true
  133. reSubmitPageList(this.queryParams).then(response => {
  134. this.rebookList = response.data.rows
  135. this.total = response.data.total
  136. this.loading = false
  137. })
  138. },
  139. handleQuery() {
  140. this.getList()
  141. },
  142. resetQuery() {
  143. this.$refs.queryForm.resetFields()
  144. this.queryParams = {
  145. pageNum: 1,
  146. pageSize: this.queryParams.pageSize
  147. } // 重置时将页码重置为1
  148. this.handleQuery()
  149. },
  150. handleRebook(row){
  151. if (row.status !== 3) { // 检查订单状态是否为3
  152. this.$modal.msgError('该票禁止改签请知悉')
  153. return
  154. }
  155. this.$refs.rebookBox.initData(row)
  156. }
  157. }
  158. }
  159. </script>
  160. <style scoped>
  161. .tip-box {
  162. padding: 10px;
  163. background-color: #f8f8f8;
  164. margin-bottom: 20px;
  165. }
  166. .tip-box p {
  167. color: #E6A23C;
  168. margin: 0;
  169. }
  170. .pay-status {
  171. text-align: center;
  172. font-size: 16px;
  173. }
  174. .success-info {
  175. text-align: center;
  176. font-size: 16px;
  177. }
  178. .interval-list {
  179. display: flex;
  180. flex-wrap: wrap;
  181. gap: 10px;
  182. }
  183. .interval-list .el-button {
  184. margin: 0;
  185. }
  186. </style>