2ef19ff1 by 杨炀

Merge commit '6bef8301' into dev

2 parents 02f9c737 6bef8301
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
18 <div class="address">{{ TickForm2.sessionType=='1000'?'日间场':'夜间场' }}</div> 18 <div class="address">{{ TickForm2.sessionType=='1000'?'日间场':'夜间场' }}</div>
19 <div class="address">{{ TickForm2.ticketName }}</div> 19 <div class="address">{{ TickForm2.ticketName }}</div>
20 20
21 <div class="address">剩余数量: {{ (TickForm2.limitCount||0)-(TickForm3.counts||0) }}</div> 21 <div v-if="TickForm2.ticketType=='0'" class="address">剩余数量: {{ leftCount }}</div>
22 </div> 22 </div>
23 23
24 <div class="ticket_info mb20"> 24 <div class="ticket_info mb20">
...@@ -207,7 +207,7 @@ const rules = ref({ ...@@ -207,7 +207,7 @@ const rules = ref({
207 const formRef = ref(null) 207 const formRef = ref(null)
208 const TickForm = ref({}) 208 const TickForm = ref({})
209 const TickForm2 = ref({}) 209 const TickForm2 = ref({})
210 const TickForm3 = ref({}) 210 const leftCount = ref({})
211 const deskList = ref([]) 211 const deskList = ref([])
212 const currDesk = ref(null) 212 const currDesk = ref(null)
213 const currSeat = ref([]) 213 const currSeat = ref([])
...@@ -235,7 +235,7 @@ onMounted(() => { ...@@ -235,7 +235,7 @@ onMounted(() => {
235 getListByAtstId({ 235 getListByAtstId({
236 atstId: route.params.latstId 236 atstId: route.params.latstId
237 }).then(res => { 237 }).then(res => {
238 TickForm3.value = res.data[0] 238 leftCount.value = res.data
239 }) 239 })
240 } 240 }
241 }) 241 })
...@@ -277,19 +277,21 @@ async function paymentHandle() { ...@@ -277,19 +277,21 @@ async function paymentHandle() {
277 return 277 return
278 } 278 }
279 279
280 if (currSeat.value.length == 0) { 280 if (TickForm2.value.ticketType == '1') {
281 ElMessage({ 281 if (currSeat.value.length == 0) {
282 message: language.value == 0 ? '请选择座位' : 'Please select the seat', 282 ElMessage({
283 type: 'error' 283 message: language.value == 0 ? '请选择座位' : 'Please select the seat',
284 }) 284 type: 'error'
285 return 285 })
286 } 286 return
287 if (currSeat.value.length != orderForm.value.customerIds.length) { 287 }
288 ElMessage({ 288 if (currSeat.value.length != orderForm.value.customerIds.length) {
289 message: language.value == 0 ? '座位数与人数不一致' : '', 289 ElMessage({
290 type: 'error' 290 message: language.value == 0 ? '座位数与人数不一致' : '',
291 }) 291 type: 'error'
292 return 292 })
293 return
294 }
293 } 295 }
294 296
295 await formRef.value.validate() 297 await formRef.value.validate()
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
8 <!-- <el-button class="fr" type="primary" plain @click="toInvoice">{{ language==0?'发票开具':'Invoice' }}</el-button>--> 8 <!-- <el-button class="fr" type="primary" plain @click="toInvoice">{{ language==0?'发票开具':'Invoice' }}</el-button>-->
9 <!-- <el-button class="fr" type="primary" plain @click="toInvoice">{{ language==0?'我的发票':'My Invoice' }}</el-button>--> 9 <!-- <el-button class="fr" type="primary" plain @click="toInvoice">{{ language==0?'我的发票':'My Invoice' }}</el-button>-->
10 </div> 10 </div>
11 <el-empty v-if="list?.length == 0" :image="`/img/order_no.png`" :image-size="228"/> 11 <el-empty v-if="list?.length == 0" :image="`/img/order_no.png`" :image-size="228" />
12 12
13 <div class="pd20"> 13 <div class="pd20">
14 <div v-for="b in list" class="item"> 14 <div v-for="b in list" class="item">
...@@ -25,23 +25,23 @@ ...@@ -25,23 +25,23 @@
25 </div> 25 </div>
26 26
27 <div class="status-po"> 27 <div class="status-po">
28 <span v-if="b.status == '0'&&b.surplus!='0,0'&&b.surplus!='0'" class="bg-warning"> 28 <span v-if="b.status == '0'&&b.surplus!='0,0'&&b.surplus!='0'" class="bg-warning">
29 {{ language == 0 ? '待支付' : 'Unpaid' }} 29 {{ language == 0 ? '待支付' : 'Unpaid' }}
30 </span> 30 </span>
31 <span v-if="b.status == '0'&&(b.surplus=='0,0'||b.surplus=='0')" class="bg-warning">{{ 31 <span v-if="b.status == '0'&&(b.surplus=='0,0'||b.surplus=='0')" class="bg-warning">{{
32 language == 0 ? '已取消' : 'Canceled' 32 language == 0 ? '已取消' : 'Canceled'
33 }}</span> 33 }}</span>
34 <span v-if="b.status == '1'" class="bg-blue">{{ language == 0 ? '支付成功' : 'successful' }}</span> 34 <span v-if="b.status == '1'" class="bg-blue">{{ language == 0 ? '支付成功' : 'successful' }}</span>
35 <span v-if="b.status == '2'" class="bg-warning">{{ language == 0 ? '已取消' : 'Canceled' }}</span> 35 <span v-if="b.status == '2'" class="bg-warning">{{ language == 0 ? '已取消' : 'Canceled' }}</span>
36 <span v-if="b.status == '3'||b.status == '4'" class="bg-danger">{{ 36 <span v-if="b.status == '3'||b.status == '4'" class="bg-danger">{{
37 language == 0 ? '已退订' : 'Refunded' 37 language == 0 ? '已退订' : 'Refunded'
38 }}</span> 38 }}</span>
39 <span v-if="b.status == '7'" class="bg-danger">{{ 39 <span v-if="b.status == '7'" class="bg-danger">{{
40 language == 0 ? '退款审核中' : 'Refund in review' 40 language == 0 ? '退款审核中' : 'Refund in review'
41 }}</span> 41 }}</span>
42 <span v-if="b.status == '-1'" class="bg-blue">{{ 42 <span v-if="b.status == '-1'" class="bg-blue">{{
43 language == 0 ? '已核销' : 'Completed' 43 language == 0 ? '已核销' : 'Completed'
44 }}</span> 44 }}</span>
45 </div> 45 </div>
46 46
47 <el-row align="middle" class="pd20 mt10" justify="space-between"> 47 <el-row align="middle" class="pd20 mt10" justify="space-between">
...@@ -56,8 +56,8 @@ ...@@ -56,8 +56,8 @@
56 <div v-if="b.orderType == 1"> 56 <div v-if="b.orderType == 1">
57 <h3 class="name">{{ b.name }}</h3> 57 <h3 class="name">{{ b.name }}</h3>
58 <div> 58 <div>
59 <p>{{b.extJsonObj.pickUpBo.count}}</p> 59 <p>{{ b.extJsonObj.pickUpBo.count }}</p>
60 <p>{{b.extJsonObj.pickUpBo.revTime}}</p> 60 <p>{{ b.extJsonObj.pickUpBo.revTime }}</p>
61 </div> 61 </div>
62 <!-- <p>{{b.messageObj}}</p>--> 62 <!-- <p>{{b.messageObj}}</p>-->
63 <!-- <p>{{b.extJsonObj}}</p>--> 63 <!-- <p>{{b.extJsonObj}}</p>-->
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
94 <div v-if="b.orderType == 6"> 94 <div v-if="b.orderType == 6">
95 <h3 class="name">{{ b.name }}</h3> 95 <h3 class="name">{{ b.name }}</h3>
96 <p>出行时间:{{ b.extJsonObj.dcStart }}</p> 96 <p>出行时间:{{ b.extJsonObj.dcStart }}</p>
97 <p v-for="t in b.extJsonObj.touristList">{{ t.gateName }}{{t.name}}</p> 97 <p v-for="t in b.extJsonObj.touristList">{{ t.gateName }}{{ t.name }}</p>
98 </div> 98 </div>
99 </el-col> 99 </el-col>
100 <el-col :lg="6" :md="12" :sm="12" :xs="24"> 100 <el-col :lg="6" :md="12" :sm="12" :xs="24">
...@@ -102,10 +102,8 @@ ...@@ -102,10 +102,8 @@
102 <p>{{ b.messageObj?.roomName }}</p> 102 <p>{{ b.messageObj?.roomName }}</p>
103 <p>{{ b.messageObj?.roomInfo }}</p> 103 <p>{{ b.messageObj?.roomInfo }}</p>
104 </div> 104 </div>
105 <div v-if="b.orderType == 1"> 105 <div v-if="b.orderType == 1" />
106 </div> 106 <div v-if="b.orderType == 2" />
107 <div v-if="b.orderType == 2">
108 </div>
109 <div v-if="b.orderType == 3||b.orderType == 4"> 107 <div v-if="b.orderType == 3||b.orderType == 4">
110 <p>{{ b.extJsonObj.packageName }}</p> 108 <p>{{ b.extJsonObj.packageName }}</p>
111 </div> 109 </div>
...@@ -125,27 +123,41 @@ ...@@ -125,27 +123,41 @@
125 :value="b.countdown" 123 :value="b.countdown"
126 format="mm:ss" 124 format="mm:ss"
127 value-style="color:#E60012;font-size:16px;" 125 value-style="color:#E60012;font-size:16px;"
128 @finish="finish(b)"/> 126 @finish="finish(b)"
127 />
129 </div> 128 </div>
130 129
131 <div class="text-right"> 130 <div class="text-right">
132 <el-button v-if="(b.orderType == 0||b.orderType == 5)&&b.viewStatus!=0" class="mb10" plain round 131 <el-button
133 size="small" type="success" 132 v-if="(b.orderType == 0||b.orderType == 5)&&b.viewStatus!=0" class="mb10" plain round
134 @click="Rebook(b)"> 133 size="small" type="success"
134 @click="Rebook(b)"
135 >
135 {{ language == 0 ? '再次预订' : 'Rebook' }} 136 {{ language == 0 ? '再次预订' : 'Rebook' }}
136 </el-button> 137 </el-button>
137 <el-button class="mb10" plain round size="small" type="primary" @click="goDetail(b)"> 138 <el-button
139 class="mb10" plain round size="small" type="primary"
140 @click="goDetail(b)"
141 >
138 {{ language == 0 ? '详情' : 'Detail' }} 142 {{ language == 0 ? '详情' : 'Detail' }}
139 </el-button> 143 </el-button>
140 <el-button v-if="b.status == '0'&&(b.surplus!='0,0'&&b.surplus!='0')" class="mb10" 144 <el-button
141 plain round size="small" type="primary" @click="goDetail(b)"> 145 v-if="b.status == '0'&&(b.surplus!='0,0'&&b.surplus!='0')" class="mb10"
146 plain round size="small" type="primary" @click="goDetail(b)"
147 >
142 {{ language == 0 ? '支付' : 'Pay' }} 148 {{ language == 0 ? '支付' : 'Pay' }}
143 </el-button> 149 </el-button>
144 <el-button v-if="b.viewStatus==0" class="mb10" plain round size="small" type="warning" 150 <el-button
145 @click="cancel(b)"> 151 v-if="b.viewStatus==0" class="mb10" plain round size="small"
152 type="warning"
153 @click="cancel(b)"
154 >
146 {{ language == 0 ? '取消订单' : 'Cancel Order' }} 155 {{ language == 0 ? '取消订单' : 'Cancel Order' }}
147 </el-button> 156 </el-button>
148 <el-button v-if="b.viewStatus==5" class="mb10" plain round size="small" type="" @click="unsubscribe(b)"> 157 <el-button
158 v-if="b.viewStatus==5" class="mb10" plain round size="small"
159 type="" @click="unsubscribe(b)"
160 >
149 {{ language == 0 ? '退订' : 'Unsubscribe' }} 161 {{ language == 0 ? '退订' : 'Unsubscribe' }}
150 </el-button> 162 </el-button>
151 163
...@@ -155,26 +167,26 @@ ...@@ -155,26 +167,26 @@
155 </div> 167 </div>
156 </div> 168 </div>
157 </el-card> 169 </el-card>
158 <div class="pd20"></div> 170 <div class="pd20" />
159 171
160 </div> 172 </div>
161 </template> 173 </template>
162 174
163 <script setup> 175 <script setup>
164 import {onMounted, getCurrentInstance} from "@vue/runtime-core"; 176 import { onMounted, getCurrentInstance } from '@vue/runtime-core'
165 import {useStorage} from "@vueuse/core/index"; 177 import { useStorage } from '@vueuse/core/index'
166 import {newbilllist} from "@/apiPc/common"; 178 import { newbilllist } from '@/apiPc/common'
167 import useUserStore from "@/store/modules/user"; 179 import useUserStore from '@/store/modules/user'
168 import dayjs from 'dayjs' 180 import dayjs from 'dayjs'
169 import {cancelOrder2, cancelOrder} from "/@/apiPc/booking"; 181 import { cancelOrder2, cancelOrder } from '/@/apiPc/booking'
170 182
171 import {ElMessage} from "element-plus"; 183 import { ElMessage } from 'element-plus'
172 184
173 const router = useRouter() 185 const router = useRouter()
174 const language = useStorage('language', 0) 186 const language = useStorage('language', 0)
175 const list = ref([]) 187 const list = ref([])
176 const user = useUserStore().user 188 const user = useUserStore().user
177 const {proxy} = getCurrentInstance() 189 const { proxy } = getCurrentInstance()
178 190
179 onMounted(() => { 191 onMounted(() => {
180 getList() 192 getList()
...@@ -186,9 +198,9 @@ function finish(bill) { ...@@ -186,9 +198,9 @@ function finish(bill) {
186 } 198 }
187 199
188 function getList() { 200 function getList() {
189 newbilllist({createById: user.userId}).then(res => { 201 newbilllist({ createById: user.userId }).then(res => {
190 list.value = res.rows || [] 202 list.value = res.rows || []
191 for (let b of list.value) { 203 for (const b of list.value) {
192 b.messageObj = JSON.parse(b.message) || {} 204 b.messageObj = JSON.parse(b.message) || {}
193 b.extJsonObj = JSON.parse(b.extJson) || {} 205 b.extJsonObj = JSON.parse(b.extJson) || {}
194 if (b.orderType == 5) { 206 if (b.orderType == 5) {
...@@ -200,7 +212,7 @@ function getList() { ...@@ -200,7 +212,7 @@ function getList() {
200 } 212 }
201 } 213 }
202 if (b.surplus && b.status == '0' && (b.surplus != '0,0' && b.surplus != '0')) { 214 if (b.surplus && b.status == '0' && (b.surplus != '0,0' && b.surplus != '0')) {
203 b.countdown = Date.now() + Number((b.surplus.split(',')[0] * 60 + b.surplus.split(',')[1]) * 10) 215 b.countdown = dayjs().add(b.surplus.split(',')[0], 'minute').add(b.surplus.split(',')[1], 'second')
204 } 216 }
205 } 217 }
206 }) 218 })
...@@ -233,14 +245,14 @@ function Rebook(row) { ...@@ -233,14 +245,14 @@ function Rebook(row) {
233 router.push({ 245 router.push({
234 name: 'ticket', 246 name: 'ticket',
235 params: { 247 params: {
236 activeId: row.activeId, 248 activeId: row.activeId
237 } 249 }
238 }) 250 })
239 } 251 }
240 } 252 }
241 253
242 const cancel = (row) => { 254 const cancel = (row) => {
243 //取消订单 255 // 取消订单
244 proxy.$modal.confirm(language.value == 0 ? '确定取消订单吗 ?' : `Are you sure to cancel the order?`).then(() => { 256 proxy.$modal.confirm(language.value == 0 ? '确定取消订单吗 ?' : `Are you sure to cancel the order?`).then(() => {
245 return cancelOrder2(row.id).then(res => { 257 return cancelOrder2(row.id).then(res => {
246 getList() 258 getList()
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!