Commit 17f582c0 authored by youjie's avatar youjie

no message

parent cb6e7cbe
......@@ -10,14 +10,16 @@
flat
/>
</div>
<div class="text-grey-6 f12 q-my-md">選擇門票類型</div>
<div class="row wrap">
<div v-for="(x,i) in dataList.TicketList" :key="i">
<q-chip size="14px" clickable @click="handleSelect(x,1)"
:text-color="x.checked?'white':'dark'"
:color="x.checked?'primary':'grey-3'" square>{{ x.TicketName }}</q-chip>
<template v-if="p&&p.startDate">
<div class="text-grey-6 f12 q-my-md">選擇門票類型</div>
<div class="row wrap">
<div v-for="(x,i) in dataList.TicketList" :key="i">
<q-chip v-if="x.originalB2CPrice>0" size="14px" clickable @click="handleSelect(x,1)"
:text-color="x.checked?'white':'dark'"
:color="x.checked?'primary':'grey-3'" square>{{ x.TicketName }}</q-chip>
</div>
</div>
</div>
</template>
<div class="text-grey-6 f12 q-my-md">選擇取票方式</div>
<div class="row no-wrap">
<div v-for="(x,i) in takeList" :key="i">
......@@ -37,13 +39,13 @@
</div>
<div v-if="$q.platform.is.mobile">
<span class="text-grey-7 product-price" style="font-size: 13px">
CNY {{ moneyFormat(x.originalB2CPrice, 0) }} /每
CNY {{ moneyFormat(x.originalB2CPrice, 0) }} /每
</span>
</div>
</div>
<div class="row items-end" v-if="x.checked">
<span v-if="$q.platform.is.desktop" class="text-grey-7 product-price" style="font-size: 13px">
CNY {{ moneyFormat(x.originalB2CPrice, 0) }} /每
CNY {{ moneyFormat(x.originalB2CPrice, 0) }} /每
</span>
<q-input
style="width: 150px"
......@@ -135,6 +137,7 @@ export default {
x.originalB2CPrice=y.Price
}
})
x.Count = 60
})
this.calcMoney()
......@@ -180,7 +183,7 @@ export default {
MailingMoney: this.p.MailingMoney,
originalB2CPrice: this.p.originalB2CPrice,
sumPrice: this.sumPrice,
TicketList: this.dataList.TicketList
TicketList: this.dataList.TicketList.filter(x=>x.checked)
}
let key = this.$md5(JSON.stringify(order))
let pickuporderScenTickets = localStorage.getItem('pickuporderScenTickets')
......
......@@ -170,7 +170,7 @@
standout
v-model="parameters.Mobile"
label="電話"
:rules="[(val) => !!val && val.length == 11 || '請輸正確電話']"
:rules="[(val) => !!val || '請輸正確電話']"
ref="Mobile"
mask="#"
reverse-fill-mask
......
......@@ -161,7 +161,7 @@
standout
v-model="parameters.Mobile"
label="電話"
:rules="[(val) => !!val && val.length == 11 || '請輸正確電話']"
:rules="[(val) => !!val || '請輸正確電話']"
ref="Mobile"
mask="#"
reverse-fill-mask
......@@ -190,6 +190,12 @@
<q-input standout v-model="parameters.Remark" input-style="height:170px;" type="textarea" placeholder="此欄位僅限資料備註。不在商品規範內的個人需求,不保證提供" maxlength="200" counter />
</q-card>
</q-form>
<coupon
v-if="sumPrice>0"
:product-type="productType"
:current-price="sumPrice"
@change="changeDiscountHandler"
></coupon>
</div>
<div class="relative-position" v-if="details"
......@@ -246,22 +252,6 @@
</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="AirportObj&&AirportObj.Name">
<div style="width: 80px">{{details.CarType==1?'抵達':'起飛'}}時間:</div>
<div class="q-ml-md ellipsis-2-lines">{{parameters.FlightTime}}</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 class="row q-pb-xs no-wrap" 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>
......@@ -285,9 +275,21 @@
<div class="text-red">{{ moneyFormat(parameters.MailingMoney,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">
<div class="col">優惠金額</div>
<div
class="text-subtitle2 text-weight-bolder text-teal"
v-if="parameters.DiscountsMoney > 0"
>
CNY - {{ moneyFormat(parameters.DiscountsMoney, 2) }}
</div>
<div class="text-grey-5" v-else>暫無優惠</div>
</div>
<div class="row q-mb-sm items-center">
<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">
CNY {{ moneyFormat(parameters.Money, 2) }}
</div>
</div>
</div>
<div class="text-right q-mt-md" v-if="step!=3">
......@@ -300,18 +302,6 @@
</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="onoptionObj"/>
</div>
</q-card>
</q-dialog>
<div v-if="!orderKey || orderKey == ''" class="text-center q-my-xl">
<none-data
iconType="order"
......@@ -329,6 +319,7 @@
import { date } from 'quasar'
import { json } from "body-parser";
import coupon from 'src/components/common/coupon.vue'
import ProductTypeEnum from "src/utils/producttypeenum";
import componentsMap from "src/components/car/Map.vue";
export default {
components:{
......@@ -339,14 +330,12 @@
},
data() {
return {
CouponIds: [],
productType: 4,
sumPrice: 0,//总金额
order: null,//订单信息
orderKey: "",
isShowDialog: false,
AddressObj: null,
onoptionObj: null,//上车范围
unoptionObj: null,//下车范围
optionObj: null,//车型
AirportObj: null,//机场
optionObj: null,//类型
details: null,//产品详情
options: {//音频控件
currentPage: 0,
......@@ -366,13 +355,14 @@
areaCode: "",
Mailbox: "",
},
chosenObj: {},
countrys: [],
areaCodes: [],
loading: false,
parameters: {
OrderId: 0,
Money: 0.0,
DiscountsMoney: 0,//优惠金额
CouponAllotIds: '',
Remark: '',
MailingState: '',//邮寄状态 1自取 2邮寄
MailingAddress: '',//MailingState =2 填写邮寄
......@@ -388,11 +378,7 @@
DetailList:[],
OrderSource: 1,//类型 0 来源B2B 1 来源B2C
},
flightTime: null,//航班起飞抵达时间
getBusTime: null,//预约车时间
getBusTimeDate: null,//预约日期
TotalPeople: 0,//总人数
onoffbus: 1,//1 上车 2下车
};
},
computed: {
......@@ -419,6 +405,19 @@
this.getUserInfoHandler()
},
methods: {
changeDiscountHandler(coupon) {
if (coupon) {
this.parameters.DiscountsMoney = coupon.discountMoney;
this.CouponIds = [coupon.couponId];
this.parameters.CouponAllotIds = this.CouponIds.join(",")
} else {
this.parameters.DiscountsMoney = 0;
this.CouponIds = [];
this.parameters.CouponAllotIds = ''
}
this.parameters.Money = this.sumPrice - this.parameters.DiscountsMoney
this.$forceUpdate();
},
// 获取商品详情
getData() {
this.$q.loading.show();
......@@ -478,6 +477,7 @@
this.parameters.DetailList.push(y)
}
})
this.sumPrice = this.OrderDate.sumPrice
}
}
}
......@@ -518,7 +518,6 @@
"ticket_post_SetTicketOrder",
this.parameters,
(r) => {
// this.$refs.myform.resetValidation()
if (r.data.resultCode == 1) {
this.step = 2
let ErpOrderId = r.data.data.Id
......@@ -530,15 +529,6 @@
})
},
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",
{
......@@ -549,10 +539,10 @@
GoodsId: this.parameters.CouponsId,//商品id
GoodsName: this.details.Name,//商品名称
GoodsPic: this.details.PicPathList[0],//商品图片
GoodsType: 4,
GoodsType: this.productType,
OrderMake: this.parameters.UseDate,//订单摘要(例如出行时间)
TotalPrice: this.parameters.Money,//总价格
PreferentialPrice: 0,// 优惠总金额
PreferentialPrice: this.parameters.DiscountsMoney,// 优惠总金额
ErpOrderId: ErpOrderId,//erp订单id
Country: this.userInfo.Country,//国家id
PlatformTax: 0,//平台税金默认0
......@@ -571,37 +561,14 @@
})
},
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 pickuporderScenTickets = localStorage.getItem('pickuporderScenTickets')
pickuporderScenTickets = pickuporderScenTickets?JSON.parse(pickuporderScenTickets):[]
let i = pickuporderScenTickets.findIndex(x=>x.key==this.orderKey)
if(i>=0){
pickuporderScenTickets.splice(i,1)
localStorage.setItem("pickuporderScenTickets",JSON.stringify(pickuporderScenTickets))
let pickuporderScenTickets = localStorage.getItem("pickuporderScenTickets");
pickuporderScenTickets = pickuporderScenTickets ? JSON.parse(pickuporderScenTickets) : [];
let i = pickuporderScenTickets.findIndex((x) => x.key == this.orderKey);
if (i >= 0) {
pickuporderScenTickets.splice(i, 1);
localStorage.setItem("pickuporderScenTickets", JSON.stringify(pickuporderScenTickets));
}
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.UseDate = this.OrderDate.startDate+' '+this.getBusTime
this.$refs.qDateProxy2.hide()
}else if(type==3){
this.parameters.UseDate = this.OrderDate.startDate+' '+this.getBusTime
}
this.CommonJump("/pay/" + pay.OrderNo, {});
},
optionsFn(cd) {
return (
......@@ -609,19 +576,6 @@
date.formatDate(date.addToDate(new Date(), { days: 0 }), "YYYY/MM/DD")
);
},
// 地图上选址
getAddress(type){
if(type==1){
this.AddressObj = this.onoptionObj
}else{
this.AddressObj = this.unoptionObj
}
this.isShowDialog = true
},
// 计算人数
getNum(){
this.TotalPeople = this.parameters.ManNum+this.parameters.ChildNum+this.parameters.BabyNum
},
// 音频
slideHandler(e) {
this.options.currentPage = e.currentPage;
......
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