|
@@ -244,6 +244,7 @@ import TouristList from '../common/TouristList'
|
|
|
import moment from 'moment'
|
|
import moment from 'moment'
|
|
|
import { IDENTIFY_TYPES } from '@/const'
|
|
import { IDENTIFY_TYPES } from '@/const'
|
|
|
import { getTeamList, getGuideList } from '@/api/checker'
|
|
import { getTeamList, getGuideList } from '@/api/checker'
|
|
|
|
|
+import { EventBus } from '@/utils/eventBus'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
props: {
|
|
props: {
|
|
@@ -595,6 +596,23 @@ export default {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
+ mounted () {
|
|
|
|
|
+ EventBus.$on('ticketChanged', () => {
|
|
|
|
|
+ if (!this.currentTicket) return
|
|
|
|
|
+
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ if (this.category === 'batch' || this.isTeam) return
|
|
|
|
|
+ // if (!this.ticketAutoAddMap[this.currentTicket.id]) {
|
|
|
|
|
+ // this.ticketAutoAddMap[this.currentTicket.id] = true
|
|
|
|
|
+ // }
|
|
|
|
|
+ this.addToOrder()
|
|
|
|
|
+ }, 500)
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ beforeDestroy () {
|
|
|
|
|
+ EventBus.$off('ticketChanged')
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
watch: {
|
|
watch: {
|
|
|
async currentTicket (val, oldVal) {
|
|
async currentTicket (val, oldVal) {
|
|
|
if (!val) return
|
|
if (!val) return
|
|
@@ -646,14 +664,6 @@ export default {
|
|
|
this.timer = setTimeout(() => {
|
|
this.timer = setTimeout(() => {
|
|
|
this.setPrice(this.currentTicket.price)
|
|
this.setPrice(this.currentTicket.price)
|
|
|
}, 300)
|
|
}, 300)
|
|
|
-
|
|
|
|
|
- this.setTimeout = setTimeout(() => {
|
|
|
|
|
- if (this.category === 'batch' || this.isTeam) return
|
|
|
|
|
- if (!this.ticketAutoAddMap[val.id]) {
|
|
|
|
|
- this.ticketAutoAddMap[val.id] = true
|
|
|
|
|
- this.addToOrder()
|
|
|
|
|
- }
|
|
|
|
|
- }, 500)
|
|
|
|
|
},
|
|
},
|
|
|
retailLockCheckStyle (val) {
|
|
retailLockCheckStyle (val) {
|
|
|
if (val) {
|
|
if (val) {
|