Commit af6deef2 authored by 罗超's avatar 罗超

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

# Conflicts:
#	src/pages/ScenicSpotTicket/details.vue
parents cbd1d523 c24a09f0
......@@ -33,7 +33,8 @@
"vuelidate": "^0.7.7"
},
"devDependencies": {
"@quasar/app": "^1.0.0"
"@quasar/app": "^1.0.0",
"webpack-dev-server": "^4.12.0"
},
"engines": {
"node": ">= 10.18.1",
......
......@@ -55,6 +55,7 @@ export default {
},
watch: {
value: function() {
console.log('switch change', this.value)
this.inputSelect = this.value
}
},
......
......@@ -151,10 +151,11 @@ export default {
this.p = n;
if(n&&n.startDate){
this.chosenObj.startDate = n.startDate;
console.log(this.chosenObj.startDate,this.dataAll,'===')
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.selectedCarObj = this.dataList.CarTypeList[0]
if(arr.length>0){
this.TicketIds = arr[0].Price.map(x=> {return x.TicketId})
}
}
this.calcMoney()
......@@ -170,6 +171,14 @@ export default {
deep: true,
immediate: true
},
Month:{
handler(n, o) {
this.selectedCarObj = this.dataList.CarTypeList[0]
// this.getCarPriceData2()
},
deep: true,
immediate: true
}
},
data() {
return {
......@@ -189,7 +198,7 @@ export default {
if(this.p.startDate){
this.chosenObj.startDate = this.p.startDate;
this.calcMoney()
this.getCarPriceData2()
// this.getCarPriceData2()
}
this.getCarPriceData()
},
......@@ -312,13 +321,11 @@ export default {
remark: "",
};
},
resetHandler(type) {
if(type&&type!=1){
this.selectedCarObj = null
this.selectedAirportObj = null
this.onCarObj = null
this.unCarObj = null
}
resetHandler() {
this.selectedCarObj = null
this.selectedAirportObj = null
this.onCarObj = null
this.unCarObj = null
setTimeout(()=>{
this.p = {};
this.initModel()
......
<<<<<<< HEAD
=======
>>>>>>> c020ad40be0c4ddc009c7e515bf5c6c1ac25638c
<style scoped>
.header-box {
max-width: 1200px;
......@@ -107,6 +103,9 @@
.address-btn {
margin: 0 10px 0 44px;
}
.address-btn:hover {
background: #F5F5F5;
}
.all-type {
margin-left: 10px;
}
......@@ -134,7 +133,8 @@
font-weight: 400;
}
.category-l2:hover {
background-color: #eee;
background: #ee4454;
color: #fff;
}
.category-l2-select {
background: #ee4454;
......@@ -162,6 +162,10 @@
.category-btn {
width: 100px;
}
.category-icon {
width: 16px;
height: 16px;
}
</style>
<template>
<div>
......@@ -286,6 +290,7 @@
:key="i"
v-for="(x, i) in dataList.CategoryList"
>
<img class="category-icon" :src="require(`../../assets/img/home/${['guanguang','jindian','hotel','car'][i]}.png`)"/>
{{ x.CategoryName }}
</div>
</div>
......
......@@ -473,6 +473,7 @@ export default {
// },
chosenSortHandler(x) {
this.msg.orderBy = x.value;
this.msg.pageIndex = 1
this.goSearchHandler();
},
getChoseAddressCity() {
......
......@@ -122,10 +122,10 @@ export default {
},
methods: {
init() {
this.createChosenDateHandler();
let startDate = this.prices.length>0&&this.prices[0].startDate?this.prices[0].startDate:''
let firstMonth = date.formatDate(
new Date(this.prices[0].startDate),
new Date(startDate),
"YYYY/MM"
);
console.log(firstMonth)
......@@ -150,6 +150,8 @@ export default {
},
changeShowMonthHandler(i) {
this.currentMonth += i;
let value = this.months[this.currentMonth].value
this.$emit('getQuotationData',value)
this.changeMonthHandler();
},
changeMonthHandler() {
......
......@@ -521,13 +521,6 @@
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-primary">
CNY {{ moneyFormat(sumPrice, 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
......@@ -538,10 +531,17 @@
</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" />
<div class="row q-mb-sm items-center">
<div class="col">總金額</div>
<div class="text-subtitle2 text-weight-bolder text-primary">
CNY {{ moneyFormat(sumPrice, 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" v-if="chosenObj.Count>0">
<div class="col">支付金額</div>
<div class="text-h6 text-weight-bolder text-primary product-price">{{details.CurrencyCode}} {{ moneyFormat(parameters.Money,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">
......
<template>
<div style="min-height: 80vh">
<div
style="
position: fixed;
......@@ -28,10 +29,7 @@
class="col product-price text-subtitle1 text-weight-bold"
style="text-align: left"
>
<span v-if="priceList && priceList.length"
>{{ dataList.CurrencyCode }}
{{ moneyFormat(priceList[0].originalB2CPrice, 0) }}</span
>
<span v-if="priceList&&priceList.length">CNY {{ moneyFormat(priceList[0].originalB2CPrice, 0) }}</span>
<span class="q-ml-sm f12 text-grey-7"></span>
</span>
<q-btn
......@@ -60,91 +58,63 @@
class="cursor-pointer"
@click="CommonJump('/index', {})"
/>
<q-breadcrumbs-el
:label="dataList.CountryName"
class="cursor-pointer"
/>
<q-breadcrumbs-el label="日本" class="cursor-pointer" />
<q-breadcrumbs-el>
<span v-for="(x, i) in citys" :key="i">
<span class="cursor-pointer">{{ x }} </span>
<span v-if="i + 1 != citys.length" class="q-mr-sm"></span>
</span>
</q-breadcrumbs-el>
<q-breadcrumbs-el
v-if="$q.platform.is.desktop"
:label="dataList.Name"
:label="dataList.title"
class="text-grey-6 ellipsis"
/>
</q-breadcrumbs>
<div class="text-grey-6 f12">Product No. # {{ dataList.ID }}</div>
<div class="text-grey-6 f12">Product No. # {{ dataList.id }}</div>
</div>
<div class="relative">
<div class="row rounded-borders" style="height: 35vh">
<div class="col">
<q-img
:src="dataList.imgCover[0]"
spinner-color="dark"
spinner-size="20px"
class="rounded-borders"
height="35vh"
/>
</div>
<div
class="q-ml-sm column"
v-if="dataList.imgCover.length > 1"
:style="{ width: dataList.imgCover.length < 3 ? '30%' : '20%' }"
<div style="padding-bottom: calc((100% - 0px) / 3); position: relative">
<div
style="position: absolute; left: 0; top: 0; right: 0; bottom: 0"
class="overflow-hidden rounded-borders"
>
<slider
ref="slider"
:options="options"
@slide="slideHandler"
style="height: 100%"
>
<div class="col rounded-borders overflow-hidden">
<q-img
:src="dataList.imgCover[1]"
spinner-color="dark"
spinner-size="20px"
class="rounded-borders"
height="100%"
/>
</div>
<div
v-if="dataList.imgCover.length >= 3"
class="col q-mt-sm rounded-borders overflow-hidden"
<slideritem
v-if="dataList.videoStr"
style="width: 80%"
class="q-mx-sm"
key="video"
>
<q-img
:src="dataList.imgCover[2]"
spinner-color="dark"
spinner-size="20px"
class=""
height="100%"
<vue-core-video-players
ref="video"
:src="dataList.videoStr"
:title="dataList.title"
:muted="true"
:autoplay="false"
@play="playHandler"
@pause="pauseHandler"
@seeked="seekedChangeHandler"
@timeupdate="timeChangeHandler"
logo="../statics/img/transparent_logo.png"
:loop="false"
id="trip_video"
/>
</div>
</div>
<div
class="q-ml-sm column"
v-if="dataList.imgCover.length > 3"
style="width: 20%"
>
<div class="col rounded-borders overflow-hidden">
<q-img
:src="dataList.imgCover[3]"
spinner-color="dark"
spinner-size="20px"
class="rounded-borders"
height="100%"
/>
</div>
<div
v-if="dataList.imgCover.length >= 5"
class="col q-mt-sm rounded-borders overflow-hidden"
</slideritem>
<slideritem
v-for="(item, index) in dataList.imgCover"
:key="index"
style="width: 80%"
class="q-mx-sm"
>
<q-img
:src="dataList.imgCover[4]"
spinner-color="dark"
spinner-size="20px"
class=""
height="100%"
/>
</div>
</div>
</div>
<div
class="absolute q-py-sm q-px-md row items-center text-white rounded-borders cursor-pointer light-shadow"
style="bottom: 20px; right: 20px; background: rgba(0, 0, 0, 0.5)"
@click="showPreview(dataList.imgCover, 0)"
>
<q-icon name="iconfont iconimage" size="16px"></q-icon>
<span class="q-ml-sm">查看照片</span>
<q-img :src="item" spinner-color="grey" spinner-size="20px" />
</slideritem>
<div slot="loading">loading...</div>
</slider>
</div>
</div>
<div
......@@ -161,7 +131,13 @@
size="16px"
class="q-mr-sm"
/>
<span>{{ dataList.SelffetchAddress }} </span>
<span
>{{dataList.CountryName}} -
<span>
<span class="cursor-pointer">{{dataList.CityName}}</span>
</span>
</span>
</div>
<div class="q-mt-md row">
<q-chip
......@@ -170,12 +146,11 @@
icon="iconfont iconOwner-1"
label=" 印象自組團"
/>
<q-chip
class="transparent q-mr-xl no-padding"
<q-chip
class="transparent q-mr-xl no-padding"
square
icon="iconfont icontime"
label="行程時間 1 天"
/>
icon="iconfont icontime"
label="行程時間 1 天" />
<q-chip
class="transparent q-mr-xl no-padding"
square
......@@ -193,16 +168,9 @@
$q.platform.is.mobile,
}"
>
<div
class="text-h6 text-right"
v-if="priceList && priceList.length > 0"
>
<div class="product-price text-h6" v-if="priceList&&priceList.length>0">
<!-- CNY:{{ dataList. }} -->
<span class="text-subtitle2"
>{{
dataList.CurrencyCode ? dataList.CurrencyCode : "CNY"
}}</span
>{{ moneyFormat(priceList[0].originalB2CPrice, 0) }}
CNY {{ moneyFormat(priceList[0].originalB2CPrice, 0) }}
<span class="f12 text-grey-6"></span>
</div>
<div v-else class="text-subtitle1 text-grey-6">暫無報價</div>
......@@ -210,7 +178,7 @@
color="primary"
label="選擇方案"
unelevated
:disable="priceList.length > 0 ? false : true"
:disable="priceList.length>0?false:true"
@click="goScrollHandler(priceListHeight)"
:class="{ 'q-mt-md full-width': $q.platform.is.desktop }"
/>
......@@ -274,132 +242,141 @@
style="max-width: 1200px; margin-left: auto; margin-right: auto"
>
<div class="text-h6">選擇方案</div>
<div
class="rounded-borders bg-white q-pa-md q-mt-md"
v-if="$q.platform.is.mobile"
>
<q-field
class="q-mt-md"
stack-label
label="選擇日期、選項"
standout
dense
<div
class="rounded-borders bg-white q-pa-md q-mt-md"
v-if="$q.platform.is.mobile"
>
<div class="self-center full-width no-outline" tabindex="0">
{{ currentPrice.startDate }}
</div>
<q-popup-proxy ref="qDateProxy">
<calendar
class="bg-white q-pa-md"
:priceList="priceList"
@change="changeChosenDateHandler"
ref="calendar"
></calendar>
</q-popup-proxy>
</q-field>
<order-preview
:dataList="dataList"
:configId="msg.configId"
:Month="currentYM.str"
:price="currentPrice"
@reset="resetHandler"
@getPriceList="getPriceList"
></order-preview>
</div>
<!--方案选择区 -->
<div class="text-h6 q-pt-lg" v-if="$q.platform.is.mobile">
所選方案詳情
</div>
<div
class="bg-white rounded-borders q-mt-md"
v-if="priceList && priceList.length > 0"
>
<div class="q-pa-md row">
<div class="col">
<div
class="text-subtitle1 text-weight-bold row items-center"
v-if="$q.platform.is.desktop"
>
<span class="q-mr-md">产品门票方案</span></span>
<q-chip
square
color="orange"
size="sm"
text-color="grey-2"
class="text-light"
label="不可取消"
/>
<q-field
class="q-mt-md"
stack-label
label="選擇日期、選項"
standout
dense
>
<div class="self-center full-width no-outline" tabindex="0">
{{ currentPrice.startDate }}
</div>
<!-- <div class="text-grey f12">
<q-popup-proxy ref="qDateProxy">
<calendar
class="bg-white q-pa-md"
:priceList="priceList"
@change="changeChosenDateHandler"
@getQuotationData="getCarPriceData"
ref="calendar"
></calendar>
</q-popup-proxy>
</q-field>
<order-preview
:dataList="dataList"
:configId="msg.configId"
:Month="currentYM.str"
:price="currentPrice"
@reset="resetHandler"
@getPriceList="getPriceList"
ref="orderPreview"
></order-preview>
</div>
<!--方案选择区 -->
<div class="text-h6 q-pt-lg" v-if="$q.platform.is.mobile">
所選方案詳情
</div>
<!-- v-if="priceList && priceList.length > 0" -->
<div
class="bg-white rounded-borders q-mt-md"
>
<div class="q-pa-md row">
<div class="col">
<div
class="text-subtitle1 text-weight-bold row items-center"
v-if="$q.platform.is.desktop"
>
<span class="q-mr-md">行程標準出行方案</span>
<q-chip
square
color="orange"
size="sm"
text-color="grey-2"
class="text-light"
label="不可取消"
/>
</div>
<!-- <div class="text-grey f12">
<ul class="q-pl-md no-margin">
<li v-for="(x, i) in warnBuy" :class="{'q-mt-md':$q.platform.is.desktop|(i!=0&&$q.platform.is.mobile)}" :key="i">
{{ x }}
</li>
</ul>
</div> -->
</div>
<div class="" v-if="$q.platform.is.desktop">
<div class="row items-center">
<span class="product-price text-h6 q-mr-md"
>{{ dataList.CurrencyCode ? dataList.CurrencyCode : "CNY" }}
{{ moneyFormat(priceList[0].originalB2CPrice, 0) }}</span
>
<q-btn
color="primary"
outline
:label="showOrderPreview ? '取消選擇' : '選擇'"
@click="changeShowOrderPreviewHandler"
class="q-px-lg"
/>
</div>
<div class="text-info q-mt-md text-right">
最早可預訂日期:{{ priceList[0].startDate }}
<div class="" v-if="$q.platform.is.desktop">
<div class="row items-center">
<span class="product-price text-h6 q-mr-md"
v-if="priceList.length>0&&priceList[0].originalB2CPrice>0">CNY
{{
moneyFormat(priceList[0].originalB2CPrice, 0)
}}</span
>
<span class="col"></span>
<q-btn
color="primary"
outline
:label="showOrderPreview ? '取消選擇' : '選擇'"
@click="changeShowOrderPreviewHandler"
class="q-px-lg"
/>
</div>
<div class="text-info q-mt-md text-right" v-if="priceList.length>0">
最早可預訂日期:{{ priceList[0].startDate }}
</div>
</div>
</div>
</div>
<div
class="q-pa-md"
style="border-top: 1px solid #eee"
v-if="showOrderPreview"
>
<div class="q-pa-md bg-grey-2 row items-center rounded-borders">
<div class="text-subtitle2 text-weight-bold q-mr-xl">
關於此方案
</div>
<q-chip
class="transparent q-mr-xl no-padding"
square
icon="iconfont iconquxiao"
label="不可取消"
/>
<q-chip
class="transparent q-mr-xl no-padding"
square
icon="iconfont iconroundcheck"
label="6個工作日內(不含例休假)確認"
/>
</div>
<div class="q-mt-lg row" v-if="$q.platform.is.desktop">
<div class="col">
<calendar
:priceList="priceList"
@change="changeChosenDateHandler"
ref="calendar"
></calendar>
</div>
<div class="col q-ml-xl">
<order-preview
:dataList="dataList"
:configId="msg.configId"
:Month="currentYM.str"
:price="currentPrice"
@reset="resetHandler"
@getPriceList="getPriceList"
></order-preview>
<div
class="q-pa-md"
style="border-top: 1px solid #eee"
v-if="showOrderPreview"
>
<div class="q-pa-md bg-grey-2 row items-center rounded-borders">
<div class="text-subtitle2 text-weight-bold q-mr-xl">
關於此方案
</div>
<q-chip
class="transparent q-mr-xl no-padding"
square
icon="iconfont iconquxiao"
label="不可取消"
/>
<q-chip
class="transparent q-mr-xl no-padding"
square
icon="iconfont iconroundcheck"
label="6個工作日內(不含例休假)確認"
/>
</div>
<div class="q-mt-lg row" v-if="$q.platform.is.desktop">
<div class="col">
<calendar
:priceList="priceList"
@change="changeChosenDateHandler"
@getQuotationData="getCarPriceData"
ref="calendar"
></calendar>
</div>
<div class="col q-ml-xl">
<order-preview
:dataList="dataList"
:configId="msg.configId"
:Month="currentYM.str"
:price="currentPrice"
@reset="resetHandler"
@getPriceList="getPriceList"
ref="orderPreview"
></order-preview>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
......@@ -412,15 +389,9 @@
<div
:class="{ 'col-8': $q.platform.is.desktop, col: $q.platform.is.mobile }"
>
<div
ref="product"
class="text-h5 text-weight-bold text-left q-mt-xl"
:class="{
'q-px-md': $q.screen.width < 1220 && $q.platform.is.mobile,
}"
>
產品介紹
</div>
<div ref="product" class="text-h5 text-weight-bold text-left q-mt-xl" :class="{
'q-px-md': $q.screen.width < 1220 && $q.platform.is.mobile,
}">產品介紹</div>
<div
class="q-mt-md"
ref="diyContext"
......@@ -433,49 +404,20 @@
'q-px-md': $q.screen.width < 1220 && $q.platform.is.mobile,
}"
>
<div v-if="dataList.OpeningHours" class="row">
<span>开放时间</span>
<div>
{{ dataList.OpeningHours }}
{{ dataList.OpeningHours.substring(6, 13) }} 停止入场
</div>
<div v-if="dataList.OpeningHours" class="row"><span>开放时间</span><div>{{dataList.OpeningHours}} {{dataList.OpeningHours.substring(6,13)}} 停止入场</div></div>
<div v-if="dataList.GeographicTag||dataList.ScenicSpotTag" class="row"><span>景区特色</span>
<div>
<q-chip v-if="dataList.GeographicTag" size="14px" clickable v-for="(s,i) in dataList.GeographicTag.split(',')" :key="i"
text-color="white"
color="primary" square>{{ s }}</q-chip>
<q-chip v-if="dataList.ScenicSpotTag" size="14px" clickable v-for="(s,i) in dataList.ScenicSpotTag.split(',')" :key="i"
text-color="dark"
color="grey-3" square>{{ s }}</q-chip>
</div>
<div
v-if="dataList.GeographicTag || dataList.ScenicSpotTag"
class="row"
>
<span>景区特色</span>
<div>
<q-chip
v-if="dataList.GeographicTag"
size="14px"
clickable
v-for="(s, i) in dataList.GeographicTag.split(',')"
:key="i"
text-color="white"
color="primary"
square
>{{ s }}</q-chip
>
<q-chip
v-if="dataList.ScenicSpotTag"
size="14px"
clickable
v-for="(s, i) in dataList.ScenicSpotTag.split(',')"
:key="i"
text-color="dark"
color="grey-3"
square
>{{ s }}</q-chip
>
</div>
</div>
<div v-if="dataList.TrafficInfo" class="row">
<span>交通说明</span>
<div>{{ dataList.TrafficInfo ? dataList.TrafficInfo : "-" }}</div>
</div>
<div v-if="dataList.TrafficInfo" class="row"><span>交通说明</span><div>{{dataList.TrafficInfo?dataList.TrafficInfo:'-'}}</div></div>
</div>
<div
class="text-h5 text-weight-bold text-left q-mt-xl"
ref="warning"
......@@ -511,27 +453,15 @@
style="border: 1px dashed var(--q-color-warning)"
:class="{
'q-mx-md': $q.screen.width < 1220 && $q.platform.is.mobile,
}"
>
<div
class="q-pa-md"
style="border-bottom: 1px dashed var(--q-color-warning)"
>
<div class="text-weight-bold text-h6">
地點名稱:{{ dataList.Name }}
</div>
<div class="text-grey-9">地址:{{ `${dataList.Address}` }}</div>
}">
<div class="q-pa-md" style="border-bottom: 1px dashed var(--q-color-warning)">
<div class="text-weight-bold text-h6">地點名稱:{{dataList.Name}}</div>
<div class="text-grey-9">地址:{{`${dataList.Address}`}}</div>
</div>
<div
class="q-pa-md"
:class="{
'q-mx-md': $q.screen.width < 1220 && $q.platform.is.mobile,
}"
>
<componentsMap
v-if="AddressObj.Lng && AddressObj.Lat"
:AddressObj="AddressObj"
/>
<div class="q-pa-md" :class="{
'q-mx-md': $q.screen.width < 1220 && $q.platform.is.mobile,
}">
<componentsMap v-if="AddressObj.Lng&&AddressObj.Lat" :AddressObj="AddressObj"/>
<div v-else class="card text-center">经纬度未知</div>
</div>
</div>
......@@ -548,7 +478,9 @@
class="q-mt-lg trip-text bg-white q-pa-md rounded-borders q-mb-xl"
style="border: 1px dashed var(--q-color-info)"
v-html="
dataList.About ? dataList.About || '暂无溫馨提示' : '暂无溫馨提示'
dataList.About
? dataList.About || '暂无溫馨提示'
: '暂无溫馨提示'
"
:class="{
'q-mx-md': $q.screen.width < 1220 && $q.platform.is.mobile,
......@@ -589,6 +521,7 @@
</div>
<template v-if="$q.platform.is.desktop">
<div class="col-1"></div>
<div class="col q-ml-xl position-relative">
<div style="position: sticky; top: 100px">
......@@ -630,7 +563,7 @@ export default {
return {
AddressObj: null,
priceList: [],
selectedId: "",
selectedId: '',
currentYM: { year: 2023, month: 2, str: "2023-02" }, // 当前年月
isCurrent: false,
isLast: false,
......@@ -768,13 +701,13 @@ export default {
},
mounted() {
window.addEventListener("scroll", this.handleScroll);
const timeStamp = Date.now();
const formattedString = date.formatDate(timeStamp, "YYYY-MM");
const timeStamp = Date.now()
const formattedString = date.formatDate(timeStamp, 'YYYY-MM')
this.currentYM = {
year: date.formatDate(timeStamp, "YYYY"),
month: date.formatDate(timeStamp, "MM"),
str: formattedString,
};
year: date.formatDate(timeStamp, 'YYYY'),
month: date.formatDate(timeStamp, 'MM'),
str: formattedString
}
if (localStorage.baseifo) {
this.TripConfig = JSON.parse(window.localStorage.getItem("baseifo"));
}
......@@ -782,14 +715,14 @@ export default {
this.getData();
},
methods: {
changeShowOrderPreviewHandler() {
this.showOrderPreview = !this.showOrderPreview;
if (!this.showOrderPreview) {
this.changeTripShowHandler();
changeShowOrderPreviewHandler(){
this.showOrderPreview=!this.showOrderPreview
if(!this.showOrderPreview){
this.changeTripShowHandler()
}
this.dataList.TicketList.forEach((x) => {
x.checked = false;
});
this.dataList.TicketList.forEach(x=>{
x.checked = false
})
},
changeTripShowHandler() {
this.$nextTick(() => {
......@@ -801,12 +734,12 @@ export default {
});
});
},
getPriceList(Arr, id) {
this.priceList = JSON.parse(Arr);
if (this.selectedId === id) {
this.selectedId = "";
getPriceList(Arr,id){
this.priceList = JSON.parse(Arr)
if(this.selectedId === id) {
this.selectedId = ''
} else {
this.selectedId = id;
this.selectedId = id
}
},
getTopNum(x) {
......@@ -843,7 +776,7 @@ export default {
window.removeEventListener("scroll", this.handleScroll);
}
},
getScroll() {
return {
left:
......@@ -883,26 +816,18 @@ export default {
},
resetHandler() {
this.currentPrice.startDate = "";
if (!this.$q.platform.is.mobile) {
if(!this.$q.platform.is.mobile){
this.$refs.calendar.reset();
}
},
changeChosenDateHandler(val) {
val.price.version = new Date().getTime();
this.currentPrice = JSON.parse(JSON.stringify(val.price));
if (this.$q.platform.is.mobile) {
if(this.$q.platform.is.mobile){
this.$refs.qDateProxy.hide();
}
},
showPreview(images, index = 0) {
this.$viewerApi({
options: {
initialViewIndex: index,
},
images,
});
},
showDialog() {
this.isShowDialog = true;
},
......@@ -919,21 +844,17 @@ export default {
(r) => {
if (r.data.resultCode == 1) {
let addList = function (arr) {
arr.forEach((item) => {
item.checked = false;
item.Count = 1;
});
arr.forEach(item => {
item.checked = false
item.Count = 1
});
};
addList(r.data.data.TicketList);
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.AddressObj = this.dataList;
this.AddressObj.Address = `${
this.dataList.CountryName ? this.dataList.CountryName + "-" : ""
}${this.dataList.CityName ? this.dataList.CityName + "-" : ""}${
this.dataList.ProvinceName ? this.dataList.ProvinceName + "-" : ""
}${this.dataList.Address}`;
this.AddressObj = this.dataList
this.AddressObj.Address = `${this.dataList.CountryName?this.dataList.CountryName+'-':''}${this.dataList.CityName?this.dataList.CityName+'-':''}${this.dataList.ProvinceName?this.dataList.ProvinceName+'-':''}${this.dataList.Address}`
this.isShow = true;
if (this.dataList.videoStr && this.dataList.videoStr != "") {
this.options.loop = false;
......@@ -949,13 +870,11 @@ export default {
});
}
this.$nextTick(() => {
this.getCarPriceData();
this.getCarPriceData()
setTimeout(() => {
this.navs.forEach((x) => {
x.top =
this.$refs[x.val].getBoundingClientRect().top +
this.currentHeight -
60;
this.$refs[x.val].getBoundingClientRect().top + this.currentHeight - 60;
});
this.priceListHeight =
this.$refs.pricelist.getBoundingClientRect().top +
......@@ -972,6 +891,7 @@ export default {
// console.log('异常信息', error)
}
});
} else {
this.$q.notify({
type: "negative",
......@@ -985,46 +905,43 @@ export default {
);
},
// 获取报价的详情
getCarPriceData() {
this.priceList = [];
getCarPriceData(time) {
// 日历翻页更新报价
if(time){
this.currentYM.str = time
this.$refs.orderPreview.resetHandler()
}
this.priceList = []
this.apipost(
"b2c_get_GetTicketCouponsMonthPriceAll",
{
CouponsId: this.msg.configId,
{
CouponsId: this.msg.configId,
// TicketId: this.dataList.TicketList[0].Id,
Month: this.currentYM.str,
},
},
(r) => {
if (r.data.resultCode == 1) {
let arr = [];
r.data.data.forEach((x) => {
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 arr = []
r.data.data.forEach(x=>{
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 = {
startDate: x.Date,
originalB2CPrice: x.PriceList[0].Price,
remainNum: 1,
Count: 1,
safeMoney: 0,
MailingMoney: MailingMoneyList[0].MailingMoney,
PriceList: x.PriceList,
};
if (
date.formatDate(Date.now(), "YYYY-MM-DD") != x.Date &&
x.Date > date.formatDate(Date.now(), "YYYY-MM-DD")
) {
arr.push(dataObj);
}
});
this.priceList = JSON.parse(JSON.stringify(arr));
startDate: x.Date,
originalB2CPrice: x.PriceList[0].Price,
remainNum: 1,
Count: 1,
safeMoney: 0,
MailingMoney: MailingMoneyList[0].MailingMoney,
PriceList: x.PriceList,
}
if(date.formatDate(Date.now(), 'YYYY-MM-DD')!=x.Date&&x.Date>date.formatDate(Date.now(), 'YYYY-MM-DD')){
arr.push(dataObj)
}
})
this.priceList = JSON.parse(JSON.stringify(arr))
}
},
null
);
},null)
},
menu() {
this.scroll =
......@@ -1044,21 +961,21 @@ export default {
</script>
<style>
.active-trip-module {
color: var(--q-color-primary);
font-weight: 800;
position: relative;
}
.active-trip-module::before {
position: absolute;
content: " ";
top: 0;
bottom: 0;
left: -25px;
width: 5px;
border-radius: 5px;
background: var(--q-color-primary);
}
.active-trip-module {
color: var(--q-color-primary);
font-weight: 800;
position: relative;
}
.active-trip-module::before {
position: absolute;
content: " ";
top: 0;
bottom: 0;
left: -25px;
width: 5px;
border-radius: 5px;
background: var(--q-color-primary);
}
.slider-item {
transform: scale(1);
transition-timing-function: ease;
......@@ -1206,4 +1123,4 @@ export default {
margin: 20px 0;
border-radius: 10px;
}
</style>
</style>
\ No newline at end of file
......@@ -286,13 +286,8 @@
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-primary">
CNY {{ moneyFormat(sumPrice, 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" v-if="parameters.MailingState==2&&parameters.MailingMoney>0">
<div class="col">邮寄费</div>
<div
......@@ -311,6 +306,13 @@
</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" />
<div class="row q-mb-sm items-center">
<div class="col">總金額</div>
<div class="text-subtitle2 text-weight-bolder text-primary">
CNY {{ moneyFormat(sumPrice, 2) }}
</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">
......
......@@ -173,11 +173,12 @@
<span class="f12 text-grey-6"></span>
</div>
<div v-else class="text-subtitle1 text-grey-6">暫無報價</div>
<!-- :disable="priceList.length>0?false:true" -->
<q-btn
color="primary"
label="選擇方案"
unelevated
:disable="priceList.length>0?false:true"
@click="goScrollHandler(priceListHeight)"
:class="{ 'q-mt-md full-width': $q.platform.is.desktop }"
/>
......@@ -260,6 +261,7 @@
class="bg-white q-pa-md"
:priceList="priceList"
@change="changeChosenDateHandler"
@getQuotationData="getCarPriceData2"
ref="calendar"
></calendar>
</q-popup-proxy>
......@@ -271,6 +273,7 @@
:price="currentPrice"
@reset="resetHandler"
@getPriceList="getPriceList"
ref="orderPreview"
></order-preview>
</div>
......@@ -278,9 +281,9 @@
<div class="text-h6 q-pt-lg" v-if="$q.platform.is.mobile">
所選方案詳情
</div>
<!-- v-if="priceList && priceList.length > 0" -->
<div
class="bg-white rounded-borders q-mt-md"
v-if="priceList && priceList.length > 0"
>
<div class="q-pa-md row">
<div class="col">
......@@ -309,12 +312,13 @@
</div>
<div class="" v-if="$q.platform.is.desktop">
<div class="row items-center">
<span class="product-price text-h6 q-mr-md"
<span v-if="priceList.length>0&&priceList[0].originalB2CPrice > 0" class="product-price text-h6 q-mr-md"
>CNY
{{
moneyFormat(priceList[0].originalB2CPrice, 0)
}}</span
>
<span v-else class="col"></span>
<q-btn
color="primary"
outline
......@@ -323,7 +327,7 @@
class="q-px-lg"
/>
</div>
<div class="text-info q-mt-md text-right">
<div class="text-info q-mt-md text-right" v-if="priceList.length>0">
最早可預訂日期:{{ priceList[0].startDate }}
</div>
</div>
......@@ -356,6 +360,7 @@
<calendar
:priceList="priceList"
@change="changeChosenDateHandler"
@getQuotationData="getCarPriceData2"
ref="calendar"
></calendar>
</div>
......@@ -367,6 +372,7 @@
:price="currentPrice"
@reset="resetHandler"
@getPriceList="getPriceList"
ref="orderPreview"
></order-preview>
</div>
</div>
......@@ -980,7 +986,12 @@ export default {
);
},
// 获取车的详情
getCarPriceData2() {
getCarPriceData2(time) {
// 日历翻页更新报价
if(time){
this.currentYM.str = time
this.$refs.orderPreview.resetHandler()
}
this.priceList = []
this.apipost(
"b2c_get_GetCarSingleProductMonthPrice",
......@@ -1005,9 +1016,19 @@ export default {
if(date.formatDate(Date.now(), 'YYYY-MM-DD')!=x.Date){
arr.push(dataObj)
}
}
})
if(arr.length==0){
let dataObj = {
startDate: this.currentYM.str,
originalB2CPrice: '',
remainNum: 0,
Count: 0,
isSupportChildren: 0,
safeMoney: 0,
}
arr.push(dataObj)
}
this.priceList = JSON.parse(JSON.stringify(arr))
}
......
......@@ -85,7 +85,7 @@
</div>
<div>
<div class="text-right">
<span>CNY:</span>
<span>CNY </span>
<span class="text-h6 q-ml-sm">{{ moneyFormat(item.totalPrice,2) }}</span>
</div>
<div class="q-mt-md text-right" v-if="item.orderStatus==1">
......
......@@ -45,7 +45,7 @@
<div class="text-grey-9">
<!-- <div class="row q-mb-sm" v-if="chosenObj.Count>0&&CarObj">
<div class="col">{{CarObj.CarName}} x {{ chosenObj.Count }}</div>
<div>{{details.CurrencyCode}} {{ moneyFormat(OrderDate.originalB2CPrice,2) }}</div>
<div>CNY {{ moneyFormat(OrderDate.originalB2CPrice,2) }}</div>
</div> -->
<hr
style="border: none;"
......@@ -71,7 +71,7 @@
<!-- <hr style="border:none;" class="bg-transparent q-mb-sm" />
<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(Money,2) }}</div>
<div class="text-h6 text-weight-bolder text-primary product-price">CNY {{ moneyFormat(Money,2) }}</div>
</div> -->
</div>
......
......@@ -26,7 +26,6 @@
min-height: 40px;
}
.title {
margin-top: 20px;
margin-bottom: 10px;
margin-left: 10px;
}
......@@ -113,7 +112,7 @@
<div class="f22 bold">{{form.Id ? '编辑': '添加'}}邮寄地址</div>
<form @submit.prevent.stop="submit" class="q-gutter-md">
<div>
<div :class="$q.platform.is.desktop ? 'row': 'culmuns'">
<div class="q-mt-xl" :class="$q.platform.is.desktop ? 'row': 'culmuns'">
<div class="col">
<div class="title">全名</div>
<q-input
......@@ -171,6 +170,7 @@
v-model="form.Mobile"
outlined
:rules="[(val) => !!val || '请输入手機號碼']"
mask="#" reverse-fill-mask
>
<template v-slot:prepend>
<div class="text-subtitle2">
......@@ -186,7 +186,7 @@
placeholder="城市"
v-model="form.CityName"
outlined
:rules="[(val) => !!val || '请输入電話(首次需驗證)']"
:rules="[(val) => !!val || '请输入城市']"
></q-input>
</div>
</div>
......@@ -205,6 +205,7 @@
<div class="col">
<div class="title">郵政編碼</div>
<q-input
mask="#" reverse-fill-mask
ref="PostalCode"
class="form-item"
placeholder="郵政編碼"
......@@ -214,8 +215,8 @@
></q-input>
</div>
</div>
<div class="flex items-center q-my-sm">
<BaseSwitch v-model="form.IsDefault"></BaseSwitch
<div class="flex items-center q-mb-lg">
<BaseSwitch ref="switch" v-model="form.IsDefault" :value="form.IsDefault"></BaseSwitch
><span class="q-ml-sm">保存為默認地址</span></div>
<div>
<q-btn color="primary" type="submit" unelevated label="保存" />
......@@ -353,6 +354,11 @@ export default {
this.form = {...item};
this.form.AreaCode = Number(this.form.AreaCode)
this.form.IsDefault = this.form.IsDefault === 1
this.$nextTick(() => {
this.$refs.switch.inputSelect = this.form.IsDefault
})
console.log('this.form.IsDefault', this.form.IsDefault)
this.isShowDialog = true;
},
deleteUser(item) {
......
......@@ -148,7 +148,7 @@
<q-btn color="primary" class="q-mt-sm" @click="removeAccount">删除您的帐户及个人数据</q-btn>
</div>
</div>
<q-dialog content-style="width: 900px" v-model="showRemove">
<q-dialog v-model="showRemove">
<removeAccount></removeAccount>
</q-dialog>
</div>
......@@ -272,6 +272,10 @@ export default {
this.form,
(res) => {
if (res.data.resultCode == 1) {
this.form= {
OldPassword: "",
NewPassword: "",
}
// this.$notify(res.data.message);
this.$q.notify({
type: "positive",
......
......@@ -217,7 +217,7 @@ export default {
Appellation: "",
EnName: "",
EnSurname: "",
Country: "",
Country: undefined,
Moblie: "",
},
model: "",
......@@ -297,6 +297,12 @@ export default {
(res) => {
if (res.data.resultCode == 1) {
this.form = res.data.data;
if(!this.form.Country) {
this.form.Country = undefined
}
if(!this.form.Appellation) {
this.form.Appellation = undefined
}
if (this.phoneCountList.length) {
this.changeCountry(this.form.Country);
}
......
......@@ -7,7 +7,7 @@
width: 900px;
}
.title {
margin: 20px 10px 10px 10px;
margin: 0 10px 10px 10px;
}
.card {
margin: 10px;
......@@ -39,10 +39,8 @@
::v-deep .q-field__marginal {
height: 40px;
}
.title {
margin-top: 20px;
margin-bottom: 10px;
margin-left: 10px;
::v-deep .q-field--auto-height .q-field__native {
min-height: 40px;
}
.phone {
margin-left: 100px;
......@@ -77,6 +75,7 @@
.card-info {
height: 20px;
padding: 0 4px;
margin: 0 0 20px 0;
background: #dddddd;
border-radius: 8px;
}
......@@ -87,8 +86,8 @@
<div class="card" v-for="item in pageData" :key="item.id">
<div class="flex card-title justify-between">
<div class="flex">
<span>{{ item.Name }}</span>
<span v-if="$q.platform.is.desktop" class="phone">手機號:{{ item.Mobile }}</span>
<span>{{item.SurName}} {{ item.Name }}</span>
<span v-if="$q.platform.is.desktop" class="phone">手機號:+{{ item.AreaCode }} {{ item.Mobile }}</span>
</div>
<span>
<span class="user-edit" @click="editUser(item)">编辑</span>
......@@ -97,18 +96,18 @@
>
</span>
</div>
<div class="q-pa-sm">
<span class="q-ml-sm" v-if="$q.platform.is.mobile">手機號:{{ item.Mobile }}</span>
<div class="q-pa-sm full-width"
<div class="q-pa-sm q-ml-sm">
<span v-if="$q.platform.is.mobile">手機號:{{ item.Mobile }}</span>
<div :class="$q.platform.is.desktop ? 'row': 'culmuns'">
<div class="col-6 q-py-sm"
:class="{ 'border-b': index < item.CardList.length - 1 }"
v-for="(el, index) in item.CardList"
:key="index"
>
<div :class="$q.platform.is.desktop ? 'row': 'culmuns'">
<div class="col-6">{{ el.TypeName }}</div>
<div class="col-6" :class="$q.platform.is.mobile ? 'q-mt-xs': ''">{{ el.CardNo }}</div>
</div>
<div>{{ el.TypeName }}:{{ el.CardNo }}</div>
</div>
</div>
</div>
</div>
</div>
......@@ -144,7 +143,7 @@
<form @submit.prevent.stop="submit" class="q-gutter-md">
<div>
<div :class="$q.platform.is.desktop ? 'row': 'culmuns'">
<div class="col">
<div class="col q-mt-md">
<div class="title"></div>
<q-input
class="form-item"
......@@ -167,23 +166,23 @@
</div>
<div :class="$q.platform.is.desktop ? 'row': 'culmuns'">
<div class="col">
<div class="title">姓氏(需與旅遊證件一致</div>
<div class="title">姓氏(请输入英文字母</div>
<q-input
class="form-item"
v-model="form.EnName"
outlined
ref="EnName"
:rules="[(val) => !!val || '请输入姓氏(需與旅遊證件一致)']"
:rules="[(val) => !!val || '请输入姓氏(请输入英文字母)']"
></q-input>
</div>
<div class="col">
<div class="title">名字(需與旅遊證件一致</div>
<div class="title">名字(请输入英文字母</div>
<q-input
ref="EnSurName"
class="form-item"
v-model="form.EnSurName"
outlined
:rules="[(val) => !!val || '请输入名字(需與旅遊證件一致)']"
:rules="[(val) => !!val || '请输入名字(请输入英文字母)']"
></q-input>
</div>
</div>
......
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