Commit a335ca0c authored by youjie's avatar youjie

no message

parent 17f582c0
...@@ -137,7 +137,6 @@ export default { ...@@ -137,7 +137,6 @@ export default {
x.originalB2CPrice=y.Price x.originalB2CPrice=y.Price
} }
}) })
x.Count = 60
}) })
this.calcMoney() this.calcMoney()
......
...@@ -43,15 +43,16 @@ ...@@ -43,15 +43,16 @@
</div> </div>
</div> </div>
<template v-if="TicketIds&&TicketIds.length>0">
<div class="text-grey-6 f12 q-my-md">選擇車類型</div> <div class="text-grey-6 f12 q-my-md">選擇車類型</div>
<div class="row wrap"> <div class="row wrap">
<div v-for="(x,i) in dataList.CarTypeList" :key="i"> <div v-for="(x,i) in dataList.CarTypeList" :key="i">
<q-chip size="14px" clickable @click="handleSelect(x,2)" <q-chip v-if="TicketIds.indexOf(x.Id)!=-1" size="14px" clickable @click="handleSelect(x,2)"
:text-color="selectedCarObj&&selectedCarObj.Id==x.Id?'white':'dark'" :text-color="selectedCarObj&&selectedCarObj.Id==x.Id?'white':'dark'"
:color="selectedCarObj&&selectedCarObj.Id==x.Id?'primary':'grey-3'" square>{{ x.CarName }}({{ x.PeopleNum }}人)</q-chip> :color="selectedCarObj&&selectedCarObj.Id==x.Id?'primary':'grey-3'" square>{{ x.CarName }}({{ x.PeopleNum }}人)</q-chip>
</div>
</div> </div>
</div> </template>
<div class="text-grey-6 f12 q-my-md">選擇數量</div> <div class="text-grey-6 f12 q-my-md">選擇數量</div>
<div class="row items-end"> <div class="row items-end">
<div class="col" :class="{'column':$q.platform.is.mobile}"> <div class="col" :class="{'column':$q.platform.is.mobile}">
...@@ -150,6 +151,8 @@ export default { ...@@ -150,6 +151,8 @@ export default {
this.p = n; this.p = n;
if(n&&n.startDate){ if(n&&n.startDate){
this.chosenObj.startDate = n.startDate; this.chosenObj.startDate = n.startDate;
let arr = this.dataAll.filter(x=> x.Date==this.chosenObj.startDate)
this.TicketIds = arr[0].Price.map(x=> {return x.TicketId})
// this.selectedCar = this.dataList.CarTypeList[0].Id // this.selectedCar = this.dataList.CarTypeList[0].Id
// this.selectedCarObj = this.dataList.CarTypeList[0] // this.selectedCarObj = this.dataList.CarTypeList[0]
} }
...@@ -178,17 +181,17 @@ export default { ...@@ -178,17 +181,17 @@ export default {
selectedAirportObj: null, selectedAirportObj: null,
onCarObj: null, onCarObj: null,
unCarObj: null, unCarObj: null,
TicketIds: null
}; };
}, },
created() { created() {
this.initModel(); this.initModel();
console.log(this.p,'=======')
if(this.p.startDate){ if(this.p.startDate){
this.chosenObj.startDate = this.p.startDate; this.chosenObj.startDate = this.p.startDate;
this.calcMoney() this.calcMoney()
this.getCarPriceData2() this.getCarPriceData2()
} }
this.getCarPriceData()
}, },
methods: { methods: {
goOrderHandler(){ goOrderHandler(){
...@@ -267,6 +270,24 @@ export default { ...@@ -267,6 +270,24 @@ export default {
},null) },null)
}, },
getCarPriceData() {
this.priceList = []
this.apipost(
"b2c_get_GetCarSingleProductMonthPriceAll",
{
ProductId: this.configId,
Month: this.Month,
// AirportId: '',
// CarTypeId: this.selectedCarObj.Id
},
(r) => {
if (r.data.resultCode == 1) {
this.dataAll = r.data.data
}
},null)
},
handleSelectAirport(item){ handleSelectAirport(item){
this.selectedAirportObj = item this.selectedAirportObj = item
}, },
......
...@@ -423,6 +423,12 @@ ...@@ -423,6 +423,12 @@
<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> </q-card>
</q-form> </q-form>
<coupon
v-if="sumPrice>0&&productType"
:product-type="productType"
:current-price="sumPrice"
@change="changeDiscountHandler"
></coupon>
</div> </div>
<div class="relative-position" v-if="details" <div class="relative-position" v-if="details"
...@@ -510,15 +516,21 @@ ...@@ -510,15 +516,21 @@
<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(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">
<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
</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>
<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(parameters.Money,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">
...@@ -570,6 +582,9 @@ export default { ...@@ -570,6 +582,9 @@ export default {
}, },
data() { data() {
return { return {
CouponIds: [],
productType: null,
sumPrice: 0,//总金额
order: null,//订单信息 order: null,//订单信息
orderKey: "", orderKey: "",
isShowDialog: false, isShowDialog: false,
...@@ -608,6 +623,8 @@ export default { ...@@ -608,6 +623,8 @@ export default {
Unit_Price: '',//单价 Unit_Price: '',//单价
Num: '',//数量 Num: '',//数量
Money: 0.0, Money: 0.0,
DiscountsMoney: 0,//优惠金额
DiscountsIds: '',//优惠券id
Sex: 1,//1男2女 Sex: 1,//1男2女
SurName: '',//姓 SurName: '',//姓
Name: '',//名 Name: '',//名
...@@ -661,6 +678,19 @@ export default { ...@@ -661,6 +678,19 @@ export default {
this.getUserInfoHandler() this.getUserInfoHandler()
}, },
methods: { methods: {
changeDiscountHandler(coupon) {
if (coupon) {
this.parameters.DiscountsMoney = coupon.discountMoney;
this.CouponIds = [coupon.couponId];
this.parameters.DiscountsIds = this.CouponIds.join(",")
} else {
this.parameters.DiscountsMoney = 0;
this.CouponIds = [];
this.parameters.DiscountsIds = ''
}
this.parameters.Money = this.sumPrice - this.parameters.DiscountsMoney
this.$forceUpdate();
},
// 获取商品详情 // 获取商品详情
getCarData() { getCarData() {
this.$q.loading.show(); this.$q.loading.show();
...@@ -680,6 +710,14 @@ export default { ...@@ -680,6 +710,14 @@ export default {
} }
this.parameters.CarId = this.OrderDate.CarId this.parameters.CarId = this.OrderDate.CarId
this.parameters.OrderType = this.details.CarType this.parameters.OrderType = this.details.CarType
//13接机 14送机 12包车
if(this.parameters.OrderType==1){
this.productType = 13
}else if(this.parameters.OrderType==2){
this.productType = 14
}else if(this.parameters.OrderType==3){
this.productType = 12
}
} else { } else {
this.$q.notify({ this.$q.notify({
type: "negative", type: "negative",
...@@ -711,6 +749,7 @@ export default { ...@@ -711,6 +749,7 @@ export default {
this.parameters.Unit_Price = this.OrderDate.originalB2CPrice this.parameters.Unit_Price = this.OrderDate.originalB2CPrice
this.parameters.Num = this.chosenObj.Count this.parameters.Num = this.chosenObj.Count
this.parameters.Money = this.OrderDate.sumPrice this.parameters.Money = this.OrderDate.sumPrice
this.sumPrice = this.OrderDate.sumPrice
} }
} }
} }
...@@ -780,15 +819,7 @@ export default { ...@@ -780,15 +819,7 @@ export default {
}) })
}, },
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",
{ {
...@@ -799,10 +830,10 @@ export default { ...@@ -799,10 +830,10 @@ export default {
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.ImageList[0],//商品图片
GoodsType: GoodsType,//商品类型(见枚举) 12包车 13 接机 14送机 GoodsType: this.productType,//商品类型(见枚举) 12包车 13 接机 14送机
OrderMake: this.parameters.OrderDate,//订单摘要(例如出行时间) OrderMake: this.parameters.OrderDate,//订单摘要(例如出行时间)
TotalPrice: this.parameters.Money,//总价格 TotalPrice: this.parameters.Money,//总价格
PreferentialPrice: 0,// 优惠总金额 PreferentialPrice: this.parameters.DiscountsMoney,// 优惠总金额
ErpOrderId: ErpOrderId,//erp订单id ErpOrderId: ErpOrderId,//erp订单id
Country: this.userInfo.Country,//国家id Country: this.userInfo.Country,//国家id
PlatformTax: 0,//平台税金默认0 PlatformTax: 0,//平台税金默认0
...@@ -821,22 +852,14 @@ export default { ...@@ -821,22 +852,14 @@ export default {
}) })
}, },
goPayHandler(pay){ goPayHandler(pay){
let key = this.$md5(JSON.stringify(pay)) let pickuporderCars = localStorage.getItem("pickuporderCars");
let pays = localStorage.getItem('pays') pickuporderCars = pickuporderCars ? JSON.parse(pickuporderCars) : [];
pays = pays?JSON.parse(pays):[] let i = pickuporderCars.findIndex((x) => x.key == this.orderKey);
pays.push({ if (i >= 0) {
key, pickuporderCars.splice(i, 1);
pay localStorage.setItem("pickuporderCars", JSON.stringify(pickuporderCars));
})
localStorage.setItem("pays",JSON.stringify(pays))
let pickuporderCars = localStorage.getItem('pickuporderCars')
pickuporderCars = pickuporderCars?JSON.parse(pickuporderCars):[]
let i = pickuporderCars.findIndex(x=>x.key==this.orderKey)
if(i>=0){
pickuporderCars.splice(i,1)
localStorage.setItem("pickuporderCars",JSON.stringify(pickuporderCars))
} }
this.CommonJump('/pay/'+key, {}); this.CommonJump("/pay/" + pay.OrderNo, {});
}, },
// 航班起飞抵达时间 // 航班起飞抵达时间
getTime(type){ getTime(type){
......
...@@ -920,13 +920,14 @@ export default { ...@@ -920,13 +920,14 @@ export default {
let arr = [] let arr = []
r.data.data.forEach(x=>{ r.data.data.forEach(x=>{
x.PriceList = x.PriceList.sort((a,b)=>{return a.Price-b.Price}) x.PriceList = x.PriceList.sort((a,b)=>{return a.Price-b.Price})
let MailingMoneyList = x.PriceList.sort((a,b)=>{return b.MailingMoney-a.MailingMoney})
let dataObj = { let dataObj = {
startDate: x.Date, startDate: x.Date,
originalB2CPrice: x.PriceList[0].Price, originalB2CPrice: x.PriceList[0].Price,
remainNum: 1, remainNum: 1,
Count: 1, Count: 1,
safeMoney: 0, safeMoney: 0,
MailingMoney: x.PriceList[0].MailingMoney, MailingMoney: MailingMoneyList[0].MailingMoney,
PriceList: x.PriceList, PriceList: x.PriceList,
} }
if(date.formatDate(Date.now(), 'YYYY-MM-DD')!=x.Date&&x.Date>date.formatDate(Date.now(), 'YYYY-MM-DD')){ if(date.formatDate(Date.now(), 'YYYY-MM-DD')!=x.Date&&x.Date>date.formatDate(Date.now(), 'YYYY-MM-DD')){
......
...@@ -171,6 +171,15 @@ ...@@ -171,6 +171,15 @@
</template> </template>
</q-input> </q-input>
</div> </div>
<div :class="filedGuestWidth">
<q-input
standout
v-model="parameters.MailingAddress"
label="郵寄地址"
:rules="[(val) => !!val || '請輸郵寄地址']"
ref="MailingAddress"
></q-input>
</div>
<div :class="filedGuestWidth"> <div :class="filedGuestWidth">
<div class="row items-center q-mt-md"> <div class="row items-center q-mt-md">
<span>選擇性別:</span> <span>選擇性別:</span>
...@@ -270,11 +279,15 @@ ...@@ -270,11 +279,15 @@
</template> </template>
</div> </div>
</template> </template>
<div class="row q-mb-sm" v-if="parameters.MailingState==2&&parameters.MailingMoney>0">
<div class="col text-grey-6">邮寄费</div>
<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" /> <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="parameters.MailingState==2&&parameters.MailingMoney>0">
<div class="col">邮寄费</div>
<div
class="text-subtitle2 text-weight-bolder text-grey-6"
>
CNY {{ moneyFormat(parameters.MailingMoney,2) }}
</div>
</div>
<div class="row q-mb-sm items-center"> <div class="row q-mb-sm items-center">
<div class="col">優惠金額</div> <div class="col">優惠金額</div>
<div <div
...@@ -362,7 +375,7 @@ ...@@ -362,7 +375,7 @@
OrderId: 0, OrderId: 0,
Money: 0.0, Money: 0.0,
DiscountsMoney: 0,//优惠金额 DiscountsMoney: 0,//优惠金额
CouponAllotIds: '', DiscountsIds: '',//优惠券id
Remark: '', Remark: '',
MailingState: '',//邮寄状态 1自取 2邮寄 MailingState: '',//邮寄状态 1自取 2邮寄
MailingAddress: '',//MailingState =2 填写邮寄 MailingAddress: '',//MailingState =2 填写邮寄
...@@ -409,11 +422,11 @@ ...@@ -409,11 +422,11 @@
if (coupon) { if (coupon) {
this.parameters.DiscountsMoney = coupon.discountMoney; this.parameters.DiscountsMoney = coupon.discountMoney;
this.CouponIds = [coupon.couponId]; this.CouponIds = [coupon.couponId];
this.parameters.CouponAllotIds = this.CouponIds.join(",") this.parameters.DiscountsIds = this.CouponIds.join(",")
} else { } else {
this.parameters.DiscountsMoney = 0; this.parameters.DiscountsMoney = 0;
this.CouponIds = []; this.CouponIds = [];
this.parameters.CouponAllotIds = '' this.parameters.DiscountsIds = ''
} }
this.parameters.Money = this.sumPrice - this.parameters.DiscountsMoney this.parameters.Money = this.sumPrice - this.parameters.DiscountsMoney
this.$forceUpdate(); this.$forceUpdate();
...@@ -497,6 +510,12 @@ ...@@ -497,6 +510,12 @@
this.$refs.SurName.validate() this.$refs.SurName.validate()
this.$refs.Name.validate() this.$refs.Name.validate()
this.$refs.Mobile.validate() this.$refs.Mobile.validate()
if(this.parameters.MailingState==2){
this.$refs.MailingAddress.validate()
}else{
this.parameters.MailingAddress = ''
}
console.log(this.parameters,'----') console.log(this.parameters,'----')
let flag = true let flag = true
flag = await this.formValidateHandler('baseUserInfo') flag = await this.formValidateHandler('baseUserInfo')
......
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