Commit 606c1009 authored by youjie's avatar youjie

no message

parent a8cb8872
...@@ -201,13 +201,27 @@ export default { ...@@ -201,13 +201,27 @@ export default {
methods: { methods: {
goOrderHandler(){ goOrderHandler(){
let order = { let order = {
CarId: this.selectedCarObj.Id, key: null,
AirportId: this.selectedAirportObj?this.selectedAirportObj.Id:'', CarObj: this.selectedCarObj,
startDate: this.p.startDate, AirportObj: {
originalB2CPrice: this.p.originalB2CPrice, Address: this.selectedAirportObj?this.selectedAirportObj.Address:'',
orderInfo: this.chosenObj, 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, 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,
CurrencyCode: this.dataList.CurrencyCode,
},
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:'',
...@@ -224,13 +238,8 @@ export default { ...@@ -224,13 +238,8 @@ export default {
}, },
} }
let key = this.$md5(JSON.stringify(order)) let key = this.$md5(JSON.stringify(order))
let pickuporderCars = localStorage.getItem('pickuporderCars') order.key = key
pickuporderCars = pickuporderCars?JSON.parse(pickuporderCars):[] localStorage.setItem("pickuporderCars",JSON.stringify(order))
pickuporderCars.push({
key,
order
})
localStorage.setItem("pickuporderCars",JSON.stringify(pickuporderCars))
this.CommonJump('/PickuporderForm/'+key, {}); this.CommonJump('/PickuporderForm/'+key, {});
}, },
// 获取车的详情 // 获取车的详情
......
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
/> />
<q-img <q-img
v-else v-else
:src="details?details.ImageList[0]:'https://image.kkday.com/v2/image/get/s1.kkday.com/product_138437/20230217083232_t5rcO/jpg'" :src="details?details.imgCover[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"
...@@ -108,11 +108,11 @@ ...@@ -108,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>{{OrderDate.startDate}}</span> <span>{{calculationAmount.startDate}}</span>
</div> </div>
<div class="text-grey-9 q-ml-md" v-if="chosenObj.Count > 0&&CarObj"> <div class="text-grey-9 q-ml-md">
<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" <span class="q-mr-sm" v-if="chosenObj.Count > 0"
>{{CarObj.CarName}} x {{ chosenObj.Count }}</span >{{CarObj.CarName}} x {{ chosenObj.Count }}</span
> >
<span class="q-mr-sm" <span class="q-mr-sm"
...@@ -447,7 +447,7 @@ ...@@ -447,7 +447,7 @@
/> />
<q-img <q-img
v-else v-else
:src="details?details.ImageList[0]:'https://image.kkday.com/v2/image/get/s1.kkday.com/product_138437/20230217083232_t5rcO/jpg'" :src="details?details.imgCover[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"
...@@ -480,24 +480,25 @@ ...@@ -480,24 +480,25 @@
接駁日期:</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&&CarObj"> <div class="row q-mb-sm" v-if="chosenObj.Count>0">
<div class="col">{{CarObj.CarName}} x {{ chosenObj.Count }}</div> <div class="col">{{CarObj.CarName}} x {{ chosenObj.Count }}</div>
<div>{{details.CurrencyCode}} {{ moneyFormat(OrderDate.originalB2CPrice,2) }}</div> <div>{{details.CurrencyCode}} {{ moneyFormat(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-subtitle2 text-weight-bolder text-primary">{{details.CurrencyCode}} {{ moneyFormat(OrderDate.sumPrice,2) }}</div> <div class="text-subtitle2 text-weight-bolder text-primary">{{details.CurrencyCode}} {{ moneyFormat(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">{{details.CurrencyCode}} {{ moneyFormat(OrderDate.sumPrice,2) }}</div> <div class="text-h6 text-weight-bolder text-primary product-price">{{details.CurrencyCode}} {{ moneyFormat(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">
...@@ -531,16 +532,16 @@ ...@@ -531,16 +532,16 @@
</div> </div>
<auth></auth> <auth></auth>
</div> </div>
</template> </template>
<script> <script>
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' 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'
import componentsMap from "../../components/car/Map.vue"; import componentsMap from "../../components/car/Map.vue";
export default { export default {
components:{ components:{
coupon, coupon,
componentsMap, componentsMap,
...@@ -549,20 +550,15 @@ ...@@ -549,20 +550,15 @@
}, },
data() { data() {
return { return {
order: null,
orderKey: "", 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,//机场
CarId: null,//车型 calculationAmount: null,//日期
AirportId: null,//机场
startDate: null,
calculationNum: null,//数量 calculationNum: null,//数量
sumPrice: null,//总价 sumPrice: null,//总价
details: null,//产品详情 details: null,//产品详情
...@@ -644,63 +640,39 @@ ...@@ -644,63 +640,39 @@
}, },
created() {}, created() {},
mounted() { mounted() {
if(this.checkParamsHandler()){ this.checkParamsHandler()
this.getCarData()
}
this.initCountry(); this.initCountry();
this.initGuestHandler(); this.initGuestHandler();
}, },
methods: { 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){
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.OrderType = this.details.CarType
} else {
this.$q.notify({
type: "negative",
message: r.data.message,
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
}
},
null
);
},
checkParamsHandler() { checkParamsHandler() {
try { try {
if (this.$route.params && this.$route.params.id) { if (this.$route.params && this.$route.params.id) {
let key = this.$route.params.id; let key = this.$route.params.id;
console.log(key,'99999')
let pickuporderCars = localStorage.getItem("pickuporderCars"); let pickuporderCars = localStorage.getItem("pickuporderCars");
pickuporderCars = pickuporderCars ? JSON.parse(pickuporderCars) : []; let OrderDate = pickuporderCars ? JSON.parse(pickuporderCars) : null;
if (pickuporderCars.length > 0) { if (OrderDate) {
this.order = pickuporderCars.find((x) => x.key == key); this.CarObj = OrderDate.CarObj,//车型
if (this.order) { 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
if (OrderDate) {
this.orderKey = key; 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//下车范围
} }
} }
} }
...@@ -753,7 +725,6 @@ ...@@ -753,7 +725,6 @@
&& !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 this.goScrollToForm('baseUserInfoTitle') if(!flag) return this.goScrollToForm('baseUserInfoTitle')
console.log(this.parameters,'------')
this.SetCarOrder() this.SetCarOrder()
}, },
goScrollToForm(formName){ goScrollToForm(formName){
...@@ -802,8 +773,8 @@ ...@@ -802,8 +773,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.ImageList[0],//商品图片 GoodsPic: this.details.imgCover[0],//商品图片
GoodsType: GoodsType,//商品类型(见枚举) 12包车 13 接机 14送机 GoodsType: GoodsType,//商品类型(见枚举)
OrderMake: this.parameters.OrderDate,//订单摘要(例如出行时间) OrderMake: this.parameters.OrderDate,//订单摘要(例如出行时间)
TotalPrice: this.parameters.Money,//总价格 TotalPrice: this.parameters.Money,//总价格
PreferentialPrice: 0,// 优惠总金额 PreferentialPrice: 0,// 优惠总金额
...@@ -840,10 +811,10 @@ ...@@ -840,10 +811,10 @@
// 1航班时间 2预约时间 // 1航班时间 2预约时间
this.onoffbus = type this.onoffbus = type
if(type==1){ if(type==1){
this.parameters.FlightTime = this.OrderDate.startDate+' '+this.flightTime this.parameters.FlightTime = this.calculationAmount.startDate+' '+this.flightTime
this.$refs.qDateProxy1.hide() this.$refs.qDateProxy1.hide()
}else if(type==2){ }else if(type==2){
this.parameters.OrderDate = this.OrderDate.startDate+' '+this.getBusTime this.parameters.OrderDate = this.calculationAmount.startDate+' '+this.getBusTime
this.$refs.qDateProxy2.hide() this.$refs.qDateProxy2.hide()
} }
...@@ -910,20 +881,20 @@ ...@@ -910,20 +881,20 @@
this.userInfo.areaCode = this.areaCodes.find((x) => x.ID == id).PhoneCode; this.userInfo.areaCode = this.areaCodes.find((x) => x.ID == id).PhoneCode;
}, },
}, },
}; };
</script> </script>
<style> <style>
.order-preview .q-stepper__content { .order-preview .q-stepper__content {
display: none !important; display: none !important;
} }
.order-preview .q-toggle__track { .order-preview .q-toggle__track {
height: 0.7em; height: 0.7em;
border-radius: 0.35em; border-radius: 0.35em;
opacity: 0.38; opacity: 0.38;
width: 50px; width: 50px;
} }
.order-preview .q-toggle__thumb { .order-preview .q-toggle__thumb {
top: 0.42em; top: 0.42em;
left: 0.45em; left: 0.45em;
width: 0.5em; width: 0.5em;
...@@ -931,20 +902,20 @@ ...@@ -931,20 +902,20 @@
transition: left 0.22s ease-in-out; transition: left 0.22s ease-in-out;
user-select: none; user-select: none;
z-index: 0; z-index: 0;
} }
.order-preview .q-toggle__inner--truthy .q-toggle__thumb { .order-preview .q-toggle__inner--truthy .q-toggle__thumb {
left: 0.94em; left: 0.94em;
} }
.order-preview .q-toggle__inner { .order-preview .q-toggle__inner {
width: 1.9em; width: 1.9em;
} }
.order-preview .q-toggle__label { .order-preview .q-toggle__label {
margin-top: 12px; margin-top: 12px;
} }
.guest-item:hover{ .guest-item:hover{
background: rgba(241,65,108,.04) !important; background: rgba(241,65,108,.04) !important;
} }
.text-h6Detail { .text-h6Detail {
text-align: center; text-align: center;
font-size: 18px; font-size: 18px;
color: #333; color: #333;
...@@ -952,13 +923,12 @@ ...@@ -952,13 +923,12 @@
position: relative; position: relative;
width:100%; width:100%;
height:50px; height:50px;
} }
.text-h6Detail i { .text-h6Detail i {
position: absolute; position: absolute;
right:20px; right:20px;
top:10px; top:10px;
cursor: pointer; cursor: pointer;
font-size:23px; font-size:23px;
} }
</style> </style>
\ No newline at end of file
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