Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
million
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
viitto
million
Commits
52e82fa1
Commit
52e82fa1
authored
Jul 01, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
a59a0846
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
145 additions
and
79 deletions
+145
-79
tripcalendar.vue
src/components/trip/tripcalendar.vue
+142
-77
details.vue
src/pages/details.vue
+3
-2
No files found.
src/components/trip/tripcalendar.vue
View file @
52e82fa1
...
...
@@ -25,14 +25,13 @@
float
:
left
;
width
:
14.28%
;
height
:
70px
;
cursor
:
pointer
;
border
:
1px
solid
transparent
;
background-color
:
#F5F5F5
;
font-size
:
12px
;
}
.dayList.noPrice
{
cursor
:
default
;
color
:
#ccc
;
background-color
:
#FFFFFF
;
}
...
...
@@ -208,8 +207,8 @@
}
.otherMonth
{
color
:
g
ray
;
background
:
#d1d1d1
;
color
:
g
ainsboro
;
}
.daysItem
{
...
...
@@ -217,9 +216,9 @@
float
:
left
;
width
:
14.28%
;
height
:
70px
;
cursor
:
pointer
;
font-size
:
16px
;
padding-top
:
10px
;
padding-top
:
10px
;
text-align
:
center
;
border-bottom
:
1px
solid
#d1d1d1
;
}
...
...
@@ -236,21 +235,25 @@
font-size
:
14px
;
font-family
:
'PingFangR'
;
}
.calendarItem_month
{
width
:
100%
;
.calendarItem_month
{
width
:
100%
;
text-align
:
center
;
height
:
50px
;
height
:
50px
;
line-height
:
50px
;
font-size
:
20px
;
font-size
:
20px
;
font-weight
:
bold
;
}
.trip-Seat
{
font-size
:
12px
;
.trip-Seat
{
font-size
:
12px
;
}
.ckedDate
{
.ckedDate
{
background-color
:
blue
;
color
:
#fff
;
color
:
#fff
;
}
</
style
>
<
template
>
<div
class=
"q-mt-lg q-mb-lg"
>
...
...
@@ -271,13 +274,20 @@
<div
v-for=
"(i,index) in week"
:key=
"index"
>
{{i}}
</div>
</div>
<div
class=
"calendarItem_day"
>
<div
class=
"daysItem
ckedDate
"
v-for=
"(subItem, index2) in item.dayArray"
:key=
"index2"
<div
class=
"daysItem"
v-for=
"(subItem, index2) in item.dayArray"
:key=
"index2"
:class=
"subItem.daymonth===item.month? 'nowMonth':'otherMonth'"
>
<div>
{{subItem.day}}
<div
class=
"trip-Seat"
>
27900
</div>
<div
class=
"trip-Seat"
>
余6
</div>
</div>
<
template
v-if=
"subItem.b2BPrice||subItem.seat"
>
<div
style=
"cursor:pointer;"
@
click=
"clickDay(subItem)"
:class=
"subItem.checked?'ckedDate':''"
>
{{
subItem
.
day
}}
<div
class=
"trip-Seat"
>
{{
subItem
.
b2BPrice
}}
</div>
<div
class=
"trip-Seat"
>
余
{{
subItem
.
seat
}}
</div>
</div>
</
template
>
<
template
v-else
>
<div>
{{
subItem
.
day
}}
</div>
</
template
>
</div>
</div>
</div>
...
...
@@ -286,35 +296,43 @@
<div
class=
"trafficInfo"
>
<div
class=
"trafficTitle"
>
交通资讯
</div>
<div
class=
"trafficFlight"
>
<div
class=
"trafficList"
>
<div
class=
"trafficTime"
><span>
06/11
</span><span>
14:30
</span></div>
<div>
双流国际机场
</div>
</div>
<div
class=
"trafficList"
>
<div>
中国航空
</div>
<div
class=
"traffic_Line"
>
<div></div>
<div></div>
<
template
v-if=
"CurrentPriceInfo.priceFlight&&CurrentPriceInfo.priceFlight.length>0"
v-for=
"(fItem,fIndex) in CurrentPriceInfo.priceFlight"
>
<div
class=
"trafficList"
:key=
"fIndex+100"
>
<div
class=
"trafficTime"
>
<span>
{{
fItem
.
startDate
.
substring
(
5
).
replace
(
'-'
,
'/'
)
}}
</span><span>
{{
fItem
.
departureTime
}}
</span>
</div>
<div>
{{
fItem
.
departureAirPortName
}}
</div>
</div>
<div>
CA168
</div>
</div>
<div
class=
"trafficList"
>
<div
class=
"trafficTime"
><span>
06/11
</span><span>
14:30
</span></div>
<div>
双流国际机场
</div>
</div>
<div
class=
"trafficList"
:key=
"fIndex+500"
>
<div>
{{
fItem
.
alName
}}
</div>
<div
class=
"traffic_Line"
>
<div></div>
<div></div>
</div>
<div>
{{
fItem
.
flightNumber
}}
</div>
</div>
<div
class=
"trafficList"
:key=
"fIndex+1000"
>
<div
class=
"trafficTime"
>
<span>
{{
fItem
.
arriveDate
.
substring
(
5
).
replace
(
'-'
,
'/'
)
}}
</span><span>
{{
fItem
.
arrivalTime
}}
</span>
</div>
<div>
{{
fItem
.
arrivalAirPortName
}}
</div>
</div>
</
template
>
</div>
</div>
<div
class=
"TripStartInfo"
>
<div>
出发日期 :
<span
class=
"tripRightspan"
>
2019-06-11(二)
</span>
出发日期 :
<span
class=
"tripRightspan"
>
{{CurrentPriceInfo.startDate}}
</span>
</div>
<div>
团位编号 :
<span
class=
"tripRightspan"
>
191919
</span>
团位编号 :
<span
class=
"tripRightspan"
>
{{CurrentPriceInfo.tcnum.toUpperCase()}}
</span>
</div>
<div
class=
"TripCanbao"
>
<div>
可报名人数
<span
class=
"tripRightspan"
>
6位
</span></div>
<div>
可报名人数
<span
class=
"tripRightspan"
>
{{ CurrentPriceInfo.seat}}位
</span>
</div>
<div>
27900
<span
class=
"TripQi"
>
起
</span>
{{CurrentPriceInfo.b2BPrice}}
<span
class=
"TripQi"
>
起
</span>
</div>
</div>
<div
class=
"trip_BtnDiv"
>
...
...
@@ -331,55 +349,101 @@
export
default
{
props
:
{
dateData
:
Array
,
day
:
String
,
priceInfo
:
Object
,
},
data
()
{
return
{
week
:
[
'日'
,
'一'
,
'二'
,
'三'
,
'四'
,
'五'
,
'六'
],
monthList
:
[],
//月份数据
priceData
:
this
.
dateData
,
currentDay
:
this
.
day
,
//daysData: [],
isSelect
:
-
1
,
monthList
:
[],
//月份数据
CurrentPriceInfo
:
{},
//当前选择的数据
}
},
mounted
()
{
this
.
getMonthsData
()
//console.log(this.dateData, 'dateDate');
//console.log(this.day, 'daydaydaydayday');
if
(
this
.
priceInfo
)
{
this
.
CurrentPriceInfo
=
{
b2BMemberPrice
:
this
.
priceInfo
.
b2BMemberPrice
,
b2BPrice
:
this
.
priceInfo
.
b2BPrice
,
b2CMemberPrice
:
this
.
priceInfo
.
b2CMemberPrice
,
b2CPrice
:
this
.
priceInfo
.
b2CPrice
,
configID
:
this
.
priceInfo
.
configID
,
dayNum
:
this
.
priceInfo
.
dayNum
,
isSubstitution
:
this
.
priceInfo
.
isSubstitution
,
seat
:
(
this
.
priceInfo
.
ySeat
+
this
.
priceInfo
.
fSeat
+
this
.
priceInfo
.
cSeat
)
-
(
this
.
priceInfo
.
surplusCSeat
+
this
.
priceInfo
.
surplusFSeat
+
this
.
priceInfo
.
surplusYSeat
),
startDate
:
this
.
priceInfo
.
startDate
,
tcState
:
this
.
priceInfo
.
tcState
,
tcid
:
this
.
priceInfo
.
tcid
,
tcnum
:
this
.
priceInfo
.
tcnum
,
teamType
:
this
.
priceInfo
.
teamType
,
totalSeat
:
(
this
.
priceInfo
.
ySeat
+
this
.
priceInfo
.
fSeat
+
this
.
priceInfo
.
cSeat
),
priceFlight
:
this
.
priceInfo
.
priceFlight
}
}
},
created
()
{
//this.getMonthsData()
},
methods
:
{
orderChosen
:
function
(
date
)
{
// let day = parseInt(date.split('-')[2]).toString()
// this.daysData.forEach((x, index) => {
// if (x.day === day) {
// this.isSelect = index;
// this.$emit('ChildrenSelect', date)
// }
// });
//点击日期
clickDay
(
subItem
)
{
if
(
this
.
monthList
&&
this
.
monthList
.
length
>
0
)
{
this
.
monthList
.
forEach
(
item
=>
{
if
(
item
.
dayArray
&&
item
.
dayArray
.
length
>
0
)
{
item
.
dayArray
.
forEach
(
childItem
=>
{
childItem
.
checked
=
false
;
})
}
});
}
subItem
.
checked
=
!
subItem
.
checked
;
if
(
this
.
dateData
&&
this
.
dateData
.
length
>
0
)
{
this
.
dateData
.
forEach
(
item
=>
{
if
(
item
.
startDate
==
subItem
.
dayStr
)
{
this
.
CurrentPriceInfo
=
{
b2BMemberPrice
:
item
.
b2BMemberPrice
,
b2BPrice
:
item
.
b2BPrice
,
b2CMemberPrice
:
item
.
b2CMemberPrice
,
b2CPrice
:
item
.
b2CPrice
,
configID
:
item
.
configID
,
dayNum
:
item
.
dayNum
,
isSubstitution
:
item
.
isSubstitution
,
seat
:
(
item
.
ySeat
+
item
.
fSeat
+
item
.
cSeat
)
-
(
item
.
surplusCSeat
+
item
.
surplusFSeat
+
item
.
surplusYSeat
),
startDate
:
item
.
startDate
,
tcState
:
item
.
tcState
,
tcid
:
item
.
tcid
,
tcnum
:
item
.
tcnum
,
teamType
:
item
.
teamType
,
totalSeat
:
(
item
.
ySeat
+
item
.
fSeat
+
item
.
cSeat
),
priceFlight
:
item
.
priceFlight
};
}
});
}
},
selectDate
(
index
)
{
// if (this.$data.daysData[index].day == 0) {
// return;
// }
// if (this.isSelect == index) {
// this.isSelect = -1;
// return;
// }
// this.isSelect = index;
// let currentDay = this.currentDay.split('-')
// let clickDay = parseInt(this.$data.daysData[index].day)
// clickDay = clickDay
<
10
?
(
'0'
+
clickDay
)
:
clickDay
// let clickDate = currentDay[0] + '-' + currentDay[1] + '-' + clickDay
// this.$emit('ChildrenSelect', clickDate)
//组装团期数据
selectDate
()
{
if
(
this
.
monthList
&&
this
.
monthList
.
length
>
0
)
{
this
.
monthList
.
forEach
(
item
=>
{
if
(
item
&&
item
.
dayArray
)
{
item
.
dayArray
.
forEach
(
subItem
=>
{
if
(
this
.
dateData
)
{
this
.
dateData
.
forEach
(
dItem
=>
{
if
(
dItem
.
startDate
==
subItem
.
dayStr
)
{
subItem
.
b2BPrice
=
dItem
.
b2BPrice
;
subItem
.
b2BMemberPrice
=
dItem
.
b2BMemberPrice
;
subItem
.
seat
=
dItem
.
seat
;
subItem
.
isSubstitution
=
dItem
.
isSubstitution
;
}
});
}
});
}
});
}
},
//生成月份和每一天
//生成月份和
月份下
每一天
getCalendarMonth
(
qDate
,
key
)
{
let
tempMonthData
=
this
.
createCalendar
(
qDate
);
let
tempMonth
=
tempMonthData
.
DayArray
;
...
...
@@ -391,15 +455,16 @@
date
:
tempMonth
[
i
].
day
,
daymonth
:
(
tempDay
.
getMonth
()
+
1
),
dayStr
:
newDayStr
,
day
:
tempDay
.
getDate
()
day
:
tempDay
.
getDate
(),
checked
:
false
,
});
};
this
.
monthList
.
push
({
monthStr
:
tempMonthData
.
CurrentYear
+
"
-"
+
tempMonthData
.
CurrentMonth
,
monthStr
:
tempMonthData
.
CurrentYear
+
"
年-"
+
tempMonthData
.
CurrentMonth
+
"月"
,
month
:
tempMonthData
.
CurrentMonth
,
dayArray
:
days
,
});
console
.
log
(
"this.monthList"
,
this
.
monthList
);
this
.
selectDate
(
);
},
//获取月份
getMonthsData
:
function
()
{
...
...
src/pages/details.vue
View file @
52e82fa1
...
...
@@ -86,7 +86,7 @@
<!-- 行程資訊 -->
<!-- TripListStyle 1月历 2列表 -->
<tripList
v-if=
"item.Id=='TripList'&&TripConfig.TripConfig.TripListStyle==2"
:key=
"index+100"
:plugData=
"dataList"
></tripList>
<tripcalendar
v-if=
"item.Id=='TripList'&&TripConfig.TripConfig.TripListStyle==1"
:key=
"index+200"
:dateData=
"dataList.priceList"
:
day=
"dataList.priceList[0].startDate
"
></tripcalendar>
<tripcalendar
v-if=
"item.Id=='TripList'&&TripConfig.TripConfig.TripListStyle==1"
:key=
"index+200"
:dateData=
"dataList.priceList"
:
priceInfo=
"dataList.currentPriceInfo
"
></tripcalendar>
<!-- 每日行程 -->
<!-- TripDayStyle 1竖起排 2横起 -->
...
...
@@ -142,7 +142,8 @@
cityId
:
0
,
preview
:
0
,
tcid
:
10090
,
teamType
:
0
teamType
:
0
,
isGetPriceFlight
:
true
,
},
isShow
:
false
,
dataList
:
{},
...
...
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