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