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
e716f135
Commit
e716f135
authored
Jul 26, 2019
by
华国豪
🙄
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/luochao/superman
parents
50e71c22
2b16349c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
470 additions
and
454 deletions
+470
-454
TravelPassengerList3.vue
...ponents/TravelManager/TravelList/TravelPassengerList3.vue
+470
-454
No files found.
src/components/TravelManager/TravelList/TravelPassengerList3.vue
View file @
e716f135
<
style
>
.PassengerList2
.PT_teamTable.PT_teamTable
{
width
:
500px
;
border-collapse
:
collapse
;
}
.PT_teamTable
td
,
.PT_teamTable
th
{
border
:
1px
solid
#dcdcdc
;
padding
:
5px
;
height
:
30px
;
}
.PT_teamTable
tr
th
{
background
:
#eee
;
height
:
30px
;
border
:
1px
solid
#dcdcdc
;
}
.PT_teamTable
tr
td
{
background
:
#fff
;}
.travelpassengerlist
{
font-size
:
12px
;
background
:
#dcdcdc
;}
.travelpassengerlist
tr
th
{
height
:
30px
;
}
.travelpassengerlist
tr
td
{
background
:
#fff
;
text-align
:
center
;}
/*拒签人员*/
.travelpassengerlist
.redTr
td
{
.PassengerList2
.PT_teamTable.PT_teamTable
{
width
:
500px
;
border-collapse
:
collapse
;
}
.PT_teamTable
td
,
.PT_teamTable
th
{
border
:
1px
solid
#dcdcdc
;
padding
:
5px
;
height
:
30px
;
}
.PT_teamTable
tr
th
{
background
:
#eee
;
height
:
30px
;
border
:
1px
solid
#dcdcdc
;
}
.PT_teamTable
tr
td
{
background
:
#fff
;
}
.travelpassengerlist
{
font-size
:
12px
;
background
:
#dcdcdc
;
}
.travelpassengerlist
tr
th
{
height
:
30px
;
}
.travelpassengerlist
tr
td
{
background
:
#fff
;
text-align
:
center
;
}
/*拒签人员*/
.travelpassengerlist
.redTr
td
{
color
:
#E95252
;
}
.leader2Btn
{
color
:
#fff
;
padding
:
0
15px
;
height
:
30px
;
background
:
#e95252
;
border
:
1px
solid
#e95252
;
cursor
:
pointer
;
border-radius
:
15px
;
}
.PassengerList2
input
.houseno
{
border
:
none
;
border-bottom
:
1px
solid
#dcdcdc
;
transition
:
all
linear
.5s
;
}
.PassengerList2
input
.houseno
:focus
{
border-bottom
:
1px
solid
#e95252
;
}
.fs-12
{
font-size
:
12px
;
color
:
#666
;
}
.color333
{
color
:
#333
;
}
.time-box
{
display
:
flex
;
margin
:
10px
0
;
text-align
:
center
;
border
:
1px
solid
#dcdcdc
;
border-bottom
:
0
;
border-top
:
0
;
}
.time-box
.el-col
{
cursor
:
pointer
;
padding
:
10px
;
border-right
:
1px
solid
#dcdcdc
;
border-bottom
:
1px
solid
#dcdcdc
;
border-top
:
1px
solid
#dcdcdc
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.time-box
.el-col.active
{
color
:
#e95252
;
border-bottom
:
1px
solid
#e95252
;
}
.PassengerList3
.travelpassengerlist
{
width
:
100%
;
}
.PassengerList3
.h34
{
height
:
34px
;
}
}
.leader2Btn
{
color
:
#fff
;
padding
:
0
15px
;
height
:
30px
;
background
:
#e95252
;
border
:
1px
solid
#e95252
;
cursor
:
pointer
;
border-radius
:
15px
;
}
.PassengerList2
input
.houseno
{
border
:
none
;
border-bottom
:
1px
solid
#dcdcdc
;
transition
:
all
linear
.5s
;
}
.PassengerList2
input
.houseno
:focus
{
border-bottom
:
1px
solid
#e95252
;
}
.fs-12
{
font-size
:
12px
;
color
:
#666
;
}
.color333
{
color
:
#333
;
}
.time-box
{
display
:
flex
;
margin
:
10px
0
;
text-align
:
center
;
border
:
1px
solid
#dcdcdc
;
border-bottom
:
0
;
border-top
:
0
;
}
.time-box
.el-col
{
cursor
:
pointer
;
padding
:
10px
;
border-right
:
1px
solid
#dcdcdc
;
border-bottom
:
1px
solid
#dcdcdc
;
border-top
:
1px
solid
#dcdcdc
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.time-box
.el-col.active
{
color
:
#e95252
;
border-bottom
:
1px
solid
#e95252
;
}
.PassengerList3
.travelpassengerlist
{
width
:
100%
;
}
.PassengerList3
.h34
{
height
:
34px
;
}
</
style
>
<
template
>
...
...
@@ -85,13 +111,14 @@
<li>
<table
class=
"PT_teamTable"
>
<tr>
<th
width=
"140"
>
团号
</th>
<th
width=
"140"
>
团号
</th>
<th
width=
"60"
>
人数
</th>
<th
width=
"120"
>
领队
</th>
<th
width=
"120"
>
导游
</th>
</tr>
<tr
v-for=
"item in QueryMsg.TeamInfoData"
>
<td><a
@
click=
"goUrlTravelControl('团控列表','TravelControlList',item.TCID,item.TCNUM)"
style=
"cursor:pointer;color:blue;"
>
{{
item
.
TCNUM
+
`(${item.TCID
}
)`
}}
<
/a></
td
>
<td><a
@
click=
"goUrlTravelControl('团控列表','TravelControlList',item.TCID,item.TCNUM)"
style=
"cursor:pointer;color:blue;"
>
{{
item
.
TCNUM
+
`(${item.TCID
}
)`
}}
<
/a></
td
>
<
td
>
{{
item
.
TotalSeat
}}
人
<
/td
>
<
td
>
{{
item
.
LeaderName
}}
<
/td
>
<
td
>
{{
item
.
GuideName
}}
<
/td
>
...
...
@@ -114,18 +141,12 @@
<
/el-col
>
<
/el-row
>
<
div
v
-
loading
=
"loading"
><
/div
>
<
table
style
=
"margin-bottom: 50px;"
class
=
"travelpassengerlist"
border
=
"0"
cellspacing
=
"1"
cellpadding
=
"0"
v
-
for
=
"(item, index) in GuestDataList"
>
<
table
style
=
"margin-bottom: 50px;"
class
=
"travelpassengerlist"
border
=
"0"
cellspacing
=
"1"
cellpadding
=
"0"
v
-
for
=
"(item, index) in GuestDataList"
>
<
tr
style
=
"background: #E6E6E6;"
>
<
th
colspan
=
"11"
>
{{
item
.
NewHotelName
}}
<
/th
>
<
/tr
>
<
tr
style
=
"background: #E6E6E6;"
>
<
tr
style
=
"background: #E6E6E6;"
>
<
th
width
=
"50"
>
房间数
<
/th
>
<
th
width
=
"50"
>
房号
<
/th
>
<
th
width
=
"130"
>
酒店及房型
<
/th
>
...
...
@@ -138,79 +159,69 @@
<
th
width
=
"120"
>
年龄类型
<
/th
>
<
th
width
=
"60"
>
方式
<
/th
>
<
/tr
>
<
tr
v
-
for
=
"(subItem, subIndex) in item.GuestList"
:
class
=
"{'redTr':subItem.IsLeaderOrder==1
}
"
class
=
"h34"
>
<
td
>
{{
subIndex
+
1
}}
<
/td
>
<
td
width
=
"80"
>
<
el
-
select
v
-
model
=
"subItem.HouseNomber"
placeholder
=
"请选择"
@
change
=
"changeRmType(subItem, subIndex)"
v
-
if
=
"subItem.HouseNo == 1"
>
<
el
-
option
v
-
for
=
"(hs, hsIndex) in numberList"
:
key
=
"hs"
:
label
=
"hs"
:
value
=
"hs"
>
<
/el-option
>
<
/el-select
>
<
p
v
-
else
>
{{
subItem
.
HouseNo
}}
<
/p
>
<
/td
>
<
td
>
<
el
-
select
v
-
model
=
"subItem.HouseType"
placeholder
=
"请选择"
@
change
=
"changeRmType(subItem, subIndex)"
v
-
if
=
"subItem.HouseNo == 1"
>
<
el
-
option
v
-
for
=
"(hs, hsIndex) in HouseTypeList"
:
key
=
"hsIndex"
:
label
=
"hs.HouseName"
:
value
=
"hs.HouseType"
>
<
/el-option
>
<
/el-select
>
<
p
v
-
else
>
{{
getHouseTypeStr
(
subItem
.
HouseType
)
}}
<
/p
>
<
/td
>
<
td
>
{{
subItem
.
GuestName
}}
<
/td
>
<
td
>
{{
'占床'
}}
<
/td
>
<
td
>
{{
subItem
.
ESurName
}}
<
/td
>
<
td
>
{{
subItem
.
EName
}}
<
/td
>
<
td
>
{{
getSexStr
(
subItem
)
}}
<
/td
>
<
td
>
{{
subItem
.
Birthday
.
split
(
'T'
)[
0
]
}}
<
/td
>
<
td
>
{{
subItem
.
PeopleType
}}
<
/td
>
<
td
>
{{
subItem
.
GroupTypeStr
}}
<
/td
>
<
/tr
>
<
tr
>
<
td
style
=
"text-align:right"
colspan
=
"11"
><
input
type
=
"button"
value
=
"保存"
class
=
"leader2Btn"
@
click
=
"SetTravelChangeHouseService"
><
/td
>
<
/tr
>
<
tr
v
-
if
=
"item.ChangeGuest.length > 0"
class
=
"h34"
>
<
td
colspan
=
"11"
><
/td
>
<
/tr
>
<
tr
v
-
for
=
"(subItem, subIndex) in item.ChangeGuest"
class
=
"h34"
>
<
td
>
{{
subIndex
+
1
}}
<
/td
>
<
td
width
=
"80"
>
<
el
-
select
v
-
model
=
"subItem.ChangeHouseNum"
placeholder
=
"请选择"
@
change
=
"changeRmType2(subItem, subIndex)"
>
<
el
-
option
v
-
for
=
"(hs, hsIndex) in numberList"
:
key
=
"hs"
:
label
=
"hs"
:
value
=
"hs"
>
<
/el-option
>
<
/el-select>
<
/td
>
<
td
>
<
el
-
select
v
-
model
=
"subItem.ChangeHouseType"
placeholder
=
"请选择"
@
change
=
"changeRmType2(subItem, subIndex)"
>
<
el
-
option
v
-
for
=
"(hs, hsIndex) in HouseTypeList"
:
key
=
"hsIndex"
:
label
=
"hs.HouseName"
:
value
=
"hs.HouseType"
>
<
/el-option
>
<
/el-select>
<
/td
>
<
td
>
{{
subItem
.
GuestName
}}
<
/td
>
<
td
>
{{
'占床'
}}
<
/td
>
<
td
>
{{
subItem
.
ESurName
}}
<
/td
>
<
td
>
{{
subItem
.
EName
}}
<
/td
>
<
td
>
{{
getSexStr
(
subItem
)
}}
<
/td
>
<
td
>
{{
subItem
.
Birthday
.
split
(
'T'
)[
0
]
}}
<
/td
>
<
td
>
{{
subItem
.
PeopleType
}}
<
/td
>
<
td
>
{{
subItem
.
GroupTypeStr
}}
<
/td
>
<
/tr
>
<
tr
v
-
for
=
"(subItem, subIndex) in item.GuestList"
:
class
=
"{'redTr':subItem.IsLeaderOrder==1
}
"
class
=
"h34"
>
<
td
>
{{
subIndex
+
1
}}
<
/td
>
<
td
width
=
"80"
>
<
el
-
select
v
-
model
=
"subItem.HouseNomber"
placeholder
=
"请选择"
@
change
=
"changeRmType(subItem, subIndex)"
v
-
if
=
"subItem.HouseNo == 1"
>
<
el
-
option
v
-
for
=
"(hs, hsIndex) in numberList"
:
key
=
"hs"
:
label
=
"hs"
:
value
=
"hs"
>
<
/el-option
>
<
/el-select
>
<
p
v
-
else
>
{{
subItem
.
HouseNo
}}
<
/p
>
<
/td
>
<
td
>
<
el
-
select
v
-
model
=
"subItem.HouseType"
placeholder
=
"请选择"
@
change
=
"changeRmType(subItem, subIndex)"
v
-
if
=
"subItem.HouseNo == 1"
>
<
el
-
option
v
-
for
=
"(hs, hsIndex) in HouseTypeList"
:
key
=
"hsIndex"
:
label
=
"hs.HouseName"
:
value
=
"hs.HouseType"
>
<
/el-option
>
<
/el-select
>
<
p
v
-
else
>
{{
getHouseTypeStr
(
subItem
.
HouseType
)
}}
<
/p
>
<
/td
>
<
td
>
{{
subItem
.
GuestName
}}
<
/td
>
<
td
>
{{
'占床'
}}
<
/td
>
<
td
>
{{
subItem
.
ESurName
}}
<
/td
>
<
td
>
{{
subItem
.
EName
}}
<
/td
>
<
td
>
{{
getSexStr
(
subItem
)
}}
<
/td
>
<
td
>
{{
subItem
.
Birthday
.
split
(
'T'
)[
0
]
}}
<
/td
>
<
td
>
{{
subItem
.
PeopleType
}}
<
/td
>
<
td
>
{{
subItem
.
GroupTypeStr
}}
<
/td
>
<
/tr
>
<
tr
>
<
td
style
=
"text-align:right"
colspan
=
"11"
><
input
type
=
"button"
value
=
"保存"
class
=
"leader2Btn"
@
click
=
"SetTravelChangeHouseService"
><
/td
>
<
/tr
>
<
tr
v
-
if
=
"item.ChangeGuest.length > 0"
class
=
"h34"
>
<
td
colspan
=
"11"
><
/td
>
<
/tr
>
<
tr
v
-
for
=
"(subItem, subIndex) in item.ChangeGuest"
class
=
"h34"
>
<
td
>
{{
subIndex
+
1
}}
<
/td
>
<
td
width
=
"80"
>
<
el
-
select
v
-
model
=
"subItem.ChangeHouseNum"
placeholder
=
"请选择"
@
change
=
"changeRmType2(subItem, subIndex)"
>
<
el
-
option
v
-
for
=
"(hs, hsIndex) in numberList"
:
key
=
"hs"
:
label
=
"hs"
:
value
=
"hs"
>
<
/el-option
>
<
/el-select
>
<
/td
>
<
td
>
<
el
-
select
v
-
model
=
"subItem.ChangeHouseType"
placeholder
=
"请选择"
@
change
=
"changeRmType2(subItem, subIndex)"
>
<
el
-
option
v
-
for
=
"(hs, hsIndex) in HouseTypeList"
:
key
=
"hsIndex"
:
label
=
"hs.HouseName"
:
value
=
"hs.HouseType"
>
<
/el-option
>
<
/el-select
>
<
/td
>
<
td
>
{{
subItem
.
GuestName
}}
<
/td
>
<
td
>
{{
'占床'
}}
<
/td
>
<
td
>
{{
subItem
.
ESurName
}}
<
/td
>
<
td
>
{{
subItem
.
EName
}}
<
/td
>
<
td
>
{{
getSexStr
(
subItem
)
}}
<
/td
>
<
td
>
{{
subItem
.
Birthday
.
split
(
'T'
)[
0
]
}}
<
/td
>
<
td
>
{{
subItem
.
PeopleType
}}
<
/td
>
<
td
>
{{
subItem
.
GroupTypeStr
}}
<
/td
>
<
/tr
>
<!--
<
/template> --
>
<
tr
v
-
if
=
"item.ChangeGuest.length > 0"
>
<
td
style
=
"text-align:right"
colspan
=
"11"
><
input
type
=
"button"
value
=
"保存"
class
=
"leader2Btn"
@
click
=
"SetTravelChangeHouseService2"
><
/td
>
<
td
style
=
"text-align:right"
colspan
=
"11"
><
input
type
=
"button"
value
=
"保存"
class
=
"leader2Btn"
@
click
=
"SetTravelChangeHouseService2"
><
/td
>
<
/tr
>
<
/table
>
<
div
class
=
"noDataNotice"
v
-
if
=
"GuestDataList.length < 1"
>
...
...
@@ -220,100 +231,124 @@
<
/div
>
<
/template
>
<
script
>
export
default
{
data
()
{
return
{
//请求数据
msg
:
{
PageIndex
:
1
,
PageSize
:
100
,
TCID
:
0
,
OrderId
:
0
,
currentPage
:
1
}
,
IsHaveLeader
:
1
,
//1-有领队,0-无领队
IsLeaderGuide
:
0
,
//1-领兼导,0-领队
TCID
:
0
,
loading
:
false
,
QueryMsg
:
{
export
default
{
data
()
{
return
{
//请求数据
msg
:
{
PageIndex
:
1
,
PageSize
:
100
,
TCID
:
0
,
OrderId
:
0
,
currentPage
:
1
}
,
IsHaveLeader
:
1
,
//1-有领队,0-无领队
IsLeaderGuide
:
0
,
//1-领兼导,0-领队
TCID
:
0
,
OrderId
:
0
,
//团期数据
TeamInfoData
:
[]
}
,
houseList
:
[],
HouseTypeList
:
[],
numberList
:
[],
HotelList
:
[],
GuestDataList
:
[],
editList
:
[],
editList2
:
[],
selectTime
:
''
,
}
;
}
,
methods
:
{
SetTravelChangeHouseService2
:
function
(){
if
(
this
.
editList2
.
length
<
1
)
{
return
this
.
$message
.
error
(
'请修改房间类型后在保存!'
)
}
this
.
apipost
(
"travelhouse_post_SetTravelChangeHouseService"
,
this
.
editList2
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
$message
.
success
(
'操作成功'
)
this
.
getList
(
this
.
selectTime
)
}
else
{
this
.
$message
.
error
(
'操作失败'
)
}
loading
:
false
,
QueryMsg
:
{
TCID
:
0
,
OrderId
:
0
,
//团期数据
TeamInfoData
:
[]
}
,
err
=>
{
}
);
houseList
:
[],
HouseTypeList
:
[],
numberList
:
[],
HotelList
:
[],
GuestDataList
:
[],
editList
:
[],
editList2
:
[],
selectTime
:
''
,
}
;
}
,
SetTravelChangeHouseService
:
function
(){
if
(
this
.
editList
.
length
<
1
)
{
return
this
.
$message
.
error
(
'请修改房间类型后在保存!'
)
}
this
.
apipost
(
"travelhouse_post_SetTravelChangeHouseService"
,
this
.
editList
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
$message
.
success
(
'操作成功'
)
this
.
getList
(
this
.
selectTime
)
}
else
{
this
.
$message
.
error
(
'操作失败'
)
methods
:
{
SetTravelChangeHouseService2
:
function
()
{
if
(
this
.
editList2
.
length
<
1
)
{
return
this
.
$message
.
error
(
'请修改房间类型后在保存!'
)
}
this
.
apipost
(
"travelhouse_post_SetTravelChangeHouseService"
,
this
.
editList2
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
$message
.
success
(
'操作成功'
)
this
.
getList
(
this
.
selectTime
)
}
else
{
this
.
$message
.
error
(
'操作失败'
)
}
}
,
err
=>
{
}
);
}
,
SetTravelChangeHouseService
:
function
()
{
if
(
this
.
editList
.
length
<
1
)
{
return
this
.
$message
.
error
(
'请修改房间类型后在保存!'
)
}
var
TCID
=
0
;
this
.
editList
.
forEach
((
sItem
,
sIndex
)
=>
{
if
(
sIndex
==
0
)
{
TCID
=
sItem
.
TCID
;
}
else
{
sItem
.
TCID
=
TCID
;
}
}
,
err
=>
{
}
);
}
,
changeTime
:
function
(
index
){
this
.
HotelList
.
map
((
x
,
i
)
=>
{
x
.
active
=
false
;
}
)
this
.
HotelList
[
index
].
active
=
true
;
this
.
getList
(
this
.
HotelList
[
index
].
UseTime
)
}
,
changeRmType2
:
function
(
obj
,
index
)
{
let
list
=
this
.
editList2
let
msg
=
{
CombineNo
:
''
,
HouseType
:
obj
.
ChangeHouseType
,
HouseNum
:
obj
.
ChangeHouseNum
,
OldHouseId
:
obj
.
HouseId
,
GuestId
:
obj
.
Id
,
TravelDate
:
this
.
selectTime
,
HotelId
:
obj
.
HotelId
,
TCID
:
obj
.
TCID
,
}
if
(
!
list
.
length
)
{
list
.
push
(
msg
)
}
else
{
let
re
=
false
;
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
if
(
list
[
i
].
GuestId
==
obj
.
Id
)
{
list
[
i
]
=
{
}
);
//console.log("this.editList",this.editList);
this
.
apipost
(
"travelhouse_post_SetTravelChangeHouseService"
,
this
.
editList
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
$message
.
success
(
'操作成功'
)
this
.
getList
(
this
.
selectTime
)
}
else
{
this
.
$message
.
error
(
'操作失败'
)
}
}
,
err
=>
{
}
);
}
,
changeTime
:
function
(
index
)
{
this
.
HotelList
.
map
((
x
,
i
)
=>
{
x
.
active
=
false
;
}
)
this
.
HotelList
[
index
].
active
=
true
;
this
.
getList
(
this
.
HotelList
[
index
].
UseTime
)
}
,
changeRmType2
:
function
(
obj
,
index
)
{
let
list
=
this
.
editList2
let
msg
=
{
CombineNo
:
''
,
HouseType
:
obj
.
ChangeHouseType
,
HouseNum
:
obj
.
ChangeHouseNum
,
OldHouseId
:
obj
.
HouseId
,
GuestId
:
obj
.
Id
,
TravelDate
:
this
.
selectTime
,
HotelId
:
obj
.
HotelId
,
TCID
:
obj
.
TCID
,
}
if
(
!
list
.
length
)
{
list
.
push
(
msg
)
}
else
{
let
re
=
false
;
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
if
(
list
[
i
].
GuestId
==
obj
.
Id
)
{
list
[
i
]
=
{
CombineNo
:
''
,
HouseType
:
obj
.
ChangeHouseType
,
HouseNum
:
obj
.
ChangeHouseNum
,
OldHouseId
:
obj
.
HouseId
,
GuestId
:
obj
.
Id
,
TravelDate
:
this
.
selectTime
,
HotelId
:
obj
.
HotelId
,
TCID
:
obj
.
TCID
,
}
re
=
true
break
;
}
}
if
(
!
re
)
{
list
.
push
({
CombineNo
:
''
,
HouseType
:
obj
.
ChangeHouseType
,
HouseNum
:
obj
.
ChangeHouseNum
,
...
...
@@ -321,47 +356,47 @@ export default {
GuestId
:
obj
.
Id
,
TravelDate
:
this
.
selectTime
,
HotelId
:
obj
.
HotelId
,
TCID
:
obj
.
TCID
,
}
re
=
true
break
;
TCID
:
list
[
0
].
TCID
,
}
)
}
}
if
(
!
re
)
{
list
.
push
({
CombineNo
:
''
,
HouseType
:
obj
.
ChangeHouseType
,
HouseNum
:
obj
.
ChangeHouseNum
,
OldHouseId
:
obj
.
HouseId
,
GuestId
:
obj
.
Id
,
TravelDate
:
this
.
selectTime
,
HotelId
:
obj
.
HotelId
,
TCID
:
list
[
0
].
TCID
,
}
)
this
.
editList2
=
list
}
,
// 修改类型
changeRmType
:
function
(
obj
,
index
)
{
let
list
=
this
.
editList
let
msg
=
{
CombineNo
:
''
,
HouseType
:
obj
.
HouseType
,
HouseNum
:
obj
.
HouseNomber
,
OldHouseId
:
obj
.
HouseId
,
GuestId
:
obj
.
Id
,
TravelDate
:
this
.
selectTime
,
HotelId
:
obj
.
HotelId
,
TCID
:
obj
.
TCID
,
}
}
this
.
editList2
=
list
}
,
// 修改类型
changeRmType
:
function
(
obj
,
index
){
let
list
=
this
.
editList
let
msg
=
{
CombineNo
:
''
,
HouseType
:
obj
.
HouseType
,
HouseNum
:
obj
.
HouseNomber
,
OldHouseId
:
obj
.
HouseId
,
GuestId
:
obj
.
Id
,
TravelDate
:
this
.
selectTime
,
HotelId
:
obj
.
HotelId
,
TCID
:
obj
.
TCID
,
}
if
(
!
list
.
length
)
{
list
.
push
(
msg
)
}
else
{
let
re
=
false
;
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
if
(
list
[
i
].
GuestId
==
obj
.
Id
)
{
list
[
i
]
=
{
if
(
!
list
.
length
)
{
list
.
push
(
msg
)
}
else
{
let
re
=
false
;
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
if
(
list
[
i
].
GuestId
==
obj
.
Id
)
{
list
[
i
]
=
{
CombineNo
:
''
,
HouseType
:
obj
.
HouseType
,
HouseNum
:
obj
.
HouseNomber
,
OldHouseId
:
obj
.
HouseId
,
GuestId
:
obj
.
Id
,
TravelDate
:
this
.
selectTime
,
HotelId
:
obj
.
HotelId
,
TCID
:
obj
.
TCID
,
}
re
=
true
break
;
}
}
if
(
!
re
)
{
list
.
push
({
CombineNo
:
''
,
HouseType
:
obj
.
HouseType
,
HouseNum
:
obj
.
HouseNomber
,
...
...
@@ -369,186 +404,167 @@ export default {
GuestId
:
obj
.
Id
,
TravelDate
:
this
.
selectTime
,
HotelId
:
obj
.
HotelId
,
TCID
:
obj
.
TCID
,
}
re
=
true
break
;
TCID
:
list
[
0
].
TCID
,
}
)
}
}
if
(
!
re
)
{
list
.
push
({
CombineNo
:
''
,
HouseType
:
obj
.
HouseType
,
HouseNum
:
obj
.
HouseNomber
,
OldHouseId
:
obj
.
HouseId
,
GuestId
:
obj
.
Id
,
TravelDate
:
this
.
selectTime
,
HotelId
:
obj
.
HotelId
,
TCID
:
list
[
0
].
TCID
,
}
)
}
}
this
.
editList
=
list
}
,
compare
:
function
(
obj1
,
obj2
)
{
this
.
editList
=
list
}
,
compare
:
function
(
obj1
,
obj2
)
{
var
val1
=
Number
(
obj1
.
HouseNo
);
var
val2
=
Number
(
obj2
.
HouseNo
);
if
(
val1
<
val2
)
{
return
-
1
;
return
-
1
;
}
else
if
(
val1
>
val2
)
{
return
1
;
return
1
;
}
else
{
return
0
;
return
0
;
}
}
,
// 修改房号
sortNumberN
:
function
(
obj
,
index
){
let
list
=
this
.
GuestDataList
;
// 选择房号后循环数据把房号相同的数据房型修改成一样的
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
if
(
obj
.
HouseNo
===
list
[
i
].
HouseNo
&&
obj
.
Id
!==
list
[
i
].
Id
)
{
obj
.
HouseType
=
list
[
i
].
HouseType
}
}
list
=
list
.
sort
(
this
.
compare
)
this
.
GuestDataList
=
list
;
}
,
//保存分房
saveOPSetGuestHouse
:
function
(){
this
.
apipost
(
"travel_get_OPSetGuestHouse"
,
this
.
GuestDataList
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
$message
.
success
(
'操作成功'
)
}
else
{
this
.
$message
.
error
(
'操作失败'
)
}
,
// 修改房号
sortNumberN
:
function
(
obj
,
index
)
{
let
list
=
this
.
GuestDataList
;
// 选择房号后循环数据把房号相同的数据房型修改成一样的
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
if
(
obj
.
HouseNo
===
list
[
i
].
HouseNo
&&
obj
.
Id
!==
list
[
i
].
Id
)
{
obj
.
HouseType
=
list
[
i
].
HouseType
}
}
,
err
=>
{
}
);
}
,
goUrlTravelControl
(
name
,
path
,
id
,
tcmun
)
{
this
.
$router
.
push
({
name
:
path
,
query
:
{
id
:
id
,
tcmun
:
tcmun
,
blank
:
"y"
,
tab
:
name
}
}
);
}
,
//获取性别字符串
getSexStr
(
item
)
{
var
str
=
""
;
if
(
item
.
Sex
==
1
)
{
str
=
"男"
;
}
else
{
str
=
"女"
;
}
return
str
;
}
,
//获取房间类型
getHouseTypeStr
(
HouseType
)
{
var
str
=
""
;
if
(
HouseType
==
1
)
{
str
=
"自然单间"
;
}
else
if
(
HouseType
==
2
)
{
str
=
"标准双人间"
;
}
else
if
(
HouseType
==
3
)
{
str
=
"大床房"
;
}
else
if
(
HouseType
==
4
)
{
str
=
"三人间"
;
}
else
if
(
HouseType
==
5
)
{
str
=
"拼凑双人间"
;
}
else
{
str
=
"未分配"
;
}
return
str
;
}
,
getHouseTypeList
:
function
(){
this
.
apipost
(
"travel_get_GetHouseType"
,
this
.
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
HouseTypeList
=
res
.
data
.
data
;
list
=
list
.
sort
(
this
.
compare
)
this
.
GuestDataList
=
list
;
}
,
//保存分房
saveOPSetGuestHouse
:
function
()
{
this
.
apipost
(
"travel_get_OPSetGuestHouse"
,
this
.
GuestDataList
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
$message
.
success
(
'操作成功'
)
}
else
{
this
.
$message
.
error
(
'操作失败'
)
}
}
,
err
=>
{
}
);
}
,
goUrlTravelControl
(
name
,
path
,
id
,
tcmun
)
{
this
.
$router
.
push
({
name
:
path
,
query
:
{
id
:
id
,
tcmun
:
tcmun
,
blank
:
"y"
,
tab
:
name
}
}
,
err
=>
{
}
);
}
,
//获取数据
getList
(
time
)
{
this
.
selectTime
=
time
let
msg
=
{
TCIDs
:
this
.
TCID
,
travelDate
:
time
}
);
}
,
//获取性别字符串
getSexStr
(
item
)
{
var
str
=
""
;
if
(
item
.
Sex
==
1
)
{
str
=
"男"
;
}
else
{
str
=
"女"
;
}
return
str
;
}
,
//获取房间类型
getHouseTypeStr
(
HouseType
)
{
var
str
=
""
;
if
(
HouseType
==
1
)
{
str
=
"自然单间"
;
}
else
if
(
HouseType
==
2
)
{
str
=
"标准双人间"
;
}
else
if
(
HouseType
==
3
)
{
str
=
"大床房"
;
}
else
if
(
HouseType
==
4
)
{
str
=
"三人间"
;
}
else
if
(
HouseType
==
5
)
{
str
=
"拼凑双人间"
;
}
else
{
str
=
"未分配"
;
}
return
str
;
}
,
getHouseTypeList
:
function
()
{
this
.
apipost
(
"travel_get_GetHouseType"
,
this
.
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
HouseTypeList
=
res
.
data
.
data
;
}
}
,
err
=>
{
}
);
}
,
//获取数据
getList
(
time
)
{
this
.
selectTime
=
time
let
msg
=
{
TCIDs
:
this
.
TCID
,
travelDate
:
time
}
this
.
loading
=
true
;
this
.
apipost
(
"travelhouse_get_GetGuestByTCIDsAndDateService"
,
msg
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
GuestDataList
=
res
.
data
.
data
}
}
,
err
=>
{
}
);
}
,
exportExcel
()
{
//导出报表
let
msg
=
{
TCID
:
this
.
msg
.
TCID
}
;
var
fileName
=
"旅客名单.xls"
;
if
(
this
.
QueryMsg
.
TeamInfoData
!=
null
)
{
fileName
=
"【"
+
this
.
QueryMsg
.
TeamInfoData
[
0
].
TCNUM
+
"】旅客名单.xls"
;
}
this
.
GetLocalFile
(
"travel_get_GetTravelGuestExport"
,
msg
,
fileName
);
}
,
//获取团期信息
getTeamInfo
()
{
var
qmsg
=
{
TCIDs
:
this
.
TCID
}
;
this
.
apipost
(
"travelhouse_get_GetCombineBasicAndHotelService"
,
qmsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
QueryMsg
.
TeamInfoData
=
res
.
data
.
data
.
PriceList
;
let
HotelList
=
res
.
data
.
data
.
HotelList
;
for
(
let
i
=
0
;
i
<
HotelList
.
length
;
i
++
)
{
HotelList
[
i
].
active
=
false
;
}
this
.
HotelList
=
HotelList
;
}
}
,
err
=>
{
}
);
}
this
.
loading
=
true
;
this
.
apipost
(
"travelhouse_get_GetGuestByTCIDsAndDateService"
,
msg
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
console
.
log
(
res
.
data
.
data
)
this
.
GuestDataList
=
res
.
data
.
data
}
}
,
err
=>
{
}
);
}
,
exportExcel
()
{
//导出报表
let
msg
=
{
TCID
:
this
.
msg
.
TCID
}
;
var
fileName
=
"旅客名单.xls"
;
if
(
this
.
QueryMsg
.
TeamInfoData
!=
null
)
{
fileName
=
"【"
+
this
.
QueryMsg
.
TeamInfoData
[
0
].
TCNUM
+
"】旅客名单.xls"
;
mounted
()
{
let
numberList
=
[]
for
(
let
i
=
0
;
i
<
99
;
i
++
)
{
numberList
.
push
(
`${i+1
}
`
)
}
this
.
GetLocalFile
(
"travel_get_GetTravelGuestExport"
,
msg
,
fileName
);
}
,
//获取团期信息
getTeamInfo
()
{
var
qmsg
=
{
TCIDs
:
this
.
TCID
}
;
this
.
apipost
(
"travelhouse_get_GetCombineBasicAndHotelService"
,
qmsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
QueryMsg
.
TeamInfoData
=
res
.
data
.
data
.
PriceList
;
let
HotelList
=
res
.
data
.
data
.
HotelList
;
for
(
let
i
=
0
;
i
<
HotelList
.
length
;
i
++
)
{
HotelList
[
i
].
active
=
false
;
}
this
.
HotelList
=
HotelList
;
}
}
,
err
=>
{
}
);
this
.
numberList
=
numberList
this
.
TCID
=
this
.
$route
.
query
.
id
;
this
.
msg
.
TCID
=
this
.
TCID
;
this
.
msg
.
OrderId
=
this
.
$route
.
query
.
OrderId
;
this
.
getTeamInfo
();
this
.
getHouseTypeList
();
}
}
,
mounted
()
{
let
numberList
=
[]
for
(
let
i
=
0
;
i
<
99
;
i
++
)
{
numberList
.
push
(
`${i+1
}
`
)
}
this
.
numberList
=
numberList
this
.
TCID
=
this
.
$route
.
query
.
id
;
this
.
msg
.
TCID
=
this
.
TCID
;
this
.
msg
.
OrderId
=
this
.
$route
.
query
.
OrderId
;
this
.
getTeamInfo
();
this
.
getHouseTypeList
();
}
}
;
<
/script>
\ No newline at end of file
}
;
<
/script
>
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