Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
罗超
SuperMan
Commits
5d03e1a4
Commit
5d03e1a4
authored
Jul 19, 2019
by
吴春
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/luochao/superman
parents
e77a3862
1f8be486
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
144 additions
and
76 deletions
+144
-76
commonUtils.js
src/assets/utils/commonUtils.js
+12
-2
comCheckHotelV2.vue
src/components/commonPage/comCheckHotelV2.vue
+132
-74
No files found.
src/assets/utils/commonUtils.js
View file @
5d03e1a4
...
...
@@ -414,8 +414,18 @@ var commonUtils = {
}
myDate
=
myDate
.
setDate
(
myDate
.
getDate
()
+
day
);
myDate
=
new
Date
(
myDate
);
//返回年月日
return
myDate
.
getFullYear
()
+
'-'
+
parseInt
(
myDate
.
getMonth
()
+
1
)
+
"-"
+
myDate
.
getDate
()
var
seperator1
=
"-"
;
var
year
=
myDate
.
getFullYear
();
var
month
=
myDate
.
getMonth
()
+
1
;
var
strDate
=
myDate
.
getDate
();
if
(
month
>=
1
&&
month
<=
9
)
{
month
=
"0"
+
month
;
}
if
(
strDate
>=
0
&&
strDate
<=
9
)
{
strDate
=
"0"
+
strDate
;
}
var
currentdate
=
year
+
seperator1
+
month
+
seperator1
+
strDate
;
return
currentdate
;
}
}
...
...
src/components/commonPage/comCheckHotelV2.vue
View file @
5d03e1a4
...
...
@@ -110,7 +110,7 @@
</table>
</div>
<div>
<el-tabs
type=
"border-card"
v-loading=
"loading"
v-if=
"
IsShow
"
>
<el-tabs
type=
"border-card"
v-loading=
"loading"
v-if=
"
qHotelType==1
"
>
<el-tab-pane
:label=
"item.ProvinceName"
v-for=
"(item,index) in dataList"
:key=
"item.subCode"
>
<div
class=
"clearfix comCheckHotelV2"
>
<div
class=
"comCk_list"
v-for=
"(subItem,subIndex) in item.HotelList"
>
...
...
@@ -124,6 +124,36 @@
</div>
</el-tab-pane>
</el-tabs>
<template
v-else
>
<table
v-loading=
"loading"
>
<thead>
<tr>
<th>
选择
</th>
<th>
酒店名称
</th>
<th>
价格
</th>
</tr>
</thead>
<tbody>
<tr
v-for=
"item in ThirdHotelList"
>
<td
width=
"50"
>
<input
:id=
"item.hotelId"
type=
"checkbox"
/>
</td>
<td
width=
"150"
>
{{
item
.
hotelName
}}
</td>
<td
width=
"150"
>
{{
item
.
lowrateTotal
}}
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td
colspan=
"3"
>
<el-pagination
v-if=
"thirdHotelMsg.numberOfResultMatched>0"
background
@
current-change=
"handleCurrentChange"
:current-page
.
sync=
"thirdHotelMsg.displayFrom"
:page-size=
"thirdHotelMsg.numberOfResults"
layout=
"total,prev, pager, next, jumper"
:total=
"thirdHotelMsg.numberOfResultMatched"
>
</el-pagination>
</td>
</tr>
</tfoot>
</table>
</
template
>
</div>
<input
type=
"button"
class=
"normalBtn com_SaveBtn"
@
click=
"sendCkedHotel()"
value=
"保存"
/>
</div>
...
...
@@ -142,6 +172,34 @@
Name
:
""
,
//酒店名称
UseDate
:
""
,
//入住时间
},
thirdHotelMsg
:
{
displayFrom
:
1
,
//当前页
numberOfResults
:
5
,
//每页条数
numberOfResultMatched
:
0
,
//总条数
arrivalDate
:
""
,
//入住时间
departureDate
:
""
,
//离店时间
//房间信息列表
searchroomGroup
:
[{
numberOfAdults
:
1
,
//大人数,
numberOfChildren
:
0
,
//儿童数
childAges
:
0
,
//儿童年龄
roomNum
:
1
,
//房间数
}],
searchHotelIdList
:
[],
//酒店id,[1,2,3]
freeword
:
""
,
//关键字
//类型 1,地区,2-酒店名称
freewordType
:
0
,
reviewRatingUpperLimits
:
0
,
//指定评论分数的上限
reviewRatingLowerLimits
:
0
,
//指定评论分数的下限
searchHotelCategory
:
[],
//酒店分类
searchHotelFeatures
:
[],
//酒店的特征
searchRoomType
:
[],
//类型的房间
searchMealType
:
[],
//饮食条件搜索
searchMinRate
:
0
,
//検索最小金額,
searchMinRate
:
0
,
//検索最大金額
sort
:
0
,
//排序
},
ThirdHotelList
:
[],
//第三方酒店列表
IsShow
:
false
,
ckedHotel
:
{}
};
...
...
@@ -152,88 +210,88 @@
this
.
IsShow
=
false
;
this
.
dataList
=
[];
this
.
HotelList
=
[];
this
.
ThirdHotelList
=
[];
//地接酒店
if
(
this
.
qHotelType
==
1
)
{
this
.
apipost
(
'hotel_post_GetHasStockHotelList_V2'
,
{
//1-只查询有库存的酒店
IsMoreThanZero
:
0
,
Country
:
"651"
,
IsAllHotel
:
1
,
Province
:
this
.
qMsg
.
ProvinceId
,
Name
:
this
.
qMsg
.
Name
,
sDate
:
this
.
qMsg
.
UseDate
},
res
=>
{
this
.
loading
=
false
;
this
.
IsShow
=
true
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
dataList
=
res
.
data
.
data
;
this
.
dataList
.
forEach
(
x
=>
{
x
.
HotelList
.
forEach
(
y
=>
{
y
.
isChecked
=
false
;
})
})
}
else
{
this
.
Error
(
res
.
data
.
message
)
}
},
err
=>
{})
this
.
GetDMCHotelList
();
}
//第三方酒店
else
{
var
nQMsg
=
{
displayFrom
:
"1"
,
//当前页
numberOfResults
:
"10"
,
//每页条数
arrivalDate
:
this
.
qMsg
.
UseDate
,
//入住时间
departureDate
:
""
,
//离店时间
//房间信息列表
searchroomGroup
:
{
numberOfAdults
:
2
,
//大人数,
numberOfChildren
:
0
,
//儿童数
childAges
:
0
,
//儿童年龄
},
searchHotelIdList
:[],
//酒店id,[1,2,3]
freeword
:
this
.
qMsg
.
Name
,
//关键字
//类型 1,地区,2-酒店名称
freewordType
:
0
,
reviewRatingUpperLimits
:
0
,
//指定评论分数的上限
reviewRatingLowerLimits
:
0
,
//指定评论分数的下限
searchHotelCategory
:[],
//酒店分类
searchHotelFeatures
:[],
//酒店的特征
searchRoomType
:[],
//类型的房间
searchMealType
:[],
//饮食条件搜索
searchMinRate
:
0
,
//検索最小金額,
searchMinRate
:
100000
,
//検索最大金額
sort
:
0
,
//排序
};
if
(
nQMsg
.
arrivalDate
==
""
)
{
this
.
Info
(
"请选择入住时间!"
);
return
;
}
else
{
nQMsg
.
departureDate
=
this
.
$commonUtils
.
AddDay
(
nQMsg
.
arrivalDate
,
1
);
}
if
(
nQMsg
.
freeword
!=
""
)
{
nQMsg
.
freewordType
=
1
;
}
else
{
nQMsg
.
freewordType
=
2
;
nQMsg
.
freeword
=
""
;
this
.
GetThirdHotelList
();
}
},
//查询地接酒店
GetDMCHotelList
()
{
this
.
apipost
(
'hotel_post_GetHasStockHotelList_V2'
,
{
//1-只查询有库存的酒店
IsMoreThanZero
:
0
,
Country
:
"651"
,
IsAllHotel
:
1
,
Province
:
this
.
qMsg
.
ProvinceId
,
Name
:
this
.
qMsg
.
Name
,
sDate
:
this
.
qMsg
.
UseDate
},
res
=>
{
this
.
loading
=
false
;
this
.
IsShow
=
true
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
dataList
=
res
.
data
.
data
;
this
.
dataList
.
forEach
(
x
=>
{
x
.
HotelList
.
forEach
(
y
=>
{
y
.
isChecked
=
false
;
})
})
}
else
{
this
.
Error
(
res
.
data
.
message
)
}
console
.
log
(
"nQMsg"
,
nQMsg
);
//多了一个参数调用线上的就酒店数据
this
.
apipost
(
'dmc_post_Get_GetJAPAN_HotelList'
,
nQMsg
,
res
=>
{
this
.
loading
=
false
;
this
.
IsShow
=
true
;
if
(
res
.
data
.
resultCode
==
1
)
{
console
.
log
(
"res.data"
,
res
.
data
);
},
err
=>
{})
},
//查询第三方酒店
GetThirdHotelList
()
{
this
.
thirdHotelMsg
.
arrivalDate
=
this
.
qMsg
.
UseDate
;
if
(
this
.
thirdHotelMsg
.
arrivalDate
==
""
)
{
this
.
Info
(
"请选择入住时间!"
);
return
;
}
else
{
this
.
thirdHotelMsg
.
departureDate
=
this
.
$commonUtils
.
AddDay
(
this
.
thirdHotelMsg
.
arrivalDate
,
1
);
}
this
.
thirdHotelMsg
.
freeword
=
this
.
qMsg
.
Name
;
if
(
this
.
thirdHotelMsg
.
freeword
==
""
)
{
this
.
thirdHotelMsg
.
freewordType
=
1
;
if
(
this
.
qMsg
.
ProvinceId
>
0
)
{
//获取当前选中的对象
let
obj
=
{};
obj
=
this
.
ProvinceList
.
find
(
item
=>
{
return
item
.
ID
===
this
.
qMsg
.
ProvinceId
;
//筛选出匹配数据
});
if
(
obj
!=
undefined
)
{
this
.
thirdHotelMsg
.
freeword
=
obj
.
Name
;
}
else
{
this
.
Error
(
res
.
data
.
message
)
this
.
thirdHotelMsg
.
freeword
=
this
.
ProvinceList
[
0
].
Name
;
}
},
err
=>
{},
true
)
}
else
{
this
.
thirdHotelMsg
.
freeword
=
this
.
ProvinceList
[
0
].
Name
;
}
}
else
{
this
.
thirdHotelMsg
.
freewordType
=
2
;
this
.
thirdHotelMsg
.
freeword
=
this
.
qMsg
.
Name
;
}
//多了一个参数调用线上的就酒店数据
this
.
apipost
(
'dmc_post_Get_GetJAPAN_HotelList'
,
this
.
thirdHotelMsg
,
res
=>
{
this
.
loading
=
false
;
this
.
IsShow
=
true
;
if
(
res
.
data
.
resultCode
==
1
)
{
//总条数
this
.
thirdHotelMsg
.
numberOfResultMatched
=
Number
(
res
.
data
.
data
.
numberOfResultMatched
);
this
.
ThirdHotelList
=
res
.
data
.
data
.
hotelSummary
;
}
else
{
this
.
Error
(
res
.
data
.
message
)
}
},
err
=>
{},
true
)
},
handleCurrentChange
(
val
)
{
this
.
thirdHotelMsg
.
displayFrom
=
val
;
this
.
GetThirdHotelList
();
},
getCheck
(
hotelList
,
index
)
{
hotelList
.
forEach
((
x
,
subIndex
)
=>
{
...
...
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