Commit e61b8413 authored by youjie's avatar youjie

no message

parent 57972655
......@@ -13,7 +13,7 @@
<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)"
<q-btn @click="handleSelect(item,1)"
:color="selectedAirportObj&&item.Id === selectedAirportObj.Id?'primary':'grey-5'"
unelevated
class="car-tag mr"
......@@ -24,9 +24,41 @@
</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)"
<q-btn @click="handleSelect(item,2)"
:color="selectedCarObj&&item.Id === selectedCarObj.Id?'primary':'grey-5'"
unelevated
class="car-tag mr"
......@@ -41,7 +73,7 @@
<div class="col" :class="{'column':$q.platform.is.mobile}">
<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 }}人+{{ selectedCarObj.PeopleNum }}行李)</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&&!selectedCarObj)||(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&&(!selectedAirportObj||(!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) {
......@@ -157,6 +185,8 @@ export default {
selectedCarObj: null,
priceList: [],
selectedAirportObj: null,
onCarObj: null,
unCarObj: null,
};
},
created() {
......@@ -171,23 +201,25 @@ export default {
methods: {
goUrl(){
let OrderDate = {
selectedCarObj: this.selectedCarObj,
selectedAirportObj: this.selectedAirportObj,
p: this.p,
chosenObj: this.chosenObj,
CarObj: this.selectedCarObj,
AirportObj: this.selectedAirportObj,
calculationAmount: this.p,
calculationNum: this.chosenObj,
sumPrice: this.sumPrice,
dataList: this.dataList
details: this.dataList,
onCarObj: this.onCarObj,
unCarObj: this.unCarObj,
}
this.CommonJump(
"/PickuporderForm",
{
// OrderDate: 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),
dataList: JSON.stringify(this.dataList)
OrderDate: 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)
}
);
},
......@@ -246,9 +278,18 @@ export default {
handleSelectAirport(item){
this.selectedAirportObj = item
},
handleSelect(item){
this.selectedCarObj = item
this.getCarPriceData2()
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
......@@ -262,6 +303,8 @@ export default {
if(type&&type!=1){
this.selectedCarObj = null
this.selectedAirportObj = null
this.onCarObj = null
this.unCarObj = null
}
setTimeout(()=>{
this.p = {};
......
This diff is collapsed.
......@@ -280,6 +280,7 @@
:dataList="dataList"
:configId="msg.configId"
:Month="currentYM.str"
:PlaceList="dataList.PlaceList"
:CarTypeList="dataList.CarTypeList"
:AirportList="dataList.AirportList"
:price="currentPrice"
......@@ -372,6 +373,7 @@
:dataList="dataList"
:configId="msg.configId"
:Month="currentYM.str"
:PlaceList="dataList.PlaceList"
:CarTypeList="dataList.CarTypeList"
:AirportList="dataList.AirportList"
:price="currentPrice"
......
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