Commit 73aa2f84 authored by 沈良进's avatar 沈良进

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

parents fe5dcf0f a8cb8872
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
||(dataList.CarType!=3&&!selectedAirportObj) ||(dataList.CarType!=3&&!selectedAirportObj)
||(dataList.CarType==1&&!unCarObj)||(dataList.CarType==2&&!onCarObj) ||(dataList.CarType==1&&!unCarObj)||(dataList.CarType==2&&!onCarObj)
||(dataList.CarType==3&&(!onCarObj||!unCarObj))" ||(dataList.CarType==3&&(!onCarObj||!unCarObj))"
@click="goUrl"/> @click="goOrderHandler"/>
</div> </div>
</div> </div>
</div> </div>
...@@ -199,27 +199,15 @@ export default { ...@@ -199,27 +199,15 @@ export default {
}, },
methods: { methods: {
goUrl(){ goOrderHandler(){
let OrderDate = { let order = {
CarObj: this.selectedCarObj, CarId: this.selectedCarObj.Id,
AirportObj: { AirportId: this.selectedAirportObj?this.selectedAirportObj.Id:'',
Address: this.selectedAirportObj?this.selectedAirportObj.Address:'', startDate: this.p.startDate,
AirportId: this.selectedAirportObj?this.selectedAirportObj.AirportId:'', originalB2CPrice: this.p.originalB2CPrice,
AirportName: this.selectedAirportObj?this.selectedAirportObj.AirportName:'', orderInfo: this.chosenObj,
Id: this.selectedAirportObj?this.selectedAirportObj.Id:'',
Name: this.selectedAirportObj?this.selectedAirportObj.Name:''
},
calculationAmount: this.p,
calculationNum: this.chosenObj,
sumPrice: this.sumPrice, 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, Id: this.dataList.Id,
},
onCarObj: { onCarObj: {
Address: this.onCarObj?this.onCarObj.Address:'', Address: this.onCarObj?this.onCarObj.Address:'',
Name: this.onCarObj?this.onCarObj.Name:'', Name: this.onCarObj?this.onCarObj.Name:'',
...@@ -235,20 +223,15 @@ export default { ...@@ -235,20 +223,15 @@ export default {
Range: this.unCarObj?this.unCarObj.Range:'' Range: this.unCarObj?this.unCarObj.Range:''
}, },
} }
// console.log(OrderDate,'========') let key = this.$md5(JSON.stringify(order))
// return let pickuporderCars = localStorage.getItem('pickuporderCars')
this.CommonJump( pickuporderCars = pickuporderCars?JSON.parse(pickuporderCars):[]
"/PickuporderForm", pickuporderCars.push({
{ key,
OrderDate: encodeURIComponent(JSON.stringify(OrderDate)), order
// CarObj: JSON.stringify(this.selectedCarObj), })
// AirportObj: JSON.stringify(this.selectedAirportObj), localStorage.setItem("pickuporderCars",JSON.stringify(pickuporderCars))
// calculationAmount: JSON.stringify(this.p), this.CommonJump('/PickuporderForm/'+key, {});
// calculationNum: JSON.stringify(this.chosenObj),
// sumPrice: JSON.stringify(this.sumPrice),
// details: JSON.stringify(this.dataList)
}
);
}, },
// 获取车的详情 // 获取车的详情
getCarPriceData2() { getCarPriceData2() {
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
> >
<div class="col"> <div class="col">
<q-card flat class="q-pa-md"> <q-card flat class="q-pa-md">
<div class="text-subtitle1 text-weight-bolder">訂購人資訊</div> <div class="text-subtitle1 text-weight-bolder" ref="baseUserInfoTitle">訂購人資訊</div>
<q-separator color="grey-2" class="q-my-md" /> <q-separator color="grey-2" class="q-my-md" />
<div class="row q-col-gutter-md"> <div class="row q-col-gutter-md">
<div :class="filedWidth"> <div :class="filedWidth">
...@@ -55,26 +55,13 @@ ...@@ -55,26 +55,13 @@
label="國家/地區" label="國家/地區"
standout standout
/> />
</div>
<div :class="filedWidth">
<q-input
standout
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>
<div :class="filedWidth"> <div :class="filedWidth">
<q-input <q-input
standout standout
v-model="userInfo.mail" v-model="userInfo.mail"
label="郵箱地址" label="郵箱地址"
:rules="[(val) => !!val || '請輸入郵箱地址']" :rules="[(val) => /^[a-zA-Z0-9]+([-_.][A-Za-zd]+)*@([a-zA-Z0-9]+[-.])+[A-Za-zd]{2,5}$/.test(val) || '請輸入正確的郵箱地址']"
ref="mail" ref="mail"
/> />
</div> </div>
...@@ -82,7 +69,7 @@ ...@@ -82,7 +69,7 @@
</q-card> </q-card>
<q-card flat class="q-pa-md q-mt-lg" v-if="details"> <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="text-subtitle1 text-weight-bolder q-mb-md" ref="passengerInformation">旅客資料</div>
<div class="row"> <div class="row">
<vue-core-video-players <vue-core-video-players
...@@ -104,7 +91,7 @@ ...@@ -104,7 +91,7 @@
/> />
<q-img <q-img
v-else v-else
:src="details?details.imgCover[0]:'https://image.kkday.com/v2/image/get/s1.kkday.com/product_138437/20230217083232_t5rcO/jpg'" :src="details?details.ImageList[0]:'https://image.kkday.com/v2/image/get/s1.kkday.com/product_138437/20230217083232_t5rcO/jpg'"
class="rounded-borders" class="rounded-borders"
spinner-color="grey-3" spinner-color="grey-3"
style="width: 80px" style="width: 80px"
...@@ -121,11 +108,11 @@ ...@@ -121,11 +108,11 @@
<div class="q-mt-md row"> <div class="q-mt-md row">
<div class="text-grey-9"> <div class="text-grey-9">
<q-icon name="iconfont iconrili" size="20px" class="q-mr-sm" /> <q-icon name="iconfont iconrili" size="20px" class="q-mr-sm" />
<span>{{calculationAmount.startDate}}</span> <span>{{OrderDate.startDate}}</span>
</div> </div>
<div class="text-grey-9 q-ml-md"> <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" /> <q-icon name="iconfont iconjiaotong" size="20px" class="q-mr-sm" />
<span class="q-mr-sm" v-if="chosenObj.Count > 0" <span class="q-mr-sm"
>{{CarObj.CarName}} x {{ chosenObj.Count }}</span >{{CarObj.CarName}} x {{ chosenObj.Count }}</span
> >
<span class="q-mr-sm" <span class="q-mr-sm"
...@@ -167,6 +154,8 @@ ...@@ -167,6 +154,8 @@
placeholder="例:WeChat" placeholder="例:WeChat"
:rules="[(val) => !!val || '請輸联络方式']" :rules="[(val) => !!val || '請輸联络方式']"
ref="ContactWay" ref="ContactWay"
mask="X"
reverse-fill-mask
> >
</q-input> </q-input>
</div> </div>
...@@ -177,6 +166,8 @@ ...@@ -177,6 +166,8 @@
label="電話" label="電話"
:rules="[(val) => !!val && val.length == 11 || '請輸正確電話']" :rules="[(val) => !!val && val.length == 11 || '請輸正確電話']"
ref="Mobile" ref="Mobile"
mask="#"
reverse-fill-mask
> >
<template v-slot:prepend> <template v-slot:prepend>
<div class="text-subtitle2">+{{ userInfo.areaCode }}</div> <div class="text-subtitle2">+{{ userInfo.areaCode }}</div>
...@@ -214,7 +205,12 @@ ...@@ -214,7 +205,12 @@
placeholder="例:航廈" placeholder="例:航廈"
:rules="[(val) => !!val || '請輸航廈']" :rules="[(val) => !!val || '請輸航廈']"
ref="AirportTerminal" 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
...@@ -224,7 +220,12 @@ ...@@ -224,7 +220,12 @@
placeholder="" placeholder=""
:rules="[(val) => !!val || '請輸航空公司名稱']" :rules="[(val) => !!val || '請輸航空公司名稱']"
ref="AirLine" 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
...@@ -234,6 +235,8 @@ ...@@ -234,6 +235,8 @@
placeholder="例:CA123" placeholder="例:CA123"
:rules="[(val) => !!val || '請輸航班編號']" :rules="[(val) => !!val || '請輸航班編號']"
ref="FlightNumber" ref="FlightNumber"
mask="X"
reverse-fill-mask
/> />
</div> </div>
<div :class="filedGuestWidth"> <div :class="filedGuestWidth">
...@@ -302,11 +305,16 @@ ...@@ -302,11 +305,16 @@
v-model="parameters.GetonAddress" v-model="parameters.GetonAddress"
label="上車地點" label="上車地點"
placeholder="" placeholder=""
:rules="[(val) => !!val || '請輸上車地點和地址供司機參考']" :rules="[(val) => !!val || '請輸上車地點供司機參考']"
ref="GetonAddress"> ref="GetonAddress"
readonly>
<template v-slot:append> <template v-slot:append>
<q-icon name="iconfont iconaddress" size="20px" class="q-mr-sm" @click="getAddress(1)"/> <!-- <q-icon name="iconfont iconaddress" size="20px" class="q-mr-sm" @click="getAddress(1)"/> -->
</template> </template>
<q-popup-proxy :offset="[0, 10]" ref="qDateProxy5">
<q-input type="textarea" dense standout autofocus
v-model="parameters.GetonAddress" placeholder="請輸上車地點供司機參考" />
</q-popup-proxy>
</q-input> </q-input>
</div> </div>
<div :class="filedGuestWidth" v-if="details.CarType!=2"> <div :class="filedGuestWidth" v-if="details.CarType!=2">
...@@ -315,11 +323,16 @@ ...@@ -315,11 +323,16 @@
v-model="parameters.GetoffAddress" v-model="parameters.GetoffAddress"
label="下車地點" label="下車地點"
placeholder="" placeholder=""
:rules="[(val) => !!val || '請輸下車地點和地址供司機參考']" :rules="[(val) => !!val || '請輸下車地點供司機參考']"
ref="GetoffAddress"> ref="GetoffAddress"
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(2)"/> -->
</template> </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> </q-input>
</div> </div>
...@@ -334,31 +347,34 @@ ...@@ -334,31 +347,34 @@
<div class="row q-col-gutter-md"> <div class="row q-col-gutter-md">
<div :class="filedGuestWidth"> <div :class="filedGuestWidth">
<q-input <q-input
type="Number"
standout standout
v-model="parameters.ManNum" v-model="parameters.ManNum"
label="成人數(18-99岁)" label="成人數(18-99岁)"
@input="getNum" @input="getNum"
:rules="[(val) => !!val || '請輸成人數']" :rules="[(val) => !!val || '請輸成人數']"
ref="ManNum" ref="ManNum"
mask="#"
reverse-fill-mask
/> />
</div> </div>
<div :class="filedGuestWidth"> <div :class="filedGuestWidth">
<q-input <q-input
type="Number"
standout standout
v-model="parameters.ChildNum" v-model="parameters.ChildNum"
label="兒童數(3-17岁)" label="兒童數(3-17岁)"
@input="getNum" @input="getNum"
mask="#"
reverse-fill-mask
/> />
</div> </div>
<div :class="filedGuestWidth"> <div :class="filedGuestWidth">
<q-input <q-input
type="Number"
standout standout
v-model="parameters.BabyNum" v-model="parameters.BabyNum"
label="嬰幼兒數(0-2岁)" label="嬰幼兒數(0-2岁)"
@input="getNum" @input="getNum"
mask="#"
reverse-fill-mask
/> />
</div> </div>
...@@ -368,18 +384,20 @@ ...@@ -368,18 +384,20 @@
<div class="row q-col-gutter-md"> <div class="row q-col-gutter-md">
<div :class="filedGuestWidth"> <div :class="filedGuestWidth">
<q-input <q-input
type="Number"
standout standout
v-model="parameters.HandLuggageNum" v-model="parameters.HandLuggageNum"
label="手提行李" label="手提行李"
mask="#"
reverse-fill-mask
/> />
</div> </div>
<div :class="filedGuestWidth"> <div :class="filedGuestWidth">
<q-input <q-input
type="Number"
standout standout
v-model="parameters.RegisteredLuggageNum" v-model="parameters.RegisteredLuggageNum"
label="托运行李" label="托运行李"
mask="#"
reverse-fill-mask
/> />
</div> </div>
...@@ -429,7 +447,7 @@ ...@@ -429,7 +447,7 @@
/> />
<q-img <q-img
v-else v-else
:src="details?details.imgCover[0]:'https://image.kkday.com/v2/image/get/s1.kkday.com/product_138437/20230217083232_t5rcO/jpg'" :src="details?details.ImageList[0]:'https://image.kkday.com/v2/image/get/s1.kkday.com/product_138437/20230217083232_t5rcO/jpg'"
class="rounded-borders" class="rounded-borders"
spinner-color="grey-3" spinner-color="grey-3"
style="width: 80px" style="width: 80px"
...@@ -444,15 +462,15 @@ ...@@ -444,15 +462,15 @@
</div> </div>
</div> </div>
<div class="q-mt-md text-grey-6"> <div class="q-mt-md text-grey-6">
<div class="row q-pb-xs" v-if="AirportObj&&AirportObj.Name"> <div class="row q-pb-xs no-wrap" v-if="AirportObj&&AirportObj.Name">
<div style="width: 80px">{{details.CarType==1?'接':'送'}}機機場:</div> <div style="width: 80px">{{details.CarType==1?'接':'送'}}機機場:</div>
<div class="q-ml-md ellipsis-2-lines">{{AirportObj.Name}}</div> <div class="q-ml-md ellipsis-2-lines">{{AirportObj.Name}}</div>
</div> </div>
<div class="row q-pb-xs" v-if="parameters.GetonAddress"> <div class="row q-pb-xs no-wrap" v-if="parameters.GetonAddress">
<div style="width: 80px">上車點:</div> <div style="width: 80px">上車點:</div>
<div class="q-ml-md ellipsis-2-lines">{{parameters.GetonAddress}}</div> <div class="q-ml-md ellipsis-2-lines">{{parameters.GetonAddress}}</div>
</div> </div>
<div class="row q-pb-xs" v-if="parameters.GetoffAddress"> <div class="row q-pb-xs no-wrap" v-if="parameters.GetoffAddress">
<div style="width: 80px">下車點:</div> <div style="width: 80px">下車點:</div>
<div class="q-ml-md ellipsis-2-lines">{{parameters.GetoffAddress}}</div> <div class="q-ml-md ellipsis-2-lines">{{parameters.GetoffAddress}}</div>
</div> </div>
...@@ -462,25 +480,24 @@ ...@@ -462,25 +480,24 @@
接駁日期:</div> 接駁日期:</div>
<div class="q-ml-md"> <div class="q-ml-md">
{{parameters.OrderDate}} {{parameters.OrderDate}}
<!-- {{calculationAmount.startDate}} -->
</div> </div>
</div> </div>
</div> </div>
<q-separator color="grey-2" class="q-my-md"/> <q-separator color="grey-2" class="q-my-md"/>
<div class="text-grey-9"> <div class="text-grey-9">
<div class="row q-mb-sm" v-if="chosenObj.Count>0"> <div class="row q-mb-sm" v-if="chosenObj.Count>0&&CarObj">
<div class="col">{{CarObj.CarName}} x {{ chosenObj.Count }}</div> <div class="col">{{CarObj.CarName}} x {{ chosenObj.Count }}</div>
<div>CNY {{ moneyFormat(sumPrice,2) }}</div> <div>{{details.CurrencyCode}} {{ moneyFormat(OrderDate.originalB2CPrice,2) }}</div>
</div> </div>
<!-- <hr style="border:none;border-top:1px dashed #EEE !important;" class="bg-transparent q-mb-sm" /> <!-- <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="row q-mb-sm items-center" v-if="(chosenObj.Count)>0">
<div class="col">總金額</div> <div class="col">總金額</div>
<div class="text-subtitle2 text-weight-bolder text-primary">CNY {{ moneyFormat(sumPrice,2) }}</div> <div class="text-subtitle2 text-weight-bolder text-primary">{{details.CurrencyCode}} {{ moneyFormat(OrderDate.sumPrice,2) }}</div>
</div> --> </div> -->
<hr style="border:none;border-top:1px dashed #EEE !important;" class="bg-transparent q-mb-sm" /> <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="row q-mb-sm items-center" v-if="chosenObj.Count>0">
<div class="col">支付金額</div> <div class="col">支付金額</div>
<div class="text-h6 text-weight-bolder text-primary product-price">CNY {{ moneyFormat(sumPrice,2) }}</div> <div class="text-h6 text-weight-bolder text-primary product-price">{{details.CurrencyCode}} {{ moneyFormat(OrderDate.sumPrice,2) }}</div>
</div> </div>
</div> </div>
<div class="text-right q-mt-md" v-if="step!=3"> <div class="text-right q-mt-md" v-if="step!=3">
...@@ -505,10 +522,20 @@ ...@@ -505,10 +522,20 @@
</div> </div>
</q-card> </q-card>
</q-dialog> </q-dialog>
<div v-if="!orderKey || orderKey == ''" class="text-center q-my-xl">
<none-data
iconType="order"
title="沒有找到您的訂單信息哦"
subtitle="趕緊去挑選心儀的旅遊產品吧,三秒後自動跳轉到首頁"
></none-data>
</div>
<auth></auth>
</div> </div>
</template> </template>
<script> <script>
import NoneData from "src/components/common/noneData.vue";
import auth from "src/components/common/auth.vue";
import { date } from 'quasar' import { date } from 'quasar'
import { json } from "body-parser"; import { json } from "body-parser";
import coupon from '../../components/common/coupon.vue' import coupon from '../../components/common/coupon.vue'
...@@ -516,18 +543,26 @@ ...@@ -516,18 +543,26 @@
export default { export default {
components:{ components:{
coupon, coupon,
componentsMap componentsMap,
NoneData,
auth
}, },
data() { data() {
return { return {
order: null,
orderKey: "",
isRangeClick: true, isRangeClick: true,
isShowDialog: false, isShowDialog: false,
AddressObj: null, AddressObj: null,
onCarObj: null,//上车范围 onCarObj: null,//上车范围
unCarObj: null,//下车范围 unCarObj: null,//下车范围
onCarId: null,//上车范围
unCarId: null,//下车范围
CarObj: null,//车型 CarObj: null,//车型
AirportObj: null,//机场 AirportObj: null,//机场
calculationAmount: null,//日期 CarId: null,//车型
AirportId: null,//机场
startDate: null,
calculationNum: null,//数量 calculationNum: null,//数量
sumPrice: null,//总价 sumPrice: null,//总价
details: null,//产品详情 details: null,//产品详情
...@@ -609,34 +644,77 @@ ...@@ -609,34 +644,77 @@
}, },
created() {}, created() {},
mounted() { mounted() {
if(this.$route.query.OrderDate){ if(this.checkParamsHandler()){
let obj = decodeURIComponent(this.$route.query.OrderDate) this.getCarData()
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.initCountry();
this.parameters.OrderDate = this.calculationAmount.startDate this.initGuestHandler();
},
methods: {
// 获取商品详情
getCarData() {
this.$q.loading.show();
this.apipost(
"b2c_get_GetCarSingleProductDetail",
{ ProductId: this.parameters.ProductId },
(r) => {
this.$q.loading.hide();
if (r.data.resultCode == 1) {
this.details = r.data.data;
this.CarObj = this.details.CarTypeList.find((x) => this.OrderDate.CarId == x.Id);
if(this.details.CarType!=3){ if(this.details.CarType!=3){
this.parameters.AirportId = this.AirportObj.Id this.AirportObj = this.details.AirportList.find((x) => this.OrderDate.AirportId == x.Id);
this.parameters.FlightTime = this.calculationAmount.startDate this.parameters.AirportId = this.OrderDate.AirportId
this.parameters.FlightTime = this.OrderDate.startDate
} }
this.parameters.CarId = this.CarObj.Id
this.parameters.OrderType = this.details.CarType this.parameters.OrderType = this.details.CarType
this.parameters.Unit_Price = this.calculationAmount.originalB2CPrice } else {
this.parameters.Num = this.chosenObj.Count this.$q.notify({
this.parameters.Money = this.sumPrice type: "negative",
message: r.data.message,
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
}
this.initCountry();
this.initGuestHandler();
}, },
methods: { null
);
},
checkParamsHandler() {
try {
if (this.$route.params && this.$route.params.id) {
let key = this.$route.params.id;
console.log(key,'99999')
let pickuporderCars = localStorage.getItem("pickuporderCars");
pickuporderCars = pickuporderCars ? JSON.parse(pickuporderCars) : [];
if (pickuporderCars.length > 0) {
this.order = pickuporderCars.find((x) => x.key == key);
if (this.order) {
this.orderKey = key;
this.chosenObj = this.order.order.orderInfo;
this.OrderDate = this.order.order
this.parameters.ProductId = this.order.order.Id
this.parameters.OrderDate = this.OrderDate.startDate
this.parameters.Unit_Price = OrderDate.originalB2CPrice
this.parameters.Num = this.OrderDate.chosenObj.Count
this.parameters.Money = this.OrderDate.sumPrice
this.onCarObj = this.OrderDate.onCarObj//上车范围
this.unCarObj = this.OrderDate.unCarObj//下车范围
}
}
}
} catch (error) {
console.log(error);
}
if (this.orderKey == "") {
setTimeout(() => {
}, 3000);
}
return this.orderKey != "";
},
submit(){ submit(){
let flag = false let flag = false
...@@ -648,6 +726,7 @@ ...@@ -648,6 +726,7 @@
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()
...@@ -673,9 +752,15 @@ ...@@ -673,9 +752,15 @@
&& !this.$refs.Mobile.hasError&& !this.$refs.OrderDate.hasError&& !this.$refs.ManNum.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 && !this.$refs.GetonAddress.hasError&& !this.$refs.GetoffAddress.hasError&& !this.$refs.mail.hasError
} }
if(!flag) return if(!flag) return this.goScrollToForm('baseUserInfoTitle')
console.log(this.parameters,'------')
this.SetCarOrder() this.SetCarOrder()
}, },
goScrollToForm(formName){
let temp=this.$refs[formName]
let formObj = temp instanceof Array ? temp[0] : temp
window.scrollTo(0,formObj.offsetTop)
},
SetCarOrder(){ SetCarOrder(){
this.loading = true this.loading = true
this.apipost( this.apipost(
...@@ -699,6 +784,15 @@ ...@@ -699,6 +784,15 @@
}) })
}, },
AddOrderInfo(ErpOrderId){ 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( this.apipost(
"AddOrderInfo_post", "AddOrderInfo_post",
{ {
...@@ -708,8 +802,8 @@ ...@@ -708,8 +802,8 @@
Mailbox: this.userInfo.mail,//邮箱 Mailbox: this.userInfo.mail,//邮箱
GoodsId: this.parameters.ProductId,//商品id GoodsId: this.parameters.ProductId,//商品id
GoodsName: this.details.Name,//商品名称 GoodsName: this.details.Name,//商品名称
GoodsPic: this.details.imgCover[0],//商品图片 GoodsPic: this.details.ImageList[0],//商品图片
GoodsType: this.parameters.OrderType,//商品类型(见枚举) GoodsType: GoodsType,//商品类型(见枚举) 12包车 13 接机 14送机
OrderMake: this.parameters.OrderDate,//订单摘要(例如出行时间) OrderMake: this.parameters.OrderDate,//订单摘要(例如出行时间)
TotalPrice: this.parameters.Money,//总价格 TotalPrice: this.parameters.Money,//总价格
PreferentialPrice: 0,// 优惠总金额 PreferentialPrice: 0,// 优惠总金额
...@@ -723,6 +817,13 @@ ...@@ -723,6 +817,13 @@
(r) => { (r) => {
if (r.data.resultCode == 1) { if (r.data.resultCode == 1) {
this.step = 3 this.step = 3
this.$q.notify({
color: "green-4",
textColor: "white",
icon: "cloud_done",
message: "訂單提交成功",
position:'center',
});
}else{ }else{
this.$q.notify({ this.$q.notify({
type: "negative", type: "negative",
...@@ -739,10 +840,10 @@ ...@@ -739,10 +840,10 @@
// 1航班时间 2预约时间 // 1航班时间 2预约时间
this.onoffbus = type this.onoffbus = type
if(type==1){ if(type==1){
this.parameters.FlightTime = this.calculationAmount.startDate+' '+this.flightTime this.parameters.FlightTime = this.OrderDate.startDate+' '+this.flightTime
this.$refs.qDateProxy1.hide() this.$refs.qDateProxy1.hide()
}else if(type==2){ }else if(type==2){
this.parameters.OrderDate = this.calculationAmount.startDate+' '+this.getBusTime this.parameters.OrderDate = this.OrderDate.startDate+' '+this.getBusTime
this.$refs.qDateProxy2.hide() this.$refs.qDateProxy2.hide()
} }
...@@ -792,6 +893,7 @@ ...@@ -792,6 +893,7 @@
// 初始化国家 // 初始化国家
initCountry() { initCountry() {
this.apipost("GetCountryInfo_post", {}, (r) => { this.apipost("GetCountryInfo_post", {}, (r) => {
if (r.data.resultCode == 1) {
this.countrys = r.data.data.countList; this.countrys = r.data.data.countList;
this.userInfo.country = this.countrys[0].ID; this.userInfo.country = this.countrys[0].ID;
...@@ -801,6 +903,7 @@ ...@@ -801,6 +903,7 @@
let temp = this.countrys.find((y) => y.ID == x.ID); let temp = this.countrys.find((y) => y.ID == x.ID);
x.EnName = `${temp.EnName}(${x.PhoneCode})`; x.EnName = `${temp.EnName}(${x.PhoneCode})`;
}); });
}
}); });
}, },
changeCountry(id) { changeCountry(id) {
......
<template> <template>
<div style="min-height: 80vh"> <div style="min-height: 80vh">
<div <div
style=" style="
position: fixed; position: fixed;
...@@ -22,7 +23,7 @@ ...@@ -22,7 +23,7 @@
class="col product-price text-subtitle1 text-weight-bold" class="col product-price text-subtitle1 text-weight-bold"
style="text-align: left" style="text-align: left"
> >
<span v-if="dataList&&dataList.MinPrice">CNY {{ moneyFormat(dataList.MinPrice, 0) }}</span> <span v-if="dataList&&dataList.MinPrice">{{dataList.CurrencyCode}} {{ moneyFormat(dataList.MinPrice, 0) }}</span>
<span class="q-ml-sm f12 text-grey-7"></span> <span class="q-ml-sm f12 text-grey-7"></span>
</span> </span>
<q-btn <q-btn
...@@ -172,7 +173,7 @@ ...@@ -172,7 +173,7 @@
> >
<div class="product-price text-h6" v-if="dataList.MinPrice > 0"> <div class="product-price text-h6" v-if="dataList.MinPrice > 0">
<!-- CNY:{{ dataList. }} --> <!-- CNY:{{ dataList. }} -->
CNY{{ moneyFormat(dataList.MinPrice, 0) }} {{dataList.CurrencyCode}}{{ moneyFormat(dataList.MinPrice, 0) }}
<span class="f12 text-grey-6"></span> <span class="f12 text-grey-6"></span>
</div> </div>
<div v-else class="text-subtitle1 text-grey-6">暫無報價</div> <div v-else class="text-subtitle1 text-grey-6">暫無報價</div>
...@@ -326,7 +327,7 @@ ...@@ -326,7 +327,7 @@
<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">
<span class="product-price text-h6 q-mr-md" <span class="product-price text-h6 q-mr-md"
>CNY >{{dataList.CurrencyCode}}
{{ {{
moneyFormat(priceList[0].originalB2CPrice, 0) moneyFormat(priceList[0].originalB2CPrice, 0)
}}</span }}</span
...@@ -597,10 +598,12 @@ ...@@ -597,10 +598,12 @@
</div> </div>
</template> </template>
</div> </div>
<!-- <auth></auth> -->
</div> </div>
</template> </template>
<script> <script>
import auth from "src/components/common/auth.vue";
import { slider, slideritem } from "vue-concise-slider"; import { slider, slideritem } from "vue-concise-slider";
import calendar from "../components/trip/calendar.vue"; import calendar from "../components/trip/calendar.vue";
import OrderPreview from "src/components/car/orderPreview.vue"; import OrderPreview from "src/components/car/orderPreview.vue";
...@@ -729,7 +732,8 @@ export default { ...@@ -729,7 +732,8 @@ export default {
smaple, smaple,
Trip, Trip,
block, block,
componentsMap componentsMap,
auth,
}, },
watch: { watch: {
days: { days: {
......
...@@ -33,7 +33,7 @@ const routes = [{ ...@@ -33,7 +33,7 @@ const routes = [{
component: () => component: () =>
import ('pages/detailsCar.vue') import ('pages/detailsCar.vue')
}, { // 包车,接机下单 }, { // 包车,接机下单
path: '/PickuporderForm', path: '/PickuporderForm/:id',
component: () => component: () =>
import ('pages/Pickuporder/orderForm.vue') import ('pages/Pickuporder/orderForm.vue')
}, { // 酒店 }, { // 酒店
......
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