Commit f53c40bd authored by 沈良进's avatar 沈良进

Merge branch 'master' of http://gitlab.oytour.com/viitto/million

parents 8f964182 60ca5550
...@@ -22,12 +22,14 @@ ...@@ -22,12 +22,14 @@
"qrcode.vue": "^1.7.0", "qrcode.vue": "^1.7.0",
"qrcodejs2": "^0.0.2", "qrcodejs2": "^0.0.2",
"quasar": "^1.22.5", "quasar": "^1.22.5",
"swiper": "3.0.4",
"v-viewer": "^1.6.4", "v-viewer": "^1.6.4",
"vue-awesome-swiper": "^3.0.4", "vue-awesome-swiper": "^3.0.4",
"vue-concise-slider": "^4.2.5", "vue-concise-slider": "^4.2.5",
"vue-core-video-player": "^0.2.0", "vue-core-video-player": "^0.2.0",
"vue-core-video-players": "0.0.5", "vue-core-video-players": "0.0.5",
"vue-i18n": "^8.0.0" "vue-i18n": "^8.0.0",
"vuelidate": "^0.7.7"
}, },
"devDependencies": { "devDependencies": {
"@quasar/app": "^1.0.0" "@quasar/app": "^1.0.0"
...@@ -40,4 +42,4 @@ ...@@ -40,4 +42,4 @@
"browserslist": [ "browserslist": [
"last 1 version, not dead, ie >= 11" "last 1 version, not dead, ie >= 11"
] ]
} }
\ No newline at end of file
import { Notify, QSpinnerIos } from 'quasar'
const message = {
warn: (msg) => {
Notify.create({
message: msg,
color: 'warning',
textColor: 'dark',
position: 'top',
icon: 'announcement'
})
},
error: (msg) => {
Notify.create({
message: msg,
type: 'negative',
position: 'top'
})
},
success: (msg) => {
Notify.create({
message: msg,
color: 'positive',
position: 'top',
textColor: 'white',
icon: 'check'
})
}
}
export default message
\ No newline at end of file
...@@ -18,7 +18,7 @@ const user = { ...@@ -18,7 +18,7 @@ const user = {
if (u) { if (u) {
localStorage.setItem('b2bUser', JSON.stringify(u)) localStorage.setItem('b2bUser', JSON.stringify(u))
} else { } else {
localStorage.setItem('b2bUser', JSON.stringify(u)) //localStorage.removeItem('b2bUser')
} }
}, },
loginOut() { loginOut() {
......
...@@ -2,17 +2,17 @@ import Vue from 'vue' ...@@ -2,17 +2,17 @@ import Vue from 'vue'
import axios from 'axios' import axios from 'axios'
import md5 from 'js-md5' import md5 from 'js-md5'
// import {eventBus} from './eventBus' // import {eventBus} from './eventBus'
// import VueCoreVideoPlayer from 'vue-core-video-players' import VueCoreVideoPlayer from 'vue-core-video-players'
import 'viewerjs/dist/viewer.css' import 'viewerjs/dist/viewer.css'
import Vuelidate from 'vuelidate'
import user from './user' import user from './user'
import message from './message'
import VueViewer from 'v-viewer' import VueViewer from 'v-viewer'
// import VueCoreVideoPlayer from 'vue-core-video-player' // import VueCoreVideoPlayer from 'vue-core-video-player'
Vue.prototype.$EventBus = new Vue() Vue.prototype.$EventBus = new Vue()
// Vue.use(VueCoreVideoPlayer) Vue.use(VueCoreVideoPlayer)
Vue.use(VueViewer) Vue.use(VueViewer)
Vue.prototype.$md5 = md5; Vue.prototype.$md5 = md5;
Vue.use(Vuelidate) Vue.prototype.$message = message
//域名管理对象 //域名管理对象
Vue.prototype.domainManager = function() { Vue.prototype.domainManager = function() {
let domainUrl = ''; let domainUrl = '';
......
...@@ -13,44 +13,32 @@ ...@@ -13,44 +13,32 @@
<template v-if="dataList.CarType!=3"> <template v-if="dataList.CarType!=3">
<div class="text-grey-6 f12 q-my-md">選擇機場</div> <div class="text-grey-6 f12 q-my-md">選擇機場</div>
<div class="row wrap"> <div class="row wrap">
<q-btn @click="handleSelect(item,1)" <div v-for="(x,i) in dataList.AirportList" :key="i">
:color="selectedAirportObj&&item.Id === selectedAirportObj.Id?'primary':'grey-5'" <q-chip size="14px" clickable @click="handleSelect(x,1)"
unelevated :text-color="selectedAirportObj&&selectedAirportObj.Id==x.Id?'white':'dark'"
class="car-tag mr" :color="selectedAirportObj&&selectedAirportObj.Id==x.Id?'primary':'grey-3'" square>{{ x.AirportName }}</q-chip>
v-for="item in AirportList" </div>
:key="item.Id"
>
{{ item.AirportName }}
</q-btn>
</div> </div>
</template> </template>
<div class="row"> <div class="row no-wrap">
<div v-if="dataList.CarType!=1"> <div v-if="dataList.CarType!=1" :class="{'col':dataList.PlaceList.length>2}">
<div class="text-grey-6 f12 q-my-md">選擇上車範圍</div> <div class="text-grey-6 f12 q-my-md">選擇上車範圍</div>
<div class="row wrap"> <div class="row wrap">
<q-btn @click="handleSelect(item,3)" <div v-for="(x,i) in dataList.PlaceList" :key="i">
:color="onCarObj&&item.Id === onCarObj.Id?'primary':'grey-5'" <q-chip size="14px" clickable @click="handleSelect(x,3)"
unelevated :text-color="onCarObj&&onCarObj.Id==x.Id?'white':'dark'"
class="car-tag mr" :color="onCarObj&&onCarObj.Id==x.Id?'primary':'grey-3'" square>{{ x.Name }}({{ x.Range }}m)</q-chip>
v-for="item in PlaceList" </div>
:key="item.Id"
>
{{ item.Name }}({{ item.Range }}m)
</q-btn>
</div>
</div> </div>
<div v-if="dataList.CarType!=2"> </div>
<div v-if="dataList.CarType!=2" :class="{'col':dataList.PlaceList.length>2,'q-ml-md':dataList.CarType!=1}">
<div class="text-grey-6 f12 q-my-md">選擇下車範圍</div> <div class="text-grey-6 f12 q-my-md">選擇下車範圍</div>
<div class="row wrap"> <div class="row wrap">
<q-btn @click="handleSelect(item,4)" <div v-for="(x,i) in dataList.PlaceList" :key="i">
:color="unCarObj&&item.Id === unCarObj.Id?'primary':'grey-5'" <q-chip size="14px" clickable @click="handleSelect(x,4)"
unelevated :text-color="unCarObj&&unCarObj.Id==x.Id?'white':'dark'"
class="car-tag mr" :color="unCarObj&&unCarObj.Id==x.Id?'primary':'grey-3'" square>{{ x.Name }}({{ x.Range }}m)</q-chip>
v-for="item in PlaceList" </div>
:key="item.Id"
>
{{ item.Name }}({{ item.Range }}m)
</q-btn>
</div> </div>
</div> </div>
</div> </div>
...@@ -58,15 +46,11 @@ ...@@ -58,15 +46,11 @@
<div class="text-grey-6 f12 q-my-md">選擇車類型</div> <div class="text-grey-6 f12 q-my-md">選擇車類型</div>
<div class="row wrap"> <div class="row wrap">
<q-btn @click="handleSelect(item,2)" <div v-for="(x,i) in dataList.CarTypeList" :key="i">
:color="selectedCarObj&&item.Id === selectedCarObj.Id?'primary':'grey-5'" <q-chip size="14px" clickable @click="handleSelect(x,2)"
unelevated :text-color="selectedCarObj&&selectedCarObj.Id==x.Id?'white':'dark'"
class="car-tag mr" :color="selectedCarObj&&selectedCarObj.Id==x.Id?'primary':'grey-3'" square>{{ x.CarName }}({{ x.PeopleNum }}人)</q-chip>
v-for="item in CarTypeList" </div>
:key="item.Id"
>
{{ item.CarName }}({{ item.PeopleNum }}人)
</q-btn>
</div> </div>
<div class="text-grey-6 f12 q-my-md">選擇數量</div> <div class="text-grey-6 f12 q-my-md">選擇數量</div>
<div class="row items-end"> <div class="row items-end">
...@@ -151,16 +135,17 @@ ...@@ -151,16 +135,17 @@
</template> </template>
<script> <script>
import { date } from "quasar";
export default { export default {
props: ["dataList","PlaceList","price","CarTypeList","AirportList","configId","Month"], props: ["dataList","price","configId","Month"],
watch: { watch: {
price: { price: {
handler(n, o) { handler(n, o) {
this.p = n; this.p = n;
if(n&&n.startDate){ if(n&&n.startDate){
this.chosenObj.startDate = n.startDate; this.chosenObj.startDate = n.startDate;
// this.selectedCar = this.CarTypeList[0].Id // this.selectedCar = this.dataList.CarTypeList[0].Id
// this.selectedCarObj = this.CarTypeList[0] // this.selectedCarObj = this.dataList.CarTypeList[0]
} }
this.calcMoney() this.calcMoney()
...@@ -168,9 +153,9 @@ export default { ...@@ -168,9 +153,9 @@ export default {
deep: true, deep: true,
immediate: false immediate: false
}, },
CarTypeList: { dataList: {
handler(n, o) { handler(n, o) {
this.CarTypeList = n; this.dataList = n;
}, },
deep: true, deep: true,
...@@ -208,20 +193,8 @@ export default { ...@@ -208,20 +193,8 @@ export default {
orderInfo: this.chosenObj, orderInfo: this.chosenObj,
sumPrice: this.sumPrice, sumPrice: this.sumPrice,
Id: this.dataList.Id, Id: this.dataList.Id,
onCarObj: { onCarId: this.onCarObj?this.onCarObj.Id:'',
Address: this.onCarObj?this.onCarObj.Address:'', unCarId: this.unCarObj?this.unCarObj.Id:'',
Name: this.onCarObj?this.onCarObj.Name:'',
Lat: this.onCarObj?this.onCarObj.Lat:'',
Lng: this.onCarObj?this.onCarObj.Lng:'',
Range: this.onCarObj?this.onCarObj.Range:'',
},
unCarObj: {
Address: this.unCarObj?this.unCarObj.Address:'',
Name: this.unCarObj?this.unCarObj.Name:'',
Lat: this.unCarObj?this.unCarObj.Lat:'',
Lng: this.unCarObj?this.unCarObj.Lng:'',
Range: this.unCarObj?this.unCarObj.Range:''
},
} }
let key = this.$md5(JSON.stringify(order)) let key = this.$md5(JSON.stringify(order))
let pickuporderCars = localStorage.getItem('pickuporderCars') let pickuporderCars = localStorage.getItem('pickuporderCars')
...@@ -233,7 +206,7 @@ export default { ...@@ -233,7 +206,7 @@ export default {
localStorage.setItem("pickuporderCars",JSON.stringify(pickuporderCars)) localStorage.setItem("pickuporderCars",JSON.stringify(pickuporderCars))
this.CommonJump('/PickuporderForm/'+key, {}); this.CommonJump('/PickuporderForm/'+key, {});
}, },
// 获取车的详情 // 获取车的详情
getCarPriceData2() { getCarPriceData2() {
this.priceList = [] this.priceList = []
this.apipost( this.apipost(
...@@ -260,7 +233,9 @@ export default { ...@@ -260,7 +233,9 @@ export default {
isSupportChildren: 1, isSupportChildren: 1,
safeMoney: 0, safeMoney: 0,
} }
arr.push(dataObj) if(date.formatDate(Date.now(), 'YYYY-MM-DD')!=x.Date){
arr.push(dataObj)
}
} }
}) })
const temp= JSON.parse(JSON.stringify(r.data.data)) const temp= JSON.parse(JSON.stringify(r.data.data))
......
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</p> </p>
</div> </div>
</div> </div>
<div style="display: flex; justify-content: center"> <div class="row justify-end">
<q-pagination <q-pagination
v-if="PageCount > 1" v-if="PageCount > 1"
v-model="msg.pageIndex" v-model="msg.pageIndex"
...@@ -644,7 +644,7 @@ export default { ...@@ -644,7 +644,7 @@ export default {
var companyId = -1; var companyId = -1;
if (localStorage.groupinfo) { if (localStorage.groupinfo) {
var groupinfo = JSON.parse(localStorage.groupinfo); var groupinfo = JSON.parse(localStorage.groupinfo);
companyId = groupinfo.siteList[0].companyId; companyId = groupinfo.siteList[0]&&groupinfo.siteList[0].companyId?groupinfo.siteList[0].companyId:-1;
} }
if (localStorage.b2bUser) { if (localStorage.b2bUser) {
var b2bUser = JSON.parse(window.localStorage.getItem("b2bUser")); var b2bUser = JSON.parse(window.localStorage.getItem("b2bUser"));
...@@ -661,7 +661,7 @@ export default { ...@@ -661,7 +661,7 @@ export default {
this.$q.loading.hide(); this.$q.loading.hide();
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.PageCount = res.data.data.pageData.pageCount; this.PageCount = res.data.data.pageCount;
this.TotalCount = res.data.data.pageData.count; this.TotalCount = res.data.data.pageData.count;
var tempArray = res.data.data.pageData.list; var tempArray = res.data.data.pageData.list;
console.log('getSearch data', tempArray) console.log('getSearch data', tempArray)
......
...@@ -12,7 +12,8 @@ ...@@ -12,7 +12,8 @@
<p class="day"><span v-if='item.dayNum<10'>0</span>{{item.dayNum}}</p> <p class="day"><span v-if='item.dayNum<10'>0</span>{{item.dayNum}}</p>
<!-- <p>{{item.dateTime}}</p> --> <!-- <p>{{item.dateTime}}</p> -->
</div> </div>
<div class="desc" v-html="item.title"></div> <div class="desc" v-html="item.title!='null'?item.title:''"></div>
</div> </div>
<oneday v-if="item.details && item.details.length==1" :day='item' :isDirect="isDirect"></oneday> <oneday v-if="item.details && item.details.length==1" :day='item' :isDirect="isDirect"></oneday>
<twoday v-if="item.details && item.details.length==2" :day='item' :isDirect="isDirect"></twoday> <twoday v-if="item.details && item.details.length==2" :day='item' :isDirect="isDirect"></twoday>
......
...@@ -53,43 +53,41 @@ ...@@ -53,43 +53,41 @@
></q-img> ></q-img>
</template> </template>
</div> </div>
<div class="row items-end" style="border: 1px solid #ccc; left: 0"> <div class="row items-end col" style="border: 1px solid #ccc; left: 0">
<div class="q-pb-lg"> <div class="down q-pa-lg q-mb-lg" :class="{ col: index == 0 }">
<div class="down q-pa-lg" :class="{ col: index == 0 }"> <div
<div v-if="item.title != ''"
v-if="item.title != ''" class="text-h6 text-bold q-pb-sm"
class="text-h6 text-bold q-pb-sm" v-html="item.title"
v-html="item.title" @click.stop="goUrl(item.url)"
@click.stop="goUrl(item.url)" style="
style=" cursor: pointer;
cursor: pointer; white-space: nowrap;
white-space: nowrap; text-overflow: ellipsis;
text-overflow: ellipsis; overflow: hidden;
overflow: hidden; "
" ></div>
></div> <div
<div class="playInfo"
class="playInfo" v-if="item.playTimeHour || item.playTimeMinutes"
>
<span class="playInfo-item" v-if="item.ticketName != ''">
</span>
<span
class="playInfo-item"
v-if="item.playTimeHour || item.playTimeMinutes" v-if="item.playTimeHour || item.playTimeMinutes"
> >
<span class="playInfo-item" v-if="item.ticketName != ''"> <i class="iconfont icon-shijian1"></i>
<span v-if="item.playTimeHour"
>{{ item.playTimeHour }}小时
</span> </span>
<span <span v-if="item.playTimeMinutes"
class="playInfo-item" >{{ item.playTimeMinutes }}分钟
v-if="item.playTimeHour || item.playTimeMinutes"
>
<i class="iconfont icon-shijian1"></i>
<span v-if="item.playTimeHour"
>{{ item.playTimeHour }}小时
</span>
<span v-if="item.playTimeMinutes"
>{{ item.playTimeMinutes }}分钟
</span>
</span> </span>
</div> </span>
<span v-html="item.content"></span>
</div> </div>
<span v-html="item.content"></span>
</div> </div>
</div> </div>
</div> </div>
......
<template> <template>
<div class="column full-height"> <div class="column full-height" v-if="p">
<div class="col"> <div class="col">
<div class="text-right" v-if="$q.platform.is.desktop"> <div class="text-right" v-if="$q.platform.is.desktop">
<q-btn <q-btn
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
flat flat
/> />
</div> </div>
<div v-if="p && p.unionCityList"> <div v-if="p && p.unionCityList && p.unionCityList.length>0">
<div class="text-grey-6 f12 q-my-md">出發城市</div> <div class="text-grey-6 f12 q-my-md">出發城市</div>
<div class="row q-col-gutter-sm"> <div class="row q-col-gutter-sm">
<div v-for="(x,i) in p.unionCityList" :key="i"> <div v-for="(x,i) in p.unionCityList" :key="i">
...@@ -376,12 +376,11 @@ export default { ...@@ -376,12 +376,11 @@ export default {
watch: { watch: {
price: { price: {
handler(n, o) { handler(n, o) {
console.log(n)
this.p = n?n:{}; this.p = n?n:{};
if (this.p.startDate) { if (this.p.startDate) {
this.chosenObj.startDate = this.p.startDate; this.chosenObj.startDate = this.p.startDate;
this.calcMoney(); this.calcMoney();
if(this.p.unionCityList && this.p.unionCityList.length>0){ if(this.p.unionCityList && this.p.unionCityList.length>0 && this.p.originalB2CPrice==this.p.RealPrice){
this.currentUnionCity = this.p.unionCityList[0] this.currentUnionCity = this.p.unionCityList[0]
} }
} }
......
<template> <template>
<div class="content-page order-preview"> <div class="content-page order-preview">
<q-stepper <q-stepper
v-model="step" v-model="step"
ref="stepper" ref="stepper"
color="primary" color="primary"
inactive-color="grey-5 " inactive-color="grey-5 "
class="bg-transparent" class="bg-transparent"
flat flat
animated animated
> >
<q-step <q-step
:name="1" :name="1"
title="確認訂單" title="確認訂單"
icon="settings" icon="settings"
:done="step > 1" :done="step > 1"
></q-step> ></q-step>
<q-step <q-step
:name="2" :name="2"
title="付款" title="付款"
icon="iconfont iconPayment-1" icon="iconfont iconPayment-1"
:done="step > 2" :done="step > 2"
></q-step> ></q-step>
<q-step <q-step
:name="3" :name="3"
title="訂購完成" title="訂購完成"
icon="iconfont iconicon_finish_R" icon="iconfont iconicon_finish_R"
:done="step == 3" :done="step == 3"
></q-step> ></q-step>
</q-stepper> </q-stepper>
<div <div
class="row q-pa-md" class="row q-pa-md"
style="min-width: 375px; margin: 0 auto" style="min-width: 375px; margin: 0 auto"
:class="{ :class="{
row: $q.screen.width >= 1200 && $q.platform.is.desktop, row: $q.screen.width >= 1200 && $q.platform.is.desktop,
column: $q.screen.width < 1200 || $q.platform.is.mobile, column: $q.screen.width < 1200 || $q.platform.is.mobile,
}" }"
> >
<div class="col"> <div class="col">
<q-card flat class="q-pa-md"> <q-form ref="baseUserInfo">
<div class="text-subtitle1 text-weight-bolder" ref="baseUserInfoTitle">訂購人資訊</div> <q-card flat class="q-pa-md">
<q-separator color="grey-2" class="q-my-md" /> <div class="text-subtitle1 text-weight-bolder">訂購人資訊</div>
<q-separator color="grey-2" class="q-my-md" />
<div class="row q-col-gutter-md">
<div :class="filedWidth">
<q-select
v-model="userInfo.Country"
@input="changeCountry"
:options="countrys"
emit-value
option-label="Name"
option-value="ID"
map-options
label="國家/地區"
standout
/>
</div>
<div :class="filedWidth">
<q-input
standout
v-model="userInfo.Mailbox"
label="郵箱地址"
:rules="[(val) => /^[a-zA-Z0-9]+([-_.][A-Za-zd]+)*@([a-zA-Z0-9]+[-.])+[A-Za-zd]{2,5}$/.test(val) || '請輸入正確的郵箱地址']"
ref="mail"
/>
</div>
</div>
</q-card>
<q-card flat class="q-pa-md q-mt-lg" v-if="details">
<div class="text-subtitle1 text-weight-bolder q-mb-md">旅客資料</div>
<div class="row">
<vue-core-video-players
v-if="details.videoStr"
ref="video"
:src="details.videoStr"
:title="details.title"
:muted="true"
:autoplay="false"
@play="playHandler"
@pause="pauseHandler"
@seeked="seekedChangeHandler"
@timeupdate="timeChangeHandler"
logo="../statics/img/transparent_logo.png"
:loop="false"
id="trip_video"
class="rounded-borders"
style="width: 80px"
/>
<q-img
v-else
:src="details?details.ImageList[0]:'https://image.kkday.com/v2/image/get/s1.kkday.com/product_138437/20230217083232_t5rcO/jpg'"
class="rounded-borders"
spinner-color="grey-3"
style="width: 80px"
/>
<div class="q-ml-md col">
<div class="text-subtitle1 ellipsis">
{{details.Name}}
</div>
<div class="text-caption text-grey-6 ellipsis q-mt-sm">
{{details.Description}}
</div>
</div>
</div>
<div class="q-mt-md row">
<div class="text-grey-9">
<q-icon name="iconfont iconrili" size="20px" class="q-mr-sm" />
<span>{{OrderDate.startDate}}</span>
</div>
<div class="text-grey-9 q-ml-md" v-if="chosenObj.Count > 0&&CarObj">
<q-icon name="iconfont iconjiaotong" size="20px" class="q-mr-sm" />
<span class="q-mr-sm"
>{{CarObj.CarName}} x {{ chosenObj.Count }}</span
>
<span class="q-mr-sm"
>({{CarObj.PeopleNum}}人/辆)</span
>
<template v-if="details.TravelHours>0">
<q-icon name="iconfont icontime" size="20px" class="q-mr-xs q-ml-sm" />
<span class="q-mr-sm">
{{`包車時長:${details.TravelHours} h`}}
</span>
</template>
</div>
</div>
<q-separator color="grey-2" class="q-mt-md" />
<div
class="bg-grey-1 rounded-borders q-pa-md q-mt-md guest-item"
>
<div class="text-subtitle1 q-pb-md text-weight-bold"></div>
<div class="row q-col-gutter-md"> <div class="row q-col-gutter-md">
<div :class="filedWidth"> <div :class="filedGuestWidth">
<q-select <q-input
v-model="userInfo.country"
@input="changeCountry"
:options="countrys"
emit-value
option-label="Name"
option-value="ID"
map-options
label="國家/地區"
standout standout
v-model="parameters.SurName"
label="本國姓"
placeholder="例:張"
:rules="[(val) => !!val || '請輸本國姓']"
ref="SurName"
/> />
</div> </div>
<div :class="filedWidth"> <div :class="filedGuestWidth">
<q-input <q-input
standout standout
v-model="userInfo.mail" v-model="parameters.Name"
label="郵箱地址" label="本國名"
:rules="[(val) => /^[a-zA-Z0-9]+([-_.][A-Za-zd]+)*@([a-zA-Z0-9]+[-.])+[A-Za-zd]{2,5}$/.test(val) || '請輸入正確的郵箱地址']" placeholder="例:三"
ref="mail" :rules="[(val) => !!val || '請輸本國名']"
ref="Name"
/> />
</div> </div>
</div> <div :class="filedGuestWidth">
</q-card> <q-input
standout
<q-card flat class="q-pa-md q-mt-lg" v-if="details"> v-model="parameters.ContactWay"
<div class="text-subtitle1 text-weight-bolder q-mb-md" ref="passengerInformation">旅客資料</div> label="联络方式"
placeholder="例:WeChat"
<div class="row"> :rules="[(val) => !!val || '請輸联络方式']"
<vue-core-video-players ref="ContactWay"
v-if="details.videoStr" mask="X"
ref="video" reverse-fill-mask
:src="details.videoStr"
:title="details.title"
:muted="true"
:autoplay="false"
@play="playHandler"
@pause="pauseHandler"
@seeked="seekedChangeHandler"
@timeupdate="timeChangeHandler"
logo="../statics/img/transparent_logo.png"
:loop="false"
id="trip_video"
class="rounded-borders"
style="width: 80px"
/>
<q-img
v-else
:src="details?details.ImageList[0]:'https://image.kkday.com/v2/image/get/s1.kkday.com/product_138437/20230217083232_t5rcO/jpg'"
class="rounded-borders"
spinner-color="grey-3"
style="width: 80px"
/>
<div class="q-ml-md col">
<div class="text-subtitle1 ellipsis">
{{details.Name}}
</div>
<div class="text-caption text-grey-6 ellipsis q-mt-sm">
{{details.Description}}
</div>
</div>
</div>
<div class="q-mt-md row">
<div class="text-grey-9">
<q-icon name="iconfont iconrili" size="20px" class="q-mr-sm" />
<span>{{OrderDate.startDate}}</span>
</div>
<div class="text-grey-9 q-ml-md" v-if="chosenObj.Count > 0&&CarObj">
<q-icon name="iconfont iconjiaotong" size="20px" class="q-mr-sm" />
<span class="q-mr-sm"
>{{CarObj.CarName}} x {{ chosenObj.Count }}</span
> >
<span class="q-mr-sm" </q-input>
>({{CarObj.PeopleNum}}人/辆)</span </div>
<div :class="filedGuestWidth">
<q-input
standout
v-model="parameters.Mobile"
label="電話"
:rules="[(val) => !!val && val.length == 11 || '請輸正確電話']"
ref="Mobile"
mask="#"
reverse-fill-mask
> >
<template v-slot:prepend>
<div class="text-subtitle2">+{{ userInfo.areaCode }}</div>
</template>
</q-input>
</div>
<div :class="filedGuestWidth">
<div class="row items-center q-mt-md">
<span>選擇性別:</span>
<q-radio
v-model="parameters.Sex"
dense
:val="1"
label="男"
class="q-mr-lg"
/>
<q-radio v-model="parameters.Sex" dense :val="2" label="女" />
</div>
</div> </div>
</div> </div>
</div>
<template v-if="details.CarType!=3">
<div class="text-subtitle1 text-weight-bolder q-my-md">{{details.CarType==1?'抵達':'起飛'}} 班机資料</div>
<q-separator color="grey-2" class="q-mt-md" /> <q-separator color="grey-2" class="q-mt-md" />
<div <div
class="bg-grey-1 rounded-borders q-pa-md q-mt-md guest-item" class="bg-grey-1 rounded-borders q-pa-md q-mt-md guest-item"
...@@ -129,240 +206,202 @@ ...@@ -129,240 +206,202 @@
<div :class="filedGuestWidth"> <div :class="filedGuestWidth">
<q-input <q-input
standout standout
v-model="parameters.SurName" v-model="parameters.AirportTerminal"
label="本國姓" label="航廈"
placeholder="例:張" placeholder="例:航廈"
:rules="[(val) => !!val || '請輸本國姓']" :rules="[(val) => !!val || '請輸航廈']"
ref="SurName" ref="AirportTerminal"
/> readonly>
<q-popup-proxy :offset="[0, 10]" ref="qDateProxy7">
<q-input type="textarea" dense standout autofocus
v-model="parameters.AirportTerminal" placeholder="請輸航廈" />
</q-popup-proxy>
</q-input>
</div> </div>
<div :class="filedGuestWidth"> <div :class="filedGuestWidth">
<q-input <q-input
standout standout
v-model="parameters.Name" v-model="parameters.AirLine"
label="本國名" label="航空公司"
placeholder="例:三" placeholder=""
:rules="[(val) => !!val || '請輸本國名']" :rules="[(val) => !!val || '請輸航空公司名稱']"
ref="Name" ref="AirLine"
/> readonly>
<q-popup-proxy :offset="[0, 10]" ref="qDateProxy8">
<q-input type="textarea" dense standout autofocus
v-model="parameters.AirLine" placeholder="請輸航空公司名稱" />
</q-popup-proxy>
</q-input>
</div> </div>
<div :class="filedGuestWidth"> <div :class="filedGuestWidth">
<q-input <q-input
standout standout
v-model="parameters.ContactWay" v-model="parameters.FlightNumber"
label="联络方式" label="航班編號"
placeholder="例:WeChat" placeholder="例:CA123"
:rules="[(val) => !!val || '請輸联络方式']" :rules="[(val) => !!val || '請輸航班編號']"
ref="ContactWay" ref="FlightNumber"
mask="X" mask="X"
reverse-fill-mask reverse-fill-mask
>
</q-input>
</div>
<div :class="filedGuestWidth">
<q-input
standout
v-model="parameters.Mobile"
label="電話"
:rules="[(val) => !!val && val.length == 11 || '請輸正確電話']"
ref="Mobile"
mask="#"
reverse-fill-mask
>
<template v-slot:prepend>
<div class="text-subtitle2">+{{ userInfo.areaCode }}</div>
</template>
</q-input>
</div>
<div :class="filedGuestWidth">
<div class="row items-center q-mt-md">
<span>選擇性別:</span>
<q-radio
v-model="parameters.Sex"
dense
:val="1"
label="男"
class="q-mr-lg"
/> />
<q-radio v-model="parameters.Sex" dense :val="2" label="女" />
</div>
</div> </div>
</div>
</div>
<template v-if="details.CarType!=3">
<div class="text-subtitle1 text-weight-bolder q-my-md">{{details.CarType==1?'抵達':'起飛'}} 班机資料</div>
<q-separator color="grey-2" class="q-mt-md" />
<div
class="bg-grey-1 rounded-borders q-pa-md q-mt-md guest-item"
>
<div class="text-subtitle1 q-pb-md text-weight-bold"></div>
<div class="row q-col-gutter-md">
<div :class="filedGuestWidth">
<q-input
standout
v-model="parameters.AirportTerminal"
label="航廈"
placeholder="例:航廈"
:rules="[(val) => !!val || '請輸航廈']"
ref="AirportTerminal"
readonly>
<q-popup-proxy :offset="[0, 10]" ref="qDateProxy7">
<q-input type="textarea" dense standout autofocus
v-model="parameters.AirportTerminal" placeholder="請輸航廈" />
</q-popup-proxy>
</q-input>
</div>
<div :class="filedGuestWidth">
<q-input
standout
v-model="parameters.AirLine"
label="航空公司"
placeholder=""
:rules="[(val) => !!val || '請輸航空公司名稱']"
ref="AirLine"
readonly>
<q-popup-proxy :offset="[0, 10]" ref="qDateProxy8">
<q-input type="textarea" dense standout autofocus
v-model="parameters.AirLine" placeholder="請輸航空公司名稱" />
</q-popup-proxy>
</q-input>
</div>
<div :class="filedGuestWidth">
<q-input
standout
v-model="parameters.FlightNumber"
label="航班編號"
placeholder="例:CA123"
:rules="[(val) => !!val || '請輸航班編號']"
ref="FlightNumber"
mask="X"
reverse-fill-mask
/>
</div>
<div :class="filedGuestWidth">
<q-input
class="q-pb-md"
standout
:value="!flightTime?'':parameters.FlightTime"
:label="`航班${details.CarType==1?'抵達':'起飛'}時間`"
:rules="[(val) => !!val || `請选航班${details.CarType==1?'抵達':'起飛'}時間`]"
ref="FlightTime"
>
<template v-slot:append>
<q-icon name="event" class="cursor-pointer"></q-icon>
</template>
<q-popup-proxy :offset="[0, 0]" ref="qDateProxy1">
<div class="row">
<!-- <q-date
mask="YYYY-MM-DD HH:mm"
:title="$t('search_date_begin')"
subtitle="選擇"
v-model="parameters.FlightTime"
:options="optionsFn"
/>
<div class="q-px-sm"></div> -->
<q-time format24h v-model="flightTime" mask="HH:mm"
@input="getTime(1)"/>
</div>
</q-popup-proxy>
</q-input>
</div>
</div>
</div>
</template>
<div class="text-subtitle1 text-weight-bolder q-my-md">
{{details.CarType==1?'接机':details.CarType==2?'送机':'包车'}}資料
</div>
<q-separator color="grey-2" class="q-mt-md" />
<div
class="bg-grey-1 rounded-borders q-pa-md q-mt-md guest-item"
>
<div class="text-subtitle1 q-pb-md text-weight-bold"></div>
<div class="row q-col-gutter-md">
<div :class="filedGuestWidth"> <div :class="filedGuestWidth">
<q-input <q-input
class="q-pb-md"
standout standout
v-model="!getBusTime?'':parameters.OrderDate" :value="!flightTime?'':parameters.FlightTime"
label="接駁日期" :label="`航班${details.CarType==1?'抵達':'起飛'}時間`"
:rules="[(val) => !!val || '請选接駁日期']" :rules="[(val) => !!val || `請选航班${details.CarType==1?'抵達':'起飛'}時間`]"
ref="OrderDate" ref="FlightTime"
> >
<template v-slot:append> <template v-slot:append>
<q-icon name="event" class="cursor-pointer"></q-icon> <q-icon name="event" class="cursor-pointer"></q-icon>
</template> </template>
<q-popup-proxy :offset="[0, 0]" ref="qDateProxy2"> <q-popup-proxy :offset="[0, 0]" ref="qDateProxy1">
<div class="row"> <div class="row">
<q-time format24h v-model="getBusTime" mask="HH:mm" <!-- <q-date
@input="getTime(2)"/> mask="YYYY-MM-DD HH:mm"
:title="$t('search_date_begin')"
subtitle="選擇"
v-model="parameters.FlightTime"
:options="optionsFn"
/>
<div class="q-px-sm"></div> -->
<q-time format24h v-model="flightTime" mask="HH:mm"
@input="getTime(1)"/>
</div> </div>
</q-popup-proxy> </q-popup-proxy>
</q-input> </q-input>
</div> </div>
<div :class="filedGuestWidth" v-if="details.CarType!=1"> </div>
<q-input </div>
standout </template>
v-model="parameters.GetonAddress"
label="上車地點" <div class="text-subtitle1 text-weight-bolder q-my-md">
placeholder="" {{details.CarType==1?'接机':details.CarType==2?'送机':'包车'}}資料
:rules="[(val) => !!val || '請輸上車地點供司機參考']" </div>
ref="GetonAddress" <q-separator color="grey-2" class="q-mt-md" />
readonly> <div
<template v-slot:append> class="bg-grey-1 rounded-borders q-pa-md q-mt-md guest-item"
<!-- <q-icon name="iconfont iconaddress" size="20px" class="q-mr-sm" @click="getAddress(1)"/> --> >
</template> <div class="text-subtitle1 q-pb-md text-weight-bold"></div>
<q-popup-proxy :offset="[0, 10]" ref="qDateProxy5"> <div class="row q-col-gutter-md">
<q-input type="textarea" dense standout autofocus <div :class="filedGuestWidth">
v-model="parameters.GetonAddress" placeholder="請輸上車地點供司機參考" />
</q-popup-proxy>
</q-input>
</div>
<div :class="filedGuestWidth" v-if="details.CarType!=2">
<q-input <q-input
standout standout
v-model="parameters.GetoffAddress" v-model="!getBusTime?'':parameters.OrderDate"
label="下車地點" label="接駁日期"
:rules="[(val) => !!val || '請选接駁日期']"
ref="OrderDate"
>
<template v-slot:append>
<q-icon name="event" class="cursor-pointer"></q-icon>
</template>
<q-popup-proxy :offset="[0, 0]" ref="qDateProxy2">
<div class="row">
<!-- <q-date
mask="YYYY-MM-DD"
:title="$t('search_date_begin')"
subtitle="選擇"
v-model="getBusTimeDate"
:options="optionsFn"
@input="getTime(3)"
/>
<div class="q-px-sm"></div> -->
<q-time format24h v-model="getBusTime" mask="HH:mm"
@input="getTime(2)"/>
</div>
</q-popup-proxy>
</q-input>
</div>
<div :class="filedGuestWidth" v-if="details.CarType!=1">
<q-input
standout
v-model="parameters.GetonAddress"
label="上車地點"
placeholder="" placeholder=""
:rules="[(val) => !!val || '請輸車地點供司機參考']" :rules="[(val) => !!val || '請輸車地點供司機參考']"
ref="GetoffAddress" ref="GetonAddress"
readonly> readonly>
<template v-slot:append> <template v-slot:append>
<!-- <q-icon name="iconfont iconaddress" size="20px" class="q-mr-sm" @click="getAddress(2)"/> --> <!-- <q-icon name="iconfont iconaddress" size="20px" class="q-mr-sm" @click="getAddress(1)"/> -->
</template> </template>
<q-popup-proxy :offset="[0, 10]" ref="qDateProxy6"> <q-popup-proxy :offset="[0, 10]" ref="qDateProxy5">
<q-input type="textarea" dense standout autofocus <q-input type="textarea" dense standout autofocus
v-model="parameters.GetoffAddress" placeholder="請輸下車地點供司機參考" /> v-model="parameters.GetonAddress" placeholder="請輸上車地點供司機參考" />
</q-popup-proxy> </q-popup-proxy>
</q-input> </q-input>
</div>
</div> </div>
<div :class="filedGuestWidth" v-if="details.CarType!=2">
<q-input
standout
v-model="parameters.GetoffAddress"
label="下車地點"
placeholder=""
:rules="[(val) => !!val || '請輸下車地點供司機參考']"
ref="GetoffAddress"
readonly>
<template v-slot:append>
<!-- <q-icon name="iconfont iconaddress" size="20px" class="q-mr-sm" @click="getAddress(2)"/> -->
</template>
<q-popup-proxy :offset="[0, 10]" ref="qDateProxy6">
<q-input type="textarea" dense standout autofocus
v-model="parameters.GetoffAddress" placeholder="請輸下車地點供司機參考" />
</q-popup-proxy>
</q-input>
</div>
</div> </div>
<div class="text-subtitle1 text-weight-bolder q-my-md">乘客資料</div> </div>
<q-separator color="grey-2" class="q-mt-md" /> <div class="text-subtitle1 text-weight-bolder q-my-md">乘客資料</div>
<div <q-separator color="grey-2" class="q-mt-md" />
class="bg-grey-1 rounded-borders q-pa-md q-mt-md guest-item" <div
> class="bg-grey-1 rounded-borders q-pa-md q-mt-md guest-item"
<div class="text-subtitle1 q-pb-md text-weight-bold">乘客数量</div> >
<div class="text-subtitle1 q-pb-md text-weight-bold">乘客数量</div>
<div class="row q-col-gutter-md">
<div :class="filedGuestWidth">
<q-input
standout
v-model="parameters.ManNum"
label="成人數(18-99岁)"
@input="getNum"
:rules="[(val) => !!val || '請輸成人數']"
ref="ManNum"
mask="#"
reverse-fill-mask
/>
</div>
<div :class="filedGuestWidth">
<q-input
standout
v-model="parameters.ChildNum"
label="兒童數(3-17岁)"
@input="getNum"
mask="#"
reverse-fill-mask
/>
</div>
<div :class="filedGuestWidth">
<q-input
standout
v-model="parameters.BabyNum"
label="嬰幼兒數(0-2岁)"
@input="getNum"
mask="#"
reverse-fill-mask
/>
</div>
</div>
<template v-if="details.CarType!=3">
<div class="text-subtitle1 q-py-md text-weight-bold">行李数量</div>
<div class="row q-col-gutter-md"> <div class="row q-col-gutter-md">
<div :class="filedGuestWidth"> <div :class="filedGuestWidth">
<q-input <q-input
standout standout
v-model="parameters.ManNum" v-model="parameters.HandLuggageNum"
label="成人數(18-99岁)" label="手提行李"
@input="getNum"
:rules="[(val) => !!val || '請輸成人數']"
ref="ManNum"
mask="#"
reverse-fill-mask
/>
</div>
<div :class="filedGuestWidth">
<q-input
standout
v-model="parameters.ChildNum"
label="兒童數(3-17岁)"
@input="getNum"
mask="#" mask="#"
reverse-fill-mask reverse-fill-mask
/> />
...@@ -370,595 +409,577 @@ ...@@ -370,595 +409,577 @@
<div :class="filedGuestWidth"> <div :class="filedGuestWidth">
<q-input <q-input
standout standout
v-model="parameters.BabyNum" v-model="parameters.RegisteredLuggageNum"
label="嬰幼兒數(0-2岁)" label="托运行李"
@input="getNum"
mask="#" mask="#"
reverse-fill-mask reverse-fill-mask
/> />
</div> </div>
</div> </div>
<template v-if="details.CarType!=3"> </template>
<div class="text-subtitle1 q-py-md text-weight-bold">行李数量</div> </div>
<div class="row q-col-gutter-md"> <div class="text-subtitle1 q-my-md text-weight-bold">特殊需求備註:</div>
<div :class="filedGuestWidth"> <q-input standout v-model="parameters.Remark" input-style="height:170px;" type="textarea" placeholder="此欄位僅限資料備註。不在商品規範內的個人需求,不保證提供" maxlength="200" counter />
<q-input </q-card>
standout </q-form>
v-model="parameters.HandLuggageNum" </div>
label="手提行李"
mask="#" <div class="relative-position" v-if="details"
reverse-fill-mask :class="{
/> 'q-ml-lg': !($q.screen.width < 1200 || $q.platform.is.mobile),
</div> 'q-mt-lg full-width': $q.screen.width < 1200 || $q.platform.is.mobile,
<div :class="filedGuestWidth"> }"
<q-input >
standout <div
v-model="parameters.RegisteredLuggageNum" class="rounded-borders bg-white q-pa-md"
label="托运行李" style="width: 300px"
mask="#" :style="{
reverse-fill-mask width:
/> $q.screen.width < 1200 || $q.platform.is.mobile
</div> ? 'unset'
: '300px',
</div> position:$q.platform.is.mobile?'unset':'sticky',
</template> top:$q.platform.is.mobile?'unset':'50px',
</div>
<div class="text-subtitle1 q-my-md text-weight-bold">特殊需求備註:</div>
<q-input standout v-model="parameters.Remark" input-style="height:170px;" type="textarea" placeholder="此欄位僅限資料備註。不在商品規範內的個人需求,不保證提供" maxlength="200" counter />
</q-card>
</div>
<div class="relative-position" v-if="details"
:class="{
'q-ml-lg': !($q.screen.width < 1200 || $q.platform.is.mobile),
'q-mt-lg full-width': $q.screen.width < 1200 || $q.platform.is.mobile,
}" }"
> >
<div <div class="text-subtitle1 text-weight-bolder">付款明細</div>
class="rounded-borders bg-white q-pa-md" <div class="row q-mt-md">
style="width: 300px" <vue-core-video-players
:style="{ v-if="details.videoStr"
width: ref="video"
$q.screen.width < 1200 || $q.platform.is.mobile :src="details.videoStr"
? 'unset' :title="details.title"
: '300px', :muted="true"
position:$q.platform.is.mobile?'unset':'sticky', :autoplay="false"
top:$q.platform.is.mobile?'unset':'50px', @play="playHandler"
}" @pause="pauseHandler"
> @seeked="seekedChangeHandler"
<div class="text-subtitle1 text-weight-bolder">付款明細</div> @timeupdate="timeChangeHandler"
<div class="row q-mt-md"> logo="../statics/img/transparent_logo.png"
<vue-core-video-players :loop="false"
v-if="details.videoStr" id="trip_video"
ref="video" class="rounded-borders"
:src="details.videoStr" style="width: 80px"
:title="details.title" />
:muted="true" <q-img
:autoplay="false" v-else
@play="playHandler" :src="details?details.ImageList[0]:'https://image.kkday.com/v2/image/get/s1.kkday.com/product_138437/20230217083232_t5rcO/jpg'"
@pause="pauseHandler" class="rounded-borders"
@seeked="seekedChangeHandler" spinner-color="grey-3"
@timeupdate="timeChangeHandler" style="width: 80px"
logo="../statics/img/transparent_logo.png" />
:loop="false" <div class="q-ml-md col">
id="trip_video" <div class="text-subtitle1 ellipsis">
class="rounded-borders" {{details.Name}}
style="width: 80px"
/>
<q-img
v-else
:src="details?details.ImageList[0]:'https://image.kkday.com/v2/image/get/s1.kkday.com/product_138437/20230217083232_t5rcO/jpg'"
class="rounded-borders"
spinner-color="grey-3"
style="width: 80px"
/>
<div class="q-ml-md col">
<div class="text-subtitle1 ellipsis">
{{details.Name}}
</div>
<div class="text-caption text-grey-6 ellipsis q-mt-sm">
{{details.Description}}
</div>
</div>
</div>
<div class="q-mt-md text-grey-6">
<div class="row q-pb-xs no-wrap" v-if="AirportObj&&AirportObj.Name">
<div style="width: 80px">{{details.CarType==1?'接':'送'}}機機場:</div>
<div class="q-ml-md ellipsis-2-lines">{{AirportObj.Name}}</div>
</div>
<div class="row q-pb-xs no-wrap" v-if="parameters.GetonAddress">
<div style="width: 80px">上車點:</div>
<div class="q-ml-md ellipsis-2-lines">{{parameters.GetonAddress}}</div>
</div> </div>
<div class="row q-pb-xs no-wrap" v-if="parameters.GetoffAddress"> <div class="text-caption text-grey-6 ellipsis q-mt-sm">
<div style="width: 80px">下車點:</div> {{details.Description}}
<div class="q-ml-md ellipsis-2-lines">{{parameters.GetoffAddress}}</div>
</div>
<div class="row">
<div style="width: 80px">
<!-- 出發日期: -->
接駁日期:</div>
<div class="q-ml-md">
{{parameters.OrderDate}}
</div>
</div> </div>
</div> </div>
<q-separator color="grey-2" class="q-my-md"/> </div>
<div class="text-grey-9"> <div class="q-mt-md text-grey-6">
<div class="row q-mb-sm" v-if="chosenObj.Count>0&&CarObj"> <div class="row q-pb-xs no-wrap" v-if="AirportObj&&AirportObj.Name">
<div class="col">{{CarObj.CarName}} x {{ chosenObj.Count }}</div> <div style="width: 80px">{{details.CarType==1?'接':'送'}}機機場:</div>
<div>{{details.CurrencyCode}} {{ moneyFormat(OrderDate.originalB2CPrice,2) }}</div> <div class="q-ml-md ellipsis-2-lines">{{AirportObj.Name}}</div>
</div> </div>
<!-- <hr style="border:none;border-top:1px dashed #EEE !important;" class="bg-transparent q-mb-sm" /> <div class="row q-pb-xs no-wrap" v-if="AirportObj&&AirportObj.Name">
<div class="row q-mb-sm items-center" v-if="(chosenObj.Count)>0"> <div style="width: 80px">{{details.CarType==1?'抵達':'起飛'}}時間:</div>
<div class="col">總金額</div> <div class="q-ml-md ellipsis-2-lines">{{parameters.FlightTime}}</div>
<div class="text-subtitle2 text-weight-bolder text-primary">{{details.CurrencyCode}} {{ moneyFormat(OrderDate.sumPrice,2) }}</div> </div>
</div> --> <div class="row q-pb-xs no-wrap" v-if="parameters.GetonAddress">
<hr style="border:none;border-top:1px dashed #EEE !important;" class="bg-transparent q-mb-sm" /> <div style="width: 80px">上車點:</div>
<div class="row q-mb-sm items-center" v-if="chosenObj.Count>0"> <div class="q-ml-md ellipsis-2-lines">{{parameters.GetonAddress}}</div>
<div class="col">支付金額</div>
<div class="text-h6 text-weight-bolder text-primary product-price">{{details.CurrencyCode}} {{ moneyFormat(OrderDate.sumPrice,2) }}</div>
</div>
</div> </div>
<div class="text-right q-mt-md" v-if="step!=3"> <div class="row q-pb-xs no-wrap" v-if="parameters.GetoffAddress">
<q-btn v-if="step!=3" unelevated color="primary" <div style="width: 80px">下車點:</div>
:loading="loading" :label="step!=3?'立即支付':'已支付'" @click="submit()" <div class="q-ml-md ellipsis-2-lines">{{parameters.GetoffAddress}}</div>
:disable="step!=3&&loading"/> </div>
<q-btn v-else unelevated color="primary" label=""/> <div class="row">
<div style="width: 80px">
<!-- 出發日期: -->
接駁日期:</div>
<div class="q-ml-md">
{{parameters.OrderDate}}
</div>
</div> </div>
</div> </div>
</div> <q-separator color="grey-2" class="q-my-md"/>
</div> <div class="text-grey-9">
<q-dialog v-model="isShowDialog"> <div class="row q-mb-sm" v-if="chosenObj.Count>0&&CarObj">
<q-card class="q-pa-lg" :style="{'width':$q.platform.is.desktop?'100%':'500px'}"> <div class="col">{{CarObj.CarName}} x {{ chosenObj.Count }}</div>
<div class="text-h6Detail"> <div>{{details.CurrencyCode}} {{ moneyFormat(OrderDate.originalB2CPrice,2) }}</div>
<span>乘客{{onoffbus==1?'上':'下'}}車範圍</span> </div>
<i class="iconfont iconbaseline-close-px" @click="isShowDialog=false"></i> <!-- <hr style="border:none;border-top:1px dashed #EEE !important;" class="bg-transparent q-mb-sm" />
<div class="row q-mb-sm items-center" v-if="(chosenObj.Count)>0">
<div class="col">總金額</div>
<div class="text-subtitle2 text-weight-bolder text-primary">{{details.CurrencyCode}} {{ moneyFormat(OrderDate.sumPrice,2) }}</div>
</div> -->
<hr style="border:none;border-top:1px dashed #EEE !important;" class="bg-transparent q-mb-sm" />
<div class="row q-mb-sm items-center" v-if="chosenObj.Count>0">
<div class="col">支付金額</div>
<div class="text-h6 text-weight-bolder text-primary product-price">{{details.CurrencyCode}} {{ moneyFormat(OrderDate.sumPrice,2) }}</div>
</div>
</div> </div>
<q-separator /> <div class="text-right q-mt-md" v-if="step!=3">
<div style="max-height: 600px;padding:20px 0" class="scroll"> <q-btn v-if="step!=3" unelevated color="primary"
<componentsMap :AddressObj="onCarObj"/> :loading="loading" :label="step!=3?'立即支付':'已支付'" @click="submit()"
:disable="step!=3&&loading"/>
<q-btn v-else unelevated color="primary" label=""/>
</div> </div>
</q-card>
</q-dialog> </div>
<div v-if="!orderKey || orderKey == ''" class="text-center q-my-xl">
<none-data
iconType="order"
title="沒有找到您的訂單信息哦"
subtitle="趕緊去挑選心儀的旅遊產品吧,三秒後自動跳轉到首頁"
></none-data>
</div> </div>
<auth></auth>
</div> </div>
</template> <q-dialog v-model="isShowDialog">
<q-card class="q-pa-lg" :style="{'width':$q.platform.is.desktop?'100%':'500px'}">
<script> <div class="text-h6Detail">
import NoneData from "src/components/common/noneData.vue"; <span>乘客{{onoffbus==1?'上':'下'}}車範圍</span>
import auth from "src/components/common/auth.vue"; <i class="iconfont iconbaseline-close-px" @click="isShowDialog=false"></i>
import { date } from 'quasar' </div>
import { json } from "body-parser"; <q-separator />
import coupon from '../../components/common/coupon.vue' <div style="max-height: 600px;padding:20px 0" class="scroll">
import componentsMap from "../../components/car/Map.vue"; <componentsMap :AddressObj="onCarObj"/>
export default { </div>
components:{ </q-card>
coupon, </q-dialog>
componentsMap, <div v-if="!orderKey || orderKey == ''" class="text-center q-my-xl">
NoneData, <none-data
auth iconType="order"
}, title="沒有找到您的訂單信息哦"
data() { subtitle="趕緊去挑選心儀的旅遊產品吧,三秒後自動跳轉到首頁"
return { ></none-data>
order: null, </div>
orderKey: "", <auth></auth>
isRangeClick: true, </div>
isShowDialog: false, </template>
AddressObj: null,
onCarObj: null,//上车范围 <script>
unCarObj: null,//下车范围 import NoneData from "src/components/common/noneData.vue";
onCarId: null,//上车范围 import auth from "src/components/common/auth.vue";
unCarId: null,//下车范围 import { date } from 'quasar'
CarObj: null,//车型 import { json } from "body-parser";
AirportObj: null,//机场 import coupon from '../../components/common/coupon.vue'
CarId: null,//车型 import componentsMap from "../../components/car/Map.vue";
AirportId: null,//机场 export default {
startDate: null, components:{
calculationNum: null,//数量 coupon,
sumPrice: null,//总价 componentsMap,
details: null,//产品详情 NoneData,
options: { auth
currentPage: 0, },
speed: 300, data() {
itemAnimation: true, return {
centeredSlides: true, order: null,//订单信息
thresholdDistance: 100, orderKey: "",
thresholdTime: 300, isShowDialog: false,
loopedSlides: 2, AddressObj: null,
slidesToScroll: 1, onCarObj: null,//上车范围
loop: true, unCarObj: null,//下车范围
}, CarObj: null,//车型
OrderDate: null,//接收产品相关信息 AirportObj: null,//机场
step: 1, details: null,//产品详情
userInfo: { options: {//音频控件
lastName: "", currentPage: 0,
firstName: "", speed: 300,
country: 0, itemAnimation: true,
phone: "", centeredSlides: true,
areaCode: "", thresholdDistance: 100,
mail: "", thresholdTime: 300,
}, loopedSlides: 2,
chosenObj: {}, slidesToScroll: 1,
isUpdateUserInfo: false, loop: true,
countrys: [], },
areaCodes: [], OrderDate: null,//接收产品相关信息
loading: false, step: 1,
parameters: { userInfo: {
OrderId: 0, Country: 0,
OrderType: 0, areaCode: "",
OrderDate:'',//预定日期 Mailbox: "",
Unit_Price: '',//单价
Num: '',//数量
Money: 0.0,
Sex: 1,//1男2女
SurName: '',//姓
Name: '',//名
Remark: '',
AirportId: '',
AirportTerminal: '',//航厦
AirLine: '',//航空公司名称
FlightNumber: '',//航班号
FlightTime: '',//航班时间
GetonAddress: '',//上车点
GetoffAddress: '',//下车点
ManNum: null,//成人数
ChildNum: null,//儿童数
BabyNum: null,//婴儿数
HandLuggageNum: null,//手提行李数量
RegisteredLuggageNum: null,//托运行李数量
ContactWay: '',//联络方式 WeChat
Mobile:'',//电话
ProductId: '',
CarId: '',//产品类型ID
pType: 1,//类型 1来源B2C
},
flightTime: null,//航班起飞抵达时间
getBusTime: null,//预约车时间
TotalPeople: 0,//总人数
onoffbus: 1,//1 上车 2下车
ErpOrderId: 0,//erp订单Id
};
},
computed: {
filedWidth() {
return {
"col-12": this.$q.screen.width < 1200,
"col-6": this.$q.screen.width >= 1200,
};
}, },
filedGuestWidth() { chosenObj: {},
return { countrys: [],
"col-12": this.$q.screen.width < 1200, areaCodes: [],
"col-4": this.$q.screen.width >= 1200, loading: false,
}; parameters: {
OrderId: 0,
OrderType: 0,
OrderDate:'',//预定日期
Unit_Price: '',//单价
Num: '',//数量
Money: 0.0,
Sex: 1,//1男2女
SurName: '',//姓
Name: '',//名
Remark: '',
AirportId: '',
AirportTerminal: '',//航厦
AirLine: '',//航空公司名称
FlightNumber: '',//航班号
FlightTime: '',//航班时间
GetonAddress: '',//上车点
GetoffAddress: '',//下车点
ManNum: null,//成人数
ChildNum: null,//儿童数
BabyNum: null,//婴儿数
HandLuggageNum: null,//手提行李数量
RegisteredLuggageNum: null,//托运行李数量
ContactWay: '',//联络方式 WeChat
Mobile:'',//电话
ProductId: '',
CarId: '',//产品类型ID
OrderSource: 1,//类型 0 来源B2B 1 来源B2C
}, },
flightTime: null,//航班起飞抵达时间
getBusTime: null,//预约车时间
getBusTimeDate: null,//预约日期
TotalPeople: 0,//总人数
onoffbus: 1,//1 上车 2下车
};
},
computed: {
filedWidth() {
return {
"col-12": this.$q.screen.width < 1200,
"col-6": this.$q.screen.width >= 1200,
};
}, },
created() {}, filedGuestWidth() {
mounted() { return {
if(this.checkParamsHandler()){ "col-12": this.$q.screen.width < 1200,
this.getCarData() "col-4": this.$q.screen.width >= 1200,
} };
this.initCountry();
this.initGuestHandler();
}, },
methods: { },
// 获取商品详情 created() {},
getCarData() { mounted() {
this.$q.loading.show(); if(this.checkParamsHandler()){
this.apipost( this.getCarData()
"b2c_get_GetCarSingleProductDetail", }
{ ProductId: this.parameters.ProductId },
(r) => { this.initGuestHandler();
this.$q.loading.hide(); this.getUserInfoHandler()
if (r.data.resultCode == 1) { },
this.details = r.data.data; methods: {
this.CarObj = this.details.CarTypeList.find((x) => this.OrderDate.CarId == x.Id); // 获取商品详情
if(this.details.CarType!=3){ getCarData() {
this.AirportObj = this.details.AirportList.find((x) => this.OrderDate.AirportId == x.Id); this.$q.loading.show();
this.parameters.AirportId = this.OrderDate.AirportId this.apipost(
this.parameters.FlightTime = this.OrderDate.startDate "b2c_get_GetCarSingleProductDetail",
} { ProductId: this.parameters.ProductId },
this.parameters.OrderType = this.details.CarType (r) => {
} else { if (r.data.resultCode == 1) {
this.$q.notify({ this.details = r.data.data;
type: "negative", this.CarObj = this.details.CarTypeList.find((x) => this.OrderDate.CarId == x.Id);
message: r.data.message, this.onCarObj = this.details.PlaceList.find((x) => this.OrderDate.onCarId == x.Id)//上车范围
position: "top", this.unCarObj = this.details.PlaceList.find((x) => this.OrderDate.unCarId == x.Id)//下车范围
timeout: 2000, // 以毫秒为单位; 0意味着没有超时 if(this.details.CarType!=3){
}); this.AirportObj = this.details.AirportList.find((x) => this.OrderDate.AirportId == x.Id);
this.parameters.AirportId = this.OrderDate.AirportId
this.parameters.FlightTime = this.OrderDate.startDate
} }
this.parameters.CarId = this.OrderDate.CarId
}, this.parameters.OrderType = this.details.CarType
null } else {
); this.$q.notify({
}, type: "negative",
checkParamsHandler() { message: r.data.message,
try { position: "top",
if (this.$route.params && this.$route.params.id) { timeout: 2000, // 以毫秒为单位; 0意味着没有超时
let key = this.$route.params.id; });
console.log(key,'99999') }
let pickuporderCars = localStorage.getItem("pickuporderCars"); this.$q.loading.hide();
pickuporderCars = pickuporderCars ? JSON.parse(pickuporderCars) : []; },
if (pickuporderCars.length > 0) { null
this.order = pickuporderCars.find((x) => x.key == key); );
if (this.order) { },
this.orderKey = key; checkParamsHandler() {
this.chosenObj = this.order.order.orderInfo; try {
this.OrderDate = this.order.order if (this.$route.params && this.$route.params.id) {
this.parameters.ProductId = this.order.order.Id let key = this.$route.params.id;
this.parameters.OrderDate = this.OrderDate.startDate let pickuporderCars = localStorage.getItem("pickuporderCars");
this.parameters.Unit_Price = OrderDate.originalB2CPrice pickuporderCars = pickuporderCars ? JSON.parse(pickuporderCars) : [];
this.parameters.Num = this.OrderDate.chosenObj.Count if (pickuporderCars.length > 0) {
this.parameters.Money = this.OrderDate.sumPrice this.order = pickuporderCars.find((x) => x.key == key);
this.onCarObj = this.OrderDate.onCarObj//上车范围 if (this.order) {
this.unCarObj = this.OrderDate.unCarObj//下车范围 this.orderKey = key;
} this.OrderDate = this.order.order
this.chosenObj = this.OrderDate.orderInfo;
this.parameters.ProductId = this.order.order.Id
this.parameters.OrderDate = this.OrderDate.startDate
this.getBusTimeDate = this.OrderDate.startDate
this.parameters.Unit_Price = this.OrderDate.originalB2CPrice
this.parameters.Num = this.chosenObj.Count
this.parameters.Money = this.OrderDate.sumPrice
} }
} }
} catch (error) {
console.log(error);
} }
if (this.orderKey == "") { } catch (error) {
setTimeout(() => { console.log(error);
}
}, 3000); if (this.orderKey == "") {
} setTimeout(() => {
return this.orderKey != "";
},
submit(){
let flag = false
this.$refs.mail.validate() }, 3000);
}
return this.orderKey != "";
},
async submit() {
this.$refs.mail.validate()
this.$refs.SurName.validate() this.$refs.SurName.validate()
this.$refs.Name.validate() this.$refs.Name.validate()
this.$refs.ContactWay.validate() this.$refs.ContactWay.validate()
this.$refs.Mobile.validate() this.$refs.Mobile.validate()
this.$refs.OrderDate.validate() this.$refs.OrderDate.validate()
this.$refs.ManNum.validate() this.$refs.ManNum.validate()
if(this.details.CarType!=3){ if(this.details.CarType!=3){
this.$refs.AirportTerminal.validate() this.$refs.AirportTerminal.validate()
this.$refs.AirLine.validate() this.$refs.AirLine.validate()
this.$refs.FlightNumber.validate() this.$refs.FlightNumber.validate()
this.$refs.FlightTime.validate() this.$refs.FlightTime.validate()
if(this.details.CarType!=1){ if(this.details.CarType!=1){
this.$refs.GetonAddress.validate()
flag = !this.$refs.SurName.hasError&& !this.$refs.Name.hasError&& !this.$refs.ContactWay.hasError
&& !this.$refs.Mobile.hasError&& !this.$refs.OrderDate.hasError&& !this.$refs.ManNum.hasError
&& !this.$refs.AirportTerminal.hasError&& !this.$refs.AirLine.hasError&& !this.$refs.FlightNumber.hasError
&& !this.$refs.FlightTime.hasError&& !this.$refs.GetonAddress.hasError&& !this.$refs.mail.hasError
}else{
this.$refs.GetoffAddress.validate()
flag = !this.$refs.SurName.hasError&& !this.$refs.Name.hasError&& !this.$refs.ContactWay.hasError
&& !this.$refs.Mobile.hasError&& !this.$refs.OrderDate.hasError&& !this.$refs.ManNum.hasError
&& !this.$refs.AirportTerminal.hasError&& !this.$refs.AirLine.hasError&& !this.$refs.FlightNumber.hasError
&& !this.$refs.FlightTime.hasError&& !this.$refs.GetoffAddress.hasError&& !this.$refs.mail.hasError
}
}else{
this.$refs.GetonAddress.validate() this.$refs.GetonAddress.validate()
}else{
this.$refs.GetoffAddress.validate() this.$refs.GetoffAddress.validate()
flag = !this.$refs.SurName.hasError&& !this.$refs.Name.hasError&& !this.$refs.ContactWay.hasError
&& !this.$refs.Mobile.hasError&& !this.$refs.OrderDate.hasError&& !this.$refs.ManNum.hasError
&& !this.$refs.GetonAddress.hasError&& !this.$refs.GetoffAddress.hasError&& !this.$refs.mail.hasError
} }
if(!flag) return this.goScrollToForm('baseUserInfoTitle') }else{
console.log(this.parameters,'------') this.$refs.GetonAddress.validate()
this.$refs.GetoffAddress.validate()
}
let flag = true
flag = await this.formValidateHandler('baseUserInfo')
if(!flag){
let errorObj = this.$refs.baseUserInfo.getValidationComponents().find(x=>x.innerError)
window.scrollTo(0,errorObj.$el.offsetTop)
}else{
this.SetCarOrder() this.SetCarOrder()
}, }
goScrollToForm(formName){ },
let temp=this.$refs[formName] async formValidateHandler(formName){
let formObj = temp instanceof Array ? temp[0] : temp let temp=this.$refs[formName]
window.scrollTo(0,formObj.offsetTop) let formObj = temp instanceof Array ? temp[0] : temp
}, return formObj.validate()
SetCarOrder(){ },
this.loading = true SetCarOrder(){
this.apipost( this.loading = true
"CarSingle_post_SetTYCarOrder", this.apipost(
this.parameters, "CarSingle_post_SetTYCarOrder",
(r) => { this.parameters,
// this.$refs.myform.resetValidation() (r) => {
if (r.data.resultCode == 1) { // this.$refs.myform.resetValidation()
this.step = 2 if (r.data.resultCode == 1) {
let ErpOrderId = r.data.data.Id this.step = 2
this.AddOrderInfo(ErpOrderId) let ErpOrderId = r.data.data.Id
}else{ this.AddOrderInfo(ErpOrderId)
this.$q.notify({ }else{
type: "negative", this.$message.error(r.data.message)
message: r.data.message,
position: "top",
timeout: 2000,
});
this.loading = false
}
})
},
AddOrderInfo(ErpOrderId){
let GoodsType = null
//13接机 14送机 12包车
if(this.parameters.OrderType==1){
GoodsType = 13
}else if(this.parameters.OrderType==2){
GoodsType = 14
}else if(this.parameters.OrderType==3){
GoodsType = 12
}
this.apipost(
"AddOrderInfo_post",
{
SurName: this.parameters.SurName,
Name: this.parameters.Name,
ContactNumber: this.parameters.Mobile,// 联系电话
Mailbox: this.userInfo.mail,//邮箱
GoodsId: this.parameters.ProductId,//商品id
GoodsName: this.details.Name,//商品名称
GoodsPic: this.details.ImageList[0],//商品图片
GoodsType: GoodsType,//商品类型(见枚举) 12包车 13 接机 14送机
OrderMake: this.parameters.OrderDate,//订单摘要(例如出行时间)
TotalPrice: this.parameters.Money,//总价格
PreferentialPrice: 0,// 优惠总金额
ErpOrderId: ErpOrderId,//erp订单id
Country: this.userInfo.country,//国家id
PlatformTax: 0,//平台税金默认0
Income: 0,//已收默认0
Refund: 0,//退款金额默认0
OrderSource: this.parameters.pType
},
(r) => {
if (r.data.resultCode == 1) {
this.step = 3
this.$q.notify({
color: "green-4",
textColor: "white",
icon: "cloud_done",
message: "訂單提交成功",
position:'center',
});
}else{
this.$q.notify({
type: "negative",
message: r.data.message,
position: "top",
timeout: 2000,
});
}
this.loading = false this.loading = false
}) }
}, })
// 航班起飞抵达时间 },
getTime(type){ AddOrderInfo(ErpOrderId){
// 1航班时间 2预约时间 let GoodsType = null
this.onoffbus = type //13接机 14送机 12包车
if(type==1){ if(this.parameters.OrderType==1){
this.parameters.FlightTime = this.OrderDate.startDate+' '+this.flightTime GoodsType = 13
this.$refs.qDateProxy1.hide() }else if(this.parameters.OrderType==2){
}else if(type==2){ GoodsType = 14
this.parameters.OrderDate = this.OrderDate.startDate+' '+this.getBusTime }else if(this.parameters.OrderType==3){
this.$refs.qDateProxy2.hide() GoodsType = 12
} }
this.apipost(
}, "AddOrderInfo_post",
optionsFn(cd) { {
return ( SurName: this.parameters.SurName,
cd >= Name: this.parameters.Name,
date.formatDate(date.addToDate(new Date(), { days: 0 }), "YYYY/MM/DD") ContactNumber: this.parameters.Mobile,// 联系电话
); Mailbox: this.userInfo.Mailbox,//邮箱
}, GoodsId: this.parameters.ProductId,//商品id
// 地图上选址 GoodsName: this.details.Name,//商品名称
getAddress(type){ GoodsPic: this.details.ImageList[0],//商品图片
if(type==1){ GoodsType: GoodsType,//商品类型(见枚举) 12包车 13 接机 14送机
this.AddressObj = this.onCarObj OrderMake: this.parameters.OrderDate,//订单摘要(例如出行时间)
}else{ TotalPrice: this.parameters.Money,//总价格
this.AddressObj = this.unCarObj PreferentialPrice: 0,// 优惠总金额
} ErpOrderId: ErpOrderId,//erp订单id
this.isShowDialog = true Country: this.userInfo.Country,//国家id
}, PlatformTax: 0,//平台税金默认0
// 计算人数 Income: 0,//已收默认0
getNum(){ Refund: 0,//退款金额默认0
this.TotalPeople = this.parameters.ManNum+this.parameters.ChildNum+this.parameters.BabyNum },
}, (r) => {
// 音频
slideHandler(e) {
this.options.currentPage = e.currentPage;
if (
e.currentPage != 0 &&
this.$refs.video &&
this.$refs.video.isPlaying
) {
this.$refs.video.pause();
}
},
playHandler(e) {},
pauseHandler(e) {},
timeChangeHandler(e) {
//console.log(e)
},
//
seekedChangeHandler(e) {
//console.log(e)
},
initGuestHandler() {
},
// 初始化国家
initCountry() {
this.apipost("GetCountryInfo_post", {}, (r) => {
if (r.data.resultCode == 1) { if (r.data.resultCode == 1) {
this.countrys = r.data.data.countList; this.step = 3
this.userInfo.country = this.countrys[0].ID; this.$message.success("訂單創建成功")
this.goPayHandler(r.data.data)
this.areaCodes = r.data.data.phoneCountList; }else{
this.changeCountry(this.userInfo.country); this.$message.error(r.data.message)
this.areaCodes.forEach((x) => {
let temp = this.countrys.find((y) => y.ID == x.ID);
x.EnName = `${temp.EnName}(${x.PhoneCode})`;
});
} }
this.loading = false
})
},
goPayHandler(pay){
let key = this.$md5(JSON.stringify(pay))
let pays = localStorage.getItem('pays')
pays = pays?JSON.parse(pays):[]
pays.push({
key,
pay
})
localStorage.setItem("pays",JSON.stringify(pays))
let pickuporderCars = localStorage.getItem('pickuporderCars')
pickuporderCars = pickuporderCars?JSON.parse(pickuporderCars):[]
let i = pickuporderCars.findIndex(x=>x.key==this.orderKey)
if(i>=0){
pickuporderCars.splice(i,1)
localStorage.setItem("pickuporderCars",JSON.stringify(pickuporderCars))
}
this.CommonJump('/pay/'+key, {});
},
// 航班起飞抵达时间
getTime(type){
// 1航班时间 2预约时间
this.onoffbus = type
if(type==1){
this.parameters.FlightTime = this.OrderDate.startDate+' '+this.flightTime
this.$refs.qDateProxy1.hide()
}else if(type==2){
this.parameters.OrderDate = this.OrderDate.startDate+' '+this.getBusTime
this.$refs.qDateProxy2.hide()
}else if(type==3){
this.parameters.OrderDate = this.OrderDate.startDate+' '+this.getBusTime
}
},
optionsFn(cd) {
return (
cd >=
date.formatDate(date.addToDate(new Date(), { days: 0 }), "YYYY/MM/DD")
);
},
// 地图上选址
getAddress(type){
if(type==1){
this.AddressObj = this.onCarObj
}else{
this.AddressObj = this.unCarObj
}
this.isShowDialog = true
},
// 计算人数
getNum(){
this.TotalPeople = this.parameters.ManNum+this.parameters.ChildNum+this.parameters.BabyNum
},
// 音频
slideHandler(e) {
this.options.currentPage = e.currentPage;
if (
e.currentPage != 0 &&
this.$refs.video &&
this.$refs.video.isPlaying
) {
this.$refs.video.pause();
}
},
playHandler(e) {},
pauseHandler(e) {},
timeChangeHandler(e) {
//console.log(e)
},
//
seekedChangeHandler(e) {
//console.log(e)
},
initGuestHandler() {
},
// 获取当前用户信息
getUserInfoHandler() {
let u = this.$user.userInfo;
if (u) {
this.apipost("GetCustomerInfo_post", { Id: u.id }, (r) => {
if (r.data.resultCode == 1) {
this.userInfo = r.data.data;
if(r.data.data.Moblie){
this.parameters.Mobile = r.data.data.Moblie
}
} else {
this.$user.userInfo = null;
}
this.initCountry();
}); });
}, }
changeCountry(id) {
this.userInfo.areaCode = this.areaCodes.find((x) => x.ID == id).PhoneCode;
},
}, },
}; // 初始化国家
</script> initCountry() {
this.apipost("GetCountryInfo_post", {}, (r) => {
if (r.data.resultCode == 1) {
this.countrys = r.data.data.countList;
this.userInfo.Country = this.countrys[0].ID;
<style> this.areaCodes = r.data.data.phoneCountList;
.order-preview .q-stepper__content { this.changeCountry(this.userInfo.Country);
display: none !important; this.areaCodes.forEach((x) => {
} let temp = this.countrys.find((y) => y.ID == x.ID);
.order-preview .q-toggle__track { x.EnName = `${temp.EnName}(${x.PhoneCode})`;
height: 0.7em; });
border-radius: 0.35em; }
opacity: 0.38; });
width: 50px; },
} changeCountry(id) {
.order-preview .q-toggle__thumb { this.userInfo.areaCode = this.areaCodes.find((x) => x.ID == id).PhoneCode;
top: 0.42em; },
left: 0.45em; },
width: 0.5em; };
height: 0.5em; </script>
transition: left 0.22s ease-in-out;
user-select: none; <style>
z-index: 0; .order-preview .q-stepper__content {
} display: none !important;
.order-preview .q-toggle__inner--truthy .q-toggle__thumb { }
left: 0.94em; .order-preview .q-toggle__track {
} height: 0.7em;
.order-preview .q-toggle__inner { border-radius: 0.35em;
width: 1.9em; opacity: 0.38;
} width: 50px;
.order-preview .q-toggle__label { }
margin-top: 12px; .order-preview .q-toggle__thumb {
} top: 0.42em;
.guest-item:hover{ left: 0.45em;
background: rgba(241,65,108,.04) !important; width: 0.5em;
} height: 0.5em;
.text-h6Detail { transition: left 0.22s ease-in-out;
text-align: center; user-select: none;
font-size: 18px; z-index: 0;
color: #333; }
font-weight: 700; .order-preview .q-toggle__inner--truthy .q-toggle__thumb {
position: relative; left: 0.94em;
width:100%; }
height:50px; .order-preview .q-toggle__inner {
} width: 1.9em;
.text-h6Detail i { }
position: absolute; .order-preview .q-toggle__label {
right:20px; margin-top: 12px;
top:10px; }
cursor: pointer; .guest-item:hover{
font-size:23px; background: rgba(241,65,108,.04) !important;
} }
</style> .text-h6Detail {
text-align: center;
\ No newline at end of file font-size: 18px;
color: #333;
font-weight: 700;
position: relative;
width:100%;
height:50px;
}
.text-h6Detail i {
position: absolute;
right:20px;
top:10px;
cursor: pointer;
font-size:23px;
}
</style>
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
> >
<div class="col q-mr-lg"> <div class="col q-mr-lg">
<div class="text-h6 ellipsis-2-lines">{{ dataList.Name }}</div> <div class="text-h6 ellipsis-2-lines">{{ dataList.Name }}</div>
<div class="text-grey-7 fz17 ellipsis-2-lines">{{ dataList.Description }}</div> <!-- <div class="text-grey-7 fz17 ellipsis-2-lines">{{ dataList.Description }}</div> -->
<div class="q-mt-md f12 text-grey-6"> <div class="q-mt-md f12 text-grey-6">
<q-icon <q-icon
name="iconfont icondingweixiao" name="iconfont icondingweixiao"
...@@ -141,13 +141,11 @@ ...@@ -141,13 +141,11 @@
icon="iconfont iconOwner-1" icon="iconfont iconOwner-1"
label=" 印象自組團" label=" 印象自組團"
/> />
<q-chip <q-chip
v-if="dataList.dayList" v-if="dataList.TravelHours>0" class="transparent q-mr-xl no-padding"
class="transparent q-mr-xl no-padding"
square square
icon="iconfont icontime" icon="iconfont icontime"
:label="` 行程時間 ${dataList.dayList.length} 天`" :label="`包車時長:${dataList.TravelHours} h`" />
/>
<q-chip <q-chip
class="transparent q-mr-xl no-padding" class="transparent q-mr-xl no-padding"
square square
...@@ -282,9 +280,6 @@ ...@@ -282,9 +280,6 @@
:dataList="dataList" :dataList="dataList"
:configId="msg.configId" :configId="msg.configId"
:Month="currentYM.str" :Month="currentYM.str"
:PlaceList="dataList.PlaceList"
:CarTypeList="dataList.CarTypeList"
:AirportList="dataList.AirportList"
:price="currentPrice" :price="currentPrice"
@reset="resetHandler" @reset="resetHandler"
@getPriceList="getPriceList" @getPriceList="getPriceList"
...@@ -316,13 +311,13 @@ ...@@ -316,13 +311,13 @@
:label="`${dataList.FreeCancelDay}天前可免费取消`" :label="`${dataList.FreeCancelDay}天前可免费取消`"
/> />
</div> </div>
<!-- <div class="text-grey f12"> <div class="text-grey f12">
<ul class="q-pl-md no-margin"> <ul class="q-pl-md no-margin">
<li v-for="(x, i) in warnBuy" class="q-mt-md" :key="i"> <li v-for="(x, i) in warnBuy" class="q-mt-md" :key="i">
{{ x }} {{ x }}
</li> </li>
</ul> </ul>
</div> --> </div>
</div> </div>
<div class="" v-if="$q.platform.is.desktop"> <div class="" v-if="$q.platform.is.desktop">
<div class="row items-center"> <div class="row items-center">
...@@ -361,7 +356,13 @@ ...@@ -361,7 +356,13 @@
icon="iconfont iconcancel" icon="iconfont iconcancel"
:label="`${dataList.FreeCancelDay}天前可免费取消`" :label="`${dataList.FreeCancelDay}天前可免费取消`"
/> />
</div> <q-chip
class="transparent q-mr-xl no-padding"
square
icon="iconfont iconroundcheck"
label="6個工作日內(不含例休假)確認"
/>
</div>
<div class="q-mt-lg row" v-if="$q.platform.is.desktop"> <div class="q-mt-lg row" v-if="$q.platform.is.desktop">
<div class="col"> <div class="col">
<calendar <calendar
...@@ -375,9 +376,6 @@ ...@@ -375,9 +376,6 @@
:dataList="dataList" :dataList="dataList"
:configId="msg.configId" :configId="msg.configId"
:Month="currentYM.str" :Month="currentYM.str"
:PlaceList="dataList.PlaceList"
:CarTypeList="dataList.CarTypeList"
:AirportList="dataList.AirportList"
:price="currentPrice" :price="currentPrice"
@reset="resetHandler" @reset="resetHandler"
@getPriceList="getPriceList" @getPriceList="getPriceList"
...@@ -658,10 +656,10 @@ export default { ...@@ -658,10 +656,10 @@ export default {
loop: true, loop: true,
}, },
warnBuy: [ warnBuy: [
"未满 2 岁幼儿不占位可免费参加(不含座位,餐点,门票,床位),请先于下订时在「备注栏」告知。", "如一輛車位不夠使用,請購買多輛車",
"如需要單人房,請購買單房", "收費公路費、停車費、入園費等請另行繳納",
"不占床2-11(包含)岁幼童可购买儿童价,如需占床請購買成人價", "由於交通擁堵,時長可能會略有變化",
"12歲以上皆視同成人售價", "每增加 30 分鐘,將收取相應的延期費。 (現場支付)",
], ],
showOrderPreview: false, showOrderPreview: false,
videoPosition: 0, videoPosition: 0,
...@@ -942,7 +940,10 @@ export default { ...@@ -942,7 +940,10 @@ export default {
isSupportChildren: 1, isSupportChildren: 1,
safeMoney: 0, safeMoney: 0,
} }
arr.push(dataObj) if(date.formatDate(Date.now(), 'YYYY-MM-DD')!=x.Date){
arr.push(dataObj)
}
} }
}) })
this.priceList = JSON.parse(JSON.stringify(arr)) this.priceList = JSON.parse(JSON.stringify(arr))
......
...@@ -777,7 +777,13 @@ export default { ...@@ -777,7 +777,13 @@ export default {
changeShowOrderPreviewHandler(){ changeShowOrderPreviewHandler(){
this.showOrderPreview=!this.showOrderPreview this.showOrderPreview=!this.showOrderPreview
if(!this.showOrderPreview){ if(!this.showOrderPreview){
this.currentPrice=null // this.currentPrice=null
if(this.currentPrice){
this.currentPrice.isSupportChildren=null
this.currentPrice.unionCityList=null
this.currentPrice.singleRoomPrice=0
this.currentPrice.originalB2CPrice=0
}
this.changeTripShowHandler() this.changeTripShowHandler()
} }
}, },
...@@ -871,7 +877,13 @@ export default { ...@@ -871,7 +877,13 @@ export default {
//console.log(e) //console.log(e)
}, },
resetHandler() { resetHandler() {
this.currentPrice=null; // this.currentPrice=null;
if(this.currentPrice){
this.currentPrice.isSupportChildren=null
this.currentPrice.unionCityList=null
this.currentPrice.singleRoomPrice=0
this.currentPrice.originalB2CPrice=0
}
if(this.$q.platform.is.mobile) if(this.$q.platform.is.mobile)
this.$refs.calendarMobile.reset() this.$refs.calendarMobile.reset()
else else
...@@ -882,7 +894,7 @@ export default { ...@@ -882,7 +894,7 @@ export default {
this.currentPrice = JSON.parse(JSON.stringify(val.price)); this.currentPrice = JSON.parse(JSON.stringify(val.price));
this.currentPrice.RealPrice = this.currentPrice.RealPrice?this.currentPrice.RealPrice:this.currentPrice.originalB2CPrice this.currentPrice.RealPrice = this.currentPrice.RealPrice?this.currentPrice.RealPrice:this.currentPrice.originalB2CPrice
this.currentPrice.originalB2CPrice = this.currentPrice.RealPrice this.currentPrice.originalB2CPrice = this.currentPrice.RealPrice
if(this.currentPrice.unionCityList && this.currentPrice.unionCityList.length>0){ if(this.currentPrice.unionCityList && this.currentPrice.unionCityList.length>0 && this.dataList.startCityId!=0){
this.currentPrice.unionCityList.splice(0,0,{ this.currentPrice.unionCityList.splice(0,0,{
cityId:this.dataList.startCityId, cityId:this.dataList.startCityId,
cityName:this.dataList.startCityName cityName:this.dataList.startCityName
......
...@@ -50,8 +50,6 @@ ...@@ -50,8 +50,6 @@
standout standout
v-model="userInfo.Name" v-model="userInfo.Name"
label="名字" label="名字"
mask="A"
reverse-fill-mask
ref="name" ref="name"
:rules="[(val) => !!val || '請輸入名字']" :rules="[(val) => !!val || '請輸入名字']"
/> />
...@@ -62,8 +60,6 @@ ...@@ -62,8 +60,6 @@
v-model="userInfo.Surname" v-model="userInfo.Surname"
ref="surname" ref="surname"
label="姓氏" label="姓氏"
mask="A"
reverse-fill-mask
:rules="[(val) => !!val || '請輸入姓氏']" :rules="[(val) => !!val || '請輸入姓氏']"
/> />
</div> </div>
...@@ -171,7 +167,7 @@ ...@@ -171,7 +167,7 @@
<div :class="filedGuestWidth"> <div :class="filedGuestWidth">
<q-input <q-input
standout standout
v-model="x.FirstName" v-model="x.SurName"
label="本國姓" label="本國姓"
placeholder="例:張" placeholder="例:張"
:rules="[(val) => !!val || '請輸本國姓']" :rules="[(val) => !!val || '請輸本國姓']"
...@@ -180,7 +176,7 @@ ...@@ -180,7 +176,7 @@
<div :class="filedGuestWidth"> <div :class="filedGuestWidth">
<q-input <q-input
standout standout
v-model="x.LastName" v-model="x.Name"
label="本國名" label="本國名"
placeholder="例:三" placeholder="例:三"
:rules="[(val) => !!val || '請輸本國名']" :rules="[(val) => !!val || '請輸本國名']"
...@@ -202,7 +198,7 @@ ...@@ -202,7 +198,7 @@
<div :class="filedGuestWidth"> <div :class="filedGuestWidth">
<q-input <q-input
standout standout
v-model="x.PassFirstName" v-model="x.ESurName"
label="護照英文姓" label="護照英文姓"
placeholder="例:ZHANG" placeholder="例:ZHANG"
mask="A" mask="A"
...@@ -213,7 +209,7 @@ ...@@ -213,7 +209,7 @@
<div :class="filedGuestWidth"> <div :class="filedGuestWidth">
<q-input <q-input
standout standout
v-model="x.PassLastName" v-model="x.EName"
label="護照英文名" label="護照英文名"
placeholder="例:SAN" placeholder="例:SAN"
mask="A" mask="A"
...@@ -224,7 +220,7 @@ ...@@ -224,7 +220,7 @@
<div :class="filedGuestWidth"> <div :class="filedGuestWidth">
<q-input <q-input
standout standout
v-model="x.Passport" v-model="x.PassportNo"
label="護照號" label="護照號"
mask="X" mask="X"
reverse-fill-mask reverse-fill-mask
...@@ -234,7 +230,7 @@ ...@@ -234,7 +230,7 @@
<div :class="filedGuestWidth"> <div :class="filedGuestWidth">
<q-input <q-input
standout standout
v-model="x.PassValidate" v-model="x.PassportExpiry"
label="護照有效期" label="護照有效期"
readonly readonly
:rules="[(val) => !!val || '請選擇護照有效期']" :rules="[(val) => !!val || '請選擇護照有效期']"
...@@ -247,8 +243,28 @@ ...@@ -247,8 +243,28 @@
mask="YYYY-MM-DD" mask="YYYY-MM-DD"
:title="$t('search_date_begin')" :title="$t('search_date_begin')"
subtitle="選擇" subtitle="選擇"
v-model="x.PassValidate" v-model="x.PassportExpiry"
@input="() => $refs.qDateProxy7.hide()" />
</q-popup-proxy>
</q-input>
</div>
<div :class="filedGuestWidth">
<q-input
standout
v-model="x.Birthday"
label="出生日期"
readonly
:rules="[(val) => !!val || '請選擇旅客出生日期']"
>
<template v-slot:append>
<q-icon name="event" class="cursor-pointer"></q-icon>
</template>
<q-popup-proxy :offset="[0, 0]" ref="qDateProxy8">
<q-date
mask="YYYY-MM-DD"
:title="$t('search_date_begin')"
subtitle="選擇"
v-model="x.Birthday"
/> />
</q-popup-proxy> </q-popup-proxy>
</q-input> </q-input>
...@@ -258,7 +274,7 @@ ...@@ -258,7 +274,7 @@
standout standout
v-model="x.MobilePhone" v-model="x.MobilePhone"
label="聯絡電話" label="聯絡電話"
mask="+# #" mask=""
reverse-fill-mask reverse-fill-mask
placeholder="格式:國家區號+號碼,例如:+81 25xxxx" placeholder="格式:國家區號+號碼,例如:+81 25xxxx"
/> />
...@@ -336,7 +352,7 @@ ...@@ -336,7 +352,7 @@
</div> </div>
<div class="row"> <div class="row">
<div style="width: 80px">出發日期:</div> <div style="width: 80px">出發日期:</div>
<div class="q-ml-md">{{ price.startDate }}</div> <div class="q-ml-md">{{ unionCity && unionCity.goFlight? unionCity.goFlight.startDate :price.startDate }}</div>
</div> </div>
</div> </div>
<q-separator color="grey-2" class="q-my-md" /> <q-separator color="grey-2" class="q-my-md" />
...@@ -357,6 +373,30 @@ ...@@ -357,6 +373,30 @@
<div class="col">嬰兒不佔床 x {{ chosenObj.yeCount }}</div> <div class="col">嬰兒不佔床 x {{ chosenObj.yeCount }}</div>
<div>CNY {{ moneyFormat(price.babyPrice, 2) }}</div> <div>CNY {{ moneyFormat(price.babyPrice, 2) }}</div>
</div> </div>
<div v-if="price.safeMoney>0">
<hr
style="border: none; border-top: 1px dashed #eee !important"
class="bg-transparent q-mb-sm"
/>
<div class="row q-mb-sm" v-if="price.safeMoney > 0">
<div class="col">保險費 x {{ price.safeMoney }}/人</div>
<div>CNY {{ moneyFormat(price.safeMoney*(chosenObj.crCount+chosenObj.etCount+chosenObj.yeCount), 2) }}</div>
</div>
</div>
<div v-if="price.visaPrice>0||price.otherPrice>0">
<hr
style="border: none; border-top: 1px dashed #eee !important"
class="bg-transparent q-mb-sm"
/>
<div class="row q-mb-sm" v-if="price.visaPrice > 0">
<div class="col">簽證費 x {{ price.visaPrice }}/人</div>
<div>CNY {{ moneyFormat(price.visaPrice*(chosenObj.crCount+chosenObj.etCount+chosenObj.yeCount), 2) }}</div>
</div>
<div class="row q-mb-sm" v-if="price.otherPrice > 0">
<div class="col">雜費 x {{ price.otherPrice }}/人</div>
<div>CNY {{ moneyFormat(price.otherPrice*(chosenObj.crCount+chosenObj.etCount+chosenObj.yeCount), 2) }}</div>
</div>
</div>
<hr <hr
style="border: none; border-top: 1px dashed #eee !important" style="border: none; border-top: 1px dashed #eee !important"
class="bg-transparent q-mb-sm" class="bg-transparent q-mb-sm"
...@@ -375,6 +415,7 @@ ...@@ -375,6 +415,7 @@
CNY {{ moneyFormat(sumPrice, 2) }} CNY {{ moneyFormat(sumPrice, 2) }}
</div> </div>
</div> </div>
<hr <hr
style="border: none; border-top: 1px dashed #eee !important" style="border: none; border-top: 1px dashed #eee !important"
class="bg-transparent q-mb-sm" class="bg-transparent q-mb-sm"
...@@ -416,6 +457,7 @@ ...@@ -416,6 +457,7 @@
import coupon from "../../components/common/coupon.vue"; import coupon from "../../components/common/coupon.vue";
import NoneData from "src/components/common/noneData.vue"; import NoneData from "src/components/common/noneData.vue";
import auth from "src/components/common/auth.vue"; import auth from "src/components/common/auth.vue";
import {date} from 'quasar'
export default { export default {
components: { components: {
coupon, coupon,
...@@ -464,19 +506,36 @@ export default { ...@@ -464,19 +506,36 @@ export default {
countrys: [], countrys: [],
areaCodes: [], areaCodes: [],
guest: { guest: {
FirstName: "", Id:0,
LastName: "", TCID:0,
Passport: "", OrderId:0,
PassFirstName: "", VisaPlanId:0,
PassLastName: "", SurName: "羅",
Name: "超",
PassportNo: "D56465465",
ESurName: "LUO",
EName: "CHAO",
GuestType: 0, GuestType: 0,
EnableSignRoom: false, EnableSignRoom: false,
PassValidate: "", PassportExpiry: "2035-12-31",
FormatTypeName: "", FormatTypeName: "",
MobilePhone: "", MobilePhone: "17308037817",
RoomType: 0, RoomType: 0,
IsSignRoom: false, IsSignRoom: false,
Sex: 0, Sex: 1,
IdCard:'',
PassportIssued:'',
Purpose: "观光",
IsBed:1,
IsNeedAirticket:2,
IsNeedSafe:1,
IsVisaFree:2,
IssuingAuthority:2,
IsCriminalRecord:2,
IsDepartureRecord:2,
IsHightSchool:2,
IsB2B:1,
Birthday:'1990-12-26'
}, },
guests: [], guests: [],
disableSign: false, disableSign: false,
...@@ -486,7 +545,8 @@ export default { ...@@ -486,7 +545,8 @@ export default {
price: null, price: null,
unionCity: null, unionCity: null,
sumPrice:0, sumPrice:0,
submiting:false submiting:false,
CouponIds:[]
}; };
}, },
computed: { computed: {
...@@ -527,11 +587,165 @@ export default { ...@@ -527,11 +587,165 @@ export default {
} }
} }
if(flag){ if(flag){
this.submitOrderHandler()
//this.submitB2COrderHandler(81192)
return;
} }
} }
this.submiting=false this.submiting=false
}, },
submitOrderHandler(){
let msg={
OrderId:0,
TCID:this.order.order.tcid,
CustomerType:4,
GroupType:1,
ContactName:this.userInfo.Surname+this.userInfo.Name,
ContactMobile:this.userInfo.PhoneCountryStr+' '+this.userInfo.Moblie,
CustomerId:0,
DepartureCityId:this.order.order.startCityId,
IsIntermodal:this.unionCity?1:2,
Unit_Price:this.price.originalB2CPrice,
TC_Price:this.price.originalB2CPrice,
ManNum:this.chosenObj.crCount,
ChirdNum:this.chosenObj.etCount,
ChirdNeedBedNum:this.chosenObj.etzcCount,
BabyNum:this.chosenObj.yeCount,
OldPeopleNum: 0,
SingleRoomNum:this.chosenObj.df,
PreferPrice:this.sumPrice,
DiscountMoney:this.discountPrice,
CouponAllotIds: this.CouponIds.join(','),
YSeatNum:this.chosenObj.crCount+this.chosenObj.etCount,
ESeatNum:0,
FSeatNum:0,
Commission:0,//todo 提成
ClientSource:3,
BrandId:0,
TradeWay:0,
PlatformOrder:'',
GuestNum:this.chosenObj.crCount+this.chosenObj.etCount,
IsChildrenTour:this.price.isSupportChildren,
IsBirdDiscount:2,
PredictRoomNum:(parseFloat((this.chosenObj.crCount+this.chosenObj.etzcCount-this.chosenObj.df))/2.0)+this.chosenObj.df,
BigRoomNum:0,
TripleRoomNum:0,
TradeDate:date.formatDate(new Date(),'YYYY-MM-DD'),
CostType:0,
MinOrderPrice:0,
Remarks:this.chosenObj.remark,
VisaNum:this.chosenObj.crCount+this.chosenObj.etCount+this.chosenObj.yeCount,
SafeNum:this.chosenObj.crCount+this.chosenObj.etCount+this.chosenObj.yeCount,
AirticketNum:0,
ReturnArriveCityId:this.unionCity && this.unionCity.backFlight?this.unionCity.backFlight.arrivalCityId:this.trip.returnArriveCityId,
IsReturnIntermodal:this.unionCity && this.unionCity.backFlight?1:2,
GoCityTime:this.unionCity && this.unionCity.goFlight ? this.unionCity.goFlight.startDate:'',
BackCityTime:this.unionCity && this.unionCity.backFlight ? this.unionCity.backFlight.startDate:'',
ScenicRefundArr:[],
CommissionSharePeople:0,
CommissionShareMoney:0,
OrderSource:3,
RedEnvelopeMoney: 0
}
this.apipost("sellorder_post_SetOrderInfoForB2B",msg,
res => {
if(res.data.resultCode==1){
this.uploadGuests(0,res.data.data.OrderId)
}else{
this.$message.error(res.data.message)
this.submiting=false
}
},
err => {
this.submiting=false
});
},
uploadGuests(i,orderId){
let currentGuest = this.guests[i]
currentGuest.OrderId=orderId
currentGuest.TCID = this.order.order.tcid
this.apipost('sellorder_post_SetTravelGuestInfo_V2',currentGuest,r=>{
console.log(r)
if(i<this.guests.length-1){
this.uploadGuests(i,orderId)
}else{
this.submitB2COrderHandler(orderId)
}
})
},
submitB2COrderHandler(orderId){
let guestInfo = `成人x${this.chosenObj.crCount}; `
if(this.chosenObj.etzcCount>0){
guestInfo += `佔床兒童x${this.chosenObj.etzcCount}; `
}
if(this.chosenObj.etbzcCount>0){
guestInfo += `不佔床兒童x${this.chosenObj.etbzcCount}; `
}
if(this.chosenObj.yeCount>0){
guestInfo += `嬰兒x${this.chosenObj.yeCount}; `
}
if(this.chosenObj.df>0){
guestInfo += `單房x${this.chosenObj.df}; `
}
if(this.chosenObj.visaPrice>0){
guestInfo += `簽證x${this.chosenObj.crCount+this.chosenObj.etCount+this.chosenObj.yeCount}; `
}
if(this.chosenObj.safeMoney>0){
guestInfo += `旅行保險x${this.chosenObj.crCount+this.chosenObj.etCount+this.chosenObj.yeCount};`
}
let msg = {
SurName:this.userInfo.Surname,
Name:this.userInfo.Name,
ContactNumber:this.userInfo.PhoneCountryStr+' '+this.userInfo.Moblie,
Mailbox:this.userInfo.Mailbox,
GoodsId:this.order.order.tcid,
GoodsName:this.trip.title,
GoodsPic:this.trip.imgCover[0].Url,
GoodsType:this.price.teamType==0?2:(this.price.teamType==2?1:3),
OrderMake:`${ this.unionCity && this.unionCity.goFlight? this.unionCity.goFlight.startDate :this.price.startDate}${this.unionCity?this.unionCity.cityName:this.trip.startCityName }出發 ${guestInfo}`,
TotalPrice:this.sumPrice,
PreferentialPrice:this.chosenObj.discountPrice,
ErpOrderId:orderId,
Country:this.userInfo.Country,
PlatformTax:0,
Income:0,
Refund:0
}
this.apipost("AddOrderInfo_post",msg,r=>{
if(r.data.resultCode==1){
this.$message.success("訂單創建成功")
this.goPayHandler(r.data.data)
} else {
this.$message.error(r.data.message)
}
})
},
goPayHandler(pay){
let key = this.$md5(JSON.stringify(pay))
let pays = localStorage.getItem('pays')
pays = pays?JSON.parse(pays):[]
pays.push({
key,
pay
})
localStorage.setItem("pays",JSON.stringify(pays))
let lineCars = localStorage.getItem('lineCars')
lineCars = lineCars?JSON.parse(lineCars):[]
let i = lineCars.findIndex(x=>x.key==this.orderKey)
if(i>=0){
lineCars.splice(i,1)
localStorage.setItem("lineCars",JSON.stringify(lineCars))
}
this.CommonJump('/pay/'+key, {});
},
GUID() {
return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
var r = Math.random()*16|0,
v = c == 'x' ? r : (r&0x3|0x8);
return v.toString(16);
})
},
async formValidateHandler(formName){ async formValidateHandler(formName){
let temp=this.$refs[formName] let temp=this.$refs[formName]
let formObj = temp instanceof Array ? temp[0] : temp let formObj = temp instanceof Array ? temp[0] : temp
...@@ -562,7 +776,7 @@ export default { ...@@ -562,7 +776,7 @@ export default {
} }
if (this.orderKey == "") { if (this.orderKey == "") {
setTimeout(() => { setTimeout(() => {
//location.href=location.origin location.href=location.origin
}, 3000); }, 3000);
} }
return this.orderKey != ""; return this.orderKey != "";
...@@ -583,7 +797,8 @@ export default { ...@@ -583,7 +797,8 @@ export default {
money += this.price.singleRoomPrice * this.chosenObj.df; money += this.price.singleRoomPrice * this.chosenObj.df;
let sumCount = this.chosenObj.crCount + this.chosenObj.etCount let sumCount = this.chosenObj.crCount + this.chosenObj.etCount
//money += this.price.visaPrice * sumCount; money += this.price.visaPrice * sumCount;
money += this.price.safeMoney * sumCount;
money += this.price.otherPrice * sumCount; money += this.price.otherPrice * sumCount;
this.sumPrice = money; this.sumPrice = money;
}, },
...@@ -599,6 +814,8 @@ export default { ...@@ -599,6 +814,8 @@ export default {
if (this.chosenObj.df > 0) { if (this.chosenObj.df > 0) {
obj.EnableSignRoom = true; obj.EnableSignRoom = true;
} }
obj.IsBed=1
obj.IdCard=this.GUID()
this.guests.push(obj); this.guests.push(obj);
} }
for (let i = 0; i < this.chosenObj.etzcCount; i++) { for (let i = 0; i < this.chosenObj.etzcCount; i++) {
...@@ -608,18 +825,24 @@ export default { ...@@ -608,18 +825,24 @@ export default {
if (this.chosenObj.df > 0) { if (this.chosenObj.df > 0) {
obj.EnableSignRoom = true; obj.EnableSignRoom = true;
} }
obj.IsBed=1
obj.IdCard=this.GUID()
this.guests.push(obj); this.guests.push(obj);
} }
for (let i = 0; i < this.chosenObj.etbzcCount; i++) { for (let i = 0; i < this.chosenObj.etbzcCount; i++) {
let obj = JSON.parse(JSON.stringify(this.guest)); let obj = JSON.parse(JSON.stringify(this.guest));
obj.GuestType = 3; obj.GuestType = 3;
obj.FormatTypeName = `儿童不占床 ${i + 1}:`; obj.FormatTypeName = `儿童不占床 ${i + 1}:`;
obj.IsBed=0
obj.IdCard=this.GUID()
this.guests.push(obj); this.guests.push(obj);
} }
for (let i = 0; i < this.chosenObj.yeCount; i++) { for (let i = 0; i < this.chosenObj.yeCount; i++) {
let obj = JSON.parse(JSON.stringify(this.guest)); let obj = JSON.parse(JSON.stringify(this.guest));
obj.GuestType = 4; obj.GuestType = 4;
obj.FormatTypeName = `婴儿 ${i + 1}:`; obj.FormatTypeName = `婴儿 ${i + 1}:`;
obj.IsBed=0
obj.IdCard=this.GUID()
this.guests.push(obj); this.guests.push(obj);
} }
}, },
...@@ -661,6 +884,7 @@ export default { ...@@ -661,6 +884,7 @@ export default {
}); });
} }
}, },
getTripData() { getTripData() {
this.$q.loading.show(); this.$q.loading.show();
let msg = { let msg = {
...@@ -684,7 +908,7 @@ export default { ...@@ -684,7 +908,7 @@ export default {
if(this.order.order.startCityId!=this.trip.startCityId){ if(this.order.order.startCityId!=this.trip.startCityId){
this.unionCity = this.price.unionCityList.find(x=>x.cityId == this.order.order.startCityId) this.unionCity = this.price.unionCityList.find(x=>x.cityId == this.order.order.startCityId)
if(this.unionCity.backFlight && this.unionCity.backFlight.addPrice){ if(this.unionCity.backFlight && this.unionCity.backFlight.addPrice){
this.price.originalB2CPrice+=unionCity.backFlight.addPrice this.price.originalB2CPrice+=this.unionCity.backFlight.addPrice
} }
if(this.unionCity.goFlight && this.unionCity.goFlight.addPrice){ if(this.unionCity.goFlight && this.unionCity.goFlight.addPrice){
this.price.originalB2CPrice+=this.unionCity.goFlight.addPrice this.price.originalB2CPrice+=this.unionCity.goFlight.addPrice
......
<template>
<div class="content-page order-preview">
<q-stepper
v-model="step"
ref="stepper"
color="primary"
inactive-color="grey-5 "
done-color="primary"
class="bg-transparent"
flat
animated
>
<q-step
:name="1"
title="確認訂單"
icon="settings"
:done="step > 1"
></q-step>
<q-step
:name="2"
title="付款"
icon="iconfont iconPayment-1"
:done="step > 2"
></q-step>
<q-step
:name="3"
title="訂購完成"
icon="iconfont iconicon_finish_R"
:done="step == 3"
></q-step>
</q-stepper>
</div>
</template>
<script>
export default {
data() {
return {
step:2
}
},
}
</script>
<style>
</style>
\ No newline at end of file
...@@ -51,91 +51,91 @@ const routes = [{ ...@@ -51,91 +51,91 @@ const routes = [{
}, },
{ {
path: '/account', //用户信息 path: '/account', //用户信息
meta: {isUserCenter: true}, meta: { isUserCenter: true },
component: () => component: () =>
import ('pages/usercenter/account.vue') import ('pages/usercenter/account.vue')
}, },
{ {
path: '/demandlist', //需求单列表 path: '/demandlist', //需求单列表
meta: {isUserCenter: true}, meta: { isUserCenter: true },
component: () => component: () =>
import ('pages/usercenter/demandlist.vue') import ('pages/usercenter/demandlist.vue')
}, },
{ {
path: '/demandinfo/:id', //需求单详情 path: '/demandinfo/:id', //需求单详情
meta: {isUserCenter: true}, meta: { isUserCenter: true },
component: () => component: () =>
import ('pages/usercenter/demandinfo.vue') import ('pages/usercenter/demandinfo.vue')
}, },
{ {
path: '/orderlist', //订单列表 path: '/orderlist', //订单列表
meta: {isUserCenter: true}, meta: { isUserCenter: true },
component: () => component: () =>
import ('pages/usercenter/orderlist.vue') import ('pages/usercenter/orderlist.vue')
}, },
{ {
path: '/orderinfo/:id', //订单详情 path: '/orderinfo/:id', //订单详情
meta: {isUserCenter: true}, meta: { isUserCenter: true },
component: () => component: () =>
import ('pages/usercenter/orderinfo.vue') import ('pages/usercenter/orderinfo.vue')
}, },
{ {
path: '/passengerList/:id', //旅客名单 path: '/passengerList/:id', //旅客名单
meta: {isUserCenter: true}, meta: { isUserCenter: true },
component: () => component: () =>
import ('pages/usercenter/passengerList.vue') import ('pages/usercenter/passengerList.vue')
}, },
{ {
path: '/register', //用户注册 path: '/register', //用户注册
meta: {isUserCenter: true}, meta: { isUserCenter: true },
component: () => component: () =>
import ('pages/usercenter/register.vue') import ('pages/usercenter/register.vue')
}, },
{ {
path: '/loginInfo', //账户设置 path: '/loginInfo', //账户设置
meta: {isUserCenter: true}, meta: { isUserCenter: true },
component: () => component: () =>
import ('pages/usercenter/loginInfo.vue') import ('pages/usercenter/loginInfo.vue')
}, },
{ {
path: '/setAddress', //地址管理 path: '/setAddress', //地址管理
meta: {isUserCenter: true}, meta: { isUserCenter: true },
component: () => component: () =>
import ('pages/usercenter/setAddress.vue') import ('pages/usercenter/setAddress.vue')
}, },
{ {
path: '/setInfo', //账户设置 path: '/setInfo', //账户设置
meta: {isUserCenter: true}, meta: { isUserCenter: true },
component: () => component: () =>
import ('pages/usercenter/setInfo.vue') import ('pages/usercenter/setInfo.vue')
}, },
{ {
path: '/setUserInfo', //用户信息 path: '/setUserInfo', //用户信息
meta: {isUserCenter: true}, meta: { isUserCenter: true },
component: () => component: () =>
import ('pages/usercenter/setUserInfo.vue') import ('pages/usercenter/setUserInfo.vue')
}, },
{ {
path: '/coupon', //优惠券 path: '/coupon', //优惠券
meta: {isUserCenter: true}, meta: { isUserCenter: true },
component: () => component: () =>
import ('pages/usercenter/coupon.vue') import ('pages/usercenter/coupon.vue')
}, },
{ {
path: '/order', //用户订单 path: '/order', //用户订单
meta: {isUserCenter: true}, meta: { isUserCenter: true },
component: () => component: () =>
import ('pages/usercenter/order.vue') import ('pages/usercenter/order.vue')
}, },
{ {
path: '/setUsersList', //用户订单 path: '/setUsersList', //用户订单
meta: {isUserCenter: true}, meta: { isUserCenter: true },
component: () => component: () =>
import ('pages/usercenter/setUsersList.vue') import ('pages/usercenter/setUsersList.vue')
}, },
{ {
path: '/payInfo', //支付管理 path: '/payInfo', //支付管理
meta: {isUserCenter: true}, meta: { isUserCenter: true },
component: () => component: () =>
import ('pages/usercenter/payInfo.vue') import ('pages/usercenter/payInfo.vue')
}, },
...@@ -154,6 +154,11 @@ const routes = [{ ...@@ -154,6 +154,11 @@ const routes = [{
component: () => component: () =>
import ('pages/line/orderPreview.vue') import ('pages/line/orderPreview.vue')
}, },
{
path: '/pay/:id?', //自定义页面
component: () =>
import ('pages/line/pay.vue')
},
] ]
}, },
......
...@@ -8916,6 +8916,11 @@ svgo@^1.0.0: ...@@ -8916,6 +8916,11 @@ svgo@^1.0.0:
unquote "~1.1.1" unquote "~1.1.1"
util.promisify "~1.0.0" util.promisify "~1.0.0"
swiper@3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/swiper/-/swiper-3.0.4.tgz#6a9810d33431bb05dbfa4276a8338e20968e3e12"
integrity sha512-t/EPKnUHHtH1A3Owj904EO8kWy6QVLeuVT2p1/P/TAzuvY5AI/37265o8f2OrVCK/qoafJ8mT52ymOGb6M0BbA==
swiper@^4.0.7: swiper@^4.0.7:
version "4.5.1" version "4.5.1"
resolved "https://registry.yarnpkg.com/swiper/-/swiper-4.5.1.tgz#ed43998e780ceb478610079c8d23fd425eca636f" resolved "https://registry.yarnpkg.com/swiper/-/swiper-4.5.1.tgz#ed43998e780ceb478610079c8d23fd425eca636f"
...@@ -9622,6 +9627,11 @@ vue@^2.6.10: ...@@ -9622,6 +9627,11 @@ vue@^2.6.10:
"@vue/compiler-sfc" "2.7.14" "@vue/compiler-sfc" "2.7.14"
csstype "^3.1.0" csstype "^3.1.0"
vuelidate@^0.7.7:
version "0.7.7"
resolved "https://registry.yarnpkg.com/vuelidate/-/vuelidate-0.7.7.tgz#5df3930a63ddecf56fde7bdacea9dbaf0c9bf899"
integrity sha512-pT/U2lDI67wkIqI4tum7cMSIfGcAMfB+Phtqh2ttdXURwvHRBJEAQ0tVbUsW9Upg83Q5QH59bnCoXI7A9JDGnA==
vuex@3.4.0: vuex@3.4.0:
version "3.4.0" version "3.4.0"
resolved "https://registry.npmmirror.com/vuex/-/vuex-3.4.0.tgz" resolved "https://registry.npmmirror.com/vuex/-/vuex-3.4.0.tgz"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment