Commit b382dcc0 authored by youjie's avatar youjie

no message

parent 4844a58a
...@@ -13,67 +13,87 @@ ...@@ -13,67 +13,87 @@
<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.TicketList" :key="i"> <div v-for="(x,i) in dataList.TicketList" :key="i">
<q-chip size="14px" clickable @click="handleSelect(x)" <q-chip size="14px" clickable @click="handleSelect(x,1)"
:text-color="selectedObj&&selectedObj.Id==x.Id?'white':'dark'" :text-color="x.checked?'white':'dark'"
:color="selectedObj&&selectedObj.Id==x.Id?'primary':'grey-3'" square>{{ x.TicketName }}</q-chip> :color="x.checked?'primary':'grey-3'" square>{{ x.TicketName }}</q-chip>
</div> </div>
</div> </div>
<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 no-wrap">
<div class="col" :class="{'column':$q.platform.is.mobile}"> <div v-for="(x,i) in takeList" :key="i">
<div v-if="selectedObj"> <q-chip size="14px" clickable @click="handleSelect(x,2)"
<span class="text-subtitle2 text-weight-bold">{{selectedObj.TicketName}}</span> :text-color="MailingStateObj&&MailingStateObj.Id==x.Id?'white':'dark'"
<span class="text-grey-6 f12 q-ml-sm"></span>(1人/票)</span> :color="MailingStateObj&&MailingStateObj.Id==x.Id?'primary':'grey-3'" square>{{ x.Name }}</q-chip>
</div>
</div>
<div v-if="dataList.TicketList.map(x=>x.checked).indexOf(true)!=-1" class="text-grey-6 f12 q-my-md">選擇數量</div>
<template v-for="(x,i) in dataList.TicketList">
<div class="row items-end q-mb-md">
<div v-if="x.checked" :key="i" class="col" :class="{'column':$q.platform.is.mobile}"
>
<div>
<span class="text-subtitle2 text-weight-bold">{{x.TicketName}}</span>
<span class="text-grey-6 f12 q-ml-sm"></span></span>
</div>
<div v-if="$q.platform.is.mobile">
<span class="text-grey-7 product-price" style="font-size: 13px">
CNY {{ moneyFormat(x.originalB2CPrice, 0) }} /每票
</span>
</div>
</div> </div>
<div v-if="$q.platform.is.mobile"> <div class="row items-end" v-if="x.checked">
<span class="text-grey-7 product-price" style="font-size: 13px"> <span v-if="$q.platform.is.desktop" class="text-grey-7 product-price" style="font-size: 13px">
CNY {{ moneyFormat(p.originalB2CPrice, 0) }} /每票 CNY {{ moneyFormat(x.originalB2CPrice, 0) }} /每票
</span> </span>
<q-input
style="width: 150px"
@input="changePeople"
v-model="x.Count"
class="col"
:class="{
'q-ml-sm q-px-none q-pl-none': $q.platform.is.desktop,
}"
mask="#"
reverse-fill-mask
dense
standout
readonly
>
<template v-slot:prepend>
<q-btn
color="primary"
size="sm"
class="q-px-none"
flat
icon="remove"
@click="addPeople(x,'Count', -1)"
/>
</template>
<template v-slot:append>
<q-btn
color="primary"
size="sm"
class="q-px-none"
flat
icon="add"
@click="addPeople(x,'Count', 1)"
/>
</template>
</q-input>
</div> </div>
</div> </div>
<div class="row items-end"> </template>
<span v-if="$q.platform.is.desktop" class="text-grey-7 product-price" style="font-size: 13px"> <div v-if="MailingStateObj&&MailingStateObj.Id==1"
CNY {{ moneyFormat(p.originalB2CPrice, 0) }} /每票 class="row items-end fz14 text-grey-6 f12 q-my-md q-pt-lg">
</span> <span>取票地址</span>
<q-input <span class="text-primary q-ml-lg">{{dataList.SelffetchAddress}}</span>
style="width: 150px"
@input="changePeople"
v-model="chosenObj.Count"
class="col"
:class="{
'q-ml-sm q-px-none q-pl-none': $q.platform.is.desktop,
}"
mask="#"
reverse-fill-mask
dense
standout
readonly
>
<template v-slot:prepend>
<q-btn
color="primary"
size="sm"
class="q-px-none"
flat
icon="remove"
@click="addPeople('Count', -1)"
/>
</template>
<template v-slot:append>
<q-btn
color="primary"
size="sm"
class="q-px-none"
flat
icon="add"
@click="addPeople('Count', 1)"
/>
</template>
</q-input>
</div>
</div> </div>
</div> </div>
<div class="q-mt-md q-pt-md" style="border-top: 1px dashed #eee"> <div class="q-mt-md q-pt-md" style="border-top: 1px dashed #eee">
<div class="row items-center fz12" v-if="MailingStateObj&&MailingStateObj.Id==2&&p&&p.MailingMoney>0">
<span class="text-subtitle2 text-grey-8 col">邮寄费</span>
<span class="text-primary q-ml-lg">{{p.MailingMoney}}</span>
</div>
<div class="row items-center"> <div class="row items-center">
<span class="text-subtitle2 text-grey-6 col">總金額</span> <span class="text-subtitle2 text-grey-6 col">總金額</span>
<span class="text-h6 text-primary product-price">CNY {{ moneyFormat(sumPrice,0) }}</span> <span class="text-h6 text-primary product-price">CNY {{ moneyFormat(sumPrice,0) }}</span>
...@@ -87,12 +107,12 @@ ...@@ -87,12 +107,12 @@
</span> </span>
<span class="f12 text-negative" <span class="f12 text-negative"
:class="{'q-mr-lg':$q.platform.is.desktop}" :class="{'q-mr-lg':$q.platform.is.desktop}"
v-if="p.startDate&&!selectedObj"> v-if="p.startDate&&(!selectedObj||!MailingStateObj)">
{{`請選擇上面的門票類型`}} {{`請選擇上面的門票類型、取票方式`}}
</span> </span>
</span> </span>
<q-btn color="primary" label="立即訂購" unelevated class="q-px-lg" <q-btn color="primary" label="立即訂購" unelevated class="q-px-lg"
:disable="sumPrice==0||!selectedObj" :disable="!p.startDate||sumPrice==0||!selectedObj||!MailingStateObj"
@click="goOrderHandler"/> @click="goOrderHandler"/>
</div> </div>
...@@ -108,9 +128,14 @@ export default { ...@@ -108,9 +128,14 @@ export default {
price: { price: {
handler(n, o) { handler(n, o) {
this.p = n; this.p = n;
if(n&&n.startDate){ this.dataList.TicketList.forEach(x=>{
this.chosenObj.startDate = n.startDate; x.originalB2CPrice = 0
} this.p.PriceList.forEach(y=>{
if(x.Id==y.TicketId){
x.originalB2CPrice=y.Price
}
})
})
this.calcMoney() this.calcMoney()
}, },
...@@ -120,7 +145,6 @@ export default { ...@@ -120,7 +145,6 @@ export default {
dataList: { dataList: {
handler(n, o) { handler(n, o) {
this.dataList = n; this.dataList = n;
}, },
deep: true, deep: true,
immediate: true immediate: true
...@@ -133,26 +157,30 @@ export default { ...@@ -133,26 +157,30 @@ export default {
sumPrice:0, sumPrice:0,
selectedObj: null, selectedObj: null,
priceList: [], priceList: [],
takeList:[
{Name:'自行取票',Id:1},
{Name:'邮寄票券',Id:2},
],
MailingStateObj: null,
}; };
}, },
created() { created() {
this.initModel(); this.initModel();
if(this.p.startDate){ if(this.p.startDate){
this.chosenObj.startDate = this.p.startDate;
this.calcMoney() this.calcMoney()
this.getCarPriceData2()
} }
}, },
methods: { methods: {
goOrderHandler(){ goOrderHandler(){
let order = { let order = {
CouponsId: this.configId, CouponsId: this.configId,
TicketId: this.selectedObj.Id, MailingState: this.MailingStateObj.Id,
Month: this.Month, Month: this.Month,
startDate: this.p.startDate, startDate: this.p.startDate,
MailingMoney: this.p.MailingMoney,
originalB2CPrice: this.p.originalB2CPrice, originalB2CPrice: this.p.originalB2CPrice,
orderInfo: this.chosenObj, sumPrice: this.sumPrice,
TicketList: this.dataList.TicketList
} }
let key = this.$md5(JSON.stringify(order)) let key = this.$md5(JSON.stringify(order))
let pickuporderScenTickets = localStorage.getItem('pickuporderScenTickets') let pickuporderScenTickets = localStorage.getItem('pickuporderScenTickets')
...@@ -162,81 +190,28 @@ export default { ...@@ -162,81 +190,28 @@ export default {
order order
}) })
localStorage.setItem("pickuporderScenTickets",JSON.stringify(pickuporderScenTickets)) localStorage.setItem("pickuporderScenTickets",JSON.stringify(pickuporderScenTickets))
this.CommonJump('/PickuporderForm/'+key, {}); this.CommonJump('/ScenicSpotTicketOrderForm/'+key, {});
}, },
// 获取报价的详情 handleSelect(item,type){
getCarPriceData2() { if(type==2){
this.priceList = [] this.MailingStateObj = item
this.apipost( }else{
"b2c_get_GetTicketCouponsMonthPrice", item.checked = !item.checked
{ this.selectedObj = item
CouponsId: this.configId, }
TicketId: this.selectedObj.Id,
Month: this.Month,
},
(r) => {
if (r.data.resultCode == 1) {
let arr = []
r.data.data.forEach(x=>{
if(x.Price){
if(this.chosenObj.startDate==x.Date){
this.p.originalB2CPrice = x.Price
}
let dataObj = {
startDate: x.Date,
originalB2CPrice: x.Price,
remainNum: 1,
Count: 1,
isSupportChildren: 1,
safeMoney: 0,
}
if(date.formatDate(Date.now(), 'YYYY-MM-DD')!=x.Date&&x.Date>date.formatDate(Date.now(), 'YYYY-MM-DD')){
arr.push(dataObj)
}
}
})
const temp= JSON.parse(JSON.stringify(r.data.data))
let PriceArr = temp.filter(x=>{ return x.Price>0 })
if(PriceArr.length>0){
this.$emit('getPriceList',JSON.stringify(arr),this.selectedObj.Id)
}else{
let dataObj = {
startDate: '',
originalB2CPrice: '',
remainNum: 0,
Count: 0,
safeMoney: 0,
PeopleNum: 1
}
this.priceList.push(dataObj)
this.$emit('getPriceList',JSON.stringify(this.priceList),this.selectedObj.Id)
this.p.originalB2CPrice = 0
this.resetHandler()
}
}
},null)
},
handleSelect(item){
this.selectedObj = item
setTimeout(()=>{ setTimeout(()=>{
this.getCarPriceData2() this.calcMoney()
},100) },100)
}, },
initModel() { initModel() {
this.sumPrice=0 this.sumPrice=0
this.chosenObj = {
startDate: "",
Count: 1,
remark: "",
};
}, },
resetHandler(type) { resetHandler() {
if(type){ this.selectedObj = null
this.selectedObj = null this.MailingStateObj = null
} this.dataList.TicketList.forEach(x=>{
x.checked = false
})
setTimeout(()=>{ setTimeout(()=>{
this.p = {}; this.p = {};
this.initModel() this.initModel()
...@@ -244,18 +219,28 @@ export default { ...@@ -244,18 +219,28 @@ export default {
this.$emit("reset"); this.$emit("reset");
}, },
changePeople(val) {}, changePeople(val) {},
addPeople(m, i, isDf = false) { addPeople(item, m, i, isDf = false) {
this.chosenObj[m] = parseInt(this.chosenObj[m]) + i; let chosenObj = item
chosenObj[m] = parseInt(chosenObj[m]) + i;
if(m!='Count'){ if(m!='Count'){
this.chosenObj[m] = this.chosenObj[m] < 0 ? 0 : this.chosenObj[m]++; chosenObj[m] = chosenObj[m] < 0 ? 0 : chosenObj[m]++;
}else{ }else{
this.chosenObj[m] = this.chosenObj[m] < 1 ? 1 : this.chosenObj[m]++; chosenObj[m] = chosenObj[m] < 1 ? 1 :chosenObj[m]++;
} }
this.calcMoney() this.calcMoney()
}, },
calcMoney() { calcMoney() {
if (!this.p) return; if (!this.p) return;
let money = this.p.originalB2CPrice * this.chosenObj.Count; let money = 0
this.dataList.TicketList.forEach(x=>{
if(x.checked){
money+=x.originalB2CPrice*x.Count
}
})
if(this.MailingStateObj&&this.MailingStateObj.Id==2){
this.sumPrice = Number(money)+Number(this.p.MailingMoney)
return
}
this.sumPrice = money; this.sumPrice = money;
}, },
}, },
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,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="priceList2&&priceList2.length">{{dataList.CurrencyCode}} {{ moneyFormat(priceList2[0].originalB2CPrice, 0) }}</span> <span v-if="priceList&&priceList.length">{{dataList.CurrencyCode}} {{ moneyFormat(priceList[0].originalB2CPrice, 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
...@@ -174,9 +174,9 @@ ...@@ -174,9 +174,9 @@
$q.platform.is.mobile, $q.platform.is.mobile,
}" }"
> >
<div class="product-price text-h6" v-if="priceList2&&priceList2.length>0"> <div class="product-price text-h6" v-if="priceList&&priceList.length>0">
<!-- CNY:{{ dataList. }} --> <!-- CNY:{{ dataList. }} -->
{{dataList.CurrencyCode?dataList.CurrencyCode:'CNY'}}{{ moneyFormat(priceList2[0].originalB2CPrice, 0) }} {{dataList.CurrencyCode?dataList.CurrencyCode:'CNY'}}{{ moneyFormat(priceList[0].originalB2CPrice, 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>
...@@ -318,7 +318,7 @@ ...@@ -318,7 +318,7 @@
<span class="product-price text-h6 q-mr-md" <span class="product-price text-h6 q-mr-md"
>{{dataList.CurrencyCode?dataList.CurrencyCode:'CNY'}} >{{dataList.CurrencyCode?dataList.CurrencyCode:'CNY'}}
{{ {{
moneyFormat(priceList2[0].originalB2CPrice, 0) moneyFormat(priceList[0].originalB2CPrice, 0)
}}</span }}</span
> >
<q-btn <q-btn
...@@ -330,7 +330,7 @@ ...@@ -330,7 +330,7 @@
/> />
</div> </div>
<div class="text-info q-mt-md text-right"> <div class="text-info q-mt-md text-right">
最早可預訂日期:{{ priceList2[0].startDate }} 最早可預訂日期:{{ priceList[0].startDate }}
</div> </div>
</div> </div>
</div> </div>
...@@ -562,7 +562,6 @@ export default { ...@@ -562,7 +562,6 @@ export default {
data() { data() {
return { return {
AddressObj: null, AddressObj: null,
priceList2: [],
priceList: [], priceList: [],
selectedId: '', selectedId: '',
currentYM: { year: 2023, month: 2, str: "2023-02" }, // 当前年月 currentYM: { year: 2023, month: 2, str: "2023-02" }, // 当前年月
...@@ -713,7 +712,6 @@ export default { ...@@ -713,7 +712,6 @@ export default {
this.TripConfig = JSON.parse(window.localStorage.getItem("baseifo")); this.TripConfig = JSON.parse(window.localStorage.getItem("baseifo"));
} }
window.addEventListener("scroll", this.menu); window.addEventListener("scroll", this.menu);
window.addEventListener("scroll", this.menu);
this.getData(); this.getData();
}, },
methods: { methods: {
...@@ -722,6 +720,9 @@ export default { ...@@ -722,6 +720,9 @@ export default {
if(!this.showOrderPreview){ if(!this.showOrderPreview){
this.changeTripShowHandler() this.changeTripShowHandler()
} }
this.dataList.TicketList.forEach(x=>{
x.checked = false
})
}, },
changeTripShowHandler() { changeTripShowHandler() {
this.$nextTick(() => { this.$nextTick(() => {
...@@ -815,6 +816,7 @@ export default { ...@@ -815,6 +816,7 @@ export default {
}, },
resetHandler() { resetHandler() {
this.currentPrice.startDate = ""; this.currentPrice.startDate = "";
if(!this.$q.platform.is.mobile){ if(!this.$q.platform.is.mobile){
this.$refs.calendar.reset(); this.$refs.calendar.reset();
} }
...@@ -841,14 +843,18 @@ export default { ...@@ -841,14 +843,18 @@ export default {
{ CouponsId: this.msg.configId }, { CouponsId: this.msg.configId },
(r) => { (r) => {
if (r.data.resultCode == 1) { if (r.data.resultCode == 1) {
let addList = function (arr) {
arr.forEach(item => {
item.checked = false
item.Count = 1
});
};
addList(r.data.data.TicketList);
this.dataList = r.data.data; this.dataList = r.data.data;
this.selectedId = this.dataList.TicketList.find(x=>x.Id) this.selectedId = this.dataList.TicketList.find(x=>x.Id)
this.dataList.imgCover = this.dataList.PicPathList; this.dataList.imgCover = this.dataList.PicPathList;
this.AddressObj = this.dataList this.AddressObj = this.dataList
this.AddressObj.Address = `${this.dataList.CountryName}-${this.dataList.CityName}-${this.dataList.ProvinceName}-${this.dataList.Address}` this.AddressObj.Address = `${this.dataList.CountryName}-${this.dataList.CityName}-${this.dataList.ProvinceName}-${this.dataList.Address}`
// {
// Address:`${this.dataList.CountryName}-${this.dataList.CityName}-${this.dataList.Address}`
// }
this.isShow = true; this.isShow = true;
if (this.dataList.videoStr && this.dataList.videoStr != "") { if (this.dataList.videoStr && this.dataList.videoStr != "") {
this.options.loop = false; this.options.loop = false;
...@@ -864,7 +870,7 @@ export default { ...@@ -864,7 +870,7 @@ export default {
}); });
} }
this.$nextTick(() => { this.$nextTick(() => {
this.getCarPriceData2() this.getCarPriceData()
setTimeout(() => { setTimeout(() => {
this.navs.forEach((x) => { this.navs.forEach((x) => {
x.top = x.top =
...@@ -900,36 +906,34 @@ export default { ...@@ -900,36 +906,34 @@ export default {
); );
}, },
// 获取报价的详情 // 获取报价的详情
getCarPriceData2() { getCarPriceData() {
this.priceList = [] this.priceList = []
this.apipost( this.apipost(
"b2c_get_GetTicketCouponsMonthPrice", "b2c_get_GetTicketCouponsMonthPriceAll",
{ {
CouponsId: this.msg.configId, CouponsId: this.msg.configId,
TicketId: this.dataList.TicketList[1].Id, // TicketId: this.dataList.TicketList[0].Id,
Month: this.currentYM.str, Month: this.currentYM.str,
}, },
(r) => { (r) => {
if (r.data.resultCode == 1) { if (r.data.resultCode == 1) {
let arr = [] let arr = []
r.data.data.forEach(x=>{ r.data.data.forEach(x=>{
if(x.Price){ x.PriceList = x.PriceList.sort((a,b)=>{return a.Price-b.Price})
let dataObj = { let dataObj = {
startDate: x.Date, startDate: x.Date,
originalB2CPrice: x.Price, originalB2CPrice: x.PriceList[0].Price,
remainNum: 1, remainNum: 1,
Count: 1, Count: 1,
safeMoney: 0, safeMoney: 0,
PeopleNum: 1 MailingMoney: x.PriceList[0].MailingMoney,
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')){
arr.push(dataObj) arr.push(dataObj)
} }
}
}) })
this.priceList = JSON.parse(JSON.stringify(arr)) this.priceList = JSON.parse(JSON.stringify(arr))
this.priceList2 = JSON.parse(JSON.stringify(arr))
} }
},null) },null)
......
...@@ -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.PicPathList[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"
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
{{details.Name}} {{details.Name}}
</div> </div>
<div class="text-caption text-grey-6 ellipsis q-mt-sm"> <div class="text-caption text-grey-6 ellipsis q-mt-sm">
{{details.Description}} {{details.Feature}}
</div> </div>
</div> </div>
</div> </div>
...@@ -110,23 +110,25 @@ ...@@ -110,23 +110,25 @@
<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>{{OrderDate.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" v-if="optionObj">
<q-icon name="iconfont iconjiaotong" size="20px" class="q-mr-sm" /> <q-icon name="iconfont iconpeople" size="20px" class="q-mr-sm" />
<span class="q-mr-sm" <span class="q-mr-sm" v-for="(x,i) in optionObj" :key="i"
>{{CarObj.CarName}} x {{ chosenObj.Count }} </span >{{x.TicketName}} x {{ x.Count }} </span
> >
<span class="q-mr-sm" <span class="q-mr-sm"
>({{CarObj.PeopleNum}}人/辆)</span ></span
> >
<template v-if="details.TravelHours>0"> <q-icon name="iconfont icontime" size="20px" class="q-mr-xs q-ml-sm" />
<q-icon name="iconfont icontime" size="20px" class="q-mr-xs q-ml-sm" /> <span class="q-mr-sm">
<span class="q-mr-sm"> 行程時間 1 天
{{`包車時長:${details.TravelHours} h`}} </span>
</span>
</template>
</div> </div>
</div> </div>
<div v-if="parameters.MailingState==1" class="rounded-borders bg-blue-1 q-px-lg q-py-sm q-mt-sm">
自取地址:{{parameters.SelffetchAddress}}
</div>
<q-separator color="grey-2" class="q-mt-md" /> <q-separator color="grey-2" class="q-mt-md" />
<div <div
class="bg-grey-1 rounded-borders q-pa-md q-mt-md guest-item" class="bg-grey-1 rounded-borders q-pa-md q-mt-md guest-item"
> >
...@@ -135,36 +137,25 @@ ...@@ -135,36 +137,25 @@
<div :class="filedGuestWidth"> <div :class="filedGuestWidth">
<q-input <q-input
standout standout
v-model="parameters.SurName" v-model="parameters.Name"
label="本國姓" label="本國姓"
placeholder="例:張" placeholder="例:張"
:rules="[(val) => !!val || '請輸本國姓']" :rules="[(val) => !!val || '請輸本國姓']"
ref="SurName" ref="SurName"
/> />
</div> </div>
<div :class="filedGuestWidth"> <div :class="filedGuestWidth">
<q-input <q-input
standout standout
v-model="parameters.Name" v-model="parameters.EName"
label="本國" label="本國姓名(英文)"
placeholder="例:" placeholder="例:zhangsan"
:rules="[(val) => !!val || '請輸本國']" :rules="[(val) => !!val || '請輸本國姓名(英文)']"
ref="Name" ref="Name"
mask="X"
reverse-fill-mask
/> />
</div> </div>
<div :class="filedGuestWidth">
<q-input
standout
v-model="parameters.ContactWay"
label="联络方式"
placeholder="例:WeChat"
:rules="[(val) => !!val || '請輸联络方式']"
ref="ContactWay"
mask="X"
reverse-fill-mask
>
</q-input>
</div>
<div :class="filedGuestWidth"> <div :class="filedGuestWidth">
<q-input <q-input
standout standout
...@@ -195,230 +186,6 @@ ...@@ -195,230 +186,6 @@
</div> </div>
</div> </div>
</div> </div>
<template v-if="details.CarType!=3">
<div class="text-subtitle1 text-weight-bolder q-my-md">{{details.CarType==1?'抵達':'起飛'}} 班机資料</div>
<q-separator color="grey-2" class="q-mt-md" />
<div
class="bg-grey-1 rounded-borders q-pa-md q-mt-md guest-item"
>
<div class="text-subtitle1 q-pb-md text-weight-bold"></div>
<div class="row q-col-gutter-md">
<div :class="filedGuestWidth">
<q-input
standout
v-model="parameters.AirportTerminal"
label="航廈"
placeholder="例:航廈"
:rules="[(val) => !!val || '請輸航廈']"
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 :class="filedGuestWidth">
<q-input
standout
v-model="parameters.AirLine"
label="航空公司"
placeholder=""
:rules="[(val) => !!val || '請輸航空公司名稱']"
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 :class="filedGuestWidth">
<q-input
standout
v-model="parameters.FlightNumber"
label="航班編號"
placeholder="例:CA123"
:rules="[(val) => !!val || '請輸航班編號']"
ref="FlightNumber"
mask="X"
reverse-fill-mask
/>
</div>
<div :class="filedGuestWidth">
<q-input
class="q-pb-md"
standout
:value="!flightTime?'':parameters.FlightTime"
:label="`航班${details.CarType==1?'抵達':'起飛'}時間`"
:rules="[(val) => !!val || `請选航班${details.CarType==1?'抵達':'起飛'}時間`]"
ref="FlightTime"
>
<template v-slot:append>
<q-icon name="event" class="cursor-pointer"></q-icon>
</template>
<q-popup-proxy :offset="[0, 0]" ref="qDateProxy1">
<div class="row">
<!-- <q-date
mask="YYYY-MM-DD HH:mm"
:title="$t('search_date_begin')"
subtitle="選擇"
v-model="parameters.FlightTime"
:options="optionsFn"
/>
<div class="q-px-sm"></div> -->
<q-time format24h v-model="flightTime" mask="HH:mm"
@input="getTime(1)"/>
</div>
</q-popup-proxy>
</q-input>
</div>
</div>
</div>
</template>
<div class="text-subtitle1 text-weight-bolder q-my-md">
{{details.CarType==1?'接机':details.CarType==2?'送机':'包车'}}資料
</div>
<q-separator color="grey-2" class="q-mt-md" />
<div
class="bg-grey-1 rounded-borders q-pa-md q-mt-md guest-item"
>
<div class="text-subtitle1 q-pb-md text-weight-bold"></div>
<div class="row q-col-gutter-md">
<div :class="filedGuestWidth">
<q-input
standout
v-model="!getBusTime?'':parameters.OrderDate"
label="接駁日期"
:rules="[(val) => !!val || '請选接駁日期']"
ref="OrderDate"
>
<template v-slot:append>
<q-icon name="event" class="cursor-pointer"></q-icon>
</template>
<q-popup-proxy :offset="[0, 0]" ref="qDateProxy2">
<div class="row">
<!-- <q-date
mask="YYYY-MM-DD"
:title="$t('search_date_begin')"
subtitle="選擇"
v-model="getBusTimeDate"
:options="optionsFn"
@input="getTime(3)"
/>
<div class="q-px-sm"></div> -->
<q-time format24h v-model="getBusTime" mask="HH:mm"
@input="getTime(2)"/>
</div>
</q-popup-proxy>
</q-input>
</div>
<div :class="filedGuestWidth" v-if="details.CarType!=1">
<q-input
standout
v-model="parameters.GetonAddress"
label="上車地點"
placeholder=""
:rules="[(val) => !!val || '請輸上車地點供司機參考']"
ref="GetonAddress"
readonly>
<template v-slot:append>
<!-- <q-icon name="iconfont iconaddress" size="20px" class="q-mr-sm" @click="getAddress(1)"/> -->
</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>
</div>
<div :class="filedGuestWidth" v-if="details.CarType!=2">
<q-input
standout
v-model="parameters.GetoffAddress"
label="下車地點"
placeholder=""
:rules="[(val) => !!val || '請輸下車地點供司機參考']"
ref="GetoffAddress"
readonly>
<template v-slot:append>
<!-- <q-icon name="iconfont iconaddress" size="20px" class="q-mr-sm" @click="getAddress(2)"/> -->
</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>
</div>
</div>
</div>
<div class="text-subtitle1 text-weight-bolder q-my-md">乘客資料</div>
<q-separator color="grey-2" class="q-mt-md" />
<div
class="bg-grey-1 rounded-borders q-pa-md q-mt-md guest-item"
>
<div class="text-subtitle1 q-pb-md text-weight-bold">乘客数量</div>
<div class="row q-col-gutter-md">
<div :class="filedGuestWidth">
<q-input
standout
v-model="parameters.ManNum"
label="成人數(18-99岁)"
@input="getNum"
:rules="[(val) => !!val || '請輸成人數']"
ref="ManNum"
mask="#"
reverse-fill-mask
/>
</div>
<div :class="filedGuestWidth">
<q-input
standout
v-model="parameters.ChildNum"
label="兒童數(3-17岁)"
@input="getNum"
mask="#"
reverse-fill-mask
/>
</div>
<div :class="filedGuestWidth">
<q-input
standout
v-model="parameters.BabyNum"
label="嬰幼兒數(0-2岁)"
@input="getNum"
mask="#"
reverse-fill-mask
/>
</div>
</div>
<template v-if="details.CarType!=3">
<div class="text-subtitle1 q-py-md text-weight-bold">行李数量</div>
<div class="row q-col-gutter-md">
<div :class="filedGuestWidth">
<q-input
standout
v-model="parameters.HandLuggageNum"
label="手提行李"
mask="#"
reverse-fill-mask
/>
</div>
<div :class="filedGuestWidth">
<q-input
standout
v-model="parameters.RegisteredLuggageNum"
label="托运行李"
mask="#"
reverse-fill-mask
/>
</div>
</div>
</template>
</div>
<div class="text-subtitle1 q-my-md text-weight-bold">特殊需求備註:</div> <div class="text-subtitle1 q-my-md text-weight-bold">特殊需求備註:</div>
<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>
...@@ -464,7 +231,7 @@ ...@@ -464,7 +231,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.PicPathList[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"
...@@ -474,7 +241,7 @@ ...@@ -474,7 +241,7 @@
{{details.Name}} {{details.Name}}
</div> </div>
<div class="text-caption text-grey-6 ellipsis q-mt-sm"> <div class="text-caption text-grey-6 ellipsis q-mt-sm">
{{details.Description}} {{details.Feature}}
</div> </div>
</div> </div>
</div> </div>
...@@ -497,26 +264,28 @@ ...@@ -497,26 +264,28 @@
</div> </div>
<div class="row"> <div class="row">
<div style="width: 80px"> <div style="width: 80px">
<!-- 出發日期: --> 门票日期:</div>
接駁日期:</div>
<div class="q-ml-md"> <div class="q-ml-md">
{{parameters.OrderDate}} {{parameters.UseDate}}
</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"> <template v-if="optionObj">
<div class="col">{{CarObj.CarName}} x {{ chosenObj.Count }}</div> <div class="row q-mb-sm" v-for="(x,i) in optionObj" :key="i">
<div>{{details.CurrencyCode}} {{ moneyFormat(OrderDate.originalB2CPrice,2) }}</div> <template v-if="x.checked">
<div class="col">{{x.TicketName}} x {{ x.Count }}</div>
<div>{{ moneyFormat(x.originalB2CPrice,2) }}</div>
</template>
</div>
</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> </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" v-if="(chosenObj.Count)>0">
<div class="col">總金額</div>
<div class="text-subtitle2 text-weight-bolder text-primary">{{details.CurrencyCode}} {{ moneyFormat(OrderDate.sumPrice,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="chosenObj.Count>0"> <div class="row q-mb-sm items-center">
<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(OrderDate.sumPrice,2) }}</div>
</div> </div>
...@@ -539,7 +308,7 @@ ...@@ -539,7 +308,7 @@
</div> </div>
<q-separator /> <q-separator />
<div style="max-height: 600px;padding:20px 0" class="scroll"> <div style="max-height: 600px;padding:20px 0" class="scroll">
<componentsMap :AddressObj="onCarObj"/> <componentsMap :AddressObj="onoptionObj"/>
</div> </div>
</q-card> </q-card>
</q-dialog> </q-dialog>
...@@ -574,9 +343,9 @@ ...@@ -574,9 +343,9 @@
orderKey: "", orderKey: "",
isShowDialog: false, isShowDialog: false,
AddressObj: null, AddressObj: null,
onCarObj: null,//上车范围 onoptionObj: null,//上车范围
unCarObj: null,//下车范围 unoptionObj: null,//下车范围
CarObj: null,//车型 optionObj: null,//车型
AirportObj: null,//机场 AirportObj: null,//机场
details: null,//产品详情 details: null,//产品详情
options: {//音频控件 options: {//音频控件
...@@ -603,31 +372,20 @@ ...@@ -603,31 +372,20 @@
loading: false, loading: false,
parameters: { parameters: {
OrderId: 0, OrderId: 0,
OrderType: 0,
OrderDate:'',//预定日期
Unit_Price: '',//单价
Num: '',//数量
Money: 0.0, Money: 0.0,
Sex: 1,//1男2女
SurName: '',//姓
Name: '',//名
Remark: '', Remark: '',
AirportId: '', MailingState: '',//邮寄状态 1自取 2邮寄
AirportTerminal: '',//航厦 MailingAddress: '',//MailingState =2 填写邮寄
AirLine: '',//航空公司名称 MailingMoney: null,
FlightNumber: '',//航班号 SelffetchAddress: '',//自取地址
FlightTime: '',//航班时间 UseDate:'',//门票日期
GetonAddress: '',//上车点 Name:'',
GetoffAddress: '',//下车点 EName:'',
ManNum: null,//成人数 Sex: 1,//1男2女
ChildNum: null,//儿童数 Birthday: '',
BabyNum: null,//婴儿数 Mobile:'',
HandLuggageNum: null,//手提行李数量 CouponsId:'',//景点id
RegisteredLuggageNum: null,//托运行李数量 DetailList:[],
ContactWay: '',//联络方式 WeChat
Mobile:'',//电话
ProductId: '',
CarId: '',//产品类型ID
OrderSource: 1,//类型 0 来源B2B 1 来源B2C OrderSource: 1,//类型 0 来源B2B 1 来源B2C
}, },
flightTime: null,//航班起飞抵达时间 flightTime: null,//航班起飞抵达时间
...@@ -654,7 +412,7 @@ ...@@ -654,7 +412,7 @@
created() {}, created() {},
mounted() { mounted() {
if(this.checkParamsHandler()){ if(this.checkParamsHandler()){
this.getCarData() this.getData()
} }
this.initGuestHandler(); this.initGuestHandler();
...@@ -662,24 +420,21 @@ ...@@ -662,24 +420,21 @@
}, },
methods: { methods: {
// 获取商品详情 // 获取商品详情
getCarData() { getData() {
this.$q.loading.show(); this.$q.loading.show();
this.apipost( this.apipost(
"b2c_get_GetCarSingleProductDetail", "b2c_get_GetTicketCouponsDetail",
{ ProductId: this.parameters.ProductId }, { CouponsId: this.parameters.CouponsId },
(r) => { (r) => {
if (r.data.resultCode == 1) { if (r.data.resultCode == 1) {
this.details = r.data.data; this.details = r.data.data;
this.CarObj = this.details.CarTypeList.find((x) => this.OrderDate.CarId == x.Id); if(this.parameters.MailingState==1){
this.onCarObj = this.details.PlaceList.find((x) => this.OrderDate.onCarId == x.Id)//上车范围 this.parameters.SelffetchAddress = this.details.SelffetchAddress
this.unCarObj = this.details.PlaceList.find((x) => this.OrderDate.unCarId == x.Id)//下车范围 this.parameters.MailingMoney = null
if(this.details.CarType!=3){ }else{
this.AirportObj = this.details.AirportList.find((x) => this.OrderDate.AirportId == x.Id); this.parameters.MailingMoney = this.OrderDate.MailingMoney
this.parameters.AirportId = this.OrderDate.AirportId this.parameters.SelffetchAddress = ''
this.parameters.FlightTime = this.OrderDate.startDate
} }
this.parameters.CarId = this.OrderDate.CarId
this.parameters.OrderType = this.details.CarType
} else { } else {
this.$q.notify({ this.$q.notify({
type: "negative", type: "negative",
...@@ -704,13 +459,25 @@ ...@@ -704,13 +459,25 @@
if (this.order) { if (this.order) {
this.orderKey = key; this.orderKey = key;
this.OrderDate = this.order.order this.OrderDate = this.order.order
this.chosenObj = this.OrderDate.orderInfo; this.parameters.CouponsId = this.order.order.CouponsId
this.parameters.ProductId = this.order.order.Id this.parameters.MailingState = this.OrderDate.MailingState
this.parameters.OrderDate = this.OrderDate.startDate this.parameters.UseDate = this.OrderDate.startDate
this.getBusTimeDate = this.OrderDate.startDate this.getBusTimeDate = this.OrderDate.startDate
this.parameters.Unit_Price = this.OrderDate.originalB2CPrice
this.parameters.Num = this.chosenObj.Count
this.parameters.Money = this.OrderDate.sumPrice this.parameters.Money = this.OrderDate.sumPrice
this.optionObj = this.OrderDate.TicketList
this.parameters.DetailList = []
this.optionObj.forEach(x=>{
if(x.checked){
let y = {
TicketName: x.TicketName,
Unit_Price: x.originalB2CPrice,
Num: x.Count,
Money: x.originalB2CPrice*x.Count,
TicketId: x.Id
}
this.parameters.DetailList.push(y)
}
})
} }
} }
} }
...@@ -729,25 +496,8 @@ ...@@ -729,25 +496,8 @@
this.$refs.SurName.validate() this.$refs.SurName.validate()
this.$refs.Name.validate() this.$refs.Name.validate()
this.$refs.ContactWay.validate()
this.$refs.Mobile.validate() this.$refs.Mobile.validate()
this.$refs.OrderDate.validate() console.log(this.parameters,'----')
this.$refs.ManNum.validate()
if(this.details.CarType!=3){
this.$refs.AirportTerminal.validate()
this.$refs.AirLine.validate()
this.$refs.FlightNumber.validate()
this.$refs.FlightTime.validate()
if(this.details.CarType!=1){
this.$refs.GetonAddress.validate()
}else{
this.$refs.GetoffAddress.validate()
}
}else{
this.$refs.GetonAddress.validate()
this.$refs.GetoffAddress.validate()
}
let flag = true let flag = true
flag = await this.formValidateHandler('baseUserInfo') flag = await this.formValidateHandler('baseUserInfo')
if(!flag){ if(!flag){
...@@ -765,7 +515,7 @@ ...@@ -765,7 +515,7 @@
SetCarOrder(){ SetCarOrder(){
this.loading = true this.loading = true
this.apipost( this.apipost(
"CarSingle_post_SetTYCarOrder", "ticket_post_SetTicketOrder",
this.parameters, this.parameters,
(r) => { (r) => {
// this.$refs.myform.resetValidation() // this.$refs.myform.resetValidation()
...@@ -792,15 +542,15 @@ ...@@ -792,15 +542,15 @@
this.apipost( this.apipost(
"AddOrderInfo_post", "AddOrderInfo_post",
{ {
SurName: this.parameters.SurName, SurName: this.parameters.Name,
Name: this.parameters.Name, Name: '',
ContactNumber: this.parameters.Mobile,// 联系电话 ContactNumber: this.parameters.Mobile,// 联系电话
Mailbox: this.userInfo.Mailbox,//邮箱 Mailbox: this.userInfo.Mailbox,//邮箱
GoodsId: this.parameters.ProductId,//商品id GoodsId: this.parameters.CouponsId,//商品id
GoodsName: this.details.Name,//商品名称 GoodsName: this.details.Name,//商品名称
GoodsPic: this.details.ImageList[0],//商品图片 GoodsPic: this.details.PicPathList[0],//商品图片
GoodsType: GoodsType,//商品类型(见枚举) 12包车 13 接机 14送机 GoodsType: 4,
OrderMake: this.parameters.OrderDate,//订单摘要(例如出行时间) OrderMake: this.parameters.UseDate,//订单摘要(例如出行时间)
TotalPrice: this.parameters.Money,//总价格 TotalPrice: this.parameters.Money,//总价格
PreferentialPrice: 0,// 优惠总金额 PreferentialPrice: 0,// 优惠总金额
ErpOrderId: ErpOrderId,//erp订单id ErpOrderId: ErpOrderId,//erp订单id
...@@ -846,10 +596,10 @@ ...@@ -846,10 +596,10 @@
this.parameters.FlightTime = this.OrderDate.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.OrderDate.startDate+' '+this.getBusTime this.parameters.UseDate = this.OrderDate.startDate+' '+this.getBusTime
this.$refs.qDateProxy2.hide() this.$refs.qDateProxy2.hide()
}else if(type==3){ }else if(type==3){
this.parameters.OrderDate = this.OrderDate.startDate+' '+this.getBusTime this.parameters.UseDate = this.OrderDate.startDate+' '+this.getBusTime
} }
}, },
...@@ -862,9 +612,9 @@ ...@@ -862,9 +612,9 @@
// 地图上选址 // 地图上选址
getAddress(type){ getAddress(type){
if(type==1){ if(type==1){
this.AddressObj = this.onCarObj this.AddressObj = this.onoptionObj
}else{ }else{
this.AddressObj = this.unCarObj this.AddressObj = this.unoptionObj
} }
this.isShowDialog = true this.isShowDialog = true
}, },
......
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