Commit 035d558d authored by 沈良进's avatar 沈良进

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

parents 796b7933 91226133
......@@ -7,7 +7,9 @@
border-radius: 8px;}
</style>
<template>
<div>
<div class="card" :id="`baidu-map_${center.Id}`"></div>
</div>
</template>
<script>
export default {
......@@ -17,7 +19,8 @@
center:{
Lng: 116.294625,
Lat: 39.961627
}
},
keywords: ''
}
},
watch: {
......@@ -27,6 +30,11 @@
},
deep:true,
immediate:true
},
keywords:{
handler(newValue,onldValue) {
this.getLocalSearch()
},
}
},
mounted() {
......@@ -74,7 +82,7 @@
offset: new BMapGL.Size(10, -60), // 设置标注的偏移量
});
this.map.addOverlay(label); // 将标注添加到地图中
label.addEventListener("click", function () {
label.addEventListener("click", function (e) {
// alert("您点击了标注");
});
label.setStyle({
......@@ -90,7 +98,12 @@
var mPoint = new BMapGL.Point(this.center.Lng, this.center.Lat);
var circle = new BMapGL.Circle(mPoint,this.center.Range,{fillColor:"blue", strokeWeight: 1 ,fillOpacity: 0.3, strokeOpacity: 0.3});
this.map.addOverlay(circle);
}
},
getLocalSearch(){
var mPoint = new BMapGL.Point(this.center.Lng, this.center.Lat);
var local = new BMapGL.LocalSearch(this.map, {renderOptions: {map: this.map, autoViewport: false}});
local.searchNearby(this.keywords,mPoint,this.center.Range);
},
},
}
</script>
......@@ -13,8 +13,8 @@
<template v-if="dataList.CarType!=3">
<div class="text-grey-6 f12 q-my-md">選擇機場</div>
<div class="row wrap">
<q-btn @click="handleSelectAirport(item)"
:color="item.Id === selectedAirport?'primary':'grey-5'"
<q-btn @click="handleSelect(item,1)"
:color="selectedAirportObj&&item.Id === selectedAirportObj.Id?'primary':'grey-5'"
unelevated
class="car-tag mr"
v-for="item in AirportList"
......@@ -24,10 +24,42 @@
</q-btn>
</div>
</template>
<div class="row">
<div v-if="dataList.CarType!=1">
<div class="text-grey-6 f12 q-my-md">選擇上車範圍</div>
<div class="row wrap">
<q-btn @click="handleSelect(item,3)"
:color="onCarObj&&item.Id === onCarObj.Id?'primary':'grey-5'"
unelevated
class="car-tag mr"
v-for="item in PlaceList"
:key="item.Id"
>
{{ item.Name }}({{ item.Range }}m)
</q-btn>
</div>
</div>
<div v-if="dataList.CarType!=2">
<div class="text-grey-6 f12 q-my-md">選擇下車範圍</div>
<div class="row wrap">
<q-btn @click="handleSelect(item,4)"
:color="unCarObj&&item.Id === unCarObj.Id?'primary':'grey-5'"
unelevated
class="car-tag mr"
v-for="item in PlaceList"
:key="item.Id"
>
{{ item.Name }}({{ item.Range }}m)
</q-btn>
</div>
</div>
</div>
<div class="text-grey-6 f12 q-my-md">選擇車類型</div>
<div class="row wrap">
<q-btn @click="handleSelect(item)"
:color="item.Id === selectedCar?'primary':'grey-5'"
<q-btn @click="handleSelect(item,2)"
:color="selectedCarObj&&item.Id === selectedCarObj.Id?'primary':'grey-5'"
unelevated
class="car-tag mr"
v-for="item in CarTypeList"
......@@ -39,9 +71,9 @@
<div class="text-grey-6 f12 q-my-md">選擇數量</div>
<div class="row items-end">
<div class="col" :class="{'column':$q.platform.is.mobile}">
<div v-if="selectedObj">
<span class="text-subtitle2 text-weight-bold">{{selectedObj.CarName}}</span>
<span class="text-grey-6 f12 q-ml-sm"></span>({{ selectedObj.PeopleNum }}人+{{ selectedObj.PeopleNum }}行李)</span>
<div v-if="selectedCarObj">
<span class="text-subtitle2 text-weight-bold">{{selectedCarObj.CarName}}</span>
<span class="text-grey-6 f12 q-ml-sm"></span>({{ selectedCarObj.PeopleNum }}人/辆)</span>
</div>
<div v-if="$q.platform.is.mobile">
<span class="text-grey-7 product-price" style="font-size: 13px">
......@@ -90,17 +122,6 @@
</q-input>
</div>
</div>
<div class="text-grey-6 f12 q-mt-mb" v-if="p.isSupportChildren == 2">
本團只支持成人出遊
</div>
<div
v-if="p.safeMoney > 0"
class="q-pt-md q-mt-md row items-center"
style="border-top: 1px dashed #eee"
>
<div class="text-grey-6 f12 col">保險服務費</div>
<div class="product-money f12">CNY {{ p.safeMoney }}/每人</div>
</div>
</div>
<div class="q-mt-md q-pt-md" style="border-top: 1px dashed #eee">
<div class="row items-center">
......@@ -112,10 +133,17 @@
{{$q.platform.is.mobile?'請選擇上面的出行日期':'請選擇左側的出行日期'}}
</span>
<span class="q-mr-lg f12 text-negative"
v-if="(p.startDate&&!selectedCar)||(p.startDate&&dataList.CarType!=3&&!selectedAirportObj)" >
{{`請選擇上面的${dataList.CarType==3?'車類型':'機場、車類型'}`}}
v-if="(p.startDate&&!selectedCarObj)
||(p.startDate&&dataList.CarType==1&&(!selectedAirportObj||!unCarObj))
||(p.startDate&&dataList.CarType==2&&(!selectedAirportObj||!onCarObj))
||(p.startDate&&dataList.CarType==3&&(!onCarObj||!unCarObj))" >
{{`請選擇上面的${dataList.CarType==3?'車類型、上車下車點':dataList.CarType==1?'機場、車類型、下車點':'機場、車類型、上車點'}`}}
</span>
<q-btn color="primary" label="立即訂購" unelevated class="q-px-lg" :disable="sumPrice==0"
<q-btn color="primary" label="立即訂購" unelevated class="q-px-lg"
:disable="sumPrice==0||!selectedCarObj
||(dataList.CarType!=3&&!selectedAirportObj)
||(dataList.CarType==1&&!unCarObj)||(dataList.CarType==2&&!onCarObj)
||(dataList.CarType==3&&(!onCarObj||!unCarObj))"
@click="goUrl"/>
</div>
</div>
......@@ -124,7 +152,7 @@
<script>
export default {
props: ["dataList","price","CarTypeList","AirportList","configId","Month"],
props: ["dataList","PlaceList","price","CarTypeList","AirportList","configId","Month"],
watch: {
price: {
handler(n, o) {
......@@ -132,7 +160,7 @@ export default {
if(n&&n.startDate){
this.chosenObj.startDate = n.startDate;
// this.selectedCar = this.CarTypeList[0].Id
// this.selectedObj = this.CarTypeList[0]
// this.selectedCarObj = this.CarTypeList[0]
}
this.calcMoney()
......@@ -154,11 +182,11 @@ export default {
p: {},
chosenObj: null,
sumPrice:0,
selectedCar: 0,
selectedObj: null,
selectedCarObj: null,
priceList: [],
selectedAirport: 0,
selectedAirportObj: null,
onCarObj: null,
unCarObj: null,
};
},
created() {
......@@ -167,16 +195,59 @@ export default {
this.chosenObj.startDate = this.p.startDate;
this.calcMoney()
this.getCarPriceData2()
// this.selectedCar = this.CarTypeList[0].Id
// this.selectedObj = this.CarTypeList[0]
}
},
methods: {
goUrl(){
let OrderDate = {
CarObj: this.selectedCarObj,
AirportObj: {
Address: this.selectedAirportObj?this.selectedAirportObj.Address:'',
AirportId: this.selectedAirportObj?this.selectedAirportObj.AirportId:'',
AirportName: this.selectedAirportObj?this.selectedAirportObj.AirportName:'',
Id: this.selectedAirportObj?this.selectedAirportObj.Id:'',
Name: this.selectedAirportObj?this.selectedAirportObj.Name:''
},
calculationAmount: this.p,
calculationNum: this.chosenObj,
sumPrice: this.sumPrice,
details: {
Name: this.dataList.Name,
Description: this.dataList.Description,
videoStr: this.dataList.videoStr,
imgCover: this.dataList.imgCover,
CarType: this.dataList.CarType,
Id: this.dataList.Id,
},
onCarObj: {
Address: this.onCarObj?this.onCarObj.Address:'',
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:''
},
}
// console.log(OrderDate,'========')
// return
this.CommonJump(
"/PickuporderForm",
{}
{
OrderDate: encodeURIComponent(JSON.stringify(OrderDate)),
// CarObj: JSON.stringify(this.selectedCarObj),
// AirportObj: JSON.stringify(this.selectedAirportObj),
// calculationAmount: JSON.stringify(this.p),
// calculationNum: JSON.stringify(this.chosenObj),
// sumPrice: JSON.stringify(this.sumPrice),
// details: JSON.stringify(this.dataList)
}
);
},
// 获取车的详情
......@@ -188,7 +259,7 @@ export default {
ProductId: this.configId,
Month: this.Month,
AirportId: '',
CarTypeId: this.selectedCar
CarTypeId: this.selectedCarObj.Id
},
(r) => {
if (r.data.resultCode == 1) {
......@@ -212,7 +283,7 @@ export default {
const temp= JSON.parse(JSON.stringify(r.data.data))
let PriceArr = temp.filter(x=>{ return x.Price>0 })
if(PriceArr.length>0){
this.$emit('getPriceList',JSON.stringify(arr),this.selectedCar)
this.$emit('getPriceList',JSON.stringify(arr),this.selectedCarObj.Id)
}else{
let dataObj = {
startDate: '',
......@@ -223,7 +294,7 @@ export default {
safeMoney: 0,
}
this.priceList.push(dataObj)
this.$emit('getPriceList',JSON.stringify(this.priceList),this.selectedCar)
this.$emit('getPriceList',JSON.stringify(this.priceList),this.selectedCarObj.Id)
this.p.originalB2CPrice = 0
this.resetHandler()
}
......@@ -233,12 +304,19 @@ export default {
},
handleSelectAirport(item){
this.selectedAirportObj = item
this.selectedAirport = item.Id
},
handleSelect(item){
this.selectedObj = item
this.selectedCar = item.Id
handleSelect(item,type){
if(type==1){
this.selectedAirportObj = item
}else if(type==2){
this.selectedCarObj = item
this.getCarPriceData2()
}else if(type==3){
this.onCarObj = item
}else if(type==4){
this.unCarObj = item
}
},
initModel() {
this.sumPrice=0
......@@ -250,10 +328,10 @@ export default {
},
resetHandler(type) {
if(type&&type!=1){
this.selectedCar = 0
this.selectedObj = null
this.selectedCarObj = null
this.selectedAirportObj = null
this.selectedAirport = 0
this.onCarObj = null
this.unCarObj = null
}
setTimeout(()=>{
this.p = {};
......
......@@ -330,7 +330,7 @@ export default {
this.calcMoney()
},
deep: true,
immediate: true,
immediate: false,
},
},
data() {
......
......@@ -43,22 +43,6 @@
<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-input
standout
v-model="userInfo.lastName"
label="名字"
:rules="[(val) => !!val || '請輸入名字']"
/>
</div>
<div :class="filedWidth">
<q-input
standout
v-model="userInfo.firstName"
label="姓氏"
:rules="[(val) => !!val || '請輸入姓氏']"
/>
</div>
<div :class="filedWidth">
<q-select
v-model="userInfo.country"
......@@ -75,9 +59,10 @@
<div :class="filedWidth">
<q-input
standout
v-model="userInfo.firstName"
v-model="parameters.Mobile"
label="電話"
:rules="[(val) => !!val || '請輸入行動電話']"
:rules="[(val) => !!val && val.length == 11 || '請輸正確電話']"
ref="Mobile"
>
<template v-slot:prepend>
<div class="text-subtitle2">+{{ userInfo.areaCode }}</div>
......@@ -90,46 +75,61 @@
v-model="userInfo.mail"
label="郵箱地址"
:rules="[(val) => !!val || '請輸入郵箱地址']"
ref="mail"
/>
</div>
<div :class="filedWidth">
<q-toggle v-model="isUpdateUserInfo" label="同步更新會員資料" />
</div>
</div>
</q-card>
<q-card flat class="q-pa-md q-mt-lg">
<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
src="https://image.kkday.com/v2/image/get/s1.kkday.com/product_138437/20230217083232_t5rcO/jpg"
v-else
:src="details?details.imgCover[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>2023-02-27</span>
<span>{{calculationAmount.startDate}}</span>
</div>
<div class="text-grey-9 q-ml-md">
<q-icon name="iconfont iconjiaotong" size="20px" class="q-mr-sm" />
<span class="q-mr-sm" v-if="chosenObj.Count > 0"
>豪华车 x {{ chosenObj.Count }} (4人+{{chosenObj.Count}}行李)</span
>{{CarObj.CarName}} x {{ chosenObj.Count }}辆 </span
>
<span class="q-mr-sm"
></span
>({{CarObj.PeopleNum}}人/辆)</span
>
</div>
</div>
......@@ -146,6 +146,7 @@
label="本國姓"
placeholder="例:張"
:rules="[(val) => !!val || '請輸本國姓']"
ref="SurName"
/>
</div>
<div :class="filedGuestWidth">
......@@ -155,72 +156,50 @@
label="本國名"
placeholder="例:三"
:rules="[(val) => !!val || '請輸本國名']"
ref="Name"
/>
</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="guests.Sex" dense :val="2" label="女" />
</div>
</div>
<div :class="filedGuestWidth">
<q-input
standout
v-model="parameters.PassFirstName"
label="護照英文姓"
placeholder="例:ZHANG"
:rules="[(val) => !!val || '請輸護照英文姓']"
/>
v-model="parameters.ContactWay"
label="联络方式"
placeholder="例:WeChat"
:rules="[(val) => !!val || '請輸联络方式']"
ref="ContactWay"
>
</q-input>
</div>
<div :class="filedGuestWidth">
<q-input
standout
v-model="parameters.PassLastName"
label="護照英文名"
placeholder="例:SAN"
:rules="[(val) => !!val || '請輸護照英文名']"
/>
v-model="parameters.Mobile"
label="電話"
:rules="[(val) => !!val && val.length == 11 || '請輸正確電話']"
ref="Mobile"
>
<template v-slot:prepend>
<div class="text-subtitle2">+{{ userInfo.areaCode }}</div>
</template>
</q-input>
</div>
<div :class="filedGuestWidth">
<q-input
standout
v-model="parameters.Passport"
label="護照號"
:rules="[(val) => !!val || '請輸護照號']"
<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 :class="filedGuestWidth">
<q-input
class="q-pb-md"
standout
v-model="parameters.PassValidate"
label="護照有效期"
readonly
>
<template v-slot:append>
<q-icon name="event" class="cursor-pointer"></q-icon>
</template>
<q-popup-proxy :offset="[0, 0]" ref="qDateProxy7">
<q-date
mask="YYYY-MM-DD"
:title="$t('search_date_begin')"
subtitle="選擇"
v-model="parameters.PassValidate"
@input="() => $refs.qDateProxy7.hide()"
/>
</q-popup-proxy>
</q-input>
</div>
</div>
</div>
<div class="text-subtitle1 text-weight-bolder q-my-md">抵达 班机資料</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"
......@@ -234,6 +213,7 @@
label="航廈"
placeholder="例:航廈"
:rules="[(val) => !!val || '請輸航廈']"
ref="AirportTerminal"
/>
</div>
<div :class="filedGuestWidth">
......@@ -243,6 +223,7 @@
label="航空公司"
placeholder=""
:rules="[(val) => !!val || '請輸航空公司名稱']"
ref="AirLine"
/>
</div>
<div :class="filedGuestWidth">
......@@ -252,37 +233,44 @@
label="航班編號"
placeholder="例:CA123"
:rules="[(val) => !!val || '請輸航班編號']"
ref="FlightNumber"
/>
</div>
<div :class="filedGuestWidth">
<q-input
class="q-pb-md"
standout
v-model="parameters.FlightTime"
label="航班抵达时间"
readonly
: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="qDateProxy7">
<q-popup-proxy :offset="[0, 0]" ref="qDateProxy1">
<div class="row">
<q-date
<!-- <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 v-model="flightTime" mask="YYYY-MM-DD HH:mm"
@input="() => $refs.qDateProxy7.hide()"/>
<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>
<div class="text-subtitle1 text-weight-bolder q-my-md">接送資料</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"
......@@ -292,37 +280,45 @@
<div :class="filedGuestWidth">
<q-input
standout
v-model="parameters.OrderDate"
v-model="!getBusTime?'':parameters.OrderDate"
label="接駁日期"
readonly
disable
: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-time format24h v-model="getBusTime" mask="HH:mm"
@input="getTime(2)"/>
</div>
</q-popup-proxy>
</q-input>
</div>
<div :class="filedGuestWidth">
<div :class="filedGuestWidth" v-if="details.CarType!=1">
<q-input
standout
v-model="parameters.GetonAddress"
label="上車地點"
placeholder=""
:rules="[(val) => !!val || '請輸上車地點和地址供司機參考']">
:rules="[(val) => !!val || '請輸上車地點和地址供司機參考']"
ref="GetonAddress">
<template v-slot:append>
<q-icon name="iconfont iconaddress" size="20px" class="q-mr-sm" />
<q-icon name="iconfont iconaddress" size="20px" class="q-mr-sm" @click="getAddress(1)"/>
</template>
</q-input>
</div>
<div :class="filedGuestWidth">
<div :class="filedGuestWidth" v-if="details.CarType!=2">
<q-input
standout
v-model="parameters.GetoffAddress"
label="下車地點"
placeholder=""
:rules="[(val) => !!val || '請輸下車地點和地址供司機參考']">
:rules="[(val) => !!val || '請輸下車地點和地址供司機參考']"
ref="GetoffAddress">
<template v-slot:append>
<q-icon name="iconfont iconaddress" size="20px" class="q-mr-sm" />
<q-icon name="iconfont iconaddress" size="20px" class="q-mr-sm" @click="getAddress(2)"/>
</template>
</q-input>
</div>
......@@ -342,6 +338,9 @@
standout
v-model="parameters.ManNum"
label="成人數(18-99岁)"
@input="getNum"
:rules="[(val) => !!val || '請輸成人數']"
ref="ManNum"
/>
</div>
<div :class="filedGuestWidth">
......@@ -350,6 +349,7 @@
standout
v-model="parameters.ChildNum"
label="兒童數(3-17岁)"
@input="getNum"
/>
</div>
<div :class="filedGuestWidth">
......@@ -358,10 +358,12 @@
standout
v-model="parameters.BabyNum"
label="嬰幼兒數(0-2岁)"
@input="getNum"
/>
</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="filedGuestWidth">
......@@ -382,52 +384,13 @@
</div>
</div>
</div>
<div class="text-subtitle1 text-weight-bolder q-my-md">旅遊期間聯絡方式</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.Name"
label="名字"
:rules="[(val) => !!val || '請輸入名字']"
/>
</div>
<div :class="filedGuestWidth">
<q-input
standout
v-model="parameters.SurName"
label="姓氏"
:rules="[(val) => !!val || '請輸入姓氏']"
/>
</div>
<div :class="filedGuestWidth">
<q-input
standout
v-model="parameters.Mobile"
label="電話"
:rules="[(val) => !!val || '請輸入行動電話']"
>
<template v-slot:prepend>
<div class="text-subtitle2">+{{ userInfo.areaCode }}</div>
</template>
</q-input>
</div>
</div>
</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-input standout v-model="parameters.Remark" input-style="height:170px;" type="textarea" placeholder="此欄位僅限資料備註。不在商品規範內的個人需求,不保證提供" maxlength="200" counter />
</q-card>
<coupon></coupon>
</div>
<div class="relative-position"
<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,
......@@ -447,73 +410,139 @@
>
<div class="text-subtitle1 text-weight-bolder">付款明細</div>
<div class="row q-mt-md">
<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
src="https://image.kkday.com/v2/image/get/s1.kkday.com/product_138437/20230217083232_t5rcO/jpg"
v-else
:src="details?details.imgCover[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">
<div style="width: 80px">出發城市:</div>
<div class="q-ml-md">武漢起止</div>
<div class="row q-pb-xs" 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" v-if="parameters.GetonAddress">
<div style="width: 80px">上車點:</div>
<div class="q-ml-md ellipsis-2-lines">{{parameters.GetonAddress}}</div>
</div>
<div class="row q-pb-xs" v-if="parameters.GetoffAddress">
<div style="width: 80px">下車點:</div>
<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">2024-02-02</div>
<div style="width: 80px">
<!-- 出發日期: -->
接駁日期:</div>
<div class="q-ml-md">
{{parameters.OrderDate}}
<!-- {{calculationAmount.startDate}} -->
</div>
</div>
</div>
<q-separator color="grey-2" class="q-my-md"/>
<div class="text-grey-9">
<div class="row q-mb-sm" v-if="chosenObj.Count>0">
<div class="col">豪华车 x {{ chosenObj.Count }}</div>
<div>CNY {{ moneyFormat(9999,2) }}</div>
<div class="col">{{CarObj.CarName}} x {{ chosenObj.Count }}</div>
<div>CNY {{ moneyFormat(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.df)>0">
<!-- <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">CNY {{ moneyFormat(9999,2) }}</div>
</div>
<div class="text-subtitle2 text-weight-bolder text-primary">CNY {{ moneyFormat(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.df)>0">
<div class="col">優惠金額</div>
<div class="text-subtitle2 text-weight-bolder text-teal">CNY - {{ moneyFormat(9999,2) }}</div>
<div class="text-grey-5">暫無優惠</div>
</div>
<div class="row q-mb-sm items-center" v-if="(chosenObj.df)>0">
<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">CNY {{ moneyFormat(9999,2) }}</div>
<div class="text-h6 text-weight-bolder text-primary product-price">CNY {{ moneyFormat(sumPrice,2) }}</div>
</div>
</div>
<div class="text-right q-mt-md">
<q-btn unelevated color="primary" label="立即支付" />
<div class="text-right q-mt-md" v-if="step!=3">
<q-btn v-if="step!=3" unelevated color="primary"
:loading="loading" :label="step!=3?'立即支付':'已支付'" @click="submit()"
:disable="step!=3&&loading"/>
<q-btn v-else unelevated color="primary" label=""/>
</div>
</div>
</div>
</div>
<q-dialog v-model="isShowDialog">
<q-card class="q-pa-lg" :style="{'width':$q.platform.is.desktop?'100%':'500px'}">
<div class="text-h6Detail">
<span>乘客{{onoffbus==1?'上':'下'}}車範圍</span>
<i class="iconfont iconbaseline-close-px" @click="isShowDialog=false"></i>
</div>
<q-separator />
<div style="max-height: 600px;padding:20px 0" class="scroll">
<componentsMap :AddressObj="onCarObj"/>
</div>
</q-card>
</q-dialog>
</div>
</template>
<script>
import { date } from 'quasar'
import { json } from "body-parser";
import coupon from '../../components/common/coupon.vue'
import componentsMap from "../../components/car/Map.vue";
export default {
components:{
coupon
coupon,
componentsMap
},
data() {
return {
isRangeClick: true,
isShowDialog: false,
AddressObj: null,
onCarObj: null,//上车范围
unCarObj: null,//下车范围
CarObj: null,//车型
AirportObj: null,//机场
calculationAmount: null,//日期
calculationNum: null,//数量
sumPrice: null,//总价
details: null,//产品详情
options: {
currentPage: 0,
speed: 300,
itemAnimation: true,
centeredSlides: true,
thresholdDistance: 100,
thresholdTime: 300,
loopedSlides: 2,
slidesToScroll: 1,
loop: true,
},
OrderDate: null,//接收产品相关信息
step: 1,
userInfo: {
lastName: "",
......@@ -523,52 +552,11 @@
areaCode: "",
mail: "",
},
chosenObj: {
startDate: "",
Count: 4,
etCount: 6,
yeCount: 0,
lrCount: 0,
etbzcCount: 4,
etzcCount: 2,
df: 1,
dcf: 0,
srf: 0,
isUnico: false,
unicoDep: {
city: null,
date: null,
price: 0,
isSup: -2,
},
unicoArr: {
city: null,
date: null,
price: 0,
isSup: -2,
},
remark: "",
},
chosenObj: {},
isUpdateUserInfo: false,
countrys: [],
areaCodes: [],
guest: {
FirstName: "",
LastName: "",
Passport: "",
PassFirstName: "",
PassLastName: "",
GuestType: 0,
EnableSignRoom: false,
PassValidate: "",
FormatTypeName: "",
MobilePhone: "",
RoomType:0,
IsSignRoom:false,
Sex: 0,
},
guests: [],
disableSign:false,
loading: false,
parameters: {
OrderId: 0,
OrderType: 0,
......@@ -576,7 +564,7 @@
Unit_Price: '',//单价
Num: '',//数量
Money: 0.0,
Sex: '1',//1男2女
Sex: 1,//1男2女
SurName: '',//姓
Name: '',//名
Remark: '',
......@@ -596,13 +584,13 @@
Mobile:'',//电话
ProductId: '',
CarId: '',//产品类型ID
PassFirstName: '',//英文姓
PassLastName: '',//英文名
Passport: '',//护照
PassValidate: '',
pType: 1,//类型 1来源B2C
},
flightTime: null,//航班起飞抵达时间
getBusTime: null,//预约车时间
TotalPeople: 0,//总人数
onoffbus: 1,//1 上车 2下车
ErpOrderId: 0,//erp订单Id
};
},
computed: {
......@@ -621,17 +609,187 @@
},
created() {},
mounted() {
if(this.$route.query.OrderDate){
let obj = decodeURIComponent(this.$route.query.OrderDate)
let OrderDate = JSON.parse(obj)
this.CarObj = OrderDate.CarObj,//车型
this.AirportObj = OrderDate.AirportObj,//机场
this.calculationAmount = OrderDate.calculationAmount,//日期
this.chosenObj = OrderDate.calculationNum,//数量
this.sumPrice = OrderDate.sumPrice,//总金额
this.details = OrderDate.details//产品详情
this.onCarObj = OrderDate.onCarObj//上车范围
this.unCarObj = OrderDate.unCarObj//下车范围
}
this.parameters.ProductId = this.details.Id
this.parameters.OrderDate = this.calculationAmount.startDate
if(this.details.CarType!=3){
this.parameters.AirportId = this.AirportObj.Id
this.parameters.FlightTime = this.calculationAmount.startDate
}
this.parameters.CarId = this.CarObj.Id
this.parameters.OrderType = this.details.CarType
this.parameters.Unit_Price = this.calculationAmount.originalB2CPrice
this.parameters.Num = this.chosenObj.Count
this.parameters.Money = this.sumPrice
this.initCountry();
this.initGuestHandler();
},
methods: {
changeRoomHandler(){
let currentSign = this.guests.filter(x=> x.IsSignRoom)
this.disableSign=currentSign==this.chosenObj.df
submit(){
let flag = false
this.$refs.mail.validate()
this.$refs.SurName.validate()
this.$refs.Name.validate()
this.$refs.ContactWay.validate()
this.$refs.Mobile.validate()
this.$refs.OrderDate.validate()
this.$refs.ManNum.validate()
if(this.details.CarType!=3){
this.$refs.AirportTerminal.validate()
this.$refs.AirLine.validate()
this.$refs.FlightNumber.validate()
this.$refs.FlightTime.validate()
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.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.SetCarOrder()
},
SetCarOrder(){
this.loading = true
this.apipost(
"CarSingle_post_SetTYCarOrder",
this.parameters,
(r) => {
// this.$refs.myform.resetValidation()
if (r.data.resultCode == 1) {
this.step = 2
let ErpOrderId = r.data.data.Id
this.AddOrderInfo(ErpOrderId)
}else{
this.$q.notify({
type: "negative",
message: r.data.message,
position: "top",
timeout: 2000,
});
this.loading = false
}
})
},
AddOrderInfo(ErpOrderId){
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.imgCover[0],//商品图片
GoodsType: this.parameters.OrderType,//商品类型(见枚举)
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
}else{
this.$q.notify({
type: "negative",
message: r.data.message,
position: "top",
timeout: 2000,
});
}
this.loading = false
})
},
// 航班起飞抵达时间
getTime(type){
// 1航班时间 2预约时间
this.onoffbus = type
if(type==1){
this.parameters.FlightTime = this.calculationAmount.startDate+' '+this.flightTime
this.$refs.qDateProxy1.hide()
}else if(type==2){
this.parameters.OrderDate = this.calculationAmount.startDate+' '+this.getBusTime
this.$refs.qDateProxy2.hide()
}
},
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() {
},
// 初始化国家
initCountry() {
this.apipost("GetCountryInfo_post", {}, (r) => {
this.countrys = r.data.data.countList;
......@@ -683,5 +841,21 @@
.guest-item:hover{
background: rgba(241,65,108,.04) !important;
}
.text-h6Detail {
text-align: center;
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>
\ No newline at end of file
......@@ -180,6 +180,7 @@
color="primary"
label="選擇方案"
unelevated
:disable="priceList.length>0?false:true"
@click="goScrollHandler('#scheme')"
:class="{ 'q-mt-md full-width': $q.platform.is.desktop }"
/>
......@@ -280,6 +281,7 @@
:dataList="dataList"
:configId="msg.configId"
:Month="currentYM.str"
:PlaceList="dataList.PlaceList"
:CarTypeList="dataList.CarTypeList"
:AirportList="dataList.AirportList"
:price="currentPrice"
......@@ -372,6 +374,7 @@
:dataList="dataList"
:configId="msg.configId"
:Month="currentYM.str"
:PlaceList="dataList.PlaceList"
:CarTypeList="dataList.CarTypeList"
:AirportList="dataList.AirportList"
:price="currentPrice"
......
......@@ -190,6 +190,7 @@
color="primary"
label="選擇方案"
unelevated
:disable="dataList.priceList.length>0?false:true"
@click="goScrollHandler(priceListHeight)"
:class="{ 'q-mt-md full-width': $q.platform.is.desktop }"
/>
......
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