7b8241de by 杨炀

Merge commit '566e93c5' into dev

2 parents 55b26a7d 566e93c5
......@@ -8,6 +8,14 @@ export function getHotelList(params) {
})
}
export function getScenicList(params) {
return request({
url: `/ota/activityScenic/getScenicList`,
method: 'get',
params: params
})
}
export function getStudioList(params) {
return request({
url: `/ota/studio/list`,
......@@ -23,6 +31,16 @@ export function getHotelById(id) {
})
}
export function getScenicById(id) {
return request({
url: `/ota/scenic/getScenicInfo`,
method: 'get',
params: {
id
}
})
}
export function getStudioById(id) {
return request({
url: `/ota/studio/${id}`,
......@@ -54,6 +72,14 @@ export function newsSubmitOrderHotel(data) {
})
}
export function submitOrderScenic(data) {
return request({
url: `/ota/norder/submitOrderScenic`,
method: 'post',
data: data
})
}
export function getRoomBilldetailbyId(params) {
return request({
url: `/ota/orderRoom/getRoomOrderInfoByOrderId`,
......@@ -221,6 +247,18 @@ export function checkRoomPayByUserId(id) {
})
}
export function checkOrderPay(orderType) {
return request({
url: `/ota/norder/checkNonPayment`,
method: 'get',
params: {
orderType
}
})
}
export function submitInvoice(form) {
return request({
url: `/ota/invoice`,
......@@ -471,7 +509,7 @@ export function checkNonPayment() {
return request({
url: `/ota/norder/checkNonPayment`,
method: 'get',
params: {orderType: 5}
params: { orderType: 5 }
})
}
......@@ -503,11 +541,27 @@ export function aadCustomer(data) {
})
}
export function aadSceneCustomer(data) {
return request({
url: `/ota/customer/insertSceneCustomer`,
method: 'post',
data
})
}
export function checkSceneCustomer(data) {
return request({
url: `/ota/orderTourist/checkDiscounts`,
method: 'post',
data
})
}
// 删除观影人
export function delCustomer(id) {
return request({
url: `/ota/customer/${id}`,
method: 'delete',
method: 'delete'
})
}
......@@ -537,3 +591,20 @@ export function getTicketOrderInfo(params) {
params
})
}
export function getGateListByLasId(params) {
return request({
url: `/ota/scenicConfig/getGateListByLasId`,
method: 'get',
params
})
}
export function getMyFriends() {
return request({
url: `/ota/orderTourist/getMyFriends`,
method: 'get'
})
}
......
......@@ -6,12 +6,12 @@ import {
/* Layout */
import Layout from '@/layoutPc'
import Empty from '@/layoutPc/empty'
import NProgress from "nprogress";
import {getToken} from "@/utils/auth";
import useUserStore from "@/store/modules/user";
import {isRelogin} from "@/utils/request";
import {ElMessage} from "element-plus";
import Layout2 from "@/layoutPc/index2";
import NProgress from 'nprogress'
import { getToken } from '@/utils/auth'
import useUserStore from '@/store/modules/user'
import { isRelogin } from '@/utils/request'
import { ElMessage } from 'element-plus'
import Layout2 from '@/layoutPc/index2'
// import useUserStore from '@/store/modules/user'
/**
......@@ -64,7 +64,7 @@ export const constantRoutes = [
path: '/ticketSearch',
component: () => import('@/viewsPc/booking/ticketSearch'),
name: 'ticketSearch',
meta: {title: '票务订单查询'}
meta: { title: '票务订单查询' }
},
{
path: '/index',
......@@ -98,37 +98,37 @@ export const constantRoutes = [
path: 'wudao',
component: () => import('@/viewsPc/about/wudao'),
name: 'dangNews',
meta: {title: '舞蹈节'}
meta: { title: '舞蹈节' }
},
{
path: 'culture',
component: () => import('@/viewsPc/about/culture'),
name: 'culture',
meta: {title: '地方文化'}
meta: { title: '地方文化' }
},
{
path: 'leaderInfo/:id',
component: () => import('@/viewsPc/about/leaderInfo'),
name: 'leaderInfo',
meta: {title: '评委详情'}
meta: { title: '评委详情' }
},
{
path: 'wudaoEn',
component: () => import('@/viewsPc/about/wudao'),
name: 'dangNewsEn',
meta: {title: 'about us'}
meta: { title: 'about us' }
},
{
path: 'cultureEn',
component: () => import('@/viewsPc/about/culture_en'),
name: 'cultureEn',
meta: {title: 'culture'}
meta: { title: 'culture' }
},
{
path: 'regulations',
component: () => import('@/viewsPc/about/fileList'),
name: 'regulations',
meta: {title: 'rules and regulations'}
meta: { title: 'rules and regulations' }
}
]
},
......@@ -141,31 +141,31 @@ export const constantRoutes = [
path: 'index',
component: () => import('@/viewsPc/notice/index'),
name: 'notice',
meta: {title: 'NOTICEBOARD'}
meta: { title: 'NOTICEBOARD' }
},
{
path: 'index/list',
component: () => import('@/viewsPc/notice/list'),
name: 'noticeList',
meta: {title: '资讯列表'}
meta: { title: '资讯列表' }
},
{
path: 'index/coverlist',
component: () => import('@/viewsPc/notice/coverlist'),
name: 'coverList',
meta: {title: '图文列表'}
meta: { title: '图文列表' }
},
{
path: 'index/fileList',
component: () => import('@/viewsPc/notice/fileList'),
name: 'fileList',
meta: {title: '文件列表'}
meta: { title: '文件列表' }
},
{
path: 'index/personList',
component: () => import('@/viewsPc/notice/personList'),
name: 'personList',
meta: {title: '人员列表'}
meta: { title: '人员列表' }
}
]
},
......@@ -178,19 +178,19 @@ export const constantRoutes = [
path: 'index',
component: () => import('@/viewsPc/news/index'),
name: 'news',
meta: {title: 'NEWS'}
meta: { title: 'NEWS' }
},
{
path: 'list/:id',
component: () => import('@/viewsPc/news/list'),
name: 'newsList',
meta: {title: '新闻列表'}
meta: { title: '新闻列表' }
},
{
path: 'detail/:id',
component: () => import('@/viewsPc/news/detail'),
name: 'newsDetail',
meta: {title: '新闻详情'}
meta: { title: '新闻详情' }
}
]
},
......@@ -203,13 +203,13 @@ export const constantRoutes = [
path: 'index',
component: () => import('@/viewsPc/nationalTeam/index'),
name: 'nationalTeam',
meta: {title: '新闻'}
meta: { title: '新闻' }
},
{
path: 'index/personList',
component: () => import('@/viewsPc/nationalTeam/components/member'),
name: 'personListHasKind',
meta: {title: '人员列表'}
meta: { title: '人员列表' }
}
]
......@@ -223,7 +223,7 @@ export const constantRoutes = [
path: 'index',
component: () => import('@/viewsPc/meta/index'),
name: 'meta',
meta: {title: 'MEDIA'}
meta: { title: 'MEDIA' }
}
]
},
......@@ -236,7 +236,7 @@ export const constantRoutes = [
path: 'index',
component: () => import('@/viewsPc/saiC/index'),
name: 'saiC',
meta: {title: 'COMPETITIONS'}
meta: { title: 'COMPETITIONS' }
}
]
},
......@@ -249,7 +249,7 @@ export const constantRoutes = [
path: 'index',
component: () => import('@/viewsPc/guide/index'),
name: 'guide',
meta: {title: 'GUIDELINE'}
meta: { title: 'GUIDELINE' }
}
]
},
......@@ -262,7 +262,7 @@ export const constantRoutes = [
path: '',
component: () => import('@/viewsPc/searchList'),
name: 'searchList',
meta: {title: '搜索结果'}
meta: { title: '搜索结果' }
}
]
},
......@@ -275,25 +275,25 @@ export const constantRoutes = [
path: 'index',
component: () => import('@/viewsPc/competition/index'),
name: 'competition',
meta: {title: '竞赛服务'}
meta: { title: '竞赛服务' }
},
{
path: 'coach/:kind',
component: () => import('@/viewsPc/competition/coach'),
name: 'competitionCoach',
meta: {title: '竞赛服务'}
meta: { title: '竞赛服务' }
},
{
path: 'calendar',
component: () => import('@/viewsPc/competition/calendar'),
name: 'calendar',
meta: {title: '竞赛日程'}
meta: { title: '竞赛日程' }
},
{
path: 'domesticRanking',
component: () => import('@/viewsPc/competition/domesticRanking'),
name: 'domesticRanking',
meta: {title: '国内排名'}
meta: { title: '国内排名' }
}
]
},
......@@ -306,19 +306,19 @@ export const constantRoutes = [
path: 'list',
component: () => import('@/viewsPc/match/index'),
name: 'matchList',
meta: {title: '赛事'}
meta: { title: '赛事' }
},
{
path: 'list/:id',
component: () => import('@/viewsPc/match/detail_en'),
name: 'matchDetail',
meta: {title: '赛事详情'}
meta: { title: '赛事详情' }
},
{
path: 'list/reservationSearch',
component: () => import('@/viewsPc/match/reservationSearch.vue'),
name: 'reservationSearch',
meta: {title: '预订查询'}
meta: { title: '预订查询' }
}
]
},
......@@ -331,22 +331,22 @@ export const constantRoutes = [
path: '0',
component: () => import('@/viewsPc/register/personal'),
name: 'personalRegister',
meta: {title: 'Register'}
meta: { title: 'Register' }
}, {
path: '1',
component: () => import('@/viewsPc/register/team/team'),
name: 'teamRegister',
meta: {title: 'Register'}
meta: { title: 'Register' }
}, {
path: 'userAgreement',
component: () => import('@/viewsPc/register/userAgreement'),
name: 'userAgreement',
meta: {title: 'Register'}
meta: { title: 'Register' }
}, {
path: 'policy',
component: () => import('@/viewsPc/register/policy'),
name: 'policy',
meta: {title: 'Register'}
meta: { title: 'Register' }
}
]
},
......@@ -359,175 +359,175 @@ export const constantRoutes = [
path: 'ticket/:activeId',
component: () => import('@/viewsPc/booking/ticket/index.vue'),
name: 'ticket',
meta: {title: 'Ticket Booking'}
meta: { title: 'Ticket Booking' }
},
{
path: 'ticket/:activeId/:latId/:attId',
component: () => import('@/viewsPc/booking/ticket/confirmOrder.vue'),
name: 'confirmOrder',
meta: {title: 'confirmOrder'}
meta: { title: 'confirmOrder' }
},
{
path: 'ticket/peopleManage',
component: () => import('@/viewsPc/booking/ticket/peopleManage.vue'),
name: 'peopleManage',
meta: {title: 'peopleManage'}
meta: { title: 'peopleManage' }
},
{
path: 'ticket/addInvoice',
component: () => import('@/viewsPc/booking/ticket/addInvoice.vue'),
name: 'ticketAddInvoice',
meta: {title: 'ticketAddInvoice'}
meta: { title: 'ticketAddInvoice' }
},
{
path: 'ticket/invoiceDetail',
component: () => import('@/viewsPc/booking/ticket/invoiceDetail.vue'),
name: 'ticketInvoiceDetail',
meta: {title: 'ticketInvoiceDetail'}
meta: { title: 'ticketInvoiceDetail' }
},
{
path: 'hotel/:cptId',
component: () => import('@/viewsPc/booking/hotel'),
name: 'hotel',
meta: {title: 'Hotel Reservation'}
meta: { title: 'Hotel Reservation' }
},
{
path: 'hotel/:cptId/:hotelId',
component: () => import('@/viewsPc/booking/hotelDetail'),
name: 'hotelDetail',
meta: {title: 'Hotel Reservation'}
},
{
path: 'travel/:cptId',
component: () => import('@/viewsPc/booking/travel'),
name: 'travel',
meta: {title: 'Hotel Reservation'}
},
{
path: 'travel/:cptId/:hotelId',
component: () => import('@/viewsPc/booking/travelDetail'),
name: 'travelDetail',
meta: {title: 'Hotel Reservation'}
meta: { title: 'Hotel Reservation' }
},
{
path: 'car/:cptId/:id',
component: () => import('@/viewsPc/booking/carOrder'),
name: 'carOrder',
meta: {title: 'Car Reservation'}
meta: { title: 'Car Reservation' }
},
{
path: 'hotel/:cptId/:hotelId/:roomId',
component: () => import('@/viewsPc/booking/hotelOrder'),
name: 'hotelOrder',
meta: {title: 'Hotel Reservation'}
},
{
path: 'travel/:cptId/:hotelId/:roomId',
component: () => import('@/viewsPc/booking/travelOrder'),
name: 'travelOrder',
meta: {title: 'Travel Reservation'}
meta: { title: 'Hotel Reservation' }
},
{
path: 'car/:cptId',
component: () => import('@/viewsPc/booking/car'),
name: 'car',
meta: {title: 'Vehicle Reservation'}
meta: { title: 'Vehicle Reservation' }
},
{
path: 'dinner/:cptId',
component: () => import('@/viewsPc/booking/dinner'),
name: 'dinner',
meta: {title: 'Dining Reservation'}
meta: { title: 'Dining Reservation' }
},
{
path: 'dinner/:cptId/:id',
component: () => import('@/viewsPc/booking/dinnerDetail'),
name: 'dinnerDetail',
meta: {title: 'Dining Reservation'}
meta: { title: 'Dining Reservation' }
},
{
path: 'dinner/:cptId/:id/:foodId',
component: () => import('@/viewsPc/booking/foodOrder'),
name: 'dinnerOrder',
meta: {title: 'Dinner Reservation'}
meta: { title: 'Dinner Reservation' }
},
{
path: 'makeUp/:cptId',
component: () => import('@/viewsPc/booking/makeUp'),
name: 'makeUp',
meta: {title: 'Makeup Appointment'}
meta: { title: 'Makeup Appointment' }
},
{
path: 'makeUp/:cptId/:id',
component: () => import('@/viewsPc/booking/makeUpDetail'),
name: 'makeUpDetail',
meta: {title: 'Makeup Appointment'}
meta: { title: 'Makeup Appointment' }
},
{
path: 'makeUp/:cptId/:id/:lasId',
component: () => import('@/viewsPc/booking/makeUpOrder.vue'),
name: 'makeUpOrder',
meta: {title: 'Makeup Reservation'}
meta: { title: 'Makeup Reservation' }
},
{
path: 'photography/:cptId',
component: () => import('@/viewsPc/booking/photography'),
name: 'photography',
meta: {title: 'Photography Appointment'}
meta: { title: 'Photography Appointment' }
},
{
path: 'photography/:cptId/:id',
component: () => import('@/viewsPc/booking/photographyDetail'),
name: 'photographyDetail',
meta: {title: 'Photography Reservation'}
meta: { title: 'Photography Reservation' }
},
{
path: 'photography/:cptId/:id/:lasId',
component: () => import('@/viewsPc/booking/photographyOrder.vue'),
name: 'photographyOrder',
meta: {title: 'Photography Appointment'}
meta: { title: 'Photography Appointment' }
},
{
path: 'pay',
component: () => import('@/viewsPc/booking/pay'),
name: 'bookingPay',
meta: {title: 'pay'}
meta: { title: 'pay' }
},
{
path: 'payticket',
component: () => import('@/viewsPc/booking/payticket'),
name: 'payticket',
meta: {title: '票务'}
meta: { title: '票务' }
},
{
path: 'payOk',
component: () => import('@/viewsPc/booking/payOk'),
name: 'bookingPayOk',
meta: {title: 'payOk'}
meta: { title: 'payOk' }
},
{
path: 'payticketOk',
component: () => import('@/viewsPc/booking/payticketOk'),
name: 'payticketOk',
meta: {title: '票务-paypal'}
meta: { title: '票务-paypal' }
},
{
path: 'invoice',
component: () => import('@/viewsPc/booking/invoicing'),
name: 'invoice',
meta: {title: '我的发票'}
meta: { title: '我的发票' }
},
{
path: 'invoiceDetail',
component: () => import('@/viewsPc/booking/invoiceDetail'),
name: 'invoiceDetail',
meta: {title: '发票详情'}
meta: { title: '发票详情' }
},
{
path: 'addInvoice',
component: () => import('@/viewsPc/booking/addInvoice'),
name: 'addInvoice',
meta: {title: '开发票'}
meta: { title: '开发票' }
},
{
path: 'travel/:cptId',
component: () => import('@/viewsPc/booking/travel'),
name: 'travel',
meta: { title: 'Hotel Reservation' }
},
{
path: 'travel/:cptId/:scenicId',
component: () => import('@/viewsPc/booking/travelDetail'),
name: 'travelDetail',
meta: { title: 'Hotel Reservation' }
},
{
path: 'travel/:cptId/:scenicId/:start',
component: () => import('@/viewsPc/booking/travelOrder'),
name: 'travelOrder',
meta: { title: 'Travel Reservation' }
}
]
},
......@@ -539,49 +539,49 @@ export const constantRoutes = [
path: 'myInfo',
component: () => import('@/viewsPc/center/myInfo'),
name: 'myInfo',
meta: {title: '个人中心'}
meta: { title: '个人中心' }
},
{
path: 'myPassword',
component: () => import('@/viewsPc/center/myPassword'),
name: 'myPassword',
meta: {title: '修改密码'}
meta: { title: '修改密码' }
},
{
path: 'myCertification',
component: () => import('@/viewsPc/center/myCertification'),
name: 'myCertification',
meta: {title: 'institutional accreditation'}
meta: { title: 'institutional accreditation' }
},
{
path: 'myMember',
component: () => import('@/viewsPc/center/myMember'),
name: 'myMember',
meta: {title: 'Player Management'}
meta: { title: 'Player Management' }
},
{
path: 'myMatch',
component: () => import('@/viewsPc/center/myMatch'),
name: 'myMatch',
meta: {title: 'My registration'}
meta: { title: 'My registration' }
},
{
path: 'myReservation',
component: () => import('@/viewsPc/center/myReservation'),
name: 'myReservation',
meta: {title: 'My reservation'}
meta: { title: 'My reservation' }
},
{
path: 'mySms',
component: () => import('@/viewsPc/center/mySms'),
name: 'mySms',
meta: {title: 'System messages'}
meta: { title: 'System messages' }
},
{
path: 'myKP',
component: () => import('@/viewsPc/center/myCanKP'),
name: 'myKP',
meta: {title: '发票管理'}
meta: { title: '发票管理' }
}
]
},
......@@ -595,71 +595,71 @@ export const constantRoutes = [
path: 'detail',
name: 'seat_detail',
component: () => import('@/viewsPc/seat/ticket-detail'),
meta: {title: '购票详情'},
meta: { title: '购票详情' },
props: route => ({
activityId: route.query.id,
activityId: route.query.id
})
},
{
path: 'seat_picker',
name: 'seat_picker',
component: () => import('@/viewsPc/seat/seat-picker'),
meta: {title: '选座'},
meta: { title: '选座' },
props: route => ({
activityId: route.query.id,
activityId: route.query.id
})
},
{
path: 'order',
name: 'seat_order',
component: () => import('@/viewsPc/seat/order-list'),
meta: {title: '我的订单'},
meta: { title: '我的订单' },
props: route => ({
activityId: route.query.id,
activityId: route.query.id
})
},
{
path: 'order_detail',
name: 'order_detail',
component: () => import('@/viewsPc/seat/order-detail'),
meta: {title: '订单详情'},
meta: { title: '订单详情' },
props: route => ({
activityId: route.query.id,
activityId: route.query.id
})
},
{
path: 'confirm_order',
name: 'confirm_order',
component: () => import('@/viewsPc/seat/confirm-order'),
meta: {title: '确认订单'},
meta: { title: '确认订单' },
props: route => ({
activityId: route.query.id,
activityId: route.query.id
})
},
{
path: 'add_watch_people',
name: 'add_watch_people',
component: () => import('@/viewsPc/seat/add-watch-people'),
meta: {title: '新增观影人'}
meta: { title: '新增观影人' }
},
{
path: 'people_manage',
name: 'people_manage',
component: () => import('@/viewsPc/seat/people-manage'),
meta: {title: '观影人管理'}
meta: { title: '观影人管理' }
},
{
path: 'payTicketOk',
component: () => import('@/viewsPc/seat/payticketOk.vue'),
name: 'payTicketOk',
meta: {title: '支付成功'}
meta: { title: '支付成功' }
},
{
path: 'payTicketLoser',
component: () => import('@/viewsPc/seat/payticketLoser.vue'),
name: 'payTicketLoser',
meta: {title: '支付失败'}
},
meta: { title: '支付失败' }
}
]
}
]
......@@ -677,59 +677,59 @@ export const constantRoutes = [
path: 'payOk',
component: () => import('@/viewsPc/match/payOk'),
name: 'payOk',
meta: {title: '支付成功'}
meta: { title: '支付成功' }
},
{
path: 'commitDone/:orderId',
component: () => import('@/viewsPc/match/commitDone'),
name: 'commitDone',
meta: {title: '提交审核'}
meta: { title: '提交审核' }
},
{
path: 'pay',
component: () => import('@/viewsPc/match/pay'),
name: 'signPay',
meta: {title: '缴费清单'}
meta: { title: '缴费清单' }
},
{
path: 'list/:id/teamSign',
component: () => import('@/viewsPc/match/teamSign'),
name: 'teamSign',
meta: {title: '团队报名'}
meta: { title: '团队报名' }
},
{
path: 'list/:id/teamSignCn',
component: () => import('@/viewsPc/match/teamSign_Cn'),
name: 'teamSignCn',
meta: {title: '团队报名-国内赛'}
meta: { title: '团队报名-国内赛' }
},
{
path: 'list/:id/chooseCoach',
component: () => import('@/viewsPc/match/chooseCoach'),
name: 'chooseCoach',
meta: {title: '选择教练/领队/其他'}
meta: { title: '选择教练/领队/其他' }
},
{
path: 'list/:id/chooseSportsman',
component: () => import('@/viewsPc/match/chooseSportsman'),
name: 'chooseSportsman',
meta: {title: '选择运动员'}
meta: { title: '选择运动员' }
},
{
path: 'list/:id/chooseProject',
component: () => import('@/viewsPc/match/chooseProject'),
name: 'chooseProject',
meta: {title: '选择参赛项目'}
meta: { title: '选择参赛项目' }
},
{
path: 'list/:id/signPreview',
component: () => import('@/viewsPc/match/signPreview'),
name: 'signPreview',
meta: {title: '提交审核'}
meta: { title: '提交审核' }
}
]
},
}
]
}
]
......@@ -742,11 +742,11 @@ const router = createRouter({
if (savedPosition) {
return savedPosition
} else {
return {top: 0}
return { top: 0 }
}
}
})
NProgress.configure({showSpinner: false})
NProgress.configure({ showSpinner: false })
router.beforeEach((to, from, next) => {
NProgress.start()
......@@ -760,7 +760,7 @@ router.beforeEach((to, from, next) => {
}).catch(err => {
useUserStore().logOut().then(() => {
ElMessage.error(err)
next({path: '/'})
next({ path: '/' })
})
})
} else {
......
<template>
<el-dialog v-model="show" title="出行人信息" center append-to-body>
<el-form>
<el-form-item prop="message">
<div class="p_box">
<div class="people">
<el-radio-group v-model="personId">
<div
v-for="(it, index) in personList" :key="index" class="prople_item"
>
<el-radio :value="it.id" :disabled="hasPersonIds?.indexOf(it.id)!=-1">
<div>
{{ it.name }} {{ it.idCard }}
</div>
</el-radio>
</div>
</el-radio-group>
</div>
<el-button @click="addPeopl">{{ languageFormat(language, "新增", "Add") }}</el-button>
</div>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button @click="show = false">取 消</el-button>
<el-button type="primary" @click="addPerson">完成</el-button>
</div>
</template>
</el-dialog>
<el-dialog v-model="showAdd" title="新增出现人" center append-to-body>
<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>
<el-form-item :label="language==0?'证件类型':'ID Type'" prop="idcType" required :show-message="false">
<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-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>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button class="can_pay" @click="showAdd = false">{{ language == 0 ? '取 消' : 'cancel' }}</el-button>
<el-button class="pay" type="primary" @click="submit">{{ language == 0 ? '确 定' : 'confirm' }}</el-button>
</div>
</template>
</el-dialog>
</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 _ from 'lodash'
import { getCurrentInstance } from '@vue/runtime-core'
const emit = defineEmits(['addPerson'])
const { proxy } = getCurrentInstance()
const show = ref(false)
const showAdd = ref(false)
const personList = ref([])
const personId = ref(null)
const hasPersonIds = ref(null)
const language = useStorage('language', 0)
const form = ref({})
const formRef = ref(null)
onMounted(() => {
getData()
})
const getData = () => {
getMyFriends().then((res) => {
personList.value = res.data
})
}
const addPeopl = () => {
formRef.value?.resetFields()
showAdd.value = true
}
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('护照只能购买成人票')
} else if (res.data == 202) {
proxy.$modal.msgError('此身份证不能购买老人票')
} else if (res.data == 203) {
proxy.$modal.msgError('此身份证不能购买儿童票')
} else {
show.value = false
emit('addPerson', Object.assign(currParams, {
customerId: person.id,
name: person.name,
idcType: person.idcType,
idCard: person.idCard
}))
}
})
}
const submit = () => {
formRef.value.validate((valid) => {
if (valid) {
aadSceneCustomer(form.value).then(res => {
if (res.data == -100) {
proxy.$modal.msgError('人员信息已存在')
} else if (res.data == -101) {
proxy.$modal.msgError('实名认证未通过')
} else {
proxy.$modal.msgSuccess(language.value == 0 ? '添加成功' : 'successfully added')
showAdd.value = false
getData()
}
})
} else {
proxy.$modal.msgWarning(language.value == 0 ? '请完善信息' : 'Please complete the information')
}
})
}
let currParams
defineExpose({
open: (params) => {
currParams = params
personId.value = params.customerId
hasPersonIds.value = params.hasCustomerIds
show.value = true
}
})
</script>
<style scoped lang="scss">
</style>
......@@ -163,6 +163,55 @@
</el-row>
</div>
</div>
<div v-if="type == 'travel'">
<div class="leftboderTT">{{ language == 0 ? '购票信息' : 'Ticket Information' }}</div>
<div class="border-info mt20">
<h3>{{ matchForm.name }}</h3>
<el-row>
<el-col>
{{ language == 0 ? '地址' : 'Address' }}
{{ matchForm.address }}
</el-col>
<el-col>
{{
form?.extJson?.ticketType?.name
}}:{{ form?.extJson?.num }}{{ language == 0 ? '张' : 'Tickets' }}
</el-col>
<el-col>
{{
language == 0 ? '时间' : 'Time'
}}{{
dayjs(form?.extJson?.ticketDate?.ticketStart).format('YYYY-MM-DD')
}}{{
form.extJson?.ticketDate?.ticketType == 1 ? '~' + dayjs(form?.extJson?.ticketDate?.ticketEnd).format('YYYY-MM-DD') : ''
}}
</el-col>
<el-col v-if="form?.extJson?.ticketDate?.isCountSale==1">
{{
language == 0 ? `满${form?.extJson?.ticketDate.counts}人优惠` : `Discount for up to ${form?.extJson?.ticketDate.counts} people`
}}<span v-if="language == 0">{{ form?.extJson?.ticketDate.discount }}</span>
<span v-else>{{ (10 - form?.extJson?.ticketDate.discount) * 10 + '%' }}off</span>
</el-col>
<!-- <el-col>-->
<!-- {{-->
<!-- language == 0 ? '原价票' : 'Cost Ticket'-->
<!-- }}{{-->
<!-- language == 0 ? form?.extJson?.ticketDate?.price : form?.extJson?.ticketDate?.priceEn-->
<!-- }}{{ language == 0 ? '元' : 'Euro' }} x 1-->
<!-- {{ language == 0 ? '张' : 'Tickets' }}-->
<!-- </el-col>-->
<!-- <el-col>-->
<!-- {{-->
<!-- language == 0 ? '优惠票' : 'Concession Ticket'-->
<!-- }}{{-->
<!-- language == 0 ? form?.extJson?.ticketDate?.rebatePrice : form?.extJson?.ticketDate?.rebatePriceEn-->
<!-- }}{{ language == 0 ? '元' : 'Euro' }} x 1-->
<!-- {{ language == 0 ? '张' : 'Tickets' }}-->
<!-- </el-col>-->
</el-row>
</div>
</div>
<div class="leftboderTT">{{ language == 0 ? '预订信息' : 'Booking information' }}</div>
......@@ -328,7 +377,56 @@
</el-row>
</el-row>
<el-row v-if="type == 'travel'" style="width: 100%">
<el-row v-for="v in form.extJson?.message" style="width: 100%">
<el-col :lg="8" :md="12" :sm="12" :xs="24">
<div>{{ v.name }}
</div>
</el-col>
<el-col :lg="8" :md="12" :sm="12" :xs="24">
<!-- <div>{{-->
<!-- !v.discount ? language == 0 ? '原价票' : 'Cost Ticket' : language == 0 ? '优惠票' : 'Concession Ticket'-->
<!-- }}-->
<!-- </div>-->
<div>{{ v.idCard }}
</div>
</el-col>
<el-col :lg="8" :md="12" :sm="12" :xs="24">
<div v-if="language == 0 ">
{{ language == 0 ? '¥' : '€' }}
{{
!v.discount ? form.extJson?.ticketDate?.price : form.extJson?.ticketDate?.rebatePrice
}}
/{{ language == 0 ? '张' : 'Tickets' }}
</div>
<div v-else>
{{ language == 0 ? '¥' : '€' }}
{{
!v.discount ? form.extJson?.ticketDate?.priceEn : form.extJson?.ticketDate?.rebatePriceEn
}}
/{{ language == 0 ? '张' : 'Tickets' }}
</div>
</el-col>
</el-row>
<el-row style="width: 100%">
<el-col :lg="8" :md="12" :sm="12" :xs="24">
<div>{{
language == 0 ? '购票数量' : 'Number of tickets purchased'
}}{{ form.num }}{{ language == 0 ? '张' : 'Tickets' }}
</div>
</el-col>
<el-col :lg="8" :md="12" :sm="12" :xs="24">{{
language == 0 ? '联系方式' : 'Contact Information'
}}{{ form.phone }}
</el-col>
<el-col :lg="8" :md="12" :sm="12" :xs="24">
{{ language == 0 ? '共计' : 'total' }}:{{
language == 0 ? '¥' : '€'
}}{{ Number(totalFee).toFixed(2) }}
</el-col>
</el-row>
</el-row>
</div>
<el-row align="middle" justify="space-between">
......
<template>
<div>
<div>
<div class="banner">
<h2>{{ language==0?'旅游服务':'Travel Service' }}</h2>
</div>
<div class="box">
<div class="searchBar">
<el-input :placeholder="language==0?'请输入关键字搜索':'Search'" v-model="query.name" class="no-border">
</el-input>
<el-input v-model="query.name" :placeholder="language==0?'请输入关键字搜索':'Search'" class="no-border" />
<el-button size="large" type="primary" class="btn-lineG" icon="search" @click="getList">
{{ language==0?'搜索':'Search' }}</el-button>
</div>
</div>
<div class="box" v-loading="loading">
<div v-loading="loading" class="box">
<el-row :gutter="20">
<el-col :lg="24" :md="24" :sm="24" :xs="24" :xl="24" v-for="(h,index) in list" class="mb20">
<el-card @click="goDetail(h)">
<el-col
v-for="(h,index) in list" :lg="24" :md="24" :sm="24" :xs="24"
:xl="24" class="mb20"
>
<el-card>
<!-- 酒店列表-->
<el-row class="hotel" align="middle" :gutter="20">
<el-col :span="6">
<div class="imgbox">
<img class="w100" :src="fillImgUrl(h.photos?.split(',')[0])"/>
<img class="w100" :src="fillImgUrl(h.photos?.split(',')[0])">
</div>
</el-col>
<el-col :span="12">
<h3 class="esp">{{h.name}}</h3>
<h3 class="esp">{{ h.name }}</h3>
<div class="starBox">
<img v-for="i in Number(h.starLevel||0)" src="@/assets/booking/star.png">
</div>
<div class="tagbox esp">
<span v-for="(t,index) in h.label?.split(',')" v-show="index<4">{{t}}</span>
<a v-show="h.label?.split(',').length>4">{{ language==0?'更多':'MORE' }} ></a>
<img v-for="i in Number(h.rank||0)" src="@/assets/booking/star.png">
</div>
<p class="esp addr mt20">
<el-icon size="16" style="position: relative;top: 2px" color="#929AA0">
<Clock />
</el-icon>
<span class="ml5">{{ language == 0 ? '开园时间' : 'Opening Time' }}{{ h.startTime }}{{ h.workTime }}</span>
</p>
<p class="esp addr mt20">
<el-icon size="16" style="position: relative;top: 2px" color="#929AA0"><LocationFilled /></el-icon>
{{h.address}}
{{ h.address }}
</p>
</el-col>
<el-col :span="4" class="text-right">
<div class="price">{{ language==0?'¥':'€' }}<span>{{ h.price }}</span>
<i v-if="language==0"></i>
</div>
<el-button class="btn-lineG w200px" round type="primary" >{{ language==0?'立即预订':'Select' }}</el-button>
<el-button class="btn-lineG w200px" round type="primary" @click="goDetail(h)">{{ language==0?'立即预订':'Select' }}</el-button>
</el-col>
</el-row>
</el-card>
</el-col>
</el-row>
<el-empty v-show="!loading&&list.length==0" :image="`/img/order_no.png`" :image-size="228" description="" />
<div style="height: 50px"></div>
<div style="height: 50px" />
</div>
</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";
const router = useRouter()
const route = useRoute()
const user = useUserStore().user
const useStore = useUserStore
const language= useStorage('language',0)
const query = ref({
name:''
})
const cptId = ref('')
const list = ref([])
const loading = ref(false)
onMounted(()=>{
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'
const router = useRouter()
const route = useRoute()
const user = useUserStore().user
const useStore = useUserStore
const language = useStorage('language', 0)
const query = ref({
name: ''
})
const cptId = ref('')
const list = ref([])
const loading = ref(false)
onMounted(() => {
query.value.activityId = route.params.cptId
getList()
})
})
function getList() {
function getList() {
loading.value = true
booking.getHotelList(query.value).then(res=>{
booking.getScenicList(query.value).then(res => {
list.value = res.rows
loading.value = false
console.log(list.value)
}).catch(e=>{
}).catch(e => {
loading.value = false
})
}
function goDetail(item) {
if(!user){
}
function goDetail(item) {
if (!user) {
useStore().setVisitor()
return
}
router.push({
name:'travelDetail',
params:{
hotelId:item.hotelId,
name: 'travelDetail',
params: {
scenicId: item.scenicId
},
query:{
id:item.id
query: {
lasId: item.id
}
})
}
}
</script>
<style scoped lang="scss">
......
<template>
<div>
<div class="box">
<el-card class="mt30" v-loading="loading">
<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])"/>-->
......@@ -9,57 +9,56 @@
<el-col :span="language == 0?16:24">
<h3 class="esp flex">{{ form?.name }}
<el-tag class="ml10">5A</el-tag>
<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="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/>
<Clock />
</el-icon>
<span class="mr10">{{ language == 0 ? '开园时间' : 'Opening Time' }}{{ form?.checkInTime }}{{ form?.checkOutTime }}</span>
<span class="mr10">{{ language == 0 ? '开园时间' : 'Opening Time' }}{{ form?.startTime }}{{ form?.workTime }}</span>
</div>
<div class="info">
<el-icon>
<Phone/>
<Phone />
</el-icon>
<span class="mr10">{{ language == 0 ? '联系方式' : 'Contact' }}0510-12345678</span>
<span class="mr10">{{ language == 0 ? '联系方式' : 'Contact' }}{{ form?.contact }}</span>
</div>
<div class="info esp">
<el-icon>
<MapLocation/>
<MapLocation />
</el-icon>
<span>{{ form?.addName }}</span>
<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>
</div>
</el-col>
<el-col :span="8" class="text-right" v-if="language == 0">
<div class="mapBox" @click="goMap">
<div id="map"></div>
<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-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(',')"/>
<el-image
:src="fillImgUrl(form?.photos?.split(',')[0])" fit="cover"
:preview-src-list="form?.photos?.split(',')"
/>
</div>
</el-col>
<el-col :span="14">
<el-row class="h100" :gutter="20">
<el-col :span="8" class="oddmb" v-for="(p,index) in form?.photos?.split(',').slice(1,7)">
<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"/>
<el-image :src="fillImgUrl(p)" fit="cover" />
</div>
</el-col>
</el-row>
......@@ -76,14 +75,13 @@
</ul>
</div>
<div>
<!-- 日期-->
<el-calendar class="mt20" v-model="currentDate" :range="calendarRange">
<!-- 日期-->
<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>
<el-col :lg="7" class="forPc" />
<el-col :lg="10" class="forPc">
<el-row justify="center" align='middle'>
<el-row justify="center" align="middle">
<!-- <div class="canBtn"><el-icon><ArrowLeftBold /></el-icon></div>-->
<div class="cTitle">
<!-- <el-date-picker-->
......@@ -98,7 +96,7 @@
<!-- @change="changee"-->
<!-- />-->
<!-- <el-input readonly :value="date" type="text" size="small" style="width: 280px"></el-input>-->
{{date}}
{{ date }}
</div>
<!-- <div class="canBtn"><el-icon><ArrowRightBold /></el-icon></div>-->
</el-row>
......@@ -110,9 +108,9 @@
type="date"
placeholder="YYYY-MM-DD"
format="YYYY-MM-DD"
@change="dateChange"
:disabled-date="disabledDateRZ"
:clearable='false'
:clearable="false"
@change="dateChange"
/>
</div>
</el-col>
......@@ -127,8 +125,10 @@
</div>
<div class="text-center mt30">
<el-button style="color: #fff" :disabled="!hotTime" size="large"
class="w200px btn-lineG" :class="{'forbid':!(!hotTime[0])}" round @click="goOrder">
<el-button
style="color: #fff" :disabled="btnDisable" size="large"
class="w200px btn-lineG" :class="{'forbid':!(!hotTime[0])}" round @click="goOrder"
>
{{ language==0?'立即预订':'BOOK NOW' }}
</el-button>
</div>
......@@ -138,21 +138,21 @@
</template>
<script setup>
import {useRouter} from "vue-router";
import {ref, reactive, onMounted, getCurrentInstance} from "vue";
import {useRoute} from "vue-router";
import {dayjs} from 'element-plus'
import {getHotelById, getHotelRooms, checkRoomPayByUserId} from "@/apiPc/booking"
import {getBaseInfoByActiveId} from "@/apiPc/booking";
const {proxy} = getCurrentInstance()
import {useStorage} from "@vueuse/core/index";
import useUserStore from "@/store/modules/user";
import {ElMessageBox} from "element-plus";
import { useRouter } from 'vue-router'
import { ref, reactive, onMounted, getCurrentInstance, computed } from 'vue'
import { useRoute } from 'vue-router'
import { dayjs } from 'element-plus'
import { getHotelById, getHotelRooms, checkRoomPayByUserId, getScenicById, checkOrderPay } from '@/apiPc/booking'
import { getBaseInfoByActiveId } from '@/apiPc/booking'
const { proxy } = getCurrentInstance()
import { useStorage } from '@vueuse/core/index'
import useUserStore from '@/store/modules/user'
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 calendarRange = ref([dayjs(currentDate.value).toDate(), (dayjs(currentDate.value).toDate())])
const user = useUserStore().user
const useStore = useUserStore
......@@ -161,7 +161,7 @@ const router = useRouter()
const route = useRoute()
const form = ref({})
const query = ref({
hotelId: route.query.id
lasId: route.query.lasId
})
const hotTime = ref([])
const showAll = ref(false)
......@@ -170,10 +170,9 @@ const roomList = ref([])
const map = ref(null)
const formTime = ref({})
let baseHotTime;
let baseHotTime
onMounted(() => {
console.log(route.params)
getBaseInfoByActiveId(route.params.cptId).then(res => {
formTime.value = res.data || null
}).catch(err => {
......@@ -185,7 +184,6 @@ onMounted(() => {
getData()
})
})
function initTime() {
......@@ -197,13 +195,9 @@ function initTime() {
function getDateTime() {
if (formTime.value) {
if (dayjs().isBefore(dayjs(formTime.value.hqStart))) {
// hotTime.value[0]=dayjs(formTime.value.hqStart).format('YYYY-MM-DD')
// hotTime.value[1]=dayjs(formTime.value.hqStart).add(1,'day').format('YYYY-MM-DD')
baseHotTime = [dayjs(formTime.value.hqStart).format('YYYY-MM-DD'), dayjs(formTime.value.hqStart).add(1, 'day').format('YYYY-MM-DD')]
if (dayjs().isBefore(dayjs(formTime.value.scenicStart))) {
baseHotTime = [dayjs(formTime.value.scenicStart).format('YYYY-MM-DD'), dayjs(formTime.value.scenicStart).add(1, 'day').format('YYYY-MM-DD')]
} else {
// hotTime.value[0]=dayjs().format('YYYY-MM-DD')
// hotTime.value[1]=dayjs().add(1,'day').format('YYYY-MM-DD')
baseHotTime = [dayjs().format('YYYY-MM-DD'), dayjs().add(1, 'day').format('YYYY-MM-DD')]
}
}
......@@ -211,79 +205,94 @@ function getDateTime() {
function getData() {
loading.value = true
getHotelById(route.params.hotelId).then(res => {
getScenicById(route.params.scenicId).then(res => {
loading.value = false
form.value = res.data
initMap()
// initMap()
}).catch(err => {
console.log(err)
})
}
function dateChange(){
currentDate.value=currentDate1.value
calendarRange.value=[dayjs(currentDate.value).toDate(),(dayjs(currentDate.value).toDate())]
function dateChange() {
currentDate.value = currentDate1.value
calendarRange.value = [dayjs(currentDate.value).toDate(), (dayjs(currentDate.value).toDate())]
}
function selectDate(date) {
currentDate1.value= currentDate.value=dayjs(date).toDate()
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 initMap() {
// const TMap = (window as any).TMap
var center = new TMap.LatLng(form.value.latitude, form.value.longitude);//设置中心点坐标'
var map = new TMap.Map("map", {
center: center,//设置地图中心点坐标
zoom: 17, //设置地图缩放级别
});
var infoWindowLocation = new TMap.LatLng(form.value.latitude, form.value.longitude);//创建一个坐标
//创建InfoWindow实例,并进行初始化
var center = new TMap.LatLng(form.value.latitude, form.value.longitude)// 设置中心点坐标'
var map = new TMap.Map('map', {
center: center, // 设置地图中心点坐标
zoom: 17 // 设置地图缩放级别
})
var infoWindowLocation = new TMap.LatLng(form.value.latitude, form.value.longitude)// 创建一个坐标
// 创建InfoWindow实例,并进行初始化
var infowindow = new TMap.InfoWindow({
content: form.value.address, //信息窗口内容
position: infoWindowLocation,//显示信息窗口的坐标
content: form.value.address, // 信息窗口内容
position: infoWindowLocation, // 显示信息窗口的坐标
map: map,
offset: {x: 0, y: -32}
});
infowindow.close();
offset: { x: 0, y: -32 }
})
infowindow.close()
var marker = new TMap.MultiMarker({
map: map,
//样式定义
// 样式定义
styles: {
"myStyle": new TMap.MarkerStyle({
"anchor": {x: 16, y: 32}
'myStyle': new TMap.MarkerStyle({
'anchor': { x: 16, y: 32 }
})
},
//点标记数据数组
// 点标记数据数组
geometries: [{
"id": "1", //点标记唯一标识,后续如果有删除、修改位置等操作,都需要此id
'id': '1', // 点标记唯一标识,后续如果有删除、修改位置等操作,都需要此id
// "styleId": 'myStyle', //指定样式id
"position": new TMap.LatLng(form.value.latitude, form.value.longitude), //点标记坐标位置
"properties": {//自定义属性
"title": form.value.name
'position': new TMap.LatLng(form.value.latitude, form.value.longitude), // 点标记坐标位置
'properties': { // 自定义属性
'title': form.value.name
}
}
]
})
marker.on("click", function (evt) {
//设置infoWindow
infowindow.open(); //打开信息窗
infowindow.setPosition(evt.geometry.position);//设置信息窗位置
marker.on('click', function(evt) {
// 设置infoWindow
infowindow.open() // 打开信息窗
infowindow.setPosition(evt.geometry.position)// 设置信息窗位置
})
}
function goOrder(room) {
if(!hotTime.value){
proxy.$modal.msgError(language.value == 0 ?'请先选择出发日期':'Please choose the date of check-in first')
return
}
if(room.useCount<=0){
ElMessageBox.confirm(language.value == 0 ? `您当前选择的日期是${hotTime.value[0]}${hotTime.value[1]},该时间段暂无可预订房间,请选择其他日期` :
`You currently select the check-in date of ${hotTime.value[0]} to ${hotTime.value[1]}, there is no room available for booking at this time period, please choose another date`, {type: 'warning'}).then({
})
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(() => {
checkRoomPayByUserId(room.hotelId).then(res => {
// if (!hotTime.value) {
// proxy.$modal.msgError(language.value == 0 ? '请先选择出发日期' : 'Please choose the date of check-in first')
// return
// }
// if (room.useCount <= 0) {
// ElMessageBox.confirm(language.value == 0 ? `您当前选择的日期是${hotTime.value[0]}至 ${hotTime.value[1]},该时间段暂无可预订房间,请选择其他日期`
// : `You currently select the check-in date of ${hotTime.value[0]} to ${hotTime.value[1]}, there is no room available for booking at this time period, please choose another date`, { type: 'warning' }).then({
//
// })
// 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?',
......@@ -291,12 +300,12 @@ function goOrder(room) {
{
confirmButtonText: language.value == 1 ? 'Go My Reservation ' : '前往我的预订',
// cancelButtonText: language.value==1?'Continue to book':'继续预订',
type: 'warning',
type: 'warning'
}
).then((res) => {
console.log(res)
router.push({
name: 'myReservation',
name: 'myReservation'
})
})
return
......@@ -304,19 +313,16 @@ function goOrder(room) {
goNext()
})
})
}
function goNext() {
router.push({
name: 'travelOrder',
params: {
roomId: 0
start: dayjs(currentDate.value).format('YYYY-MM-DD')
},
query: {
hotelName: form.value.name,
start:currentDate.value
lasId: query.value.lasId
}
})
}
......@@ -335,13 +341,13 @@ function getDaysBetween() {
}
function disabledDateRZ(date) {
//判读今天大与form.value.hqStart
if (formTime.value.hqStart) {
// 判读今天大与form.value.hqStart
if (formTime.value.scenicStart) {
const today = dayjs().format('YYYY-MM-DD')
if (formTime.value.hqStart < today) {
return !((date.getTime() >= dayjs(today).valueOf()) && (date.getTime() <= dayjs(formTime.value.hqEnd).valueOf()))
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.hqStart).valueOf()) && (date.getTime() <= dayjs(formTime.value.hqEnd).valueOf()))
return !((date.getTime() >= dayjs(formTime.value.scenicStart).valueOf()) && (date.getTime() <= dayjs(formTime.value.scenicEnd).valueOf()))
}
}
// return true
......@@ -352,8 +358,8 @@ function goMap() {
// var tencentMapUrl = "https://map.qq.com/";
// window.location.href = tencentMapUrl;
var url = `https://map.qq.com/?type=gcj02&lat=${form.value.latitude}&lng=${form.value.longitude}`
var mapUrl_tx = "http://apis.map.qq.com/uri/v1/marker?marker=coord:" + form.value.latitude + "," + form.value.longitude + "&referer=yellowpage";
window.open(url, "_blank")
var mapUrl_tx = 'http://apis.map.qq.com/uri/v1/marker?marker=coord:' + form.value.latitude + ',' + form.value.longitude + '&referer=yellowpage'
window.open(url, '_blank')
}
</script>
......
......@@ -9,60 +9,94 @@
<el-row class="pd20" :gutter="20">
<el-col :span="14">
<div class="border-info">
<h3>{{ hotelName }}</h3>
<div class="roomType">{{ room.roomType }}</div>
<div class="room">
<span>{{ room.bedType }}</span>
<el-row 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">{{ scenicItem?.name }}
<div class="starBox ml20">
<img v-for="i in Number(scenicItem?.rank||0)" src="@/assets/booking/star.png">
</div>
</h3>
<div class="info">
<el-icon>
<Clock />
</el-icon>
<span class="mr10">{{ language == 0 ? '开园时间' : 'Opening Time' }}{{ scenicItem?.startTime }}{{ scenicItem?.workTime }}</span>
</div>
<div class="info">
<el-icon>
<Phone />
</el-icon>
<span class="mr10">{{ language == 0 ? '联系方式' : 'Contact' }}{{ scenicItem?.contact }}</span>
</div>
<div class="info esp">
<el-icon>
<MapLocation />
</el-icon>
<span>{{ scenicItem?.address }}</span>
</div>
</el-col>
</el-row>
</div>
<div class="leftboderTT">{{ language == 0 ? '预约信息' : 'Reservation information' }}</div>
<div class="border-rr mt20 pd20">
<el-form :model="form" :label-width="language == 0 ?'120':'160'" :rules="rules" ref="formRef">
<!-- :disabled-date="disabledDateRZ"-->
<el-form ref="formRef" v-loading="loading" :model="form" :label-width="language == 0 ?'120':'160'" :rules="rules">
<!-- :disabled-date="disabledDateRZ"-->
<el-form-item :label="language==0?'选择日期':'Date'" required>
<el-date-picker v-model="rzRange"
format="YYYY-MM-DD" :clearable="false"
value-format="YYYY-MM-DD"/>
<el-date-picker
v-model="rzRange"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
:disabled-date="disabledDateRZ"
:clearable="false"
@change="dateChange"
/>
<div class="tip" v-if="lform.travelStart">{{ language==0?'可订日期':'Available date' }}{{ lform.travelStart.slice(0, 10) }} ~ {{ lform.travelEnd.slice(0, 10) }}</div>
<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 :label="language==0? n.name:'Rooms'" required prop="roomNum" v-for="n in typeList">
<el-input-number v-model="n.num" :min="0" :max="canOrderNum" @change="changeRoomNum(n)"/>
<el-form-item v-for="(n,i) in gateList" :key="i" :label="language==0? n.name:'Rooms'" prop="count">
<el-input-number v-model="n.count" :min="0" :max="n.leftNum" @change="changeNum(n)" />
<div class="red ml20">
<span v-if="language == 0">单价:{{ n.price }}</span>
<span v-else>{{ n.priceEn }}</span>
</div>
<div class="red ml20">
<span v-if="language == 0">剩余票数:{{ canOrderNum }}</span>
<span v-else>{{ canOrderNum }} Remaining rooms</span>
<span v-if="language == 0">剩余票数:{{ n.leftNum }}</span>
<span v-else>{{ n.leftNum }} Remaining rooms</span>
</div>
<div class="tip" v-if="language==1">If you need to make a hotel reservation, please fill in the full names of all required persons when booking the hotel. (For two or more people, please use ',')</div>
</el-form-item>
<div class="fakeFormItem">
<div v-if="needPersonNum>0" class="fakeFormItem">
<label>需填写{{ needPersonNum }}位游客</label>
<div>
<div v-show="needPersonNum > form.personArr.length">还需填写{{needPersonNum-form.personArr.length}}位游客</div>
<div>
<el-button plain type="primary" @click="showAddPerson">新增出行人</el-button>
</div>
<div v-show="needPersonNum > hasPersonNum">还需填写{{ needPersonNum-hasPersonNum }}位游客</div>
</div>
</div>
<div v-show="form.personArr.length>0">
<div class="fakeFormItem personIt" v-for="(n,index) in form.personArr">
<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,index)"><Remove /></el-icon>
游客{{index+1}}
<el-icon @click="delPerson(n,j)"><Remove /></el-icon>
{{ n.name }}{{ j+1 }}
</label>
<div class="mation">
<div>{{n.name}}</div>
身份证:{{n.idcCode}}
<div>{{ p.name }}</div>
身份证:{{ p.idCard }}
</div>
<el-icon @click="showAddPerson(n)"><Edit /></el-icon>
<el-icon @click="showAddPerson(n, j,p)"><Edit /></el-icon>
</div>
</div>
<el-form-item :label="language==0?'联系人':'Contact'" required prop="contacts">
<el-input v-model="form.contacts" />
</el-form-item>
<el-form-item :label="language==0?'联系手机':'Contact phone'" required prop="phone">
<el-input v-model="form.phone"/>
<el-input v-model="form.phone" />
</el-form-item>
</el-form>
......@@ -72,22 +106,15 @@
<div class="leftboderTT">{{ language == 0 ? '订单明细' : 'Order details' }}</div>
<div class="border-rr mt20 pd20 ccitemBox">
<label> {{ language == 0 ? '基本费用' : 'Room fee' }}
<span class="fr" v-if="language==0">{{
language == 0 ? '¥' : '€'
}}{{ ( form.roomNum * choseRooms.length).toFixed(2) }}</span>
<span class="fr" v-else>{{
language == 0 ? '¥' : '€'
}}{{ ( form.roomNum * choseRooms.length).toFixed(2) }}</span>
</label>
<div class="ccitem" v-for="(c, index) in choseRooms" :key="index" v-show="form.roomNum>0">
{{ c }}
<span v-if="language==0">{{ form.roomNum }}*{{ language == 0 ? '¥' : '€' }}{{ room.roomPrice }}</span>
<span v-else>{{ form.roomNum }}*{{ language == 0 ? '¥' : '€' }}{{ room.roomPriceEn }}</span>
<div v-for="(c, index) in gateList" v-show="c.count>0" :key="index" class="ccitem">
<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>
class="fr bigMoney"
>{{ language == 0 ? '¥' : '€' }}{{ money }}</span></label>
</div>
</el-col>
......@@ -106,163 +133,202 @@
</el-col>
</el-row>
</el-card>
<div style="height: 60px;"></div>
<div style="height: 60px;" />
</div>
<el-dialog v-model="show" title="出行人信息" width="500px" center>
<div>
<el-form label-width="100" ref="personRef">
<el-form-item label="姓名">
<el-input v-model="person.name" placeholder="请与证件姓名一致"/>
</el-form-item>
<el-form-item label="证件号">
<el-input v-model="person.idcCode" placeholder="请填写身份证号"/>
</el-form-item>
</el-form>
</div>
<template #footer>
<div class="dialog-footer">
<el-button @click="show = false">取 消</el-button>
<el-button type="primary" @click="addPerson">完成</el-button>
</div>
</template>
</el-dialog>
<choose-person ref="choosePersonRef" @add-person="addPerson" />
</div>
</template>
<script setup>
import {useRouter, useRoute} from "vue-router";
import {ref, reactive, onMounted} from "vue";
import {useStorage} from "@vueuse/core/index";
import {checkResidueRoom, getBaseInfoByActiveId, newsSubmitOrderHotel} from "@/apiPc/booking"
import { useRouter, useRoute } from 'vue-router'
import { ref, onMounted } from 'vue'
import { useStorage } from '@vueuse/core/index'
import {
getBaseInfoByActiveId,
getGateListByLasId,
getScenicById,
submitOrderScenic
} from '@/apiPc/booking'
import dayjs from 'dayjs'
import {ElMessage,ElMessageBox} from "element-plus";
import useUserStore from "@/store/modules/user";
import { ElMessage, ElMessageBox } from 'element-plus'
import useUserStore from '@/store/modules/user'
import _ from 'lodash'
import ChoosePerson from './component/choosePerson.vue'
const user = useUserStore().user
const language = useStorage('language', 0)
const router = useRouter()
const route = useRoute()
const room = ref({})
const hotelName = ref('')
const loading = ref(false)
const canOrderNum = ref(0)
const needPersonNum = ref(0)
const hasPersonNum = ref(0)
const person = ref({
name: '',
idcCode: ''
})
const show = ref(false)
const lform = ref({})
const scenicItem = ref({})
const form = ref({
roomNum: 0,
phone: user?.phonenumber||'',
personArr: []
contacts: user?.nickName || '',
phone: user?.phonenumber || '',
touristList: []
})
const rzRange = ref('')
const typeList = ref([
{
name: '成人票',
value: '1'
},
{
name: '儿童票',
value: '2'
},
{
name: '老年票',
value: '2'
}
])
const gateList = ref([])
const money = ref(0)
const choseRooms = ref([])
const choosePersonRef = 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' }
})
let usedays = 0
const usedays = 0
onMounted(() => {
console.log(route.query)
hotelName.value = route.query.hotelName
money.value = 0
rzRange.value = dayjs(route.query.start).format('YYYY-MM-DD')
rzRange.value = route.params.start
getScenic()
initDays()
checkreRooms()
getGate()
})
function initDays() {
// 可定日期范围
getBaseInfoByActiveId(route.params.cptId).then(res=>{
getBaseInfoByActiveId(route.params.cptId).then(res => {
lform.value = res.data
}).catch(err=>{
console.log(err)
})
}
function getScenic() {
getScenicById(route.params.scenicId).then(res => {
scenicItem.value = res.data
})
}
function getGate() {
gateList.value = []
loading.value = true
getGateListByLasId({
lasId: route.query.lasId,
scenicDate: rzRange.value
}).then(res => {
gateList.value = res.data
_.each(gateList.value, item => {
item.count = 0
item.leftNum = item.num - item.orderCount
item.personArr = []
})
}).finally(() => {
loading.value = false
})
}
function disabledDateRZ(date) {
//判读今天大与form.value.travelStart
if (lform.value.travelStart) {
// 判读今天大与form.value.travelStart
if (lform.value.scenicStart) {
const today = dayjs().format('YYYY-MM-DD')
if (lform.value.travelStart < today) {
return !((date.getTime() >= dayjs(today).valueOf())&&(date.getTime() <= dayjs(lform.value.travelEnd).valueOf()))
if (lform.value.scenicStart < today) {
return !((date.getTime() >= dayjs(today).valueOf()) && (date.getTime() <= dayjs(lform.value.scenicEnd).valueOf()))
} else {
return !((date.getTime() >= dayjs(lform.value.travelStart).valueOf())&&(date.getTime() <= dayjs(lform.value.travelEnd).valueOf()))
return !((date.getTime() >= dayjs(lform.value.scenicStart).valueOf()) && (date.getTime() <= dayjs(lform.value.scenicEnd).valueOf()))
}
}
// return true
}
function changeRoomNum(e) {
console.log(e)
countMoney()
function dateChange() {
getGate()
}
function checkreRooms() {
//获取票类型 typeList
const checkPersonNum = () => {
needPersonNum.value = 0
hasPersonNum.value = 0
_.each(gateList.value, item => {
needPersonNum.value += item.count
_.each(item.personArr, person => {
if (person.customerId) {
hasPersonNum.value++
}
})
})
}
const showAddPerson = (item) => {
if(item){
person.value = item
} else {
person.value = {
function changeNum(e) {
checkPersonNum()
if (e.personArr.length < e.count) {
e.personArr.push({
customerId: '',
name: '',
idcCode: ''
}
idcType: '',
idCard: ''
})
} else if (e.personArr.length > e.count) {
e.personArr.splice(e.count)
}
show.value = true
countMoney()
}
const addPerson = () => {
if(!person.value.name){
ElMessage.warning(language.value == 0 ? '请填写姓名' : 'Please fill in the name')
return
const showAddPerson = (item, index, person) => {
const customerIds = []
_.each(gateList.value, (g) => {
_.each(g.personArr, (p) => {
if (p.customerId && p.customerId != person.customerId) {
customerIds.push(p.customerId)
}
if(!person.value.idcCode){
ElMessage.warning(language.value == 0 ? '请填写身份证号' : 'Please fill in the ID number')
return
})
})
choosePersonRef.value.open({
gateId: item.id,
gateType: item.gateType,
personIndex: index,
customerId: person.customerId,
hasCustomerIds: customerIds.join(',')
})
}
const addPerson = (item) => {
const gate = _.find(gateList.value, (g) => g.id == item.gateId)
gate.personArr[item.personIndex] = {
customerId: item.customerId,
name: item.name,
idcType: item.idcType,
idCard: item.idCard
}
form.value.personArr.push(person.value)
show.value = false
checkPersonNum()
}
const delPerson = (item,index) => {
form.value.personArr.splice(index,1)
const delPerson = (item, index) => {
item.personArr.splice(index, 1)
item.count--
checkPersonNum()
countMoney()
}
function countMoney() {
if (language.value == 0) {
money.value = ((form.value.roomNum * usedays) + ( form.value.addNum * usedays)).toFixed(2)
} else {
money.value = ((form.value.roomNum * usedays) + (form.value.addNum * usedays)).toFixed(2)
money.value = 0
_.each(gateList.value, (g) => {
if (g.count > 0) {
money.value += g.count * (language.value == 0 ? g.price : g.priceEn)
}
if (money.value == 'NaN') money.value = 0.00
})
money.value = (money.value).toFixed(2)
}
function submit() {
if(!user){
if (!user) {
useUserStore().setReLogin()
return
}
if(!rzRange.value)return ElMessage.warning(language.value == 0 ? '请选择预订日期' : 'Please select check-in time')
if(!form.value.phone){
if (!form.value.phone) {
ElMessage.warning(language.value == 0 ? '请填写手机号' : 'Please fill in the phone number')
return
}
if(form.value.personArr.length!=needPersonNum.value){
if (needPersonNum.value != hasPersonNum.value) {
ElMessage.warning(language.value == 0 ? '出行人数与票数不匹配' : 'The number of people travelling does not match the number of rooms')
return
}
......@@ -273,19 +339,46 @@ function submit() {
cancelButtonText: language.value == 0 ? '取消' : 'Cancel',
type: 'warning'
}).then(() => {
newsSubmitOrderHotel(form.value).then(res => {
form.value.activeId = route.params.cptId
form.value.asId = route.query.lasId
form.value.orderName = scenicItem.value.name
form.value.dcStart = rzRange.value
const personArr = []
_.each(gateList.value, (item) => {
if (item.count > 0) {
_.each(item.personArr, (person) => {
personArr.push({
activeId: route.params.cptId,
asId: item.lasId,
asgId: item.lasgId,
asgcId: item.id,
gateName: item.name,
gateType: item.gateType,
price: language.value == 0 ? item.price : item.priceEn,
paymentType: language.value == 0 ? '1' : '3',
customerId: person.customerId,
name: person.name,
idcType: person.idcType,
idCard: person.idCard
})
})
}
})
form.value.touristList = personArr
submitOrderScenic(form.value).then(res => {
if (res.data) {
if (res.data.roomNum == -100) {
ElMessage.warning(language.value == 0 ? '剩余票数不足' : 'The remaining number of rooms is insufficient')
checkreRooms()
} else {
//去付钱
// 去付钱
router.push({
name: 'bookingPay',
query: {
orderId:res.data.orderId,
money:res.data.total,
type:'hotel'
orderId: res.data.orderId,
money: res.data.total,
type: 'travel'
}
})
}
......
......@@ -81,8 +81,8 @@ export default defineConfig(({ mode, command }) => {
rewrite: (p) => p.replace(/^\/dev-api\/ztx-webSite/, '')
},
'/dev-api': {
// target: 'http://192.168.1.118:8081/',
target: 'http://192.168.1.253:8081',
target: 'http://192.168.1.118:8081/',
// target: 'http://192.168.1.253:8081',
// target: 'https://jijin.wtwuxicenter.com/stage-api',
// target: 'https://wdsfwuxicenter.com/stage-api/',
changeOrigin: true,
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!