Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
Athena
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
华国豪
Athena
Commits
a539c102
Commit
a539c102
authored
Jul 04, 2019
by
华国豪
🙄
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/huaguohao/athena
parents
8e16c094
215acca5
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
505 additions
and
505 deletions
+505
-505
IndependentList.vue
src/components/DependentTravel/IndependentList.vue
+3
-3
IndependentTravel.vue
src/components/DependentTravel/IndependentTravel.vue
+0
-1
list.vue
src/components/GroupTour/block/list.vue
+4
-8
index.vue
src/components/GroupTour/index.vue
+5
-6
detailTwo.vue
src/components/mall/detailTwo.vue
+3
-2
search.vue
src/components/mall/search.vue
+489
-485
index.vue
src/components/trade/order/index.vue
+1
-0
No files found.
src/components/DependentTravel/IndependentList.vue
View file @
a539c102
...
...
@@ -105,7 +105,7 @@
</span>
</span>
</p>
-->
<div
class=
"orderbyitem"
style=
"
overflow:auto
"
>
<div
class=
"orderbyitem"
style=
"
height:38px
"
>
<el-button-group
class=
"orderby-group"
>
<el-button
size=
'mini'
:type=
"orderindex==0?'danger':''"
@
click=
"changeOrderType(0)"
>
综合
</el-button>
<el-button
size=
'mini'
:type=
"orderindex==1?'danger':''"
@
click=
"changeOrderType(1)"
>
团期
<i
:class=
"ordertype==0||orderindex!=1?'el-icon-arrow-down':'el-icon-arrow-up'"
></i></el-button>
...
...
@@ -127,7 +127,7 @@
<img
:src=
'compressImg(item.imgCover[0].Url, "filt", 245, "")'
alt=
""
:onerror=
"errorImg"
>
</el-col>
<el-col
class=
"div_2"
:span=
"14"
style=
"font-size:12px"
>
<p
@
click=
"goUrl('detail',item.id,item.tcid)"
class=
"visa_title"
style=
"font-size:16px;color:#000000"
>
<p
@
click=
"goUrl('detail
Two
',item.id,item.tcid)"
class=
"visa_title"
style=
"font-size:16px;color:#000000"
>
{{
item
.
lineName
}}
+
{{
item
.
ltName
}}
+
{{
item
.
productRecommend
}}
</p>
<p
v-if=
"item.priceTags"
><span
v-for=
"(tag,index) in item.priceTags"
:key=
"index+100"
class=
tag
>
{{
tag
}}
</span></p>
...
...
@@ -140,7 +140,7 @@
¥
<span
style=
"font-weight:700"
>
{{
(
isLogin
!=
1
?
item
.
b2CPrice
:
item
.
b2BPrice
)
|
NoDesnum
}}
</span><span
style=
"font-size:12px"
>
起
</span>
</el-col>
<el-col
:span=
"3"
style=
"text-align:right"
>
<el-button
@
click=
"goUrl('detail',item.id,item.tcid)"
size=
"small"
style=
"border:1px solid #FF6633;color:#FF6633;"
>
立即预定
</el-button>
<el-button
@
click=
"goUrl('detail
Two
',item.id,item.tcid)"
size=
"small"
style=
"border:1px solid #FF6633;color:#FF6633;"
>
立即预定
</el-button>
</el-col>
</el-row>
<el-pagination
style=
"margin:15px;text-align:right"
...
...
src/components/DependentTravel/IndependentTravel.vue
View file @
a539c102
...
...
@@ -421,7 +421,6 @@ export default {
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
TreatmentList
=
res
.
data
.
data
.
pageData
;
console
.
log
(
"this.TreatmentList"
,
this
.
TreatmentList
)
this
.
TreatmentList
.
forEach
(
item
=>
{
item
.
imgCover
=
JSON
.
parse
(
item
.
imgCover
)
})
...
...
src/components/GroupTour/block/list.vue
View file @
a539c102
...
...
@@ -299,7 +299,7 @@
<div
class=
"box b2"
>
<!--
<p>
这里是广告占位,讲述图片内容的详细讲解,位置有限,显示不完整的地方就用...
</p>
-->
<div
class=
"bottom"
>
<router-link
style=
"color:#ffffff;text-decoration: none;"
:to=
"
{ path: '/search',query:{'keywords':'','line
Id':dataList.name
} }">查看详情
</router-link>
<router-link
style=
"color:#ffffff;text-decoration: none;"
:to=
"
{ path: '/search',query:{'keywords':'','line
Name':dataList.name,'lineId':dataList.id
} }">查看详情
</router-link>
</div>
</div>
</div>
...
...
@@ -312,7 +312,7 @@
<el-tab-pane
:label=
"lineItem.name"
:name=
"`$
{lineItem.id}_${index}`">
</el-tab-pane>
</
template
>
</el-tabs>
<div
class=
"more"
><router-link
style=
"color:#888888;text-decoration: none;"
:to=
"{ path: '/search',query:{'keywords':'','line
Id':dataList.name
} }"
>
更多特惠>>
</router-link></div>
<div
class=
"more"
><router-link
style=
"color:#888888;text-decoration: none;"
:to=
"{ path: '/search',query:{'keywords':'','line
Name':dataList.name,'lineId':dataList.id
} }"
>
更多特惠>>
</router-link></div>
</el-row>
<el-row
class=
"right_bottom"
:gutter=
"20"
>
<
template
v-if=
"dataList.pageData && dataList.pageData.length > 0"
>
...
...
@@ -412,11 +412,7 @@ export default {
}
},
methods
:
{
GoMore
(
path
,
dataList
){
console
.
log
(
dataList
)
return
;
this
.
$router
.
push
({
path
})
},
goUrl
(
id
,
obj
){
let
path
=
'detailTwo'
path
=
`
${
path
}
/
${
encodeURIComponent
(
id
)}
/
${
obj
.
tcid
}
`
;
...
...
@@ -442,7 +438,7 @@ export default {
}
},
mounted
(){
console
.
log
(
"dataList"
,
this
.
dataList
)
},
created
()
{
this
.
MsgBus
.
$on
(
'reloadList'
,
this
.
reloaditem
)
...
...
src/components/GroupTour/index.vue
View file @
a539c102
...
...
@@ -73,7 +73,7 @@
<!--
</router-link>
-->
</el-carousel-item>
<el-carousel-item>
<router-link
:to=
"
{ path: '/search',query:{'keywords':'','line
Id':'出境日本线
'}}">
<router-link
:to=
"
{ path: '/search',query:{'keywords':'','line
Name':'出境日本线','lineId':'14
'}}">
<img
src=
'../../assets/img/groupTour/01.jpg'
>
</router-link>
</el-carousel-item>
...
...
@@ -83,17 +83,17 @@
</router-link>
</el-carousel-item>
<el-carousel-item>
<router-link
:to=
"
{ path: '/search',query:{'keywords':'','line
Id':'出境韩国线
'}}">
<router-link
:to=
"
{ path: '/search',query:{'keywords':'','line
Name':'出境韩国线','lineId':'5
'}}">
<img
src=
'../../assets/img/groupTour/03.jpg'
>
</router-link>
</el-carousel-item>
<el-carousel-item>
<router-link
:to=
"
{ path: '/search',query:{'keywords':'','line
Id':'出境东南亚线
'}}">
<router-link
:to=
"
{ path: '/search',query:{'keywords':'','line
Name':'出境东南亚线','lineId':'1
'}}">
<img
src=
'../../assets/img/groupTour/04.jpg'
>
</router-link>
</el-carousel-item>
<el-carousel-item>
<router-link
:to=
"
{ path: '/search',query:{'keywords':'','line
Id':'出境中南半岛线
'}}">
<router-link
:to=
"
{ path: '/search',query:{'keywords':'','line
Name':'出境中南半岛线','lineId':'9
'}}">
<img
src=
'../../assets/img/groupTour/05.jpg'
>
</router-link>
</el-carousel-item>
...
...
@@ -187,7 +187,7 @@ export default {
// 系列
GoLine
(
item
,
line
){
this
.
$router
.
push
({
path
:
'/search'
,
query
:{
keywords
:
""
,
lineId
:
item
.
line
Name
,
lineteamId
:
line
.
ltName
}
})
query
:{
keywords
:
""
,
lineId
:
item
.
line
Id
,
lineName
:
item
.
lineName
,
lineteamId
:
line
.
lineteamId
,
lineteamName
:
line
.
ltName
}
})
},
// 景点
TagGourl
(
path
,
item
,
num
){
...
...
@@ -200,7 +200,6 @@ export default {
this
.
lineLoad
=
true
;
this
.
apiJavaPost
(
'/api/b2b/group/getHomeLineSort'
,
msg
,
res
=>
{
this
.
lineLoad
=
false
;
console
.
log
(
res
)
if
(
res
.
data
.
resultCode
==
1
){
this
.
lineList
=
res
.
data
.
data
;
...
...
src/components/mall/detailTwo.vue
View file @
a539c102
...
...
@@ -80,8 +80,8 @@
<el-col
:span=
'12'
>
<el-breadcrumb
separator-class=
"el-icon-arrow-right"
>
<el-breadcrumb-item
:to=
"
{ path: '/heel',query:{} }">跟团游
</el-breadcrumb-item>
<el-breadcrumb-item
:to=
"
{ path: '/search',query:{'keywords':'','lineId':dataList.lineName} }">
{{
dataList
.
lineName
}}
</el-breadcrumb-item>
<el-breadcrumb-item
:to=
"
{ path: '/search',query:{'keywords':'','lineId':dataList.line
Name,'lineteamId
':dataList.ltName} }">
{{
dataList
.
ltName
}}
</el-breadcrumb-item>
<el-breadcrumb-item
:to=
"
{ path: '/search',query:{'keywords':'','lineId':dataList.line
Id,'lineName':dataList.line
Name} }">
{{
dataList
.
lineName
}}
</el-breadcrumb-item>
<el-breadcrumb-item
:to=
"
{ path: '/search',query:{'keywords':'','lineId':dataList.line
Id,'lineName':dataList.lineName,'lineteamId':dataList.lineteamId,'lineteamName
':dataList.ltName} }">
{{
dataList
.
ltName
}}
</el-breadcrumb-item>
<el-breadcrumb-item>
{{
dataList
.
title
}}
</el-breadcrumb-item>
</el-breadcrumb>
</el-col>
...
...
@@ -949,6 +949,7 @@ export default {
this
.
clickDate
=
data
.
currentPriceInfo
&&
data
.
currentPriceInfo
.
startDate
?
data
.
currentPriceInfo
.
startDate
:
''
;
this
.
FlightList
=
data
.
currentPriceInfo
&&
data
.
currentPriceInfo
.
priceFlight
?
data
.
currentPriceInfo
.
priceFlight
:
''
;
this
.
dataList
=
data
;
console
.
log
(
"this.dataList "
,
this
.
dataList
)
this
.
toDayObj
=
data
.
currentPriceInfo
;
this
.
imgCover
=
JSON
.
parse
(
this
.
dataList
.
imgCover
);
this
.
showType
=
this
.
feature
.
featureType
;
...
...
src/components/mall/search.vue
View file @
a539c102
<
style
>
@import
'../../assets/mall/search.css'
;
</
style
>
<
template
>
<div
class=
"search-page-box"
>
<el-row
>
<el-col
:span=
"20"
:offset=
"2"
class=
"topic"
>
<el-col
:span=
'12'
>
<div
class=
"chosend-box"
>
你的选择:
<el-tag
closable
hit
size=
'medium'
v-for=
'(item,index) in searchItem'
:key=
"index"
v-if=
'item!==""&&item!=="0"'
@
close=
'handleClose(index)'
>
{{
item
}}
</el-tag>
</div>
</el-col>
<el-col
:span=
'12'
>
<div
class=
"second-s-box"
>
<el-col
:span=
"4"
>
<el-select
v-model=
"type"
placeholder=
"请选择"
size=
"mini"
>
<el-option
label=
"跟团游"
value=
"1"
></el-option>
</el-select>
</el-col>
<el-col
:span=
"16"
>
<input
type=
"text"
class=
"search-input"
v-model=
"keywords"
max-length=
"50"
@
keyup
.
enter=
"loadTeamDataInit"
/>
</el-col>
<el-col
:span=
"4"
>
<el-button
type=
"danger"
size=
"medium"
@
click=
"loadTeamDataInit"
>
<i
class=
"el-icon-search"
></i>
</el-button>
</el-col>
</div>
</el-col>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"20"
:offset=
"2"
>
<div
class=
"searchitem"
>
<div
class=
"itme"
v-if=
"(searchItem[0]==='' || searchItem[0]==='0') && lines.length>0"
>
<el-col
:span=
"3"
class=
"item-title"
>
线路
</el-col>
<el-col
:span=
"21"
class=
"items"
>
<el-tabs
v-model=
"searchItem[0]"
@
tab-click=
"changeXilie"
>
<el-tab-pane
v-for=
'item in lines'
:key=
"item.id"
:label=
"item.name"
:name=
"item.name"
></el-tab-pane>
</el-tabs>
</el-col>
</div>
<div
class=
"itme"
v-if=
"(searchItem[1]==='' || searchItem[1]==='0')&&xilies.length>0"
>
<el-col
:span=
"3"
class=
"item-title"
>
系列
</el-col>
<el-col
:span=
"21"
class=
"items"
>
<el-tabs
v-model=
"searchItem[1]"
@
tab-click=
'loadTeamDataInit'
>
<el-tab-pane
v-for=
'item in xilies'
:key=
"item.id"
:label=
"item.name"
:name=
"item.name"
></el-tab-pane>
</el-tabs>
</el-col>
</div>
<div
class=
"itme"
v-if=
"(searchItem[2]==='' || searchItem[2]==='0') && (searchItem[5]==='' || searchItem[5]==='0')"
>
<el-col
:span=
"3"
class=
"item-title"
>
出发日期
</el-col>
<el-col
:span=
"6"
class=
"items"
>
<el-tabs
v-model=
"searchItem[2]"
@
tab-click=
'loadTeamDataInit'
>
<el-tab-pane
v-for=
'(item,index) in dates'
:key=
"index"
:label=
"item"
:name=
"item"
></el-tab-pane>
</el-tabs>
</el-col>
<el-col
:span=
"15"
>
<el-date-picker
size=
"mini"
value-format=
'yy-MM-dd'
v-model=
"multData"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"最早出发"
end-placeholder=
"最晚出发"
@
change=
'multDataChange'
>
</el-date-picker>
</el-col>
</div>
<div
class=
"itme"
v-if=
"searchItem[3]==='' || searchItem[3]==='0'"
>
<el-col
:span=
"3"
class=
"item-title"
>
出发城市
</el-col>
<el-col
:span=
"21"
class=
"items"
>
<el-tabs
v-model=
"searchItem[3]"
@
tab-click=
'loadTeamDataInit'
>
<el-tab-pane
v-for=
'item in startCitys'
:key=
"item.id"
:label=
"item.startCityName"
:name=
"item.startCityName"
></el-tab-pane>
</el-tabs>
</el-col>
</div>
<div
class=
"itme"
v-if=
"searchItem[4]==='' || searchItem[4]==='0'"
>
<el-col
:span=
"3"
class=
"item-title"
>
行程天数
</el-col>
<el-col
:span=
"21"
class=
"items"
>
<el-tabs
v-model=
"searchItem[4]"
@
tab-click=
'loadTeamDataInit'
>
<el-tab-pane
v-for=
'(item,index) in dayCount'
:key=
"index"
:label=
"item.format"
:name=
"item.format"
></el-tab-pane>
</el-tabs>
</el-col>
</div>
</div>
<div
class=
"orderbyitem"
>
<el-button-group
class=
"orderby-group"
>
<el-button
size=
'mini'
:type=
"orderindex==0?'danger':''"
@
click=
"changeOrderType(0)"
>
综合
</el-button>
<el-button
size=
'mini'
:type=
"orderindex==1?'danger':''"
@
click=
"changeOrderType(1)"
>
团期
<i
:class=
"ordertype==0||orderindex!=1?'el-icon-arrow-down':'el-icon-arrow-up'"
></i></el-button>
<el-button
size=
'mini'
:type=
"orderindex==2?'danger':''"
@
click=
"changeOrderType(2)"
>
价格
<i
:class=
"ordertype==0||orderindex!=2?'el-icon-arrow-down':'el-icon-arrow-up'"
></i></el-button>
<el-button
size=
'mini'
:type=
"orderindex==3?'danger':''"
@
click=
"changeOrderType(3)"
>
销量
<i
:class=
"ordertype==0||orderindex!=3?'el-icon-arrow-down':'el-icon-arrow-up'"
></i></el-button>
<el-button
size=
'mini'
:type=
"orderindex==4?'danger':''"
@
click=
"changeOrderType(4)"
>
评论数
<i
:class=
"ordertype==0||orderindex!=4?'el-icon-arrow-down':'el-icon-arrow-up'"
></i></el-button>
</el-button-group>
<div
class=
"pirce"
>
<span>
价格区间
</span>
<el-input
size=
"mini"
v-model=
"minPrice"
@
keyup
.
native=
"proving"
@
keyup
.
enter=
'loadTeamDataInit'
maxlength=
'6'
></el-input>
<strong>
~
</strong>
<el-input
size=
"mini"
v-model=
"maxPrice"
@
keyup
.
native=
"proving"
@
keyup
.
enter=
'loadTeamDataInit'
maxlength=
'6'
></el-input>
<el-button
size=
'mini'
@
click=
"loadTeamDataInit"
>
确认
</el-button>
</div>
</div>
<!-- 列表 -->
<div
class=
"teams"
v-loading=
'isLoading'
>
<div
class=
"teams-item"
v-for=
"(item,index) in teamDatas"
@
mouseover=
'hoverIndex=index'
@
mouseout=
"hoverIndex=-1"
>
<div
class=
"picbox"
>
<div
class=
"daynum"
>
{{
item
.
dayNum
}}
天
</div>
<el-carousel
:interval=
"3000"
:autoplay=
'hoverIndex==index'
arrow=
"never"
height=
"148"
:style=
"
{'background':'#ddd'}" v-if='item.imgCover!=""'>
<el-carousel-item
v-for=
"(img,imgIndex) in JSON.parse(item.imgCover)"
:key=
"imgIndex"
v-if=
'img.Url!=""'
>
<img
v-lazy=
'compressImg(img.Url, "filt", 200, 148)'
@
click=
"goUrl('detail',item.id,item.tcid)"
>
<!--
<img
v-lazy=
'`$
{img.Url}?x-oss-process=image/resize,m_fill,h_148,w_200`' @click="goUrl('detail',item.id,item.tcid)"> -->
</el-carousel-item>
</el-carousel>
<img
v-else
style=
"height:100%;width:100%"
src=
'../../assets/img/banner@3x.png'
/>
</div>
<div
class=
"contentbox"
>
<div
class=
"title"
@
click=
"goUrl('detail',item.id,item.tcid)"
>
{{
item
.
title
}}
</div>
<div
class=
"item-info"
>
<span>
<i
class=
"iconfont icon-bb-chufadi"
></i>
出发地:
{{
item
.
startCityName
?
item
.
startCityName
:
'成都'
}}
</span>
<span>
<i
class=
"iconfont icon-bb-tuanqi"
></i>
最近团期:
{{
item
.
startDate
}}
</span>
<span>
<i
class=
"iconfont icon-bb-yuwei"
></i>
余位:
{{
item
.
surplus
>
10
?
"充足"
:
`仅于${item.surplus
}
席`
}}
<
/span
>
<!--
<
span
class
=
"down"
>
<
i
class
=
"iconfont icon-bb-xiazai"
><
/i>下载行
程
<
/span> --
>
<
/div
>
<
div
class
=
"item-tag"
>
<
el
-
tag
type
=
"danger"
>
{{
item
.
ltName
}}
<
/el-tag
>
<!--
<
el
-
tag
type
=
"success"
>
早鸟立减
<
/el-tag> --
>
<
/div
>
<
div
class
=
"item-info"
>
<
span
>
<
i
class
=
"iconfont icon-bb-rili"
><
/i
>
<
div
style
=
"display:inline"
v
-
for
=
"(t,i) in item.dateArr"
:
key
=
"i"
>
{{
t
}}
<
/div
>
<
/span
>
<
/div
>
<
/div
>
<
div
class
=
"operabox"
>
<
div
class
=
"huodong"
:
style
=
"{'visibility':`${item.discountPrice>0?'visible':'hidden'
}
`
}
"
>
<
span
>
早鸟优惠
<
/span
>
<
span
>
立减
{{
item
.
discountPrice
}}
<
/span
>
<
/div
>
<
div
class
=
"price"
>
¥
{{
isLogin
!==
1
?
item
.
b2CPrice
:
item
.
b2BPrice
}}
<
span
>
起
<
/span
>
<
/div
>
<
el
-
button
size
=
'mini'
@
click
=
"goUrl('detail',item.id,item.tcid)"
>
立即预订
<
/el-button
>
<
/div
>
<
/div
>
<
div
class
=
"item-pager"
v
-
if
=
'teamDatas.length>0'
>
<
el
-
pagination
background
layout
=
"prev, pager, next, jumper"
:
total
=
"totalCount"
:
page
-
size
=
'pageSize'
@
current
-
change
=
'handleCurrentChange'
>
<
/el-pagination
>
<
/div
>
<
div
class
=
"empty-data"
v
-
else
>
<
i
class
=
"iconfont icon-kong"
><
/i
>
很抱歉,你想要的信息我们真的找不到了
<
/div
>
<
/div
>
<
/el-col
>
<
/el-row
>
<
/div
>
<
/template
>
<
script
>
import
moment
from
'moment'
export
default
{
data
()
{
return
{
type
:
'1'
,
lineChosen
:
''
,
searchItem
:[],
keywords
:
''
,
lines
:[],
xilies
:[],
dates
:[],
multData
:[],
dayCount
:[],
startCitys
:[],
minPrice
:
''
,
maxPrice
:
''
,
orderindex
:
1
,
ordertype
:
0
,
hoverIndex
:
-
1
,
pageSize
:
20
,
pageIndex
:
1
,
teamDatas
:[],
totalCount
:
0
,
isLoading
:
false
,
isLogin
:
1
,
cityId
:
262
,
companyId
:
0
,
}
}
,
created
(){
this
.
getAction
(
8
);
this
.
cityId
=
localStorage
.
cityId
;
this
.
companyId
=
parseInt
(
localStorage
.
site
);
}
,
mounted
()
{
this
.
isLogin
=
this
.
$store
.
state
.
isLogin
;
this
.
companyId
=
parseInt
(
localStorage
.
site
)
this
.
searchItem
.
push
(
''
)
this
.
searchItem
.
push
(
''
)
this
.
searchItem
.
push
(
''
)
this
.
searchItem
.
push
(
''
)
this
.
searchItem
.
push
(
''
)
this
.
searchItem
.
push
(
''
)
this
.
keywords
=
decodeURIComponent
(
this
.
$route
.
query
.
keywords
)
this
.
loadRecoItems
()
this
.
loadDates
()
this
.
loadDayCount
()
}
,
props
:[
'changeCity'
],
watch
:{
changeCity
:
{
handler
:
function
(
val
,
oldVal
)
{
if
(
val
){
this
.
cityId
=
localStorage
.
cityId
;
this
.
companyId
=
parseInt
(
localStorage
.
site
);
this
.
loadTeamData
();
this
.
loadRecoItems
();
}
}
,
deep
:
true
}
,
}
,
methods
:
{
goUrl
(
path
,
id
,
tcid
){
// detailTwo
path
=
'detailTwo'
path
=
`${path
}
/${encodeURIComponent(id)
}
/`
+
tcid
this
.
$router
.
push
({
path
}
)
}
,
proving
(){
this
.
minPrice
=
this
.
minPrice
.
replace
(
/
[^\.\d]
/g
,
''
)
this
.
minPrice
=
this
.
minPrice
.
replace
(
'.'
,
''
)
this
.
maxPrice
=
this
.
maxPrice
.
replace
(
/
[^\.\d]
/g
,
''
)
this
.
maxPrice
=
this
.
maxPrice
.
replace
(
'.'
,
''
)
}
,
handleCurrentChange
(
val
)
{
this
.
isLoading
=
true
this
.
pageIndex
=
parseInt
(
val
)
this
.
loadTeamData
()
}
,
loadTeamData
(){
// if(this.keywords=='')
{
// this.Info('请输入搜索关键字')
// return
//
}
let
lineId
=
0
,
lineTeamId
=
0
,
minTripDay
=-
1
,
maxTripDay
=-
1
,
minPrice
=-
1
,
maxPrice
=-
1
,
startDate
=
''
,
endDate
=
''
,
startCityId
=
0
let
search0
=
""
;
let
search1
=
""
;
if
(
this
.
searchItem
[
0
]
!=
''
&&
this
.
searchItem
[
0
]
!=
'0'
)
{
this
.
lines
.
forEach
(
x
=>
{
if
(
x
.
name
==
this
.
searchItem
[
0
]){
lineId
=
x
.
id
;
search0
=
x
.
name
;
}
}
)
this
.
searchItem
[
0
]
=
search0
;
}
if
(
this
.
searchItem
[
1
]
!=
''
&&
this
.
searchItem
[
1
]
!=
'0'
)
{
this
.
xilies
.
forEach
(
x
=>
{
if
(
x
.
name
==
this
.
searchItem
[
1
]){
lineTeamId
=
x
.
id
;
search1
=
x
.
name
;
}
}
)
this
.
searchItem
[
1
]
=
search1
;
}
if
(
this
.
searchItem
[
4
]
!=
''
&&
this
.
searchItem
[
4
]
!=
'0'
){
this
.
dayCount
.
forEach
(
x
=>
{
if
(
x
.
format
==
this
.
searchItem
[
4
]){
minTripDay
=
x
.
min
maxTripDay
=
x
.
max
}
}
)
}
if
(
this
.
searchItem
[
2
]
!=
''
&&
this
.
searchItem
[
2
]
!=
'0'
)
{
let
i
=
this
.
dates
.
indexOf
(
this
.
searchItem
[
2
])
let
m
=
new
Date
().
getMonth
()
+
1
let
y
=
new
Date
().
getFullYear
()
m
+=
i
if
(
m
>
12
){
m
=
m
-
12
y
+=
1
}
startDate
=
`${y
}
-${m>9?m:'0'+m
}
-01`
endDate
=
`${y
}
-${m>9?m:'0'+m
}
-${new Date(y,m,0).getDate()
}
`
}
else
if
(
this
.
searchItem
[
5
]
!=
''
&&
this
.
searchItem
[
5
]
!=
'0'
)
{
startDate
=
`20${multData[0]
}
`
endDate
=
`20${multData[1]
}
`
}
if
(
this
.
minPrice
!=
''
){
minPrice
=
parseFloat
(
this
.
minPrice
)
}
if
(
this
.
maxPrice
!=
''
){
maxPrice
=
parseFloat
(
this
.
maxPrice
)
if
(
minPrice
>
maxPrice
){
this
.
Error
(
'价格区间的最低价格不能低于最大价格'
)
this
.
isLoading
=
false
return
false
}
}
if
(
this
.
searchItem
[
3
]
!=
''
&&
this
.
searchItem
[
3
]
!=
'0'
)
{
this
.
startCitys
.
forEach
(
x
=>
{
if
(
x
.
startCityName
==
this
.
searchItem
[
3
]){
startCityId
=
x
.
id
}
}
)
}
//startCitys
//
{
// "id":1,
// "name":"同业会员价"
//
}
,
//
{
// "id":2,
// "name":"同业价格"
//
}
,
//
{
// "id":3,
// "name":"直客会员价"
//
}
,
//
{
// "id":4,
// "name":"直客价格"
//
}
let
msg
=
{
pageIndex
:
this
.
pageIndex
,
pageSize
:
this
.
pageSize
,
searchKey
:
this
.
keywords
,
cityId
:
this
.
cityId
,
lineId
,
lineTeamId
,
minTripDay
,
maxTripDay
,
minPrice
,
maxPrice
,
startDate
,
endDate
,
orderByDate
:
this
.
orderindex
==
1
?(
this
.
ordertype
==
0
?
2
:
1
):
0
,
orderByPrice
:
this
.
orderindex
==
2
?(
this
.
ordertype
==
0
?
2
:
1
):
0
,
priceOrderByField
:
4
,
companyId
:
this
.
companyId
,
orderBySales
:
this
.
orderindex
==
3
?(
this
.
ordertype
==
0
?
2
:
1
):
0
,
startCityId
}
this
.
isLogin
=
this
.
$store
.
state
.
isLogin
;
if
(
this
.
isLogin
==
1
){
msg
.
priceOrderByField
=
2
;
}
else
{
msg
.
priceOrderByField
=
4
;
}
let
cmd
=
'b2b_get_GetB2BTravelPageList'
this
.
apipost
(
cmd
,
msg
,
r
=>
{
this
.
teamDatas
=
r
.
data
.
data
.
pageData
this
.
totalCount
=
r
.
data
.
data
.
pageCount
this
.
isLoading
=
false
this
.
teamDatas
.
forEach
(
x
=>
{
x
.
dateArr
=
[]
x
.
startDates
.
split
(
','
).
forEach
(
y
=>
{
x
.
dateArr
.
push
(
moment
(
y
).
format
(
'MM-DD'
))
}
)
}
)
}
,
null
)
}
,
changeOrderType
(
i
){
if
(
this
.
orderindex
==
i
){
this
.
ordertype
=
this
.
ordertype
==
0
?
1
:
0
}
else
{
this
.
orderindex
=
i
this
.
ordertype
=
0
}
this
.
loadTeamDataInit
()
}
,
loadDayCount
(){
this
.
dayCount
.
push
({
min
:
1
,
max
:
1
,
format
:
'1天'
}
)
this
.
dayCount
.
push
({
min
:
2
,
max
:
2
,
format
:
'2天'
}
)
this
.
dayCount
.
push
({
min
:
3
,
max
:
3
,
format
:
'3天'
}
)
this
.
dayCount
.
push
({
min
:
4
,
max
:
4
,
format
:
'4天'
}
)
this
.
dayCount
.
push
({
min
:
5
,
max
:
5
,
format
:
'5天'
}
)
this
.
dayCount
.
push
({
min
:
6
,
max
:
6
,
format
:
'6天'
}
)
this
.
dayCount
.
push
({
min
:
7
,
max
:
8
,
format
:
'7-8天'
}
)
this
.
dayCount
.
push
({
min
:
9
,
max
:
10
,
format
:
'9-10天'
}
)
this
.
dayCount
.
push
({
min
:
10
,
max
:
null
,
format
:
'10天以上'
}
)
}
,
multDataChange
(){
let
t
=
''
if
(
this
.
multData
.
length
==
2
){
this
.
multData
.
forEach
((
x
,
index
)
=>
{
t
+=
x
t
+=
index
>
0
?
''
:
'至'
}
)
this
.
$set
(
this
.
searchItem
,
5
,
t
)
this
.
loadTeamDataInit
()
}
else
{
this
.
$set
(
this
.
searchItem
,
5
,
t
)
}
}
,
loadDates
(){
let
d
=
new
Date
().
getMonth
()
for
(
let
i
=
0
;
i
<
3
;
i
++
){
d
++
d
=
d
>
12
?
d
-
12
:
d
this
.
dates
.
push
(
`${d
}
月`
)
}
}
,
changeXilie
(
tab
,
event
){
this
.
xilies
=
[]
if
(
this
.
searchItem
[
0
]
===
''
||
this
.
searchItem
[
0
]
===
'0'
){
this
.
$set
(
this
.
searchItem
,
1
,
''
)
}
else
{
this
.
loadTeamDataInit
()
this
.
lines
.
forEach
(
x
=>
{
if
(
this
.
searchItem
[
0
]
===
x
.
name
){
this
.
xilies
=
x
.
lineTeam
}
}
)
}
}
,
loadTeamDataInit
(){
this
.
isLoading
=
true
this
.
pageIndex
=
1
this
.
loadTeamData
()
}
,
// 系列
loadRecoItems
(){
if
(
this
.
companyId
!=-
1
){
this
.
apipost
(
'b2b_get_GetGroupSearchItem'
,{
'companyId'
:
this
.
companyId
,
cityId
:
this
.
cityId
}
,
r
=>
{
this
.
lines
=
r
.
data
.
data
.
line
// console.log("this.lines",this.lines)
if
(
this
.
$route
.
query
.
lineId
&&
this
.
$route
.
query
.
lineteamId
){
this
.
searchItem
[
0
]
=
this
.
$route
.
query
.
lineId
this
.
searchItem
[
1
]
=
this
.
$route
.
query
.
lineteamId
this
.
loadTeamDataInit
()
this
.
changeXilie
()
}
else
if
(
this
.
$route
.
query
.
lineId
){
this
.
searchItem
[
0
]
=
this
.
$route
.
query
.
lineId
this
.
changeXilie
()
}
else
if
(
this
.
$route
.
query
.
startCityId
){
this
.
searchItem
[
3
]
=
this
.
$route
.
query
.
startCityId
;
this
.
loadTeamDataInit
()
}
else
{
this
.
loadTeamDataInit
()
}
this
.
startCitys
=
r
.
data
.
data
.
startCity
}
,
null
)
}
}
,
handleClose
(
i
)
{
this
.
$set
(
this
.
searchItem
,
i
,
''
)
if
(
i
==
0
){
this
.
xilies
=
[]
this
.
$set
(
this
.
searchItem
,
1
,
''
)
}
else
if
(
i
==
5
){
this
.
multData
=
[]
}
this
.
loadTeamDataInit
()
}
}
}
<
/script
>
<
style
>
@import
'../../assets/mall/search.css'
;
</
style
>
<
template
>
<div
class=
"search-page-box"
>
<el-row
>
<el-col
:span=
"20"
:offset=
"2"
class=
"topic"
>
<el-col
:span=
'12'
>
<div
class=
"chosend-box"
>
你的选择:
<el-tag
closable
hit
size=
'medium'
v-for=
'(item,index) in searchItem'
:key=
"index"
v-if=
'item!==""&&item!=="0"'
@
close=
'handleClose(index)'
>
{{
item
}}
</el-tag>
</div>
</el-col>
<el-col
:span=
'12'
>
<div
class=
"second-s-box"
>
<el-col
:span=
"4"
>
<el-select
v-model=
"type"
placeholder=
"请选择"
size=
"mini"
>
<el-option
label=
"跟团游"
value=
"1"
></el-option>
</el-select>
</el-col>
<el-col
:span=
"16"
>
<input
type=
"text"
class=
"search-input"
v-model=
"keywords"
max-length=
"50"
@
keyup
.
enter=
"loadTeamDataInit"
/>
</el-col>
<el-col
:span=
"4"
>
<el-button
type=
"danger"
size=
"medium"
@
click=
"loadTeamDataInit"
>
<i
class=
"el-icon-search"
></i>
</el-button>
</el-col>
</div>
</el-col>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"20"
:offset=
"2"
>
<div
class=
"searchitem"
>
<div
class=
"itme"
v-if=
"(searchItem[0]==='' || searchItem[0]==='0') && lines.length>0"
>
<el-col
:span=
"3"
class=
"item-title"
>
线路
</el-col>
<el-col
:span=
"21"
class=
"items"
>
<el-tabs
v-model=
"searchItem[0]"
@
tab-click=
"changeXilie"
>
<el-tab-pane
v-for=
'item in lines'
:key=
"item.id"
:label=
"item.name"
:name=
"item.name"
></el-tab-pane>
</el-tabs>
</el-col>
</div>
<div
class=
"itme"
v-if=
"(searchItem[1]==='' || searchItem[1]==='0')&&xilies.length>0"
>
<el-col
:span=
"3"
class=
"item-title"
>
系列
</el-col>
<el-col
:span=
"21"
class=
"items"
>
<el-tabs
v-model=
"searchItem[1]"
@
tab-click=
'loadTeamDataInit'
>
<el-tab-pane
v-for=
'item in xilies'
:key=
"item.id"
:label=
"item.name"
:name=
"item.name"
></el-tab-pane>
</el-tabs>
</el-col>
</div>
<div
class=
"itme"
v-if=
"(searchItem[2]==='' || searchItem[2]==='0') && (searchItem[5]==='' || searchItem[5]==='0')"
>
<el-col
:span=
"3"
class=
"item-title"
>
出发日期
</el-col>
<el-col
:span=
"6"
class=
"items"
>
<el-tabs
v-model=
"searchItem[2]"
@
tab-click=
'loadTeamDataInit'
>
<el-tab-pane
v-for=
'(item,index) in dates'
:key=
"index"
:label=
"item"
:name=
"item"
></el-tab-pane>
</el-tabs>
</el-col>
<el-col
:span=
"15"
>
<el-date-picker
size=
"mini"
value-format=
'yy-MM-dd'
v-model=
"multData"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"最早出发"
end-placeholder=
"最晚出发"
@
change=
'multDataChange'
>
</el-date-picker>
</el-col>
</div>
<div
class=
"itme"
v-if=
"searchItem[3]==='' || searchItem[3]==='0'"
>
<el-col
:span=
"3"
class=
"item-title"
>
出发城市
</el-col>
<el-col
:span=
"21"
class=
"items"
>
<el-tabs
v-model=
"searchItem[3]"
@
tab-click=
'loadTeamDataInit'
>
<el-tab-pane
v-for=
'item in startCitys'
:key=
"item.id"
:label=
"item.startCityName"
:name=
"item.startCityName"
></el-tab-pane>
</el-tabs>
</el-col>
</div>
<div
class=
"itme"
v-if=
"searchItem[4]==='' || searchItem[4]==='0'"
>
<el-col
:span=
"3"
class=
"item-title"
>
行程天数
</el-col>
<el-col
:span=
"21"
class=
"items"
>
<el-tabs
v-model=
"searchItem[4]"
@
tab-click=
'loadTeamDataInit'
>
<el-tab-pane
v-for=
'(item,index) in dayCount'
:key=
"index"
:label=
"item.format"
:name=
"item.format"
></el-tab-pane>
</el-tabs>
</el-col>
</div>
</div>
<div
class=
"orderbyitem"
>
<el-button-group
class=
"orderby-group"
>
<el-button
size=
'mini'
:type=
"orderindex==0?'danger':''"
@
click=
"changeOrderType(0)"
>
综合
</el-button>
<el-button
size=
'mini'
:type=
"orderindex==1?'danger':''"
@
click=
"changeOrderType(1)"
>
团期
<i
:class=
"ordertype==0||orderindex!=1?'el-icon-arrow-down':'el-icon-arrow-up'"
></i></el-button>
<el-button
size=
'mini'
:type=
"orderindex==2?'danger':''"
@
click=
"changeOrderType(2)"
>
价格
<i
:class=
"ordertype==0||orderindex!=2?'el-icon-arrow-down':'el-icon-arrow-up'"
></i></el-button>
<el-button
size=
'mini'
:type=
"orderindex==3?'danger':''"
@
click=
"changeOrderType(3)"
>
销量
<i
:class=
"ordertype==0||orderindex!=3?'el-icon-arrow-down':'el-icon-arrow-up'"
></i></el-button>
<el-button
size=
'mini'
:type=
"orderindex==4?'danger':''"
@
click=
"changeOrderType(4)"
>
评论数
<i
:class=
"ordertype==0||orderindex!=4?'el-icon-arrow-down':'el-icon-arrow-up'"
></i></el-button>
</el-button-group>
<div
class=
"pirce"
>
<span>
价格区间
</span>
<el-input
size=
"mini"
v-model=
"minPrice"
@
keyup
.
native=
"proving"
@
keyup
.
enter=
'loadTeamDataInit'
maxlength=
'6'
></el-input>
<strong>
~
</strong>
<el-input
size=
"mini"
v-model=
"maxPrice"
@
keyup
.
native=
"proving"
@
keyup
.
enter=
'loadTeamDataInit'
maxlength=
'6'
></el-input>
<el-button
size=
'mini'
@
click=
"loadTeamDataInit"
>
确认
</el-button>
</div>
</div>
<!-- 列表 -->
<div
class=
"teams"
v-loading=
'isLoading'
>
<div
class=
"teams-item"
v-for=
"(item,index) in teamDatas"
@
mouseover=
'hoverIndex=index'
@
mouseout=
"hoverIndex=-1"
>
<div
class=
"picbox"
>
<div
class=
"daynum"
>
{{
item
.
dayNum
}}
天
</div>
<el-carousel
:interval=
"3000"
:autoplay=
'hoverIndex==index'
arrow=
"never"
height=
"148"
:style=
"
{'background':'#ddd'}" v-if='item.imgCover!=""'>
<el-carousel-item
v-for=
"(img,imgIndex) in JSON.parse(item.imgCover)"
:key=
"imgIndex"
v-if=
'img.Url!=""'
>
<img
v-lazy=
'compressImg(img.Url, "filt", 200, 148)'
@
click=
"goUrl('detail',item.id,item.tcid)"
>
<!--
<img
v-lazy=
'`$
{img.Url}?x-oss-process=image/resize,m_fill,h_148,w_200`' @click="goUrl('detail',item.id,item.tcid)"> -->
</el-carousel-item>
</el-carousel>
<img
v-else
style=
"height:100%;width:100%"
src=
'../../assets/img/banner@3x.png'
/>
</div>
<div
class=
"contentbox"
>
<div
class=
"title"
@
click=
"goUrl('detail',item.id,item.tcid)"
>
{{
item
.
title
}}
</div>
<div
class=
"item-info"
>
<span>
<i
class=
"iconfont icon-bb-chufadi"
></i>
出发地:
{{
item
.
startCityName
?
item
.
startCityName
:
'成都'
}}
</span>
<span>
<i
class=
"iconfont icon-bb-tuanqi"
></i>
最近团期:
{{
item
.
startDate
}}
</span>
<span>
<i
class=
"iconfont icon-bb-yuwei"
></i>
余位:
{{
item
.
surplus
>
10
?
"充足"
:
`仅于${item.surplus
}
席`
}}
<
/span>
<!--
<
span
class
=
"down"
>
<
i
class
=
"iconfont icon-bb-xiazai"
><
/i>下载行程
<
/span> -->
<
/div>
<
div
class
=
"item-tag"
>
<
el
-
tag
type
=
"danger"
>
{{
item
.
ltName
}}
<
/el-tag>
<!--
<
el
-
tag
type
=
"success"
>
早鸟立减
<
/el-tag> -->
<
/div>
<
div
class
=
"item-info"
>
<
span
>
<
i
class
=
"iconfont icon-bb-rili"
><
/i>
<
div
style
=
"display:inline"
v
-
for
=
"(t,i) in item.dateArr"
:
key
=
"i"
>
{{
t
}}
<
/div>
<
/span>
<
/div>
<
/div>
<
div
class
=
"operabox"
>
<
div
class
=
"huodong"
:
style
=
"{'visibility':`${item.discountPrice>0?'visible':'hidden'
}
`
}
"
>
<
span
>
早鸟优惠
<
/span>
<
span
>
立减
{{
item
.
discountPrice
}}
<
/span>
<
/div>
<
div
class
=
"price"
>
¥
{{
isLogin
!==
1
?
item
.
b2CPrice
:
item
.
b2BPrice
}}
<
span
>
起
<
/span>
<
/div>
<
el
-
button
size
=
'mini'
@
click
=
"goUrl('detail',item.id,item.tcid)"
>
立即预订
<
/el-button>
<
/div>
<
/div>
<
div
class
=
"item-pager"
v
-
if
=
'teamDatas.length>0'
>
<
el
-
pagination
background
layout
=
"prev, pager, next, jumper"
:
total
=
"totalCount"
:
page
-
size
=
'pageSize'
@
current
-
change
=
'handleCurrentChange'
>
<
/el-pagination>
<
/div>
<
div
class
=
"empty-data"
v
-
else
>
<
i
class
=
"iconfont icon-kong"
><
/i>
很抱歉,你想要的信息我们真的找不到了
<
/div>
<
/div>
<
/el-col>
<
/el-row>
<
/div>
<
/template>
<
script
>
import
moment
from
'moment'
export
default
{
data
()
{
return
{
type
:
'1'
,
lineChosen
:
''
,
searchItem
:[],
keywords
:
''
,
lines
:[],
xilies
:[],
dates
:[],
multData
:[],
dayCount
:[],
startCitys
:[],
minPrice
:
''
,
maxPrice
:
''
,
orderindex
:
1
,
ordertype
:
0
,
hoverIndex
:
-
1
,
pageSize
:
20
,
pageIndex
:
1
,
teamDatas
:[],
totalCount
:
0
,
isLoading
:
false
,
isLogin
:
1
,
cityId
:
262
,
companyId
:
0
,
lineId
:
0
,
lineTeamId
:
0
,
}
}
,
created
(){
this
.
getAction
(
8
);
this
.
cityId
=
localStorage
.
cityId
;
this
.
companyId
=
parseInt
(
localStorage
.
site
);
}
,
mounted
()
{
this
.
isLogin
=
this
.
$store
.
state
.
isLogin
;
this
.
companyId
=
parseInt
(
localStorage
.
site
)
this
.
searchItem
.
push
(
''
)
this
.
searchItem
.
push
(
''
)
this
.
searchItem
.
push
(
''
)
this
.
searchItem
.
push
(
''
)
this
.
searchItem
.
push
(
''
)
this
.
searchItem
.
push
(
''
)
this
.
keywords
=
decodeURIComponent
(
this
.
$route
.
query
.
keywords
)
this
.
loadRecoItems
()
this
.
loadDates
()
this
.
loadDayCount
()
}
,
props
:[
'changeCity'
],
watch
:{
changeCity
:
{
handler
:
function
(
val
,
oldVal
)
{
if
(
val
){
this
.
cityId
=
localStorage
.
cityId
;
this
.
companyId
=
parseInt
(
localStorage
.
site
);
this
.
loadTeamData
();
this
.
loadRecoItems
();
}
}
,
deep
:
true
}
,
}
,
methods
:
{
goUrl
(
path
,
id
,
tcid
){
// detailTwo
path
=
'detailTwo'
path
=
`${path
}
/${encodeURIComponent(id)
}
/`
+
tcid
this
.
$router
.
push
({
path
}
)
}
,
proving
(){
this
.
minPrice
=
this
.
minPrice
.
replace
(
/
[^\.\d]
/g
,
''
)
this
.
minPrice
=
this
.
minPrice
.
replace
(
'.'
,
''
)
this
.
maxPrice
=
this
.
maxPrice
.
replace
(
/
[^\.\d]
/g
,
''
)
this
.
maxPrice
=
this
.
maxPrice
.
replace
(
'.'
,
''
)
}
,
handleCurrentChange
(
val
)
{
this
.
isLoading
=
true
this
.
pageIndex
=
parseInt
(
val
)
this
.
loadTeamData
()
}
,
loadTeamData
(){
// if(this.keywords=='')
{
// this.Info('请输入搜索关键字')
// return
//
}
let
minTripDay
=-
1
,
maxTripDay
=-
1
,
minPrice
=-
1
,
maxPrice
=-
1
,
startDate
=
''
,
endDate
=
''
,
startCityId
=
0
let
search0
=
""
;
let
search1
=
""
;
if
(
this
.
searchItem
[
0
]
!=
''
&&
this
.
searchItem
[
0
]
!=
'0'
)
{
this
.
lines
.
forEach
(
x
=>
{
if
(
x
.
name
==
this
.
searchItem
[
0
]){
lineId
=
x
.
id
;
search0
=
x
.
name
;
}
}
)
this
.
searchItem
[
0
]
=
search0
;
}
if
(
this
.
searchItem
[
1
]
!=
''
&&
this
.
searchItem
[
1
]
!=
'0'
)
{
this
.
xilies
.
forEach
(
x
=>
{
if
(
x
.
name
==
this
.
searchItem
[
1
]){
lineTeamId
=
x
.
id
;
search1
=
x
.
name
;
}
}
)
this
.
searchItem
[
1
]
=
search1
;
}
if
(
this
.
searchItem
[
4
]
!=
''
&&
this
.
searchItem
[
4
]
!=
'0'
){
this
.
dayCount
.
forEach
(
x
=>
{
if
(
x
.
format
==
this
.
searchItem
[
4
]){
minTripDay
=
x
.
min
maxTripDay
=
x
.
max
}
}
)
}
if
(
this
.
searchItem
[
2
]
!=
''
&&
this
.
searchItem
[
2
]
!=
'0'
)
{
let
i
=
this
.
dates
.
indexOf
(
this
.
searchItem
[
2
])
let
m
=
new
Date
().
getMonth
()
+
1
let
y
=
new
Date
().
getFullYear
()
m
+=
i
if
(
m
>
12
){
m
=
m
-
12
y
+=
1
}
startDate
=
`${y
}
-${m>9?m:'0'+m
}
-01`
endDate
=
`${y
}
-${m>9?m:'0'+m
}
-${new Date(y,m,0).getDate()
}
`
}
else
if
(
this
.
searchItem
[
5
]
!=
''
&&
this
.
searchItem
[
5
]
!=
'0'
)
{
startDate
=
`20${multData[0]
}
`
endDate
=
`20${multData[1]
}
`
}
if
(
this
.
minPrice
!=
''
){
minPrice
=
parseFloat
(
this
.
minPrice
)
}
if
(
this
.
maxPrice
!=
''
){
maxPrice
=
parseFloat
(
this
.
maxPrice
)
if
(
minPrice
>
maxPrice
){
this
.
Error
(
'价格区间的最低价格不能低于最大价格'
)
this
.
isLoading
=
false
return
false
}
}
if
(
this
.
searchItem
[
3
]
!=
''
&&
this
.
searchItem
[
3
]
!=
'0'
)
{
this
.
startCitys
.
forEach
(
x
=>
{
if
(
x
.
startCityName
==
this
.
searchItem
[
3
]){
startCityId
=
x
.
id
}
}
)
}
//startCitys
//
{
// "id":1,
// "name":"同业会员价"
//
}
,
//
{
// "id":2,
// "name":"同业价格"
//
}
,
//
{
// "id":3,
// "name":"直客会员价"
//
}
,
//
{
// "id":4,
// "name":"直客价格"
//
}
let
msg
=
{
pageIndex
:
this
.
pageIndex
,
pageSize
:
this
.
pageSize
,
searchKey
:
this
.
keywords
,
cityId
:
this
.
cityId
,
lineId
:
this
.
lineId
,
lineTeamId
:
this
.
lineTeamId
,
minTripDay
,
maxTripDay
,
minPrice
,
maxPrice
,
startDate
,
endDate
,
orderByDate
:
this
.
orderindex
==
1
?(
this
.
ordertype
==
0
?
2
:
1
):
0
,
orderByPrice
:
this
.
orderindex
==
2
?(
this
.
ordertype
==
0
?
2
:
1
):
0
,
priceOrderByField
:
4
,
companyId
:
this
.
companyId
,
orderBySales
:
this
.
orderindex
==
3
?(
this
.
ordertype
==
0
?
2
:
1
):
0
,
startCityId
}
this
.
isLogin
=
this
.
$store
.
state
.
isLogin
;
if
(
this
.
isLogin
==
1
){
msg
.
priceOrderByField
=
2
;
}
else
{
msg
.
priceOrderByField
=
4
;
}
let
cmd
=
'b2b_get_GetB2BTravelPageList'
this
.
apipost
(
cmd
,
msg
,
r
=>
{
this
.
teamDatas
=
r
.
data
.
data
.
pageData
this
.
totalCount
=
r
.
data
.
data
.
pageCount
this
.
isLoading
=
false
this
.
teamDatas
.
forEach
(
x
=>
{
x
.
dateArr
=
[]
x
.
startDates
.
split
(
','
).
forEach
(
y
=>
{
x
.
dateArr
.
push
(
moment
(
y
).
format
(
'MM-DD'
))
}
)
}
)
}
,
null
)
}
,
changeOrderType
(
i
){
if
(
this
.
orderindex
==
i
){
this
.
ordertype
=
this
.
ordertype
==
0
?
1
:
0
}
else
{
this
.
orderindex
=
i
this
.
ordertype
=
0
}
this
.
loadTeamDataInit
()
}
,
loadDayCount
(){
this
.
dayCount
.
push
({
min
:
1
,
max
:
1
,
format
:
'1天'
}
)
this
.
dayCount
.
push
({
min
:
2
,
max
:
2
,
format
:
'2天'
}
)
this
.
dayCount
.
push
({
min
:
3
,
max
:
3
,
format
:
'3天'
}
)
this
.
dayCount
.
push
({
min
:
4
,
max
:
4
,
format
:
'4天'
}
)
this
.
dayCount
.
push
({
min
:
5
,
max
:
5
,
format
:
'5天'
}
)
this
.
dayCount
.
push
({
min
:
6
,
max
:
6
,
format
:
'6天'
}
)
this
.
dayCount
.
push
({
min
:
7
,
max
:
8
,
format
:
'7-8天'
}
)
this
.
dayCount
.
push
({
min
:
9
,
max
:
10
,
format
:
'9-10天'
}
)
this
.
dayCount
.
push
({
min
:
10
,
max
:
null
,
format
:
'10天以上'
}
)
}
,
multDataChange
(){
let
t
=
''
if
(
this
.
multData
.
length
==
2
){
this
.
multData
.
forEach
((
x
,
index
)
=>
{
t
+=
x
t
+=
index
>
0
?
''
:
'至'
}
)
this
.
$set
(
this
.
searchItem
,
5
,
t
)
this
.
loadTeamDataInit
()
}
else
{
this
.
$set
(
this
.
searchItem
,
5
,
t
)
}
}
,
loadDates
(){
let
d
=
new
Date
().
getMonth
()
for
(
let
i
=
0
;
i
<
3
;
i
++
){
d
++
d
=
d
>
12
?
d
-
12
:
d
this
.
dates
.
push
(
`${d
}
月`
)
}
}
,
changeXilie
(
tab
,
event
){
this
.
xilies
=
[]
if
(
this
.
searchItem
[
0
]
===
''
||
this
.
searchItem
[
0
]
===
'0'
){
this
.
$set
(
this
.
searchItem
,
1
,
''
)
}
else
{
this
.
loadTeamDataInit
()
this
.
lines
.
forEach
(
x
=>
{
if
(
this
.
searchItem
[
0
]
===
x
.
name
){
this
.
xilies
=
x
.
lineTeam
}
}
)
}
}
,
loadTeamDataInit
(){
this
.
isLoading
=
true
this
.
pageIndex
=
1
this
.
loadTeamData
()
}
,
// 系列
loadRecoItems
(){
if
(
this
.
companyId
!=-
1
){
this
.
apipost
(
'b2b_get_GetGroupSearchItem'
,{
'companyId'
:
this
.
companyId
,
cityId
:
this
.
cityId
}
,
r
=>
{
this
.
lines
=
r
.
data
.
data
.
line
console
.
log
(
"this.lines"
,
this
.
lines
)
if
(
this
.
$route
.
query
.
lineId
&&
this
.
$route
.
query
.
lineteamId
){
this
.
lineId
=
this
.
$route
.
query
.
lineId
;
this
.
lineteamId
=
this
.
$route
.
query
.
lineteamId
;
this
.
searchItem
[
0
]
=
this
.
$route
.
query
.
lineName
this
.
searchItem
[
1
]
=
this
.
$route
.
query
.
lineteamName
this
.
loadTeamDataInit
()
this
.
changeXilie
()
}
else
if
(
this
.
$route
.
query
.
lineId
){
this
.
lineId
=
this
.
$route
.
query
.
lineId
;
this
.
searchItem
[
0
]
=
this
.
$route
.
query
.
lineName
this
.
changeXilie
()
}
else
if
(
this
.
$route
.
query
.
startCityId
){
this
.
searchItem
[
3
]
=
this
.
$route
.
query
.
startCityId
;
this
.
loadTeamDataInit
()
}
else
{
this
.
loadTeamDataInit
()
}
this
.
startCitys
=
r
.
data
.
data
.
startCity
}
,
null
)
}
}
,
handleClose
(
i
)
{
this
.
$set
(
this
.
searchItem
,
i
,
''
)
if
(
i
==
0
){
this
.
xilies
=
[]
this
.
$set
(
this
.
searchItem
,
1
,
''
)
}
else
if
(
i
==
5
){
this
.
multData
=
[]
}
this
.
loadTeamDataInit
()
}
}
}
<
/script>
src/components/trade/order/index.vue
View file @
a539c102
...
...
@@ -488,6 +488,7 @@ export default {
PredictRoomNum
:
fcnt
,
BigRoomNum
:
this
.
chosenObj
.
dcf
,
TripleRoomNum
:
this
.
chosenObj
.
srf
,
TradeDate
:
moment
().
format
(
'YYYY-MM-DD'
),
CostType
:
0
,
MinOrderPrice
:
0
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment