c0c59ce7 by 杨炀

Merge branch 'dev' of https://code.itechtop.cn/yangyang/dance-pc into dev

# Conflicts:
#	vite.config.js
2 parents 65d4b1e1 6c6e5fb9
......@@ -237,6 +237,15 @@ export function getBaseInfoByActiveId(id) {
})
}
export function vehicleConfigList(params) {
return request({
url: `/ota/vehicleConfig/list`,
method: 'get',
params
})
}
export function checkRoomPayByUserId(id) {
return request({
url: `/ota/norder/checkRoomPayByUserId`,
......@@ -648,9 +657,9 @@ export function getTicketOrderInfo(params) {
})
}
export function getGateListByLasId(params) {
export function getVehicleByCheckIn(params) { // activityId,category,checkIn
return request({
url: `/ota/scenicConfig/getGateListByLasId`,
url: `/ota/activityVehicle/getVehicleByCheckIn`,
method: 'get',
params
})
......@@ -670,3 +679,34 @@ export function checkPurchasedCustomers(data) {
data
})
}
// 接机
export function getVehicleMap(params) { // activityId
return request({
url: `/ota/activityVehicle/getVehicleMap`,
method: 'get',
params
})
}
export function getVehicleMa1p(params) { // activityId
return request({
url: `/ota/activityVehicle/getVehicleMap`,
method: 'get',
params
})
}
// 旅游
export function getGateListByLasId(params) { // scenicDate,lasId
return request({
url: `/ota/scenicConfig/getGateListByLasId`,
method: 'get',
params
})
}
// 旅游
......
......@@ -404,6 +404,18 @@ export const constantRoutes = [
meta: { title: 'Hotel Reservation' }
},
{
path: 'car/:cptId',
component: () => import('@/viewsPc/booking/car'),
name: 'car',
meta: { title: 'Vehicle Reservation' }
},
{
path: 'carList/:cptId',
component: () => import('@/viewsPc/booking/carList'),
name: 'carList',
meta: { title: 'carList' }
},
{
path: 'car/:cptId/:id',
component: () => import('@/viewsPc/booking/carOrder'),
name: 'carOrder',
......@@ -416,12 +428,6 @@ export const constantRoutes = [
meta: { title: 'Hotel Reservation' }
},
{
path: 'car/:cptId',
component: () => import('@/viewsPc/booking/car'),
name: 'car',
meta: { title: 'Vehicle Reservation' }
},
{
path: 'dinner/:cptId',
component: () => import('@/viewsPc/booking/dinner'),
name: 'dinner',
......
......@@ -4,64 +4,178 @@
<img v-if="language==0" src="@/assets/booking/cl_text_c.png">
<img v-else src="@/assets/booking/cl_text_e.png">
</div>
<br>
<br>
<br>
<div class="box">
<div class="searchBar">
<el-input v-model="query.name" :placeholder="language==0?'请输入关键字搜索':'Search'" class="no-border">
</el-input>
<el-button class="btn-lineG" icon="search" size="large" type="primary" @click="getList">
{{ language == 0 ? '搜索' : 'Search' }}
</el-button>
<el-row :gutter="180">
<el-col :span="12">
<el-card>
<h2 class="text-center gradient-text">{{ language == 0 ? '接机' : "airport pickup" }}</h2>
<div v-if="language==0">
<el-form
ref="formRef1" :model="form1" :rules="rules" class="form" label-width="100px"
size="large"
>
<el-form-item :label="language==0?'出发地':'place of departure'" prop="checkIn">
<el-select
v-model="form1.checkIn" :placeholder="language==0?'请选择':'please select'"
@change="changeSelectIn"
>
<el-option v-for="val in cardData.in" :key="val" :label="val" :value="val" />
</el-select>
</el-form-item>
<br>
<br>
<el-form-item :label="language==0?'到达地':'place of destination'" prop="checkOut">
<el-select v-model="form1.checkOut" :placeholder="language==0?'请选择':'please select'">
<el-option v-for="val in daoOptionIn" :key="val.id" :label="val.checkOut" :value="val.id" />
</el-select>
</el-form-item>
</el-form>
</div>
<div v-else>
<el-form
ref="formRef1" :model="form1" :rules="rules" class="formEn" label-width="155px"
size="large"
>
<el-form-item label="place of departure" prop="checkIn">
<el-select v-model="form1.checkIn" placeholder="please select" @change="changeSelectIn">
<el-option v-for="val in cardData.in" :key="val" :label="val" :value="val" />
</el-select>
</el-form-item>
<br>
<br>
<el-form-item label="place of destination" prop="checkOut">
<el-select v-model="form1.checkOut" placeholder="please select">
<el-option v-for="val in daoOptionIn" :key="val.id" :label="val.checkOut" :value="val.id" />
</el-select>
</el-form-item>
</el-form>
</div>
<div v-loading="loading" class="box">
<div v-for="(h,index) in list" :key="index" class="routeItem">
<el-row :gutter="20" align="middle" class="w100">
<el-col :lg="2" :sm="6">
<div class="index">{{ language == 0 ? '路线' : 'Route' }}{{ index + 1 }}
<br>
<br>
<div class="text-center ">
<el-button class="btn-lineG w50 " round size="large" type="primary" @click="handleSubmit(0)">
{{ language == 0 ? '我要接机' : "next step" }}
</el-button>
</div>
<br>
<br>
</el-card>
</el-col>
<el-col :lg="6" >
<p class="esp text-center">{{ h.checkIn }}</p>
</el-col>
<el-col :lg="4" :sm="6" class="text-center">
<img class="mauto w40px" src="@/assets/booking/wf.png"/>
</el-col>
<el-col :lg="6" >
<p class="esp text-center">{{ h.checkOut }}</p>
</el-col>
<el-col :lg="3" :sm="12">
<div v-if="language==0" class="price">
¥
<span>{{ h.upPrice }}</span>
<el-col :span="12">
<el-card>
<h2 class="text-center gradient-text">{{ language == 0 ? '送机' : 'airport drop-off service' }}</h2>
<div v-if="language==0">
<el-form
ref="formRef2" :model="form2" :rules="rules" class="form" label-width="100px"
size="large"
>
<el-form-item :label="language==0?'出发地':'place of departure'" prop="checkIn">
<el-select
v-model="form2.checkIn" :placeholder="language==0?'请选择':'please select'"
@change="changeSelectOut"
>
<el-option v-for="val in cardData.out" :key="val" :label="val" :value="val" />
</el-select>
</el-form-item>
<br>
<br>
<el-form-item :label="language==0?'到达地':'place of destination'" prop="checkOut">
<el-select v-model="form2.checkOut" :placeholder="language==0?'请选择':'please select'">
<el-option v-for="val in daoOptionOut" :key="val.id" :label="val.checkOut" :value="val.id" />
</el-select>
</el-form-item>
</el-form>
</div>
<div v-else class="price">
<span>{{ h.upPriceEn }}</span>
<div v-else>
<el-form
ref="formRef2" :model="form2" :rules="rules" class="formEn" label-width="155px"
size="large"
>
<el-form-item label="place of departure" prop="checkIn">
<el-select v-model="form2.checkIn" placeholder="please select" @change="changeSelectOut">
<el-option v-for="val in cardData.out" :key="val" :label="val" :value="val" />
</el-select>
</el-form-item>
<br>
<br>
<el-form-item label="place of destination" prop="checkOut">
<el-select v-model="form2.checkOut" placeholder="please select">
<el-option v-for="val in daoOptionOut" :key="val.id" :label="val.checkOut" :value="val.id" />
</el-select>
</el-form-item>
</el-form>
</div>
</el-col>
<el-col :lg="3" :sm="12">
<el-button class="btn-lineG w100" round type="primary" @click="goOrder(h)">
{{ language == 0 ? '我要预订' : 'Select' }}
<br>
<br>
<div class="text-center">
<el-button class="btn-lineG w50" round size="large" type="primary" @click="handleSubmit(1)">
{{ language == 0 ? '我要送机' : 'next step' }}
</el-button>
</div>
<br>
<br>
</el-card>
</el-col>
</el-row>
</div>
<el-empty v-show="!loading&&list.length==0" :image="`/img/order_no.png`" :image-size="228" description=""/>
<div style="height: 50px"></div>
</div>
<!-- <div v-loading="loading" class="box">-->
<!-- <div v-for="(h,index) in list" :key="index" class="routeItem">-->
<!-- <el-row :gutter="20" align="middle" class="w100">-->
<!-- <el-col :lg="2" :sm="6">-->
<!-- <div class="index">{{ language == 0 ? '路线' : 'Route' }}{{ index + 1 }}-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :lg="6">-->
<!-- <p class="esp text-center">{{ h.checkIn }}</p>-->
<!-- </el-col>-->
<!-- <el-col :lg="4" :sm="6" class="text-center">-->
<!-- <img class="mauto w40px" src="@/assets/booking/wf.png">-->
<!-- </el-col>-->
<!-- <el-col :lg="6">-->
<!-- <p class="esp text-center">{{ h.checkOut }}</p>-->
<!-- </el-col>-->
<!-- <el-col :lg="3" :sm="12">-->
<!-- <div v-if="language==0" class="price">-->
<!-- ¥-->
<!-- <span>{{ h.upPrice }}</span>-->
<!-- </div>-->
<!-- <div v-else class="price">-->
<!-- €-->
<!-- <span>{{ h.upPriceEn }}</span>-->
<!-- </div>-->
<!-- -->
<!-- </el-col>-->
<!-- <el-col :lg="3" :sm="12">-->
<!-- <el-button class="btn-lineG w100" round type="primary" @click="goOrder(h)">-->
<!-- {{ language == 0 ? '我要预订' : 'Select' }}-->
<!-- </el-button>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- </div>-->
<!-- -->
<!-- <el-empty v-show="!loading&&list.length==0" :image="`/img/order_no.png`" :image-size="228" description="" />-->
<!-- <div style="height: 50px" />-->
<!-- </div>-->
</div>
</template>
<script setup>
import {onMounted} from "@vue/runtime-core"
import * as booking from "@/apiPc/booking"
import {useRouter, useRoute} from "vue-router";
import {useStorage} from "@vueuse/core/index";
import useUserStore from "@/store/modules/user";
import { getCurrentInstance, onMounted, ref } from '@vue/runtime-core'
import * as booking from '@/apiPc/booking'
import { useRouter, useRoute } from 'vue-router'
import { useStorage } from '@vueuse/core/index'
import useUserStore from '@/store/modules/user'
import { getVehicleByCheckIn } from '@/apiPc/booking'
const { proxy } = getCurrentInstance()
const user = useUserStore().user
const router = useRouter()
const route = useRoute()
......@@ -69,14 +183,29 @@ const language = useStorage('language', 0)
const query = ref({
name: ''
})
const activeName = ref(0)
const cptId = ref('')
const list = ref([])
const loading = ref(false)
const form1 = ref({})
const form2 = ref({})
const rules = ref({
checkIn: [
{ required: true, message: `${language.value == 0 ? '请选择' : 'please select'}`, trigger: 'blur' }
],
checkOut: [
{ required: true, message: `${language.value == 0 ? '请选择' : 'please select'}`, trigger: 'blur' }
]
})
const cardData = ref({})
const daoOptionIn = ref([])
const daoOptionOut = ref([])
onMounted(() => {
query.value.activityId = route.params.cptId
// if (language.value==0)
getList()
// getList()
getVehicleMap()
})
function getList() {
......@@ -90,6 +219,70 @@ function getList() {
})
}
async function getVehicleMap() {
const res = await booking.getVehicleMap({ activityId: route.params.cptId })
cardData.value = res.data
}
async function changeSelectIn() {
const res = await booking.getVehicleByCheckIn({
activityId: route.params.cptId,
checkIn: form1.value.checkIn,
category: '0'
})
form1.value.checkOut = ''
daoOptionIn.value = res.data
}
async function changeSelectOut() {
const res = await booking.getVehicleByCheckIn({
activityId: route.params.cptId,
checkIn: form1.value.checkIn,
category: '1'
})
form2.value.checkOut = ''
daoOptionOut.value = res.data
}
async function handleSubmit(v) {
let checkOut = {}
let obj = {}
if (v == 0) {
await proxy.$refs['formRef1'].validate()
checkOut = daoOptionIn.value.find(v => v.id == form1.value.checkOut) || {}
obj = {
activityId: route.params.cptId,
checkIn: form1.value.checkIn,
checkOut: checkOut.checkOut,
category: v
}
} else {
await proxy.$refs['formRef2'].validate()
checkOut = daoOptionOut.value.find(v => v.id == form2.value.checkOut) || {}
obj = {
activityId: route.params.cptId,
checkIn: form2.value.checkIn,
checkOut: checkOut.checkOut,
category: v
}
// await getVehicleByCheckIn({
// activityId: route.params.cptId,
// checkIn: form2.value.checkIn,
// checkOut: checkOut.checkOut,
// category: v
// })
}
await router.push({
name: 'carList',
params: {
id: route.params.cptId
},
query: obj
})
}
function goOrder(item, car) {
if (!user) {
useUserStore().setReLogin()
......@@ -98,7 +291,7 @@ function goOrder(item, car) {
router.push({
name: 'carOrder',
params: {
id: item.id,
id: item.id
},
query: {
item: encodeURIComponent(JSON.stringify(item))
......@@ -180,131 +373,43 @@ function goOrder(item, car) {
}
}
.searchBar {
position: relative;
top: -30px;
background: #FFFFFF;
display: flex;
padding: 20px;
border-radius: 10px;
}
.no-border {
border: none;
background: #F5F7F9;
:deep(.el-input__wrapper) {
border: none;
box-shadow: none;
background: #F5F7F9;
}
}
.starBox {
img {
display: inline-block;
margin-right: 4px
}
}
.tagbox {
margin: 15px 0;
a {
color: #AFB5B9;
font-size: 12px;
}
span {
border-radius: 13px;
font-size: 12px;
padding: 4px 10px;
margin-right: 10px;
font-weight: 400;
}
span:nth-child(4n) {
background: rgba(50, 177, 108, 0.2);
color: rgba(50, 177, 108, 1);
}
span:nth-child(4n+1) {
background: rgba(243, 152, 0, 0.2);
color: rgba(243, 152, 0, 1);
}
span:nth-child(4n+2) {
background: rgba(0, 160, 233, 0.2);
color: rgba(0, 160, 233, 1);
}
span:nth-child(4n+3) {
background: rgba(247, 64, 166, 0.2);
color: rgba(247, 64, 166, 1);
}
}
.name.flex {
align-items: center;
}
.name .tagbox {
margin: 0 0 0 15px;
.gradient-text {
font-family: FZJunHeiS-B-GB;
font-weight: 600;
font-size: 24px;
background: linear-gradient(0deg, #8226FC 0%, #483BEB 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.room {
background: #FAFBFD;
margin: 20px 0 0;
padding: 20px;
border: 1px solid #E5E5E5;
.form {
padding-right: 50px;
.name {
:deep(.el-form-item) {
label {
font-size: 20px;
margin: 0 0 10px;
height: 60px;
line-height: 60px;
}
.roomImg {
aspect-ratio: 16/9;
border-radius: 10px;
overflow: hidden;
img {
width: 100%;
object-fit: cover;
object-position: center;
height: 100%;
.el-select--large .el-select__wrapper {
min-height: 60px;
}
}
}
.formEn {
padding-right: 50px;
.bg-lineg {
margin: auto;
border-radius: 10px;
text-align: center;
padding: 7px 2px 2px;
font-size: 24px;
width: 66px;
cursor: pointer;
div {
background: #fff;
font-size: 13px;
border-radius: 20px;
padding: 0 10px;
color: #453DEA;
font-weight: 500;
:deep(.el-form-item) {
label {
font-size: 14px;
height: 60px;
line-height: 60px;
}
}
}
.routeItem{background: #fff;border-radius: 10px;margin: 0 0 20px;padding: 10px 20px;box-shadow: 0 0 6px #eee;
.price {
color: #FF8124;
font-size: 24px;
span {
font-size: 36px;
font-family: "DIN Alternate"
.el-select--large .el-select__wrapper {
min-height: 60px;
}
}
}
......
<template>
<div>
<div class="banner">
<img v-if="language==0" src="@/assets/booking/cl_text_c.png">
<img v-else src="@/assets/booking/cl_text_e.png">
</div>
<div class="box">
<div class="searchBar">
<el-input v-model="query.name" :placeholder="language==0?'请输入关键字搜索':'Search'" class="no-border" />
<el-button class="btn-lineG" icon="search" size="large" type="primary" @click="getVehicleByCheckIn">
{{ language == 0 ? '搜索' : 'Search' }}
</el-button>
</div>
</div>
<div v-loading="loading" class="box">
<div v-for="(h,index) in list" :key="index" class="routeItem">
<el-row :gutter="20" align="middle" class="w100">
<el-col :lg="2" :sm="6">
<div class="index">{{ language == 0 ? '路线' : 'Route' }}{{ index + 1 }}
</div>
</el-col>
<el-col :lg="6">
<p class="esp text-center">{{ h.checkIn }}</p>
</el-col>
<el-col :lg="4" :sm="6" class="text-center">
<img class="mauto w40px" src="@/assets/booking/wf.png">
</el-col>
<el-col :lg="6">
<p class="esp text-center">{{ h.checkOut }}</p>
</el-col>
<el-col :lg="3" :sm="12">
<div v-if="language==0" class="price">
¥
<span>{{ h.upPrice }}</span>
</div>
<div v-else class="price">
<span>{{ h.upPriceEn }}</span>
</div>
</el-col>
<el-col :lg="3" :sm="12">
<el-button class="btn-lineG w100" round type="primary" @click="goOrder(h)">
{{ language == 0 ? '我要预订' : 'Select' }}
</el-button>
</el-col>
</el-row>
</div>
<el-empty v-show="!loading&&list.length==0" :image="`/img/order_no.png`" :image-size="228" description="" />
<div style="height: 50px" />
</div>
</div>
</template>
<script setup>
import { onMounted, ref } from '@vue/runtime-core'
import * as booking from '@/apiPc/booking'
import { useRouter, useRoute } from 'vue-router'
import { useStorage } from '@vueuse/core/index'
import useUserStore from '@/store/modules/user'
const user = useUserStore().user
const router = useRouter()
const route = useRoute()
const language = useStorage('language', 0)
const query = ref({})
const activeName = ref(0)
const cptId = ref('')
const list = ref([])
const loading = ref(false)
onMounted(() => {
query.value.activityId = route.query.activityId
query.value.checkIn = route.query.checkIn
query.value.checkOut = route.query.checkOut
query.value.category = route.query.category
// if (language.value==0)
// getList()
getVehicleByCheckIn()
})
function getList() {
// if (language.value!=0)return
loading.value = true
booking.getActivityCarList(query.value).then(res => {
list.value = res.rows
loading.value = false
}).catch(e => {
loading.value = false
})
}
async function getVehicleByCheckIn() {
loading.value = true
const res = await booking.getVehicleByCheckIn(query.value)
list.value = res.data || []
loading.value = false
}
function goOrder(item, car) {
if (!user) {
useUserStore().setReLogin()
return
}
router.push({
name: 'carOrder',
params: {
id: item.id
},
query: {
item: encodeURIComponent(JSON.stringify(item))
}
})
}
</script>
<style lang="scss" scoped>
.hotel {
margin-bottom: 20px;
cursor: pointer;
.index {
display: flex;
font-weight: 500;
padding-left: 20px;
font-size: 18px;
align-items: center;
img {
margin-left: 15px;
}
}
p {
font-weight: 500;
font-size: 24px;
color: #000000;
}
&:hover .el-card {
box-shadow: 0 0 10px #aaa;
}
}
.hotel:nth-child(7n) .index {
color: #009E96;
}
.hotel:nth-child(7n+1) .index {
color: #FF8124;
}
.hotel:nth-child(7n+2) .index {
color: #E4007F;
}
.hotel:nth-child(7n+3) .index {
color: #0068B7;
}
.hotel:nth-child(7n+4) .index {
color: #32B16C;
}
.hotel:nth-child(7n+5) .index {
color: #920783;
}
.hotel:nth-child(7n+6) .index {
color: #00B7EE;
}
.banner {
height: 140px;
background-size: cover;
text-align: center;
background: url("@/assets/booking/cl_bg.png") center;
display: flex;
align-items: center;
justify-content: center;
img {
display: block;
margin: -30px auto 0;
width: auto;
}
}
.searchBar {
position: relative;
top: -30px;
background: #FFFFFF;
display: flex;
padding: 20px;
border-radius: 10px;
}
.no-border {
border: none;
background: #F5F7F9;
:deep(.el-input__wrapper) {
border: none;
box-shadow: none;
background: #F5F7F9;
}
}
.starBox {
img {
display: inline-block;
margin-right: 4px
}
}
.tagbox {
margin: 15px 0;
a {
color: #AFB5B9;
font-size: 12px;
}
span {
border-radius: 13px;
font-size: 12px;
padding: 4px 10px;
margin-right: 10px;
font-weight: 400;
}
span:nth-child(4n) {
background: rgba(50, 177, 108, 0.2);
color: rgba(50, 177, 108, 1);
}
span:nth-child(4n+1) {
background: rgba(243, 152, 0, 0.2);
color: rgba(243, 152, 0, 1);
}
span:nth-child(4n+2) {
background: rgba(0, 160, 233, 0.2);
color: rgba(0, 160, 233, 1);
}
span:nth-child(4n+3) {
background: rgba(247, 64, 166, 0.2);
color: rgba(247, 64, 166, 1);
}
}
.name.flex {
align-items: center;
}
.name .tagbox {
margin: 0 0 0 15px;
}
.room {
background: #FAFBFD;
margin: 20px 0 0;
padding: 20px;
border: 1px solid #E5E5E5;
.name {
font-size: 20px;
margin: 0 0 10px;
}
.roomImg {
aspect-ratio: 16/9;
border-radius: 10px;
overflow: hidden;
img {
width: 100%;
object-fit: cover;
object-position: center;
height: 100%;
}
}
.bg-lineg {
margin: auto;
border-radius: 10px;
text-align: center;
padding: 7px 2px 2px;
font-size: 24px;
width: 66px;
cursor: pointer;
div {
background: #fff;
font-size: 13px;
border-radius: 20px;
padding: 0 10px;
color: #453DEA;
font-weight: 500;
}
}
}
.routeItem {
background: #fff;
border-radius: 10px;
margin: 0 0 20px;
padding: 10px 20px;
box-shadow: 0 0 6px #eee;
.price {
color: #FF8124;
font-size: 24px;
span {
font-size: 36px;
font-family: "DIN Alternate"
}
}
}
</style>
......@@ -18,38 +18,51 @@
</div>
</div>
<div class="leftboderTT">{{ language == 0 ? '预约信息' : 'Reservation information' }}</div>
<div class="leftboderTT">
{{ language == 0 ? '预约信息' : 'Reservation information' }}
</div>
<div class="border-rr mt20 pd20">
<el-form ref="formRef" :label-width="language == 0 ?'120':'200'" :model="form" :rules="rules">
<el-form-item :label="language==0?'人数':'Person Count'" required>
<el-form-item :label="language==0?'人数':'Person Count'" prop="pickUpBo.count">
<el-input-number v-model="form.pickUpBo.count" type="text" @change="changecarNum" />
</el-form-item>
<el-form-item :label="language==0?'用车日期':'Date'" required>
<el-form-item :label="language==0?'用车日期':'Date'" prop="date1">
<el-date-picker
v-model="date1" :disabled-date="disabledDate"
v-model="form.date1" :disabled-date="disabledDate"
:placeholder="language==0?'选择日期':'Select date'"
format="YYYY-MM-DD" type="date"
value-format="YYYY-MM-DD"
/>
</el-form-item>
<el-form-item :label="language==0?'用车时间':'Time'" required>
<el-time-picker v-model="revTime1" format="HH:mm" value-format="HH:mm" @change="bindTimeChange" />
<el-form-item :label="language==0?'用车时间':'Time'" prop="lvcId">
<!-- <el-time-picker v-model="revTime1" format="HH:mm" value-format="HH:mm" @change="bindTimeChange" />-->
<el-select v-model="form.lvcId">
<el-option v-for="v in timeList" :key="v.id" :label="`${v.nameStart}~${v.nameEnd}`" :value="v.id" />
</el-select>
</el-form-item>
<el-form-item :label="language==0?'联系人':'Contacts'" required>
<el-form-item
v-for="(v,i) in form.list" :key="i" :label="`${language==0?`乘坐人${i+1}`:`Contacts${i+1}`}`"
:prop="`list.${i}.name`"
:rules="rules.name"
>
<el-input v-model="v.name" type="text" />
</el-form-item>
<el-form-item :label="language==0?'联系人':'Contacts'" prop="pickUpBo.contacts">
<el-input v-model="form.pickUpBo.contacts" type="text" />
</el-form-item>
<el-form-item :label="language==0?'联系电话':'Phone'" required>
<el-form-item :label="language==0?'联系电话':'Phone'" prop="pickUpBo.phone">
<el-input v-model="form.pickUpBo.phone" type="text" />
</el-form-item>
<el-form-item :label="language==0?'航班/火车班次:':'Flight/Train No'" required>
<el-form-item :label="language==0?'航班/火车班次:':'Flight/Train No'" prop="pickUpBo.no">
<el-input v-model="form.pickUpBo.no" type="text" />
</el-form-item>
<el-form-item :label="language==0?'接机/接站地点':'Pick up/Drop off Address'" required>
<el-input v-model="form.pickUpBo.noAddress" type="text" />
</el-form-item>
<el-form-item :label="language==0?'送达地点':'Delivery Address'" required>
<el-input v-model="form.pickUpBo.deliveryAddress" type="text" />
</el-form-item>
<!-- <el-form-item :label="language==0?'接机/接站地点':'Pick up/Drop off Address'" required>-->
<!-- <el-input v-model="form.pickUpBo.noAddress" type="text" />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="language==0?'送达地点':'Delivery Address'" required>-->
<!-- <el-input v-model="form.pickUpBo.deliveryAddress" type="text" />-->
<!-- </el-form-item>-->
<el-form-item :label="language==0?'备注':'Remarks'">
<el-input v-model="form.pickUpBo.remarks" rows="3" type="textarea" />
</el-form-item>
......@@ -60,15 +73,22 @@
<div class="leftboderTT">{{ language == 0 ? '订单明细' : 'Order details' }}</div>
<div class="border-rr mt20 pd20 ccitemBox">
<label> {{ language == 0 ? '单价' : 'Price' }}
<span class="fr">{{ language == 0 ? '¥' : '€' }}{{ language == 0 ? item.upPrice: item.upPriceEn }}</span>
<span class="fr">{{ language == 0 ? '¥' : '€' }}
{{ language == 0 ? item.upPrice : item.upPriceEn }}
</span>
</label>
<div class="ccitem">
<span>{{ form.pickUpBo.count }} *{{ language == 0 ? '¥' : '€' }}{{ language == 0 ? item.upPrice: item.upPriceEn }}</span>
<span>
{{ form.pickUpBo.count }} *{{ language == 0 ? '¥' : '€' }}
{{ language == 0 ? item.upPrice : item.upPriceEn }}
</span>
</div>
<label>{{ language == 0 ? '共计' : 'Total' }}<span
class="fr bigMoney"
>{{ language == 0 ? '¥' : '€' }}{{ money }}</span></label>
<label>{{ language == 0 ? '共计' : 'Total' }}
<span class="fr bigMoney">
{{ language == 0 ? '¥' : '€' }}{{ money }}
</span>
</label>
</div>
</el-col>
......@@ -79,14 +99,17 @@
<el-row align="middle" justify="space-between">
<el-col :span="12">
<label>{{ language == 0 ? '共计金额' : 'Total' }}:
<span class=" text-warning"> {{ language == 0 ? '¥' : '€' }}<span class="bigMoney">{{
money
}}</span></span>
<span class=" text-warning">
{{ language == 0 ? '¥' : '€' }}
<span class="bigMoney">
{{ money }}
</span>
</span>
</label>
</el-col>
<el-col :span="12" class="text-right">
<el-button
:loading="payLoading" :disabled="money<=0" class="btn-lineG w200px" round type="primary"
:disabled="money<=0" :loading="payLoading" class="btn-lineG w200px" round type="primary"
@click="submit"
>
{{ language == 0 ? '确认付款' : 'Pay' }}
......@@ -101,13 +124,14 @@
<script setup>
import { useRouter, useRoute } from 'vue-router'
import { ref, onMounted, watch } from 'vue'
import { ref, onMounted, getCurrentInstance } from 'vue'
import { useStorage } from '@vueuse/core/index'
import { getBaseInfoByActiveId, submitOrderCar } from '@/apiPc/booking'
import { getBaseInfoByActiveId, submitOrderCar, vehicleConfigList } from '@/apiPc/booking'
import dayjs from 'dayjs'
import { ElMessage, ElMessageBox } from 'element-plus'
import useUserStore from '@/store/modules/user'
const { proxy } = getCurrentInstance()
const payLoading = ref(false)
const user = useUserStore().user
const language = useStorage('language', 0)
......@@ -115,31 +139,81 @@ const router = useRouter()
const route = useRoute()
const item = ref({})
const revTime1 = ref('')
const date1 = ref('')
const form = ref({
pickUpBo: {
count: 1
}
},
list: [{}]
})
const money = ref(0)
const rules = ref({})
const rules = ref({
'pickUpBo.count': {
required: true,
message: language.value == 0 ? '请输入人数' : 'Please enter the number of people',
trigger: 'blur'
},
'pickUpBo.revTime': {
required: true,
message: language.value == 0 ? '请选择时间' : 'Please select time',
trigger: 'blur'
},
'pickUpBo.contacts': {
required: true,
message: language.value == 0 ? '请输入联系人' : 'Please enter contacts',
trigger: 'blur'
},
'pickUpBo.phone': {
required: true,
message: language.value == 0 ? '请输入联系电话' : 'Please enter contact number',
trigger: 'blur'
},
'pickUpBo.no': {
required: true,
message: language.value == 0 ? '请输入航班号' : 'Please enter flight number',
trigger: 'blur'
},
name: {
required: true,
message: language.value == 0 ? '请输入姓名' : 'Please enter name',
trigger: 'blur'
},
date1: {
required: true,
message: language.value == 0 ? '请选择日期' : 'Please select date',
trigger: 'blur'
},
lvcId: {
required: true,
message: language.value == 0 ? '请选择时间' : 'Please select time ',
trigger: 'blur'
}
})
const lform = ref({})
const timeList = ref([])
onMounted(() => {
item.value = JSON.parse(decodeURIComponent(route.query.item))
console.log(item.value)
money.value = 0
changecarNum()
initDays()
handleVehicleConfigList()
})
function changecarNum() {
money.value = (form.value.pickUpBo.count * (language.value == 0 ? item.value.upPrice : item.value.upPriceEn)).toFixed(2)
const num = form.value.pickUpBo.count
money.value = (num * (language.value == 0 ? item.value.upPrice : item.value.upPriceEn)).toFixed(2)
if (num) {
const arr = [...new Array(num).fill({})]
form.value.list = JSON.parse(JSON.stringify(arr))
}
}
function bindTimeChange(e) {
revTime1.value = e
async function handleVehicleConfigList() {
const res = await vehicleConfigList({ lavId: item.value.id })
timeList.value = res.rows
}
function initDays() {
......@@ -157,33 +231,57 @@ function disabledDate(date) {
return true
}
function submit() {
async function submit() {
await proxy.$refs['formRef'].validate()
if (!user) {
useUserStore().setReLogin()
return
}
if (money.value <= 0) {
ElMessage.error(language.value == 0 ? '请添加人数' : 'Please add the number of people')
await proxy.$modal.msgError(language.value == 0 ? '请添加人数' : 'Please add the number of people')
return
}
// 提交确认
ElMessageBox.confirm(language.value == 0 ? '确认提交订单吗?' : 'Confirm to submit the order?', {
confirmButtonText: language.value == 0 ? '确定' : 'Confirm',
cancelButtonText: language.value == 0 ? '取消' : 'Cancel',
type: 'warning'
}).then(() => {
pushFrom()
})
await proxy.$modal.confirm(language.value == 0 ? '确认提交订单吗?' : 'Confirm to submit the order?')
await pushFrom()
// await ElMessageBox.confirm(language.value == 0 ? '确认提交订单吗?' : 'Confirm to submit the order?', {
// confirmButtonText: language.value == 0 ? '确定' : 'Confirm',
// cancelButtonText: language.value == 0 ? '取消' : 'Cancel',
// type: 'warning'
// }).then(() => {
// pushFrom()
// })
}
function pushFrom() {
payLoading.value = true
form.value.pickUpBo.revTime = date1.value + ' ' + revTime1.value
form.value.activeId = item.value.activityId
form.value.lavId = item.value.id
form.value.checkIn = item.value.checkIn
form.value.checkOut = item.value.checkOut
submitOrderCar(form.value).then(res => {
const checkTime = timeList.value.find(v => v.id == form.value.lvcId)
// const name = form.value.list.map(v => v.name)?.toString()
const obj = {
pickUpBo: {
revTime: form.value.date1 + ' ' + revTime1.value,
contacts: form.value.pickUpBo.contacts,
phone: form.value.pickUpBo.phone,
count: form.value.pickUpBo.count,
no: form.value.pickUpBo.no,
remarks: form.value.remarks,
lvcId: form.value.lvcId,
lvcTimes: checkTime.nameStart + '-' + checkTime.nameEnd,
customers: form.value.list
},
activeId: item.value.activityId,
lavId: item.value.id,
checkIn: item.value.checkIn,
checkOut: item.value.checkOut
}
// form.value.pickUpBo.revTime = form.value.date1 + ' ' + revTime1.value
// form.value.activeId = item.value.activityId
// form.value.lavId = item.value.id
// form.value.checkIn = item.value.checkIn
// form.value.checkOut = item.value.checkOut
submitOrderCar(obj).then(res => {
payLoading.value = false
if (res.data && res.data.total != -100) {
router.push({
......
<template>
<el-dialog v-model="show" width="500" :title="languageFormat(language, '出行人信息', 'Travelers')" center
append-to-body>
<el-button type="primary" plain @click="addPeopl">{{ languageFormat(language, "新增", "Add") }}</el-button>
<el-dialog
v-model="show" :title="languageFormat(language, '出行人信息', 'Travelers')" append-to-body center
width="500"
>
<el-button plain type="primary" @click="addPeopl">{{ languageFormat(language, "新增", "Add") }}</el-button>
<el-radio-group v-model="personId">
<div v-for="(it, index) in personList" :key="index" class="e_item">
<el-radio border :value="it.id" :disabled="hasPersonIds?.indexOf(it.id)!=-1">
<el-radio :disabled="hasPersonIds?.indexOf(it.id)!=-1" :value="it.id" border>
<div class="name">{{ it.name }}</div>
<div class="code">
......@@ -27,23 +29,23 @@
</el-dialog>
<el-dialog v-model="showAdd" :title="language ==0?'新增出行人':'Add traveler'" center append-to-body>
<el-dialog v-model="showAdd" :title="language ==0?'新增出行人':'Add traveler'" append-to-body center>
<el-form
ref="formRef" :model="form" label-width="100px" size="large"
style="margin: 80px"
>
<el-form-item :label="language==0?'姓名':'name'" prop="name" required :show-message="false">
<el-input v-model="form.name" :placeholder="language==0?'请输入':'Please input'"/>
<el-form-item :label="language==0?'姓名':'name'" :show-message="false" prop="name" required>
<el-input v-model="form.name" :placeholder="language==0?'请输入':'Please input'" />
</el-form-item>
<el-form-item :label="language==0?'证件类型':'ID Type'" prop="idcType" required :show-message="false">
<el-form-item :label="language==0?'证件类型':'ID Type'" :show-message="false" prop="idcType" required>
<el-select v-model="form.idcType" :placeholder="language==0?'请选择':'Please choose'">
<el-option :label="language==0?'身份证':'Identity card'" value="0"/>
<el-option :label="language==0?'护照':'Passport'" value="1"/>
<el-option :label="language==0?'其他':'Other'" value="2"/>
<el-option :label="language==0?'身份证':'Identity card'" value="0" />
<el-option :label="language==0?'护照':'Passport'" value="1" />
<el-option :label="language==0?'其他':'Other'" value="2" />
</el-select>
</el-form-item>
<el-form-item :label="language==0?'证件号':'ID number'" prop="idCard" required :show-message="false">
<el-input v-model="form.idCard" :placeholder="language==0?'请输入证件号':'Please enter the ID after ah'"/>
<el-form-item :label="language==0?'证件号':'ID number'" :show-message="false" prop="idCard" required>
<el-input v-model="form.idCard" :placeholder="language==0?'请输入证件号':'Please enter the ID after ah'" />
</el-form-item>
</el-form>
......@@ -58,15 +60,15 @@
</template>
<script setup>
import {aadSceneCustomer, checkSceneCustomer, getMyFriends} from '/@/apiPc/booking'
import {languageFormat} from '/@/viewsPc/seat/utils/language'
import {onMounted, ref} from 'vue'
import {useStorage} from '@vueuse/core/index'
import { aadSceneCustomer, checkSceneCustomer, getMyFriends } from '/@/apiPc/booking'
import { languageFormat } from '/@/viewsPc/seat/utils/language'
import { onMounted, ref } from 'vue'
import { useStorage } from '@vueuse/core/index'
import _ from 'lodash'
import {getCurrentInstance} from '@vue/runtime-core'
import { getCurrentInstance } from '@vue/runtime-core'
const emit = defineEmits(['addPerson'])
const {proxy} = getCurrentInstance()
const { proxy } = getCurrentInstance()
const show = ref(false)
const showAdd = ref(false)
......@@ -96,17 +98,6 @@ const addPeopl = () => {
const addPerson = () => {
const person = _.find(personList.value, (it) => it.id == personId.value)
checkSceneCustomer({
customerId: person.id,
gateType: currParams.gateType
}).then((res) => {
if (res.data == 201) {
proxy.$modal.msgError(language.value == 0 ? '护照只能购买成人票' : 'Passport can only buy adult tickets')
} else if (res.data == 202) {
proxy.$modal.msgError(language.value == 0 ? '此身份证不能购买老人票' : 'This ID cannot buy senior tickets')
} else if (res.data == 203) {
proxy.$modal.msgError(language.value == 0 ? '此身份证不能购买儿童票' : 'This ID cannot buy child tickets')
} else {
show.value = false
emit('addPerson', Object.assign(currParams, {
customerId: person.id,
......@@ -114,8 +105,26 @@ const addPerson = () => {
idcType: person.idcType,
idCard: person.idCard
}))
}
})
// checkSceneCustomer({
// customerId: person.id,
// gateType: currParams.gateType
// }).then((res) => {
// if (res.data == 201) {
// proxy.$modal.msgError(language.value == 0 ? '护照只能购买成人票' : 'Passport can only buy adult tickets')
// } else if (res.data == 202) {
// proxy.$modal.msgError(language.value == 0 ? '此身份证不能购买老人票' : 'This ID cannot buy senior tickets')
// } else if (res.data == 203) {
// proxy.$modal.msgError(language.value == 0 ? '此身份证不能购买儿童票' : 'This ID cannot buy child tickets')
// } else {
// show.value = false
// emit('addPerson', Object.assign(currParams, {
// customerId: person.id,
// name: person.name,
// idcType: person.idcType,
// idCard: person.idCard
// }))
// }
// })
}
const submit = () => {
......@@ -151,7 +160,7 @@ defineExpose({
</script>
<style scoped lang="scss">
<style lang="scss" scoped>
.el-radio-group {
display: block;
}
......
......@@ -125,8 +125,8 @@
<p>
{{ form?.extJson?.atName }}
{{ form?.extJson?.atsName }}
<span v-if="form?.extJson?.sessionType == '1000'">{{ language==0?'日间场':'Day' }}</span>
<span v-else>{{ language==0?'夜间场':'Night' }}</span>
<span v-if="form?.extJson?.sessionType == '1000'">{{ language == 0 ? '日间场' : 'Day' }}</span>
<span v-else>{{ language == 0 ? '夜间场' : 'Night' }}</span>
{{ form?.extJson?.ticketName }}
{{ form?.num }}{{ language == 0 ? '张' : 'Tickets' }}
</p>
......@@ -161,12 +161,13 @@
language == 0 ? '联系方式' : 'Contact Information'
}}{{ form.phone }}
</el-col>
<el-col :lg="8" :md="12" :sm="12" :xs="24"/>
<el-col :lg="8" :md="12" :sm="12" :xs="24" />
</el-row>
<el-row v-if="type == 'car'">
<el-col :lg="12" :md="12" :sm="12" :xs="24">
<div class="st-info">
<div>{{ language == 0 ? '用车时间' : 'Delivery Time' }}{{ form.pickUpBo?.revTime }}</div>
<div>{{ language == 0 ? '用车日期' : 'Delivery Date' }}{{ form.pickUpBo?.revTime }}</div>
<div>{{ language == 0 ? '用车时间' : 'Delivery Time' }}{{ form.pickUpBo?.lvcTimes }}</div>
<!-- <div v-for="(car,index) in form.pickUpBo.carsList" :key="index" class="carLine">-->
<!-- <div v-if="car.num > 0">-->
<!-- <label>{{ car.name }}</label>-->
......@@ -178,15 +179,20 @@
<!-- language == 0 ? '辆' : 'Cars'-->
<!-- }} * {{ language == 0 ? '¥' : '€' }}{{ car.price }}</span>-->
<!-- </div>-->
<div>{{ language == 0 ? '人数' : 'People' }}{{ form.pickUpBo.count }}</div>
<div>{{ language == 0 ? '航班/火车班次' : 'Flight/Train' }}{{ form.pickUpBo.no }}</div>
<div>{{ language == 0 ? '接机/接站地点' : 'Pick-up/Drop-off Place' }}
{{ form.pickUpBo.noAddress }}
<div>{{ language == 0 ? '乘坐人' : 'Contacts' }}
<span v-for="v in form.pickUpBo.customers" :key="v" style="margin-right: 20px">{{ v.name }}</span>
</div>
<div>{{ language == 0 ? '送达地点' : 'Delivery Place' }}{{ form.pickUpBo.deliveryAddress }}</div>
<div>{{ language == 0 ? '人数' : 'People' }}{{ form.pickUpBo.count }}</div>
<!-- <div>{{ language == 0 ? '接机/接站地点' : 'Pick-up/Drop-off Place' }}:-->
<!-- {{ form.pickUpBo.noAddress }}-->
<!-- </div>-->
<!-- <div>{{ language == 0 ? '送达地点' : 'Delivery Place' }}{{ form.pickUpBo.deliveryAddress }}</div>-->
<div>{{ language == 0 ? '联系人' : 'Contact Person' }}{{ form.pickUpBo.contacts }}</div>
<div>{{ language == 0 ? '联系电话' : 'Contact Phone' }}{{ form.pickUpBo.phone }}</div>
<div>{{ language == 0 ? '航班/火车班次' : 'Flight/Train' }}{{ form.pickUpBo.no }}</div>
<div>{{ language == 0 ? '备注' : 'Remarks' }}{{ form.pickUpBo.remarks || '-' }}</div>
</div>
</el-col>
......@@ -266,7 +272,7 @@
</el-row>
<el-row v-if="type == 'ticket'" style="width: 100%">
<el-col :lg="12">
{{ language == 0 ? '联系人' : 'Contact' }}{{form.contacts}}
{{ language == 0 ? '联系人' : 'Contact' }}{{ form.contacts }}
</el-col>
<el-col :lg="12">
{{ language == 0 ? '联系方式' : 'Contact' }}{{ form.phone }}
......@@ -278,8 +284,8 @@
<span class="text-gray">{{ v.idCard }}</span>
</el-col>
<el-col :lg="12" :md="12" :sm="12" :xs="24" class="text-right">
<span class="text-primary" v-if="language == 0 ">{{ form.price }}</span>
<span v-else>{{ form.priceEn || 0}}</span>
<span v-if="language == 0 " class="text-primary">{{ form.price }}</span>
<span v-else>{{ form.priceEn || 0 }}</span>
</el-col>
</el-row>
<el-row style="width: 100%">
......@@ -290,8 +296,7 @@
}}{{ language == 0 ? '张' : 'Tickets' }}
</div>
</el-col>
<el-col :lg="8" :md="12" :sm="12" :xs="24">
</el-col>
<el-col :lg="8" :md="12" :sm="12" :xs="24" />
<el-col :lg="8" :md="12" :sm="12" :xs="24" class="text-right text-warning">
{{ form.paymentType == '1' ? '共计' : 'total' }}:{{
form.paymentType == '1' ? '¥' : '€'
......@@ -363,13 +368,13 @@
</div>
</el-col>
<el-col :lg="24">
<div class="text-center"/>
<div class="text-center" />
</el-col>
</el-row>
</div>
</div>
<div v-else class="pd20 skeletonBox">
<el-skeleton :rows="8"/>
<el-skeleton :rows="8" />
<el-button
:style="language == 0 ?'width:200px':'width:400px'" class="btn-lineG" round size="large"
type="primary" @click="showLogin"
......@@ -483,7 +488,7 @@
<div v-if="form.payDate&&form.viewStatus=='1'">
<div class="text-center">
<el-icon color="#32B16C" size="80">
<SuccessFilled/>
<SuccessFilled />
</el-icon>
<p class="text-success">{{ language == 0 ? '支付成功' : 'successful!' }}</p>
<h3 class="wePrice">{{ language == 0 ? '¥' : '€' }}{{ totalFee || 0 }}</h3>
......@@ -505,7 +510,7 @@
</template>
</el-result>
</div>
<Dialog ref="DialogRef"/>
<Dialog ref="DialogRef" />
<el-dialog
v-model="showSJDialog" :close-on-click-modal="false" :close-on-press-escape="false"
......@@ -514,7 +519,7 @@
<div class="flex">
<el-form-item :label="language==0?'开票人':'Name'">
<div class="flex">
<el-input v-model="lpName" :placeholder="language==0?'请输入开票人':'Please enter your name'"/>
<el-input v-model="lpName" :placeholder="language==0?'请输入开票人':'Please enter your name'" />
<el-button type="primary" @click="submitSJ">{{ language == 0 ? '提交并下载' : 'Submit' }}</el-button>
</div>
</el-form-item>
......@@ -530,22 +535,22 @@
</template>
<script setup>
import {getCurrentInstance, ref} from 'vue'
import {onMounted} from '@vue/runtime-core'
import {useRoute, useRouter} from 'vue-router'
import { getCurrentInstance, ref } from 'vue'
import { onMounted } from '@vue/runtime-core'
import { useRoute, useRouter } from 'vue-router'
import * as booking from '@/apiPc/booking'
import Dialog from '@/viewsPc/booking/component/dailog.vue'
const {proxy} = getCurrentInstance()
const { proxy } = getCurrentInstance()
const route = useRoute()
const router = useRouter()
const payType = ref('2')
const orderId = ref(route.query.orderId)
const matchId = ref()
import useUserStore from '@/store/modules/user'
import {useStorage} from '@vueuse/core/index'
import {ElMessage, ElMessageBox} from 'element-plus'
import { useStorage } from '@vueuse/core/index'
import { ElMessage, ElMessageBox } from 'element-plus'
import {
cancelOrder,
cancelOrder2,
......@@ -618,7 +623,7 @@ function getData() {
form.value = {
pickUpBo: {}
}
return booking.getCarBilldetailbyId({orderId: orderId.value}).then(res => {
return booking.getCarBilldetailbyId({ orderId: orderId.value }).then(res => {
form.value = res.data
if (language.value == 0) {
totalFee.value = res.data.total
......@@ -631,7 +636,7 @@ function getData() {
})
}
if (type.value == 'food') {
return booking.getFoodBilldetailbyId({orderId: orderId.value}).then(res => {
return booking.getFoodBilldetailbyId({ orderId: orderId.value }).then(res => {
if (language.value == 0) {
totalFee.value = res.data.total
} else {
......@@ -644,7 +649,7 @@ function getData() {
})
}
if (type.value == 'hotel') {
return booking.getRoomBilldetailbyId({orderId: orderId.value}).then(res => {
return booking.getRoomBilldetailbyId({ orderId: orderId.value }).then(res => {
if (language.value == 0) {
totalFee.value = res.data.total
} else {
......@@ -677,7 +682,7 @@ function getData() {
// 旅游订单详情
const getTravelOrderInfo = () => {
return booking.getScenicOrderInfo({orderId: orderId.value}).then(res => {
return booking.getScenicOrderInfo({ orderId: orderId.value }).then(res => {
form.value = res.data
totalFee.value = language.value == 0 ? form.value.total : form.value.totalEn
matchId.value = form.value.activeId
......@@ -692,7 +697,7 @@ const getTravelOrderInfo = () => {
// 票务订单详情
async function getTicketOrderInfoFN() {
const res = await getTicketOrderInfo({orderId: orderId.value})
const res = await getTicketOrderInfo({ orderId: orderId.value })
form.value = res.data
form.value.extJson = JSON.parse(form.value.extJson)
try {
......@@ -708,7 +713,7 @@ async function getTicketOrderInfoFN() {
}
async function getDetail(activeId) {
const res = await getTicketInfoByActivityId({activityId: activeId})
const res = await getTicketInfoByActivityId({ activityId: activeId })
matchForm.value = res.data
console.log(matchForm.value)
}
......@@ -720,14 +725,14 @@ function goHome() {
function goPay() {
if (payType.value == '2') {
booking.createWePay({orderId: orderId.value}).then(res => {
booking.createWePay({ orderId: orderId.value }).then(res => {
wePayCodeUrl.value = res.data
hideconfirmbtn.value = true
startforGetData()
})
}
if (payType.value == '3') {
booking.createPalPay({orderId: orderId.value}).then(res => {
booking.createPalPay({ orderId: orderId.value }).then(res => {
if (res.data) {
location.href = res.data
}
......@@ -804,7 +809,7 @@ function showLogin() {
function MakeUpOrder() {
return booking.getMealOrderInfo({orderId: orderId.value}).then(res => {
return booking.getMealOrderInfo({ orderId: orderId.value }).then(res => {
form.value = res.data
totalFee.value = language.value == 0 ? form.value.total : form.value.totalEn
matchId.value = form.value.activeId
......@@ -817,7 +822,7 @@ function MakeUpOrder() {
}
function MakeUpIno() {
booking.getMealOrderInfoByLogex({asmId: form.value.asmId}).then(res => {
booking.getMealOrderInfoByLogex({ asmId: form.value.asmId }).then(res => {
formInfo.value = res.data
console.log(res)
})
......@@ -828,7 +833,7 @@ function MakeUpIno() {
}
function ScenicInfo() {
booking.getLogexScenicVoById({id: form.value.asId}).then(res => {
booking.getLogexScenicVoById({ id: form.value.asId }).then(res => {
formInfo.value = res.data
console.log(res)
}).catch((e) => {
......@@ -839,7 +844,7 @@ function ScenicInfo() {
function photographyOrder() {
return booking.getPhotoOrderInfo({orderId: orderId.value}).then(res => {
return booking.getPhotoOrderInfo({ orderId: orderId.value }).then(res => {
form.value = res.data
totalFee.value = language.value == 0 ? form.value.total : form.value.totalEn
photographyInfo()
......@@ -850,7 +855,7 @@ function photographyOrder() {
}
function photographyInfo() {
booking.getPhotoOrderInfoByLogex({aspId: form.value.aspId}).then(res => {
booking.getPhotoOrderInfoByLogex({ aspId: form.value.aspId }).then(res => {
formInfo.value = res.data
})
// .catch((e) => {
......
<template>
<el-card class="container">
<div v-loading="loading">
<div class="title">
<div class="title father">
{{ languageFormat(language, "订单确认", "Order confirmation") }}
<span class="son" @click="handelUp">{{ language == 0 ? '上一步' : 'Go back' }}</span>
</div>
<div class="content pd20">
<el-row gutter="20">
......@@ -21,12 +22,15 @@
{{ TickForm2.ticketName }}
</div>
<div v-if="TickForm2.ticketType=='0'" class="address">{{ language==0?'剩余数量':'Remaining Quantity' }}{{ leftCount }}</div>
<div v-if="TickForm2.ticketType=='0'" class="address">{{
language == 0 ? '剩余数量' : 'Remaining Quantity'
}}{{ leftCount }}
</div>
</div>
<div class="ticket_info mb20">
<div class="tit_box">
<div class="line"/>
<div class="line" />
<div class="txt">
{{ languageFormat(language, "订票信息", "Ticket Info") }}
</div>
......@@ -37,30 +41,36 @@
<div v-if="TickForm2.ticketType == '1'">
<el-form-item :label="language == 0 ? '桌号' : 'Table'">
<el-popover placement="right" :width="400" trigger="hover">
<template #reference>
<div class="text-primary underline pointer" @click="showImg">
{{ language == 0 ? '查看区域布局' : ' View Area Layout' }}
</div>
</template>
<el-image :src="fillImgUrl(tickImg)" style="width: 100%;"
:preview-src-list="[fillImgUrl(tickImg)]"/>
</el-popover>
<!-- <el-popover :width="400" placement="right" trigger="hover">-->
<!-- <template #reference>-->
<!-- <div class="text-primary underline pointer" @click="showImg">-->
<!-- {{ language == 0 ? '查看区域布局' : ' View Area Layout' }}-->
<!-- </div>-->
<!-- </template>-->
<!-- <el-image-->
<!-- :preview-src-list="[fillImgUrl(tickImg)]" :src="fillImgUrl(tickImg)"-->
<!-- style="width: 100%;"-->
<!-- />-->
<!-- </el-popover>-->
<!-- -->
<el-radio-group v-model="currDesk">
<el-radio-button v-for="(it, index) in deskList" :key="index" :label="it.deskNo" :value="it"
:disabled="it.status!=0"/>
<el-radio-button
v-for="(it, index) in deskList" :key="index" :disabled="it.status!=0" :label="it.deskNo"
:value="it"
/>
</el-radio-group>
</el-form-item>
<el-form-item :label="language == 0 ? '座位号' : 'Seat'">
<el-checkbox-group v-model="currSeat">
<el-checkbox-button v-for="(it, index) in currDesk?.seatList" :key="index" :label="it.seatNo"
:value="it" :disabled="it.status!=0"/>
<el-checkbox-button
v-for="(it, index) in currDesk?.seatList" :key="index" :disabled="it.status!=0"
:label="it.seatNo" :value="it"
/>
</el-checkbox-group>
</el-form-item>
<el-form-item :label="language == 0 ?'已选座位号':'Selected Seat'">
<el-tag class="mr10" v-for="(s,index) in currSeat" :key="s.id" closable @close="delSeat(s,index)">
<el-tag v-for="(s,index) in currSeat" :key="s.id" class="mr10" closable @close="delSeat(s,index)">
{{ s.deskNo }} - {{ s.seatNo }}
</el-tag>
</el-form-item>
......@@ -96,7 +106,7 @@
</div>
<div class="idcard">{{ it.idCard }}</div>
</div>
<el-checkbox :value="it.id" :disabled="!!it.disabled"/>
<el-checkbox :disabled="!!it.disabled" :value="it.id" />
</div>
</el-checkbox-group>
</div>
......@@ -112,7 +122,7 @@
<el-col :lg="8" class="right">
<div class="tit_box">
<div class="line"/>
<div class="line" />
<div class="txt">
{{ languageFormat(language, "订单明细", "Order summary") }}
</div>
......@@ -123,7 +133,7 @@
<div class="time">
{{ language == 0 ? '票价' : 'Cost Ticket' }}
</div>
<p/>
<p />
<div class="ticket">
{{ language == 0 ? TickForm2.price : TickForm2.priceEn }}
<span> {{ language == 0 ? '元' : 'Euro' }}</span>
......@@ -143,6 +153,15 @@
</div>
</div>
</div>
<!-- 场馆布局图-->
<div style="margin-top: 95px">
<el-image
:preview-src-list="[fillImgUrl(tickImg)]"
:src="fillImgUrl(tickImg)"
style="width: 100%;"
/>
</div>
</el-col>
</el-row>
</div>
......@@ -166,7 +185,7 @@
</template>
<script setup>
import {ref, computed, onMounted} from 'vue'
import { ref, computed, onMounted } from 'vue'
import {
customerListApi,
submitOrderTicket,
......@@ -176,12 +195,12 @@ import {
checkPurchasedCustomers,
getDeskInfo
} from '@/apiPc/booking'
import {ElMessage, ElMessageBox} from 'element-plus'
import {languageFormat} from '@/viewsPc/seat/utils/language.js'
import { ElMessage, ElMessageBox } from 'element-plus'
import { languageFormat } from '@/viewsPc/seat/utils/language.js'
import useUserStore from '/@/store/modules/user'
import {useStorage} from '@vueuse/core/index'
import { useStorage } from '@vueuse/core/index'
import _ from 'lodash'
import {useRoute, useRouter} from 'vue-router'
import { useRoute, useRouter } from 'vue-router'
const useStore = useUserStore()
......@@ -243,12 +262,10 @@ onMounted(() => {
getDeskInfo({
atstId: route.params.latstId
}).then(res => {
deskList.value = res.data
deskList.value = res.data?.sort((a, b) => a.deskNo - b.deskNo)
currDesk.value = res.data[0]
})
}
// 普通票
else {
} else { // 普通票
getListByAtstId({
atstId: route.params.latstId
}).then(res => {
......@@ -321,7 +338,7 @@ async function paymentHandle() {
confirmButtonText: language.value == 0 ? '确定' : 'Confirm',
cancelButtonText: language.value == 0 ? '取消' : 'Cancel',
type: 'warning'
}).then(async () => {
}).then(async() => {
try {
const orderCustomerList = []
_.each(orderForm.value.customerIds, (id, index) => {
......@@ -390,7 +407,7 @@ async function paymentHandle() {
}
async function getDetail() {
const res = await getTicketInfoByActivityId({activityId: orderForm.value.activeId})
const res = await getTicketInfoByActivityId({ activityId: orderForm.value.activeId })
TickForm.value = res.data
}
......@@ -401,8 +418,8 @@ function addPeopl() {
})
}
const showImg = () => {
function handelUp() {
router.go(-1)
}
</script>
......@@ -677,6 +694,16 @@ div {
}
}
.father {
position: relative;
}
.son {
position: absolute;
left: 10px;
cursor: pointer
}
@media screen and (max-width: 768px) {
.container {
width: 100%;
......
......@@ -2,7 +2,7 @@
<div>
<!-- top -->
<div class="container top">
<img :src="fillImgUrl(matchForm.ticketImg)" class="cover_img">
<img :src="fillImgUrl(matchForm.ticketImg)" alt="" class="cover_img">
<div class="info">
<div class="title">{{ matchForm.name }}</div>
<div class="time">
......@@ -93,7 +93,7 @@
<span
v-if="currVenue?.images"
style="color: #493ceb;cursor:pointer;font-weight:600;font-size: 14px"
@click="showUrl=currVenue.images; show=true"
@click="handleImage"
> <span style="color: red;font-size: 18px">*</span>
{{
language == 0 ? '点击查看场馆布局' : 'View Venue Layout'
......@@ -140,7 +140,7 @@
<span v-else>{{
language == 0 ? '夜间场' : 'Night'
}}</span>
<!-- {{ key=='1000'?'日间场':'夜间场' }}-->
<!-- {{ key=='1000'?'日间场':'夜间场' }}-->
</div>
</div>
</div>
......@@ -227,8 +227,11 @@
<div class="container bottom">
<div style="display: flex">
<div :class="{'bg':active==1}" class="buBg" @click="active=1">{{ language==0?'购票说明':'Notice' }}</div>
<div :class="{'bg' :active==2}" class="buBg" @click="active=2">{{ language==0?'购票须知':'Instructions' }}</div>
<div :class="{'bg':active==1}" class="buBg" @click="active=1">{{ language == 0 ? '购票说明' : 'Notice' }}</div>
<div :class="{'bg' :active==2}" class="buBg" @click="active=2">{{
language == 0 ? '购票须知' : 'Instructions'
}}
</div>
</div>
<div v-show="active==1" class="rich_content" v-html="matchForm.ticketDes" />
<div v-show="active==2" class="rich_content" v-html="matchForm.ticketNotice" />
......@@ -250,7 +253,8 @@ import {
getTicketListApi,
checkNonPayment,
getStadiumList,
getActivityTypeVoListByLatsId
getActivityTypeVoListByLatsId,
getBaseInfoByActiveId
} from '@/apiPc/booking'
import { dayjs } from 'element-plus'
......@@ -290,6 +294,7 @@ const venueList = ref([])
const tickList = ref([])
const currVenue = ref(null)
const currTick = ref(null)
const matchData = ref({})
watch(show, (val) => {
if (!val) {
......@@ -316,7 +321,7 @@ getTicketList()
async function getTicketList() {
const res = await getTicketListApi({
activityId: activeId.value, isView: 1
activityId: activeId.value, status: 1
})
tickClass.value = res.rows
if (tickClass.value.length > 0) {
......@@ -418,6 +423,20 @@ function toSelectClosed() {
type: 'warning'
})
}
async function getmatchData() {
const res = await getBaseInfoByActiveId(route.params.activeId)
matchData.value = res.data
console.log(res)
}
function handleImage() {
// ticketImg
showUrl.value = matchData.value.ticketLayout
show.value = true
}
getmatchData()
</script>
<style lang="scss" scoped>
......@@ -455,8 +474,8 @@ function toSelectClosed() {
margin-top: 26px;
.cover_img {
width: 390px;
height: 517px;
width: 500px;
height: 667px;
object-fit: fill;
margin-right: 36px;
}
......
<template>
<div>
<div class="box">
<el-card v-loading="loading" class="mt30">
<el-row v-if="form" class="hotel" align="middle" :gutter="20">
<!-- <el-col :span="6">-->
<!-- <img class="w100" :src="fillImgUrl(form.photos?.split(',')[0])"/>-->
<!-- </el-col>-->
<el-col :span="language == 0?16:24">
<h3 class="esp flex">{{ form?.name }}
<div class="starBox ml20">
<img v-for="i in Number(form?.rank||0)" src="@/assets/booking/star.png">
</div>
</h3>
<!-- <div class="tagbox">-->
<!-- <span v-for="(t,index) in form?.label?.split(',')" v-show="index<4">{{ t }}</span>-->
<!-- <a v-show="form?.label?.split(',').length>4">{{ language == 0 ? '更多' : 'MORE' }} ></a>-->
<!-- </div>-->
<!-- top -->
<div class="container top">
<img :src="fillImgUrl(travel.cover)" alt="" class="cover_img" st>
<div class="info">
<el-icon>
<Clock />
</el-icon>
<span class="mr10">{{ language == 0 ? '开园时间' : 'Opening Time' }}{{ form?.startTime }}{{ form?.workTime }}</span>
<div class="title">{{ travel.name }}</div>
<div class="select_item_box">
<div class="label">
{{ triggerLanguage(language, "时间", "Event Date & Time") }} :
</div>
<div class="info">
<el-icon>
<Phone />
</el-icon>
<span class="mr10">{{ language == 0 ? '联系方式' : 'Contact' }}{{ form?.contact }}</span>
</div>
<div class="info esp">
<el-icon>
<MapLocation />
</el-icon>
<span>{{ form?.address }}</span>
<div class="select_item_box">
<div class="select_item">
<div
v-for="(v, index) in travel.dateList"
:key="index"
:class="[
v== selectForm.scenicDate ? 'tagActive' : 'tag',
]"
@click="select(v)"
>
{{ v }}
</div>
<div v-if="form?.introduction" class="info pointer">
<div :class="showAll?'':'esp_2'" @click="showAll=!showAll" v-html="form.introduction.toString()" />
</div>
</el-col>
</el-row>
<el-empty v-else :image="`/img/order_no.png`" :image-size="228" description="" />
</el-card>
<div class="mt30">
<el-row :gutter="20">
<el-col :span="10">
<div class="imgbox hotelImg">
<el-image
:src="fillImgUrl(form?.photos?.split(',')[0])" fit="cover"
:preview-src-list="form?.photos?.split(',')"
</div>
<div>
<!-- 成人票 -->
<br>
<div v-for="v in ticketList" v-show="v.leftNum!=0" :key="v.id">
<div class="select_item_box">
<div class="label ticket">
{{ v.name }} :
</div>
<div class="rowBox">
<span class="titleTick">
{{
triggerLanguage(language, v.price, v.priceEn)
}}
{{
triggerLanguage(language, '¥/人', '€/person')
}}
</span>
<el-input-number
v-model="v.count" :max="v.leftNum" :min="0" :precision="0" class="inputNumber"
@change="countTotal"
/>
<i class="residue">{{ language == 0 ? '剩余票数' : 'Remaining votes' }}{{ v.leftNum }}</i>
</div>
</el-col>
<el-col :span="14">
<el-row class="h100" :gutter="20">
<el-col v-for="(p,index) in form?.photos?.split(',').slice(1,7)" :key="index" :span="8" class="oddmb">
<div class="imgbox hotelImg">
<el-image :src="fillImgUrl(p)" fit="cover" />
</div>
</el-col>
</el-row>
</el-col>
</el-row>
</div>
<el-card class="mt30 mb60">
<div class="lineHead">
<ul>
<li>
{{ language == 0 ? '选择日期' : 'tickets type' }}
</li>
</ul>
<!-- 价格 -->
<div class="select_item_box">
<div class="label">
{{ triggerLanguage(language, '价格', "Price") }} :
</div>
<div>
<!-- 日期-->
<el-calendar v-model="currentDate" class="mt20" :range="calendarRange">
<template #header="{date}">
<el-row style="width: 100%">
<el-col :lg="7" class="forPc" />
<el-col :lg="10" class="forPc">
<el-row justify="center" align="middle">
<!-- <div class="canBtn"><el-icon><ArrowLeftBold /></el-icon></div>-->
<div class="cTitle">
<!-- <el-date-picker-->
<!-- v-model="value2"-->
<!-- type="daterange"-->
<!-- range-separator="-"-->
<!-- start-placeholder="Start date"-->
<!-- end-placeholder="End date"-->
<!-- format="YYYY-MM-DD"-->
<!-- value-format="YYYY-MM-DD"-->
<!-- size="small"-->
<!-- @change="changee"-->
<!-- />-->
<!-- <el-input readonly :value="date" type="text" size="small" style="width: 280px"></el-input>-->
{{ date }}
</div>
<!-- <div class="canBtn"><el-icon><ArrowRightBold /></el-icon></div>-->
</el-row>
</el-col>
<el-col :lg="7" :xs="24">
<div style="text-align: right;padding-right: 10px">
<el-date-picker
v-model="currentDate1"
type="date"
placeholder="YYYY-MM-DD"
format="YYYY-MM-DD"
:disabled-date="disabledDateRZ"
:clearable="false"
@change="dateChange"
/>
<div class="select_item_box">
<div class="select_item">
<div class="tagActive" style="min-width: 80px">
{{ language == 0 ? '¥' : '€' }} {{ language == 0 ? selectForm.price : selectForm.priceEn }}
</div>
</div>
</div>
<!-- 购票备注-->
<div v-if="matchForm.ticketRemark" class="select_item_box">
<div class="label">
{{
triggerLanguage(language, '购票备注', "Ticket Purchase Note")
}} :
</div>
</el-col>
</el-row>
</template>
<template #date-cell="data">
<div :class="data.data.day==query.currentDate?'primaryDate date':'date'" @click="selectDate(data.data.day)">
{{ data.data.day.slice(8, 10) }}
</div>
</template>
</el-calendar>
<div v-if="matchForm.ticketRemark" class="select_item_box">
<div class="select_item">
{{ matchForm.ticketRemark }}
</div>
</div>
<div class="text-center mt30">
<el-button
style="color: #fff" size="large"
class="w200px btn-lineG" :class="{'forbid':!(!hotTime[0])}" round @click="goOrder"
<div
v-if="endTime<=0" class="btn" style="margin-left: 40px;opacity: 0.5;cursor: not-allowed;margin-top: 10px"
@click="toSelectClosed"
>
<span v-if="btnDisable">{{ language==0?'不在预定时间内':'OUT OF ORDER TIME' }}</span>
<span v-else>{{ language==0?'立即预订':'BOOK NOW' }}</span>
</el-button>
{{
triggerLanguage(language, "售票结束", "Sale closed")
}}
</div>
<div v-else class="btn" style="margin-left: 40px;margin-top: 10px" @click="toSelectSeat()">
{{
triggerLanguage(language, "立即购票", "Buy tickets now")
}}
</div>
</div>
</div>
</div>
<div class="container bottom">
<div style="display: flex">
<div :class="{'bg':active==1}" class="buBg" @click="active=1">{{ language == 0 ? '购票说明' : 'Notice' }}</div>
<div :class="{'bg' :active==2}" class="buBg" @click="active=2">{{
language == 0 ? '购票须知' : 'Instructions'
}}
</div>
</div>
<div v-show="active==1" class="rich_content" v-html="travel.descriptions" />
<div v-show="active==2" class="rich_content" v-html="travel.notice" />
<el-dialog v-model="show" title="" width="1000px">
<div>
<img :src="fillImgUrl(showUrl)" alt="" style="width: 100%">
</div>
</el-card>
</el-dialog>
</div>
</div>
</template>
<script setup>
import { useRouter } from 'vue-router'
import { ref, onMounted, computed } from 'vue'
import { useRoute } from 'vue-router'
import { dayjs } from 'element-plus'
import { getScenicById, checkOrderPay } from '@/apiPc/booking'
import { getBaseInfoByActiveId } from '@/apiPc/booking'
import { ref, computed, onMounted } from 'vue'
import * as booking from '@/apiPc/booking'
import { useStorage } from '@vueuse/core/index'
import { ElMessageBox } from 'element-plus'
const currentDate = ref(new Date())
const currentDate1 = ref(new Date())
const calendarRange = ref([dayjs(currentDate.value).toDate(), (dayjs(currentDate.value).toDate())])
import { fillImgUrl } from '/@/utils/ruoyi'
import useUserStore from '/@/store/modules/user'
import { triggerLanguage } from '@/utils/ruoyi'
import { useStorage } from '@vueuse/core/index'
import { useRoute, useRouter } from 'vue-router'
import { getCurrentInstance } from '@vue/runtime-core'
const language = useStorage('language', 0)
const router = useRouter()
const useStore = useUserStore()
const user = computed(() => useUserStore().user)
const route = useRoute()
const form = ref({})
const query = ref({
lasId: route.query.lasId
const router = useRouter()
const show = ref(false)
const showUrl = ref('')
const activeId = ref(route.params.activeId)
const active = ref(1)
const timeData = ref()
const endTime = ref()
const matchForm = ref({})
const selectForm = ref({
latsId: null,
scenicDate: '',
price: '--',
priceEn: '--'
})
const hotTime = ref([])
const showAll = ref(false)
const loading = ref(false)
const formTime = ref({})
const { proxy } = getCurrentInstance()
const travel = ref({})
const ticketList = ref([])
onMounted(() => {
getBaseInfoByActiveId(route.params.cptId).then(res => {
formTime.value = res.data || null
}).catch(err => {
console.log(err)
formTime.value = null
}).finally(() => {
console.log(formTime.value)
getData()
})
getLogexScenicVoById()
})
function getData() {
loading.value = true
getScenicById(route.params.scenicId).then(res => {
loading.value = false
form.value = res.data
// initMap()
}).catch(err => {
console.log(err)
async function getLogexScenicVoById() {
const res = await booking.getLogexScenicVoById({ id: activeId.value })
travel.value = res.data
selectForm.value.latsId = travel.value.id
if (travel.value.dateList && travel.value.dateList.length > 0) {
selectForm.value.scenicDate = travel.value.dateList[0]
await getGateListByLasId()
}
}
async function getGateListByLasId() {
const res = await booking.getGateListByLasId({
latsId: selectForm.value.latsId,
scenicDate: selectForm.value.scenicDate
})
ticketList.value = res.data
for (const v of ticketList.value) {
v.leftNum = v.num - v.orderCount
v.count = 0
}
}
function dateChange() {
currentDate.value = currentDate1.value
calendarRange.value = [dayjs(currentDate.value).toDate(), (dayjs(currentDate.value).toDate())]
function select(v) {
selectForm.value.scenicDate = v
selectForm.value.price = '--'
selectForm.value.priceEn = '--'
getGateListByLasId()
}
function selectDate(date) {
query.value.currentDate = date
currentDate1.value = currentDate.value = dayjs(date).toDate()
console.log(date)
function countTotal() {
let price = 0
let priceEn = 0
for (const val of ticketList.value) {
if (val.count > 0) {
price += val.price * val.count
priceEn += val.priceEn * val.count
val.personArr = [...new Array(val.count).fill({
customerId: '',
name: '',
idcType: '',
idCard: ''
})]
}
}
selectForm.value.price = price
selectForm.value.priceEn = priceEn
}
const btnDisable = computed(() => {
if (formTime.value.scenicStart) {
const curr = currentDate.value.valueOf()
const today = dayjs(dayjs().format('YYYY-MM-DD')).valueOf()
const start = dayjs(formTime.value.scenicStart).valueOf()
const end = dayjs(formTime.value.scenicEnd).valueOf()
if (curr >= start && curr <= end && curr >= today) {
return false
}
async function toSelectSeat() {
if (!user.value) {
useStore.setVisitor()
return
}
return true
})
function goOrder() {
if(btnDisable.value){
if (!selectForm.value.scenicDate) {
await proxy.$modal.confirm(language.value == 0 ? '请选择日期' : 'Please select a date')
return
}
ElMessageBox.confirm(language.value == 0 ? `你当前选择的出行日期为${dayjs(currentDate.value).format('YYYY-MM-DD')}是否确定?` : `Your current check-in time is ${dayjs(currentDate.value).format('YYYY-MM-DD')} Are you sure?`, { type: 'warning' }).then({}).then(() => {
checkOrderPay(6).then(res => {
if (res.data == -100) {
ElMessageBox.confirm(
language.value == 0 ? '你有未支付的旅游预订,是否前往个人中心查看' : 'You already have an unpaid travel order, do you want to go to the personal center to check it?',
language.value == 0 ? '提示' : 'Warning',
{
confirmButtonText: language.value == 1 ? 'Go My Reservation ' : '前往我的预订',
// cancelButtonText: language.value==1?'Continue to book':'继续预订',
type: 'warning'
if (!selectForm.value.price == '--' || selectForm.value.price == '--') {
await proxy.$modal.confirm(language.value == 0 ? '请选择购票数量' : 'Please select the number of tickets to purchase')
return
}
).then((res) => {
console.log(res)
router.push({
await checkOrderPay()
}
async function checkOrderPay() {
const res = await booking.checkOrderPay(8)
if (res.data == -100) {
await proxy.$modal.confirm(language.value == 0 ? '你有未支付的旅游预订,是否前往个人中心查看?' : 'You already have an unpaid travel order, do you want to go to the personal center to check it?')
await router.push({
name: 'myReservation'
})
})
return
}
} else {
goNext()
})
})
}
}
function goNext() {
router.push({
name: 'travelOrder',
params: {
start: dayjs(currentDate.value).format('YYYY-MM-DD')
start: selectForm.value.scenicDate
},
query: {
lasId: query.value.lasId
lasId: selectForm.value.latsId,
item: encodeURIComponent(JSON.stringify(ticketList.value))
}
})
}
function disabledDateRZ(date) {
// 判读今天大与form.value.hqStart
if (formTime.value.scenicStart) {
const today = dayjs().format('YYYY-MM-DD')
if (formTime.value.scenicStart < today) {
return !((date.getTime() >= dayjs(today).valueOf()) && (date.getTime() <= dayjs(formTime.value.scenicEnd).valueOf()))
} else {
return !((date.getTime() >= dayjs(formTime.value.scenicStart).valueOf()) && (date.getTime() <= dayjs(formTime.value.scenicEnd).valueOf()))
}
}
function toSelectClosed() {
ElMessageBox.confirm(language.value == 0 ? '售票结束' : 'Sale closed', language.value == 0 ? '提示' : 'Tips', {
confirmButtonText: language.value == 0 ? '确定' : 'OK',
cancelButtonText: language.value == 0 ? '取消' : 'Cancel',
type: 'warning'
})
}
</script>
<style scoped lang="scss">
.room {
background: #FAFBFD;
margin: 20px 0 0;
padding: 20px;
border: 1px solid #E5E5E5;
<style lang="scss" scoped>
.forWei {
display: none
}
.name {
font-size: 20px;
margin: 0 0 10px;
}
.buBg {
cursor: pointer;
font-size: 18px;
padding: 8px 13px;
border-radius: 5px;
margin-right: 10px;
}
.roomImg {
aspect-ratio: 16/9;
border-radius: 10px;
overflow: hidden;
.bg {
background: linear-gradient(270deg, #493ceb 0%, #8623fc 100%);
color: #fff;
}
img {
.container {
width: 1200px;
margin: 0 auto;
background-color: #fff;
box-shadow: 0 0 46px 0 rgba(1, 16, 64, 0.08);
border-radius: 8px;
box-sizing: border-box;
font-family: SourceHanSansCN, SourceHanSansCN;
padding-bottom: 20px;
}
.top {
display: flex;
padding: 19px;
margin-top: 26px;
.cover_img {
width: 500px;
height: 667px;
object-fit: fill;
margin-right: 36px;
}
.info {
padding-top: 12px;
width: 100%;
object-fit: cover;
object-position: center;
height: 100%;
.title {
font-weight: bold;
font-size: 28px;
color: #000000;
line-height: 1.6;
margin-bottom: 15px;
}
.time {
font-weight: 600;
font-size: 16px;
color: #000;
line-height: 24px;
margin-bottom: 16px;
}
.price {
color: #FF8124;
font-size: 24px;
.address {
font-weight: 600;
font-size: 16px;
color: #000;
line-height: 24px;
margin-bottom: 15px;
}
span {
font-size: 36px;
font-family: "DIN Alternate"
.select_item_box {
display: flex;
margin-bottom: 10px;
&:last-child {
margin-bottom: 0;
}
.label {
font-weight: 600;
font-size: 16px;
color: #000;
line-height: 24px;
margin-right: 12px;
flex-shrink: 0;
}
.bg-lineg {
margin: auto;
border-radius: 10px;
text-align: center;
padding: 7px 2px 2px;
font-size: 24px;
width: 66px;
.ticket {
height: 40px;
line-height: 40px;
width: 100px;
}
.rowBox {
display: flex;
.titleTick {
color: #493ceb;
cursor: pointer;
font-weight: 600;
font-size: 18px;
margin-right: 30px;
height: 40px;
line-height: 40px;
width: 180px;
//text-align: center;
}
div {
background: #fff;
font-size: 13px;
border-radius: 20px;
padding: 0 10px;
color: #453DEA;
font-weight: 500;
.inputNumber {
height: 35px;
margin: 2.5px;
}
.residue {
height: 40px;
line-height: 40px;
font-size: 14px;
color: orange;
margin-left: 10px;
}
}
.hotel {
h3 {
margin: 0 0 20px;
}
img.w100 {
object-fit: cover;
aspect-ratio: 16/9
.forbid {
opacity: 0.5 !important;
cursor: not-allowed !important;
}
.addr {
font-size: 16px;
color: #929AA0;
.select_item {
display: flex;
flex-wrap: wrap;
gap: 10px;
user-select: none;
.tag_t {
padding: 1px 15px;
font-weight: 400;
font-size: 14px;
color: #493ceb;
border-radius: 6px;
border: 1px solid #453dea;
margin-left: 5px;
}
.tag {
display: flex;
padding: 12px 18px;
background: #eeeeee;
border-radius: 4px;
border: 1px solid #29343c;
font-size: 14px;
color: #4a4a4a;
cursor: pointer;
}
.price {
margin: 0 0 25px;
color: #FF8124;
font-size: 18px;
.tagActive {
display: flex;
padding: 12px 18px;
background: #fff;
border-radius: 4px;
border: 1px solid #493ceb;
font-size: 14px;
color: #493ceb;
cursor: pointer;
}
span {
font-size: 24px;
margin: 0 8px;
font-family: 'DINAlternate-Bold';
font-weight: 600;
.tao {
border: 1px solid #493ceb;
font-size: 14px;
color: #493ceb;
margin-left: 10px;
}
i {
font-style: normal;
color: #929AA0;
.tagDisabled {
padding: 12px 18px;
background: #878787;
border-radius: 4px;
border: 1px solid #29343c;
font-size: 14px;
color: #4a4a4a;
cursor: no-drop;
}
}
}
}
:deep(.button) {
display: block;
height: 55px;
width: auto;
color: #fff;
.btn {
width: 175px;
height: 40px;
background: linear-gradient(270deg, #493ceb 0%, #8623fc 100%);
border-radius: 20px;
line-height: 40px;
text-align: center;
font-weight: 500;
font-size: 16px;
color: #ffffff;
cursor: pointer;
}
}
}
span {
display: block !important;
.bottom {
padding: 50px;
margin-top: 30px;
margin-bottom: 30px;
div {
margin-top: 3px;
.title {
padding: 20px 30px;
background: linear-gradient(270deg, #493ceb 0%, #8623fc 100%);
font-weight: bold;
font-size: 20px;
color: #ffffff;
line-height: 30px;
margin-bottom: 30px;
}
.rich_content {
margin-top: 30px;
:deep(img) {
width: 100% !important;
height: auto !important;
}
}
}
.starBox {
img {
display: inline-block;
margin-right: 4px
@media screen and (max-width: 768px) {
.container {
width: 100%;
}
.forWei {
display: block
}
.top {
//transform: scale(0.5);transform-origin: left top;
.cover_img {
width: 120px;
height: 160px;
margin-right: 15px;
}
}
.tagbox {
margin: 15px 0;
.info {
padding: 0;
a {
color: #AFB5B9;
font-size: 12px;
.title {
font-size: 14px;
margin: 0;
}
span {
border-radius: 13px;
.time, .address, .label, .tip {
font-size: 12px;
padding: 4px 10px;
margin-right: 10px;
font-weight: 400;
}
span:nth-child(4n) {
background: rgba(50, 177, 108, 0.2);
color: rgba(50, 177, 108, 1);
.title, .time, .address, .tip, .select_item_box {
margin-bottom: 3px;
}
span:nth-child(4n+1) {
background: rgba(243, 152, 0, 0.2);
color: rgba(243, 152, 0, 1);
.select_item_box {
.label {
font-size: 12px;
}
span:nth-child(4n+2) {
background: rgba(0, 160, 233, 0.2);
color: rgba(0, 160, 233, 1);
.select_item .tag {
padding: 2px 10px;
font-size: 12px;
}
span:nth-child(4n+3) {
background: rgba(247, 64, 166, 0.2);
color: rgba(247, 64, 166, 1);
.select_item .tagActive {
padding: 2px 10px;
font-size: 12px;
}
}
.mapBox {
position: relative;
overflow: hidden;
height: 200px;
#map {
position: relative;
left: -70px;
width: calc(100% + 160px);
.select_item .tagDisabled {
padding: 2px 10px;
font-size: 12px;
}
}
}
.hotelImg {
border-radius: 10px;
overflow: hidden;
aspect-ratio: 16/9;
img {
object-fit: cover;
object-position: center;
width: 100%;
height: 100%;
.btn {
display: inline-block;
margin: 10px 0 0;
background: linear-gradient(270deg, #493ceb 0%, #8623fc 100%);
border-radius: 20px;
line-height: 40px;
text-align: center;
font-weight: 500;
font-size: 16px;
color: #ffffff;
cursor: pointer;
}
}
}
.bottom {
padding: 0
}
}
.info {
font-weight: 400;
font-size: 14px;
color: #929AA0;
.el-icon {
margin-right: 5px;
}
}
.oddmb:nth-child(2) {
margin-bottom: 20px;
.countDownTitle {
text-align: center;
color: #000;
position: relative;
width: 100%;
left: 0;
font-size: 28px;
}
.forbid {
cursor: not-allowed !important;
filter:grayscale(0.4);opacity: 0.7;
.countDownTitle span {
background: #fff;
padding: 0 10px;
position: relative;
z-index: 1;
}
.forbid:hover {
box-shadow: none;
.countDownTitle::after {
position: absolute;
background: #ccc;
height: 1px;
content: '';
top: 0;
bottom: 0;
margin: auto;
width: 100%;
left: 0;
}
.lineHead{display: flex;justify-content: space-between;}
.el-calendar {
--el-calendar-border: none;
--el-calendar-cell-width: 40px;
.van-count-down {
text-align: center;
--el-text-color-regular: #8E8D94;
:deep(.el-calendar__header) {
margin: 20px 0;
display: flex;
justify-content: center;
padding: 0 0 10px
}
:deep(.el-calendar__body) {
border: 1px solid #F0F0F0;
padding: 0
}
:deep(.el-calendar-table .el-calendar-day) {
padding: 1px;
}
:deep(.el-calendar-table td.is-selected) {
background: transparent;
}
:deep(.el-calendar__button-group) {
display: none;
}
}
:deep(.el-calendar-table thead th) {
padding: 5px 0 0
}
.colon {
display: inline-block;
font-size: 20px;
height: 110px;
line-height: 110px;
margin: 0 8px;
color: #7B7F83;
}
.primaryDate {
.block {
display: inline-block;
opacity: 0.7;
width: 100px;
height: 110px;
line-height: 110px;
color: #fff;
background: linear-gradient(90deg, #8623FC, #453DEA);
}
.date {
margin: auto;
border-radius: 50%;
width: 30px;
height: 30px;
line-height: 30px;
font-size: 35px;
font-weight: bold;
}
border-radius: 10px;
background: url(@/assets/img/djs_bg.png) left;
background-size: 100% 100%;
text-align: center;
}
</style>
......
<template>
<div>
<div class="box">
<el-card v-loading="loading" class="mt30">
<el-row v-if="form" :gutter="20" align="middle" class="hotel">
<!-- <el-col :span="6">-->
<!-- <img class="w100" :src="fillImgUrl(form.photos?.split(',')[0])"/>-->
<!-- </el-col>-->
<el-col :span="language == 0?16:24">
<h3 class="esp flex">{{ form?.name }}
<div class="starBox ml20">
<img v-for="i in Number(form?.rank||0)" src="@/assets/booking/star.png">
</div>
</h3>
<!-- <div class="tagbox">-->
<!-- <span v-for="(t,index) in form?.label?.split(',')" v-show="index<4">{{ t }}</span>-->
<!-- <a v-show="form?.label?.split(',').length>4">{{ language == 0 ? '更多' : 'MORE' }} ></a>-->
<!-- </div>-->
<div class="info">
<el-icon>
<Clock />
</el-icon>
<span class="mr10">{{ language == 0 ? '开园时间' : 'Opening Time' }}{{
form?.startTime
}}{{ form?.workTime }}</span>
</div>
<div class="info">
<el-icon>
<Phone />
</el-icon>
<span class="mr10">{{ language == 0 ? '联系方式' : 'Contact' }}{{ form?.contact }}</span>
</div>
<div class="info esp">
<el-icon>
<MapLocation />
</el-icon>
<span>{{ form?.address }}</span>
</div>
<div v-if="form?.introduction" class="info pointer">
<div :class="showAll?'':'esp_2'" @click="showAll=!showAll" v-html="form.introduction.toString()" />
</div>
</el-col>
</el-row>
<el-empty v-else :image="`/img/order_no.png`" :image-size="228" description="" />
</el-card>
<div class="mt30">
<el-row :gutter="20">
<el-col :span="10">
<div class="imgbox hotelImg">
<el-image
:preview-src-list="form?.photos?.split(',')" :src="fillImgUrl(form?.photos?.split(',')[0])"
fit="cover"
/>
</div>
</el-col>
<el-col :span="14">
<el-row :gutter="20" class="h100">
<el-col v-for="(p,index) in form?.photos?.split(',').slice(1,7)" :key="index" :span="8" class="oddmb">
<div class="imgbox hotelImg">
<el-image :src="fillImgUrl(p)" fit="cover" />
</div>
</el-col>
</el-row>
</el-col>
</el-row>
</div>
<el-card class="mt30 mb60">
<div class="lineHead">
<ul>
<li>
{{ language == 0 ? '选择日期' : 'tickets type' }}
</li>
</ul>
</div>
<div>
<!-- 日期-->
<el-calendar v-model="currentDate" :range="calendarRange" class="mt20">
<template #header="{date}">
<el-row style="width: 100%">
<el-col :lg="7" class="forPc" />
<el-col :lg="10" class="forPc">
<el-row align="middle" justify="center">
<!-- <div class="canBtn"><el-icon><ArrowLeftBold /></el-icon></div>-->
<div class="cTitle">
<!-- <el-date-picker-->
<!-- v-model="value2"-->
<!-- type="daterange"-->
<!-- range-separator="-"-->
<!-- start-placeholder="Start date"-->
<!-- end-placeholder="End date"-->
<!-- format="YYYY-MM-DD"-->
<!-- value-format="YYYY-MM-DD"-->
<!-- size="small"-->
<!-- @change="changee"-->
<!-- />-->
<!-- <el-input readonly :value="date" type="text" size="small" style="width: 280px"></el-input>-->
{{ date }}
</div>
<!-- <div class="canBtn"><el-icon><ArrowRightBold /></el-icon></div>-->
</el-row>
</el-col>
<el-col :lg="7" :xs="24">
<div style="text-align: right;padding-right: 10px">
<el-date-picker
v-model="currentDate1"
:clearable="false"
:disabled-date="disabledDateRZ"
format="YYYY-MM-DD"
placeholder="YYYY-MM-DD"
type="date"
@change="dateChange"
/>
</div>
</el-col>
</el-row>
</template>
<template #date-cell="data">
<div
:class="data.data.day==query.currentDate?'primaryDate date':'date'"
@click="selectDate(data.data.day)"
>
{{ data.data.day.slice(8, 10) }}
</div>
</template>
</el-calendar>
</div>
<div class="text-center mt30">
<el-button
:class="{'forbid':!(!hotTime[0])}" class="w200px btn-lineG"
round size="large" style="color: #fff" @click="goOrder"
>
<span v-if="btnDisable">{{ language == 0 ? '不在预定时间内' : 'OUT OF ORDER TIME' }}</span>
<span v-else>{{ language == 0 ? '立即预订' : 'BOOK NOW' }}</span>
</el-button>
</div>
</el-card>
</div>
</div>
</template>
<script setup>
import { useRouter } from 'vue-router'
import { ref, onMounted, computed } from 'vue'
import { useRoute } from 'vue-router'
import { dayjs } from 'element-plus'
import { getScenicById, checkOrderPay } from '@/apiPc/booking'
import { getBaseInfoByActiveId } from '@/apiPc/booking'
import { useStorage } from '@vueuse/core/index'
import { ElMessageBox } from 'element-plus'
const currentDate = ref(new Date())
const currentDate1 = ref(new Date())
const calendarRange = ref([dayjs(currentDate.value).toDate(), (dayjs(currentDate.value).toDate())])
const language = useStorage('language', 0)
const router = useRouter()
const route = useRoute()
const form = ref({})
const query = ref({
lasId: route.query.lasId
})
const hotTime = ref([])
const showAll = ref(false)
const loading = ref(false)
const formTime = ref({})
onMounted(() => {
getBaseInfoByActiveId(route.params.cptId).then(res => {
formTime.value = res.data || null
}).catch(err => {
console.log(err)
formTime.value = null
}).finally(() => {
console.log(formTime.value)
getData()
})
})
function getData() {
loading.value = true
getScenicById(route.params.scenicId).then(res => {
loading.value = false
form.value = res.data
// initMap()
}).catch(err => {
console.log(err)
})
}
function dateChange() {
currentDate.value = currentDate1.value
calendarRange.value = [dayjs(currentDate.value).toDate(), (dayjs(currentDate.value).toDate())]
}
function selectDate(date) {
query.value.currentDate = date
currentDate1.value = currentDate.value = dayjs(date).toDate()
console.log(date)
}
const btnDisable = computed(() => {
if (formTime.value.scenicStart) {
const curr = currentDate.value.valueOf()
const today = dayjs(dayjs().format('YYYY-MM-DD')).valueOf()
const start = dayjs(formTime.value.scenicStart).valueOf()
const end = dayjs(formTime.value.scenicEnd).valueOf()
if (curr >= start && curr <= end && curr >= today) {
return false
}
}
return true
})
function goOrder() {
if (btnDisable.value) {
return
}
ElMessageBox.confirm(language.value == 0 ? `你当前选择的出行日期为${dayjs(currentDate.value).format('YYYY-MM-DD')}是否确定?` : `Your current check-in time is ${dayjs(currentDate.value).format('YYYY-MM-DD')} Are you sure?`, { type: 'warning' }).then({}).then(() => {
checkOrderPay(6).then(res => {
if (res.data == -100) {
ElMessageBox.confirm(
language.value == 0 ? '你有未支付的旅游预订,是否前往个人中心查看' : 'You already have an unpaid travel order, do you want to go to the personal center to check it?',
language.value == 0 ? '提示' : 'Warning',
{
confirmButtonText: language.value == 1 ? 'Go My Reservation ' : '前往我的预订',
// cancelButtonText: language.value==1?'Continue to book':'继续预订',
type: 'warning'
}
).then((res) => {
console.log(res)
router.push({
name: 'myReservation'
})
})
return
}
goNext()
})
})
}
function goNext() {
router.push({
name: 'travelOrder',
params: {
start: dayjs(currentDate.value).format('YYYY-MM-DD')
},
query: {
lasId: query.value.lasId
}
})
}
function disabledDateRZ(date) {
// 判读今天大与form.value.hqStart
if (formTime.value.scenicStart) {
const today = dayjs().format('YYYY-MM-DD')
if (formTime.value.scenicStart < today) {
return !((date.getTime() >= dayjs(today).valueOf()) && (date.getTime() <= dayjs(formTime.value.scenicEnd).valueOf()))
} else {
return !((date.getTime() >= dayjs(formTime.value.scenicStart).valueOf()) && (date.getTime() <= dayjs(formTime.value.scenicEnd).valueOf()))
}
}
}
</script>
<style lang="scss" scoped>
.room {
background: #FAFBFD;
margin: 20px 0 0;
padding: 20px;
border: 1px solid #E5E5E5;
.name {
font-size: 20px;
margin: 0 0 10px;
}
.roomImg {
aspect-ratio: 16/9;
border-radius: 10px;
overflow: hidden;
img {
width: 100%;
object-fit: cover;
object-position: center;
height: 100%;
}
}
.price {
color: #FF8124;
font-size: 24px;
span {
font-size: 36px;
font-family: "DIN Alternate"
}
}
.bg-lineg {
margin: auto;
border-radius: 10px;
text-align: center;
padding: 7px 2px 2px;
font-size: 24px;
width: 66px;
cursor: pointer;
div {
background: #fff;
font-size: 13px;
border-radius: 20px;
padding: 0 10px;
color: #453DEA;
font-weight: 500;
}
}
}
.hotel {
h3 {
margin: 0 0 20px;
}
img.w100 {
object-fit: cover;
aspect-ratio: 16/9
}
.addr {
font-size: 16px;
color: #929AA0;
font-weight: 400;
}
.price {
margin: 0 0 25px;
color: #FF8124;
font-size: 18px;
span {
font-size: 24px;
margin: 0 8px;
font-family: 'DINAlternate-Bold';
font-weight: 600;
}
i {
font-style: normal;
color: #929AA0;
}
}
}
:deep(.button) {
display: block;
height: 55px;
width: auto;
color: #fff;
span {
display: block !important;
div {
margin-top: 3px;
}
}
}
.starBox {
img {
display: inline-block;
margin-right: 4px
}
}
.tagbox {
margin: 15px 0;
a {
color: #AFB5B9;
font-size: 12px;
}
span {
border-radius: 13px;
font-size: 12px;
padding: 4px 10px;
margin-right: 10px;
font-weight: 400;
}
span:nth-child(4n) {
background: rgba(50, 177, 108, 0.2);
color: rgba(50, 177, 108, 1);
}
span:nth-child(4n+1) {
background: rgba(243, 152, 0, 0.2);
color: rgba(243, 152, 0, 1);
}
span:nth-child(4n+2) {
background: rgba(0, 160, 233, 0.2);
color: rgba(0, 160, 233, 1);
}
span:nth-child(4n+3) {
background: rgba(247, 64, 166, 0.2);
color: rgba(247, 64, 166, 1);
}
}
.mapBox {
position: relative;
overflow: hidden;
height: 200px;
#map {
position: relative;
left: -70px;
width: calc(100% + 160px);
}
}
.hotelImg {
border-radius: 10px;
overflow: hidden;
aspect-ratio: 16/9;
img {
object-fit: cover;
object-position: center;
width: 100%;
height: 100%;
}
}
.info {
font-weight: 400;
font-size: 14px;
color: #929AA0;
.el-icon {
margin-right: 5px;
}
}
.oddmb:nth-child(2) {
margin-bottom: 20px;
}
.forbid {
cursor: not-allowed !important;
filter: grayscale(0.4);
opacity: 0.7;
}
.forbid:hover {
box-shadow: none;
}
.lineHead {
display: flex;
justify-content: space-between;
}
.el-calendar {
--el-calendar-border: none;
--el-calendar-cell-width: 40px;
text-align: center;
--el-text-color-regular: #8E8D94;
:deep(.el-calendar__header) {
justify-content: center;
padding: 0 0 10px
}
:deep(.el-calendar__body) {
border: 1px solid #F0F0F0;
padding: 0
}
:deep(.el-calendar-table .el-calendar-day) {
padding: 1px;
}
:deep(.el-calendar-table td.is-selected) {
background: transparent;
}
:deep(.el-calendar__button-group) {
display: none;
}
:deep(.el-calendar-table thead th) {
padding: 5px 0 0
}
.primaryDate {
color: #fff;
background: linear-gradient(90deg, #8623FC, #453DEA);
}
.date {
margin: auto;
border-radius: 50%;
width: 30px;
height: 30px;
line-height: 30px;
font-weight: bold;
}
}
</style>
......@@ -3,26 +3,27 @@
<div class="box">
<el-card :body-style="{ padding: '0px' }" class="mt20">
<div slot="header">
<div class="bg-lineg">{{ language == 0 ? '旅游服务下单' : 'Hotel booking order' }}</div>
<div class="bg-lineg father">{{ language == 0 ? '旅游服务下单' : 'Hotel booking order' }}
<sapn class="son" @click="handleGo">{{ language == 0 ? '上一步' : 'Back go' }}</sapn>
</div>
</div>
<!-- {{room}}-->
<el-row class="pd20" :gutter="20">
<el-row :gutter="20" class="pd20">
<el-col :span="14">
<div class="border-info">
<el-row class="hotel" align="middle" :gutter="20">
<!-- <el-col :span="6">-->
<!-- <img class="w100" :src="fillImgUrl(form.photos?.split(',')[0])"/>-->
<!-- </el-col>-->
<el-row :gutter="20" align="middle" class="hote ">
<el-col :span="language == 0?16:24">
<h3 class="esp flex">{{ scenicItem?.name }}
<el-tag effect="dark" class="ml20">{{ scenicItem?.rank||0 }}A</el-tag>
<el-tag class="ml20" effect="dark">{{ scenicItem?.rank || 0 }}A</el-tag>
</h3>
<div class="info">
<el-icon>
<Clock />
</el-icon>
<span class="mr10">{{ language == 0 ? '开园时间' : 'Opening Time' }}{{ scenicItem?.startTime }}{{ scenicItem?.workTime }}</span>
<span class="mr10">{{ language == 0 ? '开园时间' : 'Opening Time' }}{{ scenicItem?.startTime }}{{
scenicItem?.workTime
}}</span>
</div>
<div class="info">
<el-icon>
......@@ -42,71 +43,83 @@
<div class="leftboderTT">{{ language == 0 ? '预约信息' : 'Reservation information' }}</div>
<div class="border-rr mt20 pd20">
<el-form ref="formRef" v-loading="loading" :model="form" :label-width="language == 0 ?'120':'160'" :rules="rules">
<el-form
ref="formRef" v-loading="loading" :label-width="language == 0 ?'120':'160'" :model="form"
:rules="rules"
>
<!-- &lt;!&ndash; :disabled-date="disabledDateRZ"&ndash;&gt;-->
<!-- <el-form-item :label="language==0?'选择日期':'Date'" required>-->
<!-- <el-date-picker-->
<!-- v-model="rzRange"-->
<!-- :clearable="false"-->
<!-- :disabled-date="disabledDateRZ"-->
<el-form-item :label="language==0?'选择日期':'Date'" required>
<el-date-picker
v-model="rzRange"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
:disabled-date="disabledDateRZ"
:clearable="false"
@change="dateChange"
/>
<div v-if="lform.scenicStart" class="tip">{{ language==0?'可订日期':'Available date' }}{{ lform.scenicStart.slice(0, 10) }} ~ {{ lform.scenicEnd.slice(0, 10) }}</div>
<!-- :picker-options="pickerOptions"-->
</el-form-item>
<el-form-item v-for="(n,i) in gateList" :key="i" :label="language==0? n.name:n.name" prop="count">
<el-input-number v-model="n.count" :min="0" :max="n.leftNum" @change="changeNum(n)" />
<el-popover placement="top-start">
<template #reference>
<el-icon class="ml20"><Warning /></el-icon>
</template>
<div v-html="n.details"></div>
</el-popover>
<div class="red ml20">
<span v-if="language == 0">单价: ¥{{ n.price }}</span>
<span v-else>€ {{ n.priceEn }} / Ticket</span>
</div>
<div class="red ml20">
<span v-if="language == 0">剩余票数:{{ n.leftNum }}</span>
<span v-else>{{ n.leftNum }} sheet remaining </span>
</div>
</el-form-item>
<!-- format="YYYY-MM-DD"-->
<!-- value-format="YYYY-MM-DD"-->
<!-- @change="dateChange"-->
<!-- />-->
<!-- -->
<!-- <div v-if="lform.scenicStart" class="tip">{{-->
<!-- language == 0 ? '可订日期' : 'Available date'-->
<!-- }}{{ lform.scenicStart.slice(0, 10) }} ~ {{ lform.scenicEnd.slice(0, 10) }}-->
<!-- </div>-->
<!-- -->
<!-- &lt;!&ndash; :picker-options="pickerOptions"&ndash;&gt;-->
<!-- </el-form-item>-->
<!-- <el-form-item v-for="(n,i) in gateList" :key="i" :label="language==0? n.name:n.name" prop="count">-->
<!-- <el-input-number v-model="n.count" :max="n.leftNum" :min="0" @change="changeNum(n)" />-->
<!-- <el-popover placement="top-start">-->
<!-- <template #reference>-->
<!-- <el-icon class="ml20">-->
<!-- <Warning />-->
<!-- </el-icon>-->
<!-- </template>-->
<!-- <div v-html="n.details" />-->
<!-- </el-popover>-->
<!-- <div class="red ml20">-->
<!-- <span v-if="language == 0">单价: ¥{{ n.price }}</span>-->
<!-- <span v-else>€ {{ n.priceEn }} / Ticket</span>-->
<!-- </div>-->
<!-- <div class="red ml20">-->
<!-- <span v-if="language == 0">剩余票数:{{ n.leftNum }}</span>-->
<!-- <span v-else>{{ n.leftNum }} sheet remaining </span>-->
<!-- </div>-->
<!-- -->
<!-- </el-form-item>-->
<!-- -->
<div v-if="needPersonNum>0" class="fakeFormItem">
<label v-if="language == 0">需填写{{ needPersonNum }}位游客</label>
<label v-else>Need {{ needPersonNum }} visitors</label>
<div>
<label class="text-warning" v-show="needPersonNum > hasPersonNum && language==0">
还需填写{{ needPersonNum-hasPersonNum }}位游客
<label v-show="needPersonNum > hasPersonNum && language==0" class="text-warning">
还需填写{{ needPersonNum - hasPersonNum }}位游客
</label>
</div>
</div>
<div v-for="(n,i) in gateList" :key="i">
<div v-for="(p,j) in n.personArr" :key="j" class="fakeFormItem personIt">
<label>
<el-icon @click="delPerson(n,j)"><Remove /></el-icon>
{{ n.name }}{{ j+1 }}
<!-- <el-icon @click="delPerson(n,j)">-->
<!-- <Remove />-->
<!-- </el-icon>-->
{{ n.name }}{{ j + 1 }}
</label>
<div v-if="p.name" class="mation">
<div>{{ p.name }}</div>
<span v-if="p.idcType==0">{{language==0?'身份证':'ID number'}}</span>
<span v-if="p.idcType==1">{{language==0?'护照':'Passport'}}</span>
<span v-if="p.idcType==2">{{language==0?'其他':'Other'}}</span>
<span v-if="p.idcType==0">{{ language == 0 ? '身份证' : 'ID number' }}</span>
<span v-if="p.idcType==1">{{ language == 0 ? '护照' : 'Passport' }}</span>
<span v-if="p.idcType==2">{{ language == 0 ? '其他' : 'Other' }}</span>
:{{ p.idCard }}
</div>
<el-icon @click="showAddPerson(n, j,p)" color="#453DEA"><Edit /></el-icon>
<el-icon color="#453DEA" @click="showAddPerson(n, j,p)">
<Edit />
</el-icon>
</div>
</div>
<el-form-item :label="language==0?'联系人':'Contact'" required prop="contacts">
<el-form-item :label="language==0?'联系人':'Contact'" prop="contacts">
<el-input v-model="form.contacts" />
</el-form-item>
<el-form-item :label="language==0?'联系手机':'Contact phone'" required prop="phone">
<el-form-item :label="language==0?'联系手机':'Contact phone'" prop="phone" required>
<el-input v-model="form.phone" />
</el-form-item>
......@@ -118,15 +131,19 @@
<div class="border-rr mt20 pd20 ccitemBox">
<div v-for="(c, index) in gateList" v-show="c.count>0" :key="index" class="ccitem">
{{ c.name }}
<span v-if="language==0">{{ c.count }} * {{ '¥' }}{{ c.price }}</span>
<span v-else>{{ c.count }} * {{ '€' }} {{ c.priceEn }}</span>
<span v-if="language==0">
{{ c.count }} * {{ '¥' }}{{ c.price }}
</span>
<span v-else>{{ c.count }} * {{ '€' }} {{ c.priceEn }}
</span>
</div>
<label>{{ language == 0 ? '共计' : 'Total' }}<span
class="fr bigMoney"
>{{ language == 0 ? '¥' : '€' }} {{ money }}</span></label>
<label>{{ language == 0 ? '共计' : 'Total' }}
<span class="fr bigMoney">
{{ language == 0 ? '¥' : '€' }} {{ money }}
</span>
</label>
</div>
</el-col>
......@@ -134,14 +151,18 @@
</el-card>
<el-card class="mt30">
<el-row justify="space-between" align="middle">
<el-row align="middle" justify="space-between">
<el-col :span="12">
<label>{{ language == 0 ? '共计金额' : 'Total' }}:
<span class=" text-warning"> {{ language == 0 ? '¥' : '€' }}<span class="bigMoney">{{ money }}</span></span>
<span class=" text-warning"> {{ language == 0 ? '¥' : '€' }}<span class="bigMoney">{{
money
}}</span></span>
</label>
</el-col>
<el-col :span="12" class="text-right">
<el-button type="primary" class="btn-lineG w200px" size="large" round @click="submit">{{ language == 0 ?'确认付款':'Book Now' }}</el-button>
<el-button class="btn-lineG w200px" round size="large" type="primary" @click="submit">
{{ language == 0 ? '确认付款' : 'Book Now' }}
</el-button>
</el-col>
</el-row>
</el-card>
......@@ -187,29 +208,53 @@ const rzRange = ref('')
const gateList = ref([])
const money = ref(0)
const choosePersonRef = ref([])
const ticketList = ref([])
const rules = ref({
phone: { required: true, message: language.value == 0 ? '请输入联系电话' : 'Please enter a contact number', trigger: 'blur' }
phone: {
required: true,
message: language.value == 0 ? '请输入联系电话' : 'Please enter a contact number',
trigger: 'blur'
},
contacts: {
required: true,
message: language.value == 0 ? '请输入联人' : 'Please enter a contact',
trigger: 'blur'
}
})
onMounted(() => {
money.value = 0
rzRange.value = route.params.start
gateList.value = ticketList.value = JSON.parse(decodeURIComponent(route.query.item))
console.log(gateList.value)
getScenic()
initDays()
getGate()
countMoney()
checkPersonNum()
// changeNum()
// initDays()
// getGate()
})
function initDays() {
// 可定日期范围
getBaseInfoByActiveId(route.params.cptId).then(res => {
lform.value = res.data
})
}
function getTotal() {
// get
}
function getScenic() {
getScenicById(route.params.scenicId).then(res => {
scenicItem.value = res.data
})
}
function getGate() {
gateList.value = []
loading.value = true
......@@ -259,6 +304,11 @@ const checkPersonNum = () => {
})
}
function getCountInfo() {
// get
}
function changeNum(e) {
checkPersonNum()
......@@ -329,6 +379,10 @@ function submit() {
useUserStore().setReLogin()
return
}
if (!form.value.contacts) {
ElMessage.warning(language.value == 0 ? '请填写联系人' : 'Please fill in the contact person.')
return
}
if (!form.value.phone) {
ElMessage.warning(language.value == 0 ? '请填写手机号' : 'Please fill in the phone number')
return
......@@ -394,9 +448,13 @@ function submit() {
})
}
function handleGo() {
router.go(-1)
}
</script>
<style scoped lang="scss">
<style lang="scss" scoped>
.bigMoney {
font-size: 36px !important;
font-family: 'DIN Alternate';
......@@ -463,20 +521,56 @@ function submit() {
.red {
color: #FF8124;
}
.fakeFormItem {
display: flex;
padding: 10px 0;
label{ height: 32px; font-size: var(--el-form-label-font-size); width: 120px;
color: var(--el-text-color-regular); padding: 0 12px 0 0;
line-height: 32px;flex: 0 0 auto;
label {
height: 32px;
font-size: var(--el-form-label-font-size);
width: 120px;
color: var(--el-text-color-regular);
padding: 0 12px 0 0;
line-height: 32px;
flex: 0 0 auto;
display: inline-flex;
justify-content: flex-end;
align-items: center;gap: 10px;white-space: nowrap;}
align-items: center;
gap: 10px;
white-space: nowrap;
}
}
.tip {
font-size: 14px;
color: #666;
padding: 0 10px;
}
.tip{font-size: 14px;color: #666;padding: 0 10px;}
.personIt{display: flex;align-items: center;
.mation{width: 200px;font-size: 12px;
div{font-size: 14px;}
.personIt {
display: flex;
align-items: center;
.mation {
width: 200px;
font-size: 12px;
div {
font-size: 14px;
}
}
}
.father {
position: relative;
}
.son {
position: absolute;
left: 10px;
cursor: pointer;
}
</style>
......
<template>
<div v-if="language == 0" class="itemBox">
<el-row :gutter="20">
<el-col :sm="12" :lg="8" :xs="12">
<el-col :lg="8" :sm="12" :xs="12">
<div class="item" @click="popRemark(1)"><img src="@/assets/dance/btn01.png">酒店预订</div>
</el-col>
<el-col :sm="12" :lg="8" :xs="12">
<el-col :lg="8" :sm="12" :xs="12">
<div class="item" @click="popRemark(2)"><img src="@/assets/dance/btn02.png">车辆预订</div>
</el-col>
<!-- <el-col :sm="12" :lg="8" :xs="12">-->
<!-- <div class="item" @click="popRemark(3)"><img src="@/assets/dance/btn03.png">餐饮预订</div>-->
<!-- </el-col>-->
<el-col :sm="12" :lg="8" :xs="12">
<el-col :lg="8" :sm="12" :xs="12">
<div class="item" @click="popRemark(8)"><img src="@/assets/dance/btn08.png">旅游服务</div>
</el-col>
<el-col :sm="12" :lg="8" :xs="12">
<el-col :lg="8" :sm="12" :xs="12">
<div class="item" @click="popRemark(0)"><img src="@/assets/dance/btn04.png">票务预订</div>
</el-col>
<el-col :sm="12" :lg="8" :xs="12">
<el-col :lg="8" :sm="12" :xs="12">
<div class="item" @click="popRemark(4)"><img src="@/assets/dance/btn05.png">化妆预约</div>
</el-col>
<el-col :sm="12" :lg="8" :xs="12">
<el-col :lg="8" :sm="12" :xs="12">
<div class="item" @click="popRemark(5)"><img src="@/assets/dance/btn06.png">拍照预约</div>
</el-col>
</el-row>
</div>
<div v-else class="itemBox_en">
<el-row :gutter="20">
<el-col :sm="12" :lg="8" :xs="12">
<el-col :lg="8" :sm="12" :xs="12">
<div class="item_en" @click="popRemark(1)"><img src="@/assets/dance/btn01.png">
<p>HOTEL RESERVATION</p>
</div>
</el-col>
<el-col :sm="12" :lg="8" :xs="12">
<el-col :lg="8" :sm="12" :xs="12">
<div class="item_en" @click="popRemark(2)"><img src="@/assets/dance/btn02.png">
<p>TRANSPORTATION RESERVATION</p>
</div>
</el-col>
<!-- <el-col :sm="12" :lg="8" :xs="12">-->
<!-- <div class="item_en" @click="popRemark(3)"><img src="@/assets/dance/btn03.png">-->
<!-- <p>DINING RESERVATION</p>-->
<!-- </div>-->
<!-- </el-col>-->
<el-col :sm="12" :lg="8" :xs="12">
<!-- <el-col :sm="12" :lg="8" :xs="12">-->
<!-- <div class="item_en" @click="popRemark(3)"><img src="@/assets/dance/btn03.png">-->
<!-- <p>DINING RESERVATION</p>-->
<!-- </div>-->
<!-- </el-col>-->
<el-col :lg="8" :sm="12" :xs="12">
<div class="item_en" @click="popRemark(8)"><img src="@/assets/dance/btn08.png">
<p>TRAVEL SERVICE</p>
</div>
</el-col>
<el-col :sm="12" :lg="8" :xs="12">
<el-col :lg="8" :sm="12" :xs="12">
<div class="item_en" @click="popRemark(0)">
<img src="@/assets/dance/btn04.png">
<p>TICKET BOOKING</p>
</div>
</el-col>
<el-col :sm="12" :lg="8" :xs="12">
<el-col :lg="8" :sm="12" :xs="12">
<div class="item_en" @click="popRemark(4)"><img src="@/assets/dance/btn05.png">
<p>MAKEUP APPOINTMENT</p>
</div>
</el-col>
<el-col :sm="12" :lg="8" :xs="12">
<el-col :lg="8" :sm="12" :xs="12">
<div class="item_en" @click="popRemark(5)"><img src="@/assets/dance/btn06.png">
<p>PHOTOGRAPHY APPOINTMENT</p>
</div>
......@@ -114,7 +114,6 @@ onMounted(() => {
function building() {
ElMessage.warning(language.value == 0 ? '感谢您对本次比赛的关注,该服务暂无可预订信息,敬请期待。' : 'Thank you for your attention to this competition. The service is currently unavailable for booking. Please stay tuned.')
return
}
function popRemark(type) {
......@@ -173,14 +172,14 @@ function goBooking(n) {
router.push({ path: `/booking/photography/${props.matchId}` })
break
case 8:
// 酒店
// 旅游
router.push({ path: `/booking/travel/${props.matchId}` })
break
}
}
</script>
<style scoped lang="scss">
<style lang="scss" scoped>
.itemBox {
padding: 20px 40px;
}
......@@ -248,9 +247,16 @@ function goBooking(n) {
}
@media screen and (max-width: 768px) {
.itemBox,.itemBox_en{padding: 0 20px 20px}
.item{font-size: 16px;
img{width: 50px;height: 50px}
.itemBox, .itemBox_en {
padding: 0 20px 20px
}
.item {
font-size: 16px;
img {
width: 50px;
height: 50px
}
}
}
</style>
......
<template>
<el-dialog :title="title" v-model="show" width="400px" @close="close">
<el-dialog v-model="show" :title="title" destroy-on-close width="400px" @close="close">
<div>
<h2 class="text-warning text-center" v-if="cptName">{{cptName}}</h2>
<h2 v-if="cptName" class="text-warning text-center">{{ cptName }}</h2>
<div v-if="type==1" class="plr20" v-html="form.reserveDes"></div>
<div v-if="type==2" class="plr20" v-html="form.reserveDesCar"></div>
<div v-if="type==3" class="plr20" v-html="form.reserveDesFood"></div>
<div v-if="type==4" class="plr20" v-html="form.reserveDesMeal"></div>
<div v-if="type==5" class="plr20" v-html="form.reserveDesPhoto"></div>
<div v-if="type==0" class="plr20" v-html="form.reserveDesTitck"></div>
<div v-if="type==8" class="plr20" v-html="form.reserveDesTravel"></div>
<div v-if="type==1" class="plr20" v-html="form.reserveDes" />
<div v-if="type==2" class="plr20" v-html="form.reserveDesCar" />
<div v-if="type==3" class="plr20" v-html="form.reserveDesFood" />
<div v-if="type==4" class="plr20" v-html="form.reserveDesMeal" />
<div v-if="type==5" class="plr20" v-html="form.reserveDesPhoto" />
<div v-if="type==0" class="plr20" v-html="form.reserveDesTitck" />
<div v-if="type==8" class="plr20" v-html="form.reserveDesScenic" />
</div>
<template #footer>
<div class="dialog-footer text-center">
<el-button type="primary" class="btn-lineG w200px" round @click="ok">{{language==0?'确定':'Confirm'}}</el-button>
<el-button class="btn-lineG w200px" round type="primary" @click="ok">{{ language == 0 ? '确定' : 'Confirm' }}
</el-button>
</div>
</template>
</el-dialog>
</template>
<script setup>
import {getBaseInfoByActiveId} from "@/apiPc/booking";
import {getCurrentInstance} from "@vue/runtime-core";
import {useStorage} from "@vueuse/core/index";
const emit = defineEmits([ 'submit'])
const {proxy} = getCurrentInstance()
const language= useStorage('language',0)
import useUserStore from "@/store/modules/user";
import { getBaseInfoByActiveId } from '@/apiPc/booking'
import { getCurrentInstance } from '@vue/runtime-core'
import { useStorage } from '@vueuse/core/index'
const emit = defineEmits(['submit'])
const { proxy } = getCurrentInstance()
const language = useStorage('language', 0)
import useUserStore from '@/store/modules/user'
const user = useUserStore().user
const title = ref('')
const cptName = ref('')
......@@ -48,16 +51,18 @@ defineExpose({
function getData() {
console.log(matchId)
getBaseInfoByActiveId(matchId).then(res=>{
getBaseInfoByActiveId(matchId).then(res => {
form.value = res.data || {}
console.log(form.value)
}).catch(err=>{
}).catch(err => {
console.log(err)
})
}
function close() {
show.value = false
}
function ok() {
// type
show.value = false
......@@ -70,6 +75,6 @@ function ok() {
}
</script>
<style scoped lang="scss">
<style lang="scss" scoped>
</style>
......
......@@ -70,8 +70,8 @@ export default defineConfig(({ mode, command }) => {
rewrite: (p) => p.replace(/^\/dev-api\/ztx-train/, '')
},
'/dev-api/ztx-match': {
// target: 'http://192.168.1.118:8081',
target: 'https://wdsfwuxicenter.com/stage-api/',
target: 'http://192.168.1.118:8081',
// target: 'https://wdsfwuxicenter.com/stage-api/',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api\/ztx-match/, '')
},
......@@ -82,8 +82,8 @@ export default defineConfig(({ mode, command }) => {
},
'/dev-api': {
// target: 'http://192.168.1.118:8081/',
// target: 'http://192.168.1.130:8081',
target: 'https://jijin.wtwuxicenter.com/stage-api',
target: 'http://192.168.1.118:8081',
// target: 'https://jijin.wtwuxicenter.com/stage-api',
// target: 'https://wdsfwuxicenter.com/stage-api/',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api/, '')
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!