Commit 23086fb6 authored by youjie's avatar youjie

行程首页优化

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