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
a8743396
Commit
a8743396
authored
Sep 03, 2019
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
c1186b6f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
136 additions
and
57 deletions
+136
-57
HotelDetail.vue
src/components/Hotel/HotelDetail.vue
+25
-7
HotelList.vue
src/components/Hotel/HotelList.vue
+1
-1
HotelSure.vue
src/components/Hotel/HotelSure.vue
+21
-2
OpHotelOrderDetail.vue
...ents/newPersonalCenter/block/model/OpHotelOrderDetail.vue
+89
-47
No files found.
src/components/Hotel/HotelDetail.vue
View file @
a8743396
...
...
@@ -533,6 +533,7 @@
<el-date-picker
class=
"HD_date_input"
v-model=
"SimilarMsg.arrivalDate"
style=
"width:190px;"
clear-icon=
""
size=
"small"
value-format=
"yyyy-MM-dd"
@
change=
"getDepartureDate"
:picker-options=
"pickerOptions0"
type=
"date"
placeholder=
""
>
...
...
@@ -542,6 +543,7 @@
size=
"small"
value-format=
"yyyy-MM-dd"
:picker-options=
"pickerOptions0"
@
change=
"getDepartureDate"
type=
"date"
placeholder=
""
>
</el-date-picker>
...
...
@@ -882,10 +884,16 @@ export default {
this
.
$viewer
=
viewer
;
},
bigImgShow
(
index
)
{
//if (num == 1) {
this
.
$viewer
.
view
(
index
)
this
.
$viewer
.
view
(
index
)
this
.
$viewer
.
show
();
//}
},
//获取结束日期不能等于开始
getDepartureDate
(){
var
arrivalDate
=
new
Date
(
this
.
SimilarMsg
.
arrivalDate
);
var
departureDate
=
new
Date
(
this
.
SimilarMsg
.
departureDate
);
if
(
arrivalDate
.
getTime
()
>=
departureDate
.
getTime
()){
this
.
SimilarMsg
.
departureDate
=
moment
(
this
.
SimilarMsg
.
arrivalDate
).
add
(
1
,
'days'
).
format
(
'YYYY-MM-DD'
)
}
},
//获取房型
getGradeType
(
type
)
{
...
...
@@ -922,9 +930,6 @@ export default {
},
changeImg
(){
this
.
images
=
[]
this
.
bigImgShow
()
},
getList
()
{
...
...
@@ -1245,6 +1250,7 @@ export default {
this
.
SimilarMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
SimilarList
=
[];
if
(
Object
.
prototype
.
toString
.
call
(
res
.
data
.
data
.
roomRateDetails
)
==
"[object Object]"
...
...
@@ -1319,7 +1325,19 @@ export default {
},
//获取价格
getPrice
(
price
)
{
return
Math
.
ceil
(
price
/
this
.
JapanIncrease
);
//(chargeableRateInfoPerPersonForANightBySetCurrency/0.9975)*入住天数*入住人数
//天数
return
Math
.
ceil
(
price
/
this
.
JapanIncrease
)
*
(
this
.
auditNum
+
this
.
childNum
)
*
this
.
DateDiff
(
this
.
SimilarMsg
.
arrivalDate
,
this
.
SimilarMsg
.
departureDate
);
},
//获取相差天数
DateDiff
(
sDate1
,
sDate2
)
{
//sDate1和sDate2是2017-09-25格式
var
aDate
,
oDate1
,
oDate2
,
iDays
;
aDate
=
sDate1
.
split
(
"-"
);
oDate1
=
new
Date
(
aDate
[
1
]
+
'-'
+
aDate
[
2
]
+
'-'
+
aDate
[
0
]);
//转换为09-25-2017格式
aDate
=
sDate2
.
split
(
"-"
);
oDate2
=
new
Date
(
aDate
[
1
]
+
'-'
+
aDate
[
2
]
+
'-'
+
aDate
[
0
]);
iDays
=
parseInt
(
Math
.
abs
(
oDate1
-
oDate2
)
/
1000
/
60
/
60
/
24
);
//把相差的毫秒数转换为天数
return
iDays
;
},
//点击预订传递参数
bookHotel
(
roomOptionCd
){
...
...
src/components/Hotel/HotelList.vue
View file @
a8743396
...
...
@@ -611,7 +611,7 @@
地址:
{{
item
.
address
}}
</div>
<div
class=
"HL_ListPrice"
>
<span><label>
¥
</label>
{{
getPrice
(
item
.
lowrateBySetCurrency
)
}}
</span>
起
<span><label>
¥
</label>
{{
getPrice
(
item
.
lowrate
Total
BySetCurrency
)
}}
</span>
起
</div>
<input
type=
"button"
class=
"HL_ListBtn"
@
click=
"goHotelDetail(item,'HotelDetail')"
value=
"查看详情"
/>
</div>
...
...
src/components/Hotel/HotelSure.vue
View file @
a8743396
...
...
@@ -325,6 +325,15 @@
text-align
:
right
;
width
:
80px
;
}
.HotelSure
.HS_div2One
.el-input__inner
{
border-radius
:
0
;
}
.HotelSure
.HS_div3
.el-input__inner
{
border-radius
:
0
;
}
.HotelSure
.HS_div3
.el-textarea__inner
{
border-radius
:
0
;
}
</
style
>
...
...
@@ -1010,8 +1019,18 @@ export default {
this
.
sureMsg
.
roomOptionCd
=
this
.
msg
.
roomOptionCd
;
this
.
sureMsg
.
HotelName
=
this
.
dataList
.
hotelName
;
this
.
sureMsg
.
HotelPic
=
this
.
HotelImgUrl
;
//判断选择的人数与入住人数
let
Count1
=
0
this
.
sureMsg
.
roomGroup
.
forEach
(
x
=>
{
Count1
+=
x
.
roomMaleCount
+
x
.
roomFemaleCount
+
x
.
roomChildCount
})
let
Count2
=
0
;
Count2
=
this
.
auditNum
+
this
.
childNum
;
if
(
Count1
!=
Count2
){
this
.
Error
(
'入住人数与总入住数不匹配'
);
return
;
}
this
.
dataList
.
roomGroup
.
forEach
(
x
=>
{
this
.
sureMsg
.
roomGroup
.
forEach
(
j
=>
{
if
(
Object
.
prototype
.
toString
.
call
(
x
.
rateGroup
)
==
'[object Object]'
){
...
...
src/components/newPersonalCenter/block/model/OpHotelOrderDetail.vue
View file @
a8743396
This diff is collapsed.
Click to expand it.
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