Commit 23086fb6 authored by youjie's avatar youjie

行程首页优化

parent 33c8fc1e
......@@ -6,6 +6,14 @@ class scheduledTripService {
static async GetB2BTravelInfoV1(param:any):Promise<HttpResponse>{
return request('b2b_get_GetB2BTravelInfoV1',param)
}
// 获取线路
static async GetB2BGroupSearchItem(param:any):Promise<HttpResponse>{
return request('b2b_get_GetGroupSearchItem',param)
}
// 获取出发城市
static async GetB2BSite(param:any):Promise<HttpResponse>{
return request('b2b_get_site',param)
}
// 获取分页数据
static async GetB2BTravelPageList(param:any):Promise<HttpResponse>{
return request('b2b_get_GetB2BTravelPageList',param)
......
<template>
<div class="rounded-borders bg-white" :class="{'q-col-gutter-sm':$q.platform.is.desktop}">
<div class="row items-center q-pa-md" :class="{'q-col-gutter-sm':$q.platform.is.desktop}">
<div class="text-subtitle2 q-mr-md">
<span class="text-weight-bold text-primary q-mr-sm">{{
TotalCount
}}</span>
<span>{{$t('v103.scheduledTrip.experiencetrip')}}</span>
</div>
<q-chip
v-for="(x, i) in chosenAddress"
size="13px"
:key="i"
removable
outline
color="grey"
:label="x.Name"
@remove="removeChosen(x,i)"
/>
<div class="row items-center no-wrap justify-between q-pa-md" :class="{'q-col-gutter-sm':$q.platform.is.desktop}">
<div class="col row items-center no-wrap">
<div class="q-mr-md" style="flex-shrink: 0;">
<div class="text-subtitle2">
<span class="text-weight-bold text-primary q-mr-sm">{{
TotalCount
}}</span>
<span>{{$t('v103.scheduledTrip.experiencetrip')}}</span>
</div>
</div>
<div class="col row wrap">
<template v-for="(x, i) in chosenAddress">
<!-- <q-chip
v-if="i==0"
size="13px"
:key="i"
outline
color="grey"
:label="x.Name"
/> -->
<q-chip
v-if="i!=0"
size="13px"
:key="i"
removable
outline
color="grey"
:label="x.Name"
@remove="removeChosen(x,i)"
/>
</template>
</div>
</div>
<div class="q-ml-md">
<q-btn style="width: 60px;" color="primary" unelevated size="sm" :label="$t('query')" @click="setSearchHandler"/>
</div>
</div>
<div
class="row items-center"
......@@ -24,9 +44,25 @@
style="border-top: 1px solid #eee"
>
<span class="f12" v-if="$q.platform.is.desktop">{{$t('v103.scheduledTrip.sort')}}:</span>
<q-chip
<span class="row items-center cursor-pointer rounded-borders q-px-sm q-py-xs q-mr-sm"
:class="{
'bg-grey-3': orderindex != x.value,
'bg-primary': orderindex == x.value,
'text-dark':orderindex != x.value,'text-white':orderindex == x.value
}"
v-for="(x, i) in sortArray"
:key="i"
@click="chosenSortHandler(x.value)">
<q-icon class="q-mr-sm" v-if="i==0" :class="x.icon" size="xs" v-close-popup/>
<span>{{x.label}}</span>
<q-icon v-if="i!=0"
:name="ordertype && orderindex == x.value ? 'keyboard_arrow_up' : 'keyboard_arrow_down'" class="q-ml-sm"
size="20px"
/>
</span>
<!-- <q-chip
square
:icon="x.icon"
class="cursor-pointer"
clickable
:text-color="sortNum != x.value ? 'dark' : 'white'"
......@@ -37,8 +73,9 @@
v-for="(x, i) in sortArray"
:key="i"
@click="chosenSortHandler(x)"
>{{ x.label }}</q-chip
>
>
{{ x.label }}
</q-chip> -->
</div>
</div>
<div class="q-mt-lg">
......@@ -162,10 +199,8 @@
const qNameProxy = ref(null) as any
const { locale, t } = useI18n()
const data = reactive({
searchAdd: {
name: "",
value: 0,
},
ordertype: 0,
orderindex:0,
areaList: [],
chosenAddress: [],
goodsType: [],
......@@ -178,21 +213,46 @@
dataList: [],
sortNum: 1,
sortArray: [
// {
// label: t('v103.scheduledTrip.recommend'),
// value: 1,
// icon: "iconfont icongood",
// },
// {
// label: t('v103.scheduledTrip.ascendingorder'),
// value: 2,
// icon: "iconfont iconmeiyuan",
// },
// {
// label: t('v103.scheduledTrip.descendingorder'),
// value: 3,
// icon: "iconfont iconmeiyuan",
// },
{
label: t('v103.scheduledTrip.recommend'),
value: 1,
value: 0,
icon: "iconfont icongood",
},
{
label: t('v103.scheduledTrip.ascendingorder'),
label: '团期',
value: 1,
icon: "iconfont iconon",
},
{
label: '价格',
value: 2,
icon: "iconfont iconmeiyuan",
},
{
label: t('v103.scheduledTrip.descendingorder'),
label: '销量',
value: 3,
icon: "iconfont iconmeiyuan",
icon: "iconfont icongood",
},
// {
// label: '评论数',
// value: 4,
// icon: "iconfont icongood",
// },
],
TotalCount: 0,
PageCount: 0,
......@@ -203,28 +263,67 @@
data.dateRange = { from: data.msg.startDate, to: data.msg.endDate };
watch(data.msg, (n, o) => {
data.msg.pageIndex = 1
methods.goSearchHandler()
methods.setSearchHandler()
},{deep: true})
watch(search, (n, o) => {
data.chosenAddress = JSON.parse(JSON.stringify(n.chosenAddress))
data.qMsg = JSON.parse(JSON.stringify(n.msg))
data.msg = JSON.parse(JSON.stringify(n.msg))
// methods.goSearchHandler();
},{deep:true})
const methods = {
changeOrderType(i){
if(data.orderindex==i){
data.ordertype=this.ordertype==0?1:0
}else{
data.orderindex=i
data.ordertype=0
}
search.msg.orderByDate = data.orderindex==1?(data.ordertype==0?2:1):0
search.msg.orderByPrice = data.orderindex==2?(data.ordertype==0?2:1):0
search.msg.orderBySales = data.orderindex==3?(data.ordertype==0?2:1):0
// this.loadTeamDataInit()
},
// 删除目的地
removeChosen(x,i) {
search.deleteChosen = JSON.parse(JSON.stringify(x))
data.chosenAddress.splice(i,1)
search.chosenAddress = JSON.parse(JSON.stringify(data.chosenAddress))
if(x.type==1){
search.msg.lineId=0
search.msg.lineTeamId=0
}else if(x.type==2){
search.msg.lineTeamId=0
}else if(x.type==3){
search.msg.startCityId=0
}else if(x.type==4){
search.DayId = 0
search.msg.minTripDay = ""
search.msg.maxTripDay = ""
}else if(x.type==5){
search.datesId = 0
search.msg.startDate = ""
}else if(x.type==6){
search.msg.startDate = ""
search.msg.endDate = ""
}
},
// 排序方式
chosenSortHandler(x) {
data.sortNum = x.value;
data.msg.orderByDate = data.sortNum == 4 ? 1 : data.sortNum == 5 ? 2 : 0;
data.msg.orderByPrice = data.sortNum == 2 ? 1 : data.sortNum == 3 ? 2 : 0;
data.msg.orderByDay = data.sortNum == 6 ? 1 : data.sortNum == 7 ? 2 : 0;
chosenSortHandler(i) {
console.log(i,'----')
if(data.orderindex==i){
data.ordertype=data.ordertype==0?1:0
}else{
data.orderindex=i
data.ordertype=0
}
search.msg.orderByDate = data.orderindex==1?(data.ordertype==0?2:1):0
search.msg.orderByPrice = data.orderindex==2?(data.ordertype==0?2:1):0
search.msg.orderBySales = data.orderindex==3?(data.ordertype==0?2:1):0
methods.setSearchHandler()
// data.sortNum = x.value;
// data.msg.orderByDate = data.sortNum == 4 ? 1 : data.sortNum == 5 ? 2 : 0;
// data.msg.orderByPrice = data.sortNum == 2 ? 1 : data.sortNum == 3 ? 2 : 0;
// data.msg.orderByDay = data.sortNum == 6 ? 1 : data.sortNum == 7 ? 2 : 0;
},
goSearchHandler() {
$q.loading.show();
......@@ -286,6 +385,10 @@
message.errorMsg(e.message)
})
},
setSearchHandler(){
data.msg.pageIndex = 1
methods.goSearchHandler()
},
GotoDetails(item) {
$router.push({
path:`/scheduledTrip/details/${encodeURIComponent(item.id)}/${item.tcid}`
......
This diff is collapsed.
......@@ -67,7 +67,7 @@
}"
>
{{
x.price ? moneyFormat(x.price.originalB2CPrice, 0) : "&nbsp;"
x.price ? x.price.originalB2CPrice : "&nbsp;"
}}
</div>
</div>
......
......@@ -334,7 +334,9 @@ export default defineComponent({
currentImage:'',
showImagePriview: false,
d: props.days,
TitleT: []
})
data.TitleT = [t('v103.details.calendarhtml.d2'), t('v103.details.calendarhtml.d3'), t('v103.details.calendarhtml.d4')]
watch(() => props.days,(n,o) => {
data.d = n;
},{deep: true}
......@@ -356,9 +358,8 @@ export default defineComponent({
y.title = methods.formatTraffice(y.childItem.subTraffic);
y.icon = "iconfont iconjiaotong";
} else if (y.type == 4) {
let t = [t('v103.details.calendarhtml.d2'), t('v103.details.calendarhtml.d3'), t('v103.details.calendarhtml.d4')];
y.childItem.dinnerTypeName =
t[parseInt(y.childItem.useDinnerType) - 1];
y.childItem.dinnerTypeName = data.TitleT[parseInt(y.childItem.useDinnerType) - 1];
}
});
});
......
......@@ -1106,8 +1106,8 @@ export default {
v103: {
scheduledTrip:{
pageTitle: '行程檢索',
screeningtitle: '篩選目的地',
searchinput: '搜尋目的地',
screeningtitle: '篩選關鍵詞',
searchinput: '搜尋關鍵詞',
allcommoditytype: '所有商品類別',
screeningdate: '篩選出發日期',
screeningprice: '價錢篩選',
......
......@@ -6,7 +6,7 @@
:style="{ transform: stickyHeight }">
<div style="max-width: 1200px; margin-left: auto; margin-right: auto" :class="{ 'q-px-md': $q.screen.width < 1220 }" class="q-py-sm row items-center">
<span class="col product-price text-subtitle1 text-weight-bold" style="text-align: left">
<span>CNY {{ moneyFormat(dataList.priceList[0].originalB2CPrice, 0) }}</span>
<span>CNY {{ dataList.priceList[0].originalB2CPrice }}</span>
<span class="q-ml-sm f12 text-grey-7">{{$t('v103.details.since')}}</span>
</span>
<q-btn color="primary" unelevated class="q-px-xl" :label="$t('v103.details.selectionscheme')" @click="goScrollHandler(priceListHeight)" />
......@@ -109,8 +109,7 @@
class="product-price text-h6"
v-if="dataList.priceList.length > 0"
>
<!-- CNY:{{ dataList. }} -->
CNY:{{ moneyFormat(dataList.priceList[0].originalB2CPrice, 0) }}
CNY:{{ dataList.priceList[0].originalB2CPrice }}
<span class="f12 text-grey-6">{{$t('v103.details.since')}}</span>
</div>
<div v-else class="text-subtitle1 text-grey-6">{{$t('v103.details.nooffer')}}</div>
......@@ -169,7 +168,7 @@
</div>
<div class="" v-if="$q.platform.is.desktop">
<div class="row items-center">
<span class="product-price text-h6 q-mr-md">CNY {{ moneyFormat(dataList.priceList[0].originalB2CPrice, 0) }}</span>
<span class="product-price text-h6 q-mr-md">CNY {{ dataList.priceList[0].originalB2CPrice }}</span>
<q-btn color="primary" outline :label="showOrderPreview ? $t('v103.details.deselect') : $t('v103.details.choose')" @click="showOrderPreview = !showOrderPreview" class="q-px-lg" />
</div>
<div class="text-info q-mt-md text-right">{{$t('v103.details.earliest')}}:{{ dataList.priceList[0].startDate }}</div>
......@@ -524,6 +523,7 @@ export default defineComponent({
})
}
}
console.log(data.dataList,'----')
data.dataList.imgCover = JSON.parse(data.dataList.imgCover)
data.dayList = data.dataList.dayList
data.isShow = true
......@@ -582,9 +582,9 @@ export default defineComponent({
})
}, 1000)
})
} else {
message.errorMsg(r.data.message)
}
} else {
message.errorMsg(r.data.message)
}
})
.catch(e => {
......
......@@ -677,6 +677,7 @@
}
.desktop-page{
max-width:1200px;
min-width: 900px;
margin:0 auto;
}
</style>
......@@ -716,10 +717,12 @@ export default defineComponent({
})
const search = reactive({
datesId: 0,
DayId: 0,
chosenAddress: [] as Array<any>,//右边目的地
deleteChosen: null as any,//右侧删除目的地
msg:{
cityId: 0,
cityId: 0,//当前城市id
companyId: 0,
startDate: "", //开始日期
endDate: "", //结束日期
......@@ -727,19 +730,19 @@ export default defineComponent({
lineTeamId: 0, //系列编号
minPrice: "0", //最低价格
maxPrice: "100000", //最高价格
minTripDay: "", //最低行程
minTripDay: "", //最低行程
maxTripDay: "", //最高行程天数
orderByDate: 0,
orderByPrice: 0,
orderBySales: 0,
priceOrderByField: 4,
searchKey: "",
startCityId: 0,
priceOrderByField: 2,//1同业会员价 2同业价格 3直客会员价 4直客价格
searchKey: "",//关键词搜索
startCityId: 0,//出发城市id
teamType: [],
priceRange:{
min: 1,
max: 100000,
}
},
}
})
provide(DirtionmaryHelper.TICKET_QUERY_PARAM, search)
......@@ -773,6 +776,6 @@ export default defineComponent({
letter-spacing: 1px;
}
.addr-list:hover {
background: #f1416c1a;
background: #E1F5FE;
}
</style>
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