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
851b4aca
Commit
851b4aca
authored
Jun 13, 2019
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改组件
parent
92d7977c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
86 additions
and
54 deletions
+86
-54
comCheckHotel.vue
src/components/commonPage/comCheckHotel.vue
+86
-54
No files found.
src/components/commonPage/comCheckHotel.vue
View file @
851b4aca
...
@@ -4,16 +4,10 @@
...
@@ -4,16 +4,10 @@
border-bottom
:
1px
solid
#d1d1d1
;
border-bottom
:
1px
solid
#d1d1d1
;
}
}
.comCheckHotel
>
div
{
.comCheckHotel
>
div
{
float
:
left
;
width
:
100%
;
width
:
120px
;
border-right
:
1px
solid
#d1d1d1
;
height
:
200px
;
height
:
200px
;
overflow
:
auto
overflow
:
auto
}
}
.comCheckHotel
>
div
:last-child
{
width
:
230px
;
border
:
none
;
}
.comCk_list
{
.comCk_list
{
cursor
:
pointer
;
cursor
:
pointer
;
padding
:
0
20px
;
padding
:
0
20px
;
...
@@ -42,21 +36,24 @@
...
@@ -42,21 +36,24 @@
<
template
>
<
template
>
<div>
<div>
<div
class=
"cm_hotelTitle"
>
酒店信息
</div>
<div
class=
"cm_hotelTitle"
>
<div
class=
"clearfix comCheckHotel"
>
<el-select
filterable
v-model=
"selHotelId"
@
change=
"getChangeHotel(selHotelId)"
:placeholder=
"$t('pub.pleaseSel')"
>
<div>
<el-option
label=
"不限"
:value=
'0'
></el-option>
<div
class=
"comCk_list"
v-for=
"(item,index) in dataList"
:class=
"
{'ckedList':ckindexOne==index}" @click="getCityList(item),ckindexOne=index">
<el-option
v-for=
"item in ProvinceList"
:label=
'item.Name'
:value=
'item.ID'
{{
item
.
ProvinceName
}}
:key=
'item.ID'
>
</div>
</el-option>
</el-select>
酒店信息
</div>
</div>
<div>
<div>
<div
class=
"comCk_list"
v-for=
"(item,index) in cityList"
:class=
"
{'ckedList':ckindexTwo==index}" @click="getHotelList(item),ckindexTwo=index
">
<el-tabs
v-model=
"activeName"
type=
"card"
@
tab-click=
"handleClick
"
>
{{
item
.
CityName
}}
<el-tab-pane
:label=
"item.ProvinceName"
v-for=
"item in dataList"
></el-tab-pane>
</div
>
</el-tabs
>
</div>
</div>
<div
class=
"clearfix comCheckHotel"
>
<div>
<div>
<div
class=
"comCk_list"
v-for=
"
item
in HotelList"
>
<div
class=
"comCk_list"
v-for=
"
(item,index)
in HotelList"
>
<input
type=
"checkbox"
v-model=
"item.isChecked"
@
click=
"getCheck(item)"
style=
""
/>
<input
type=
"checkbox"
v-model=
"item.isChecked"
@
click=
"getCheck(item
,index
)"
style=
""
/>
{{
item
.
Name
}}
<span
class=
"cm_Inventory"
>
{{
item
.
Inventory
}}
</span>
{{
item
.
Name
}}
<span
class=
"cm_Inventory"
>
{{
item
.
Inventory
}}
</span>
</div>
</div>
</div>
</div>
...
@@ -66,21 +63,22 @@
...
@@ -66,21 +63,22 @@
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
// props:["sDate"],
data
()
{
data
()
{
return
{
return
{
dataList
:[],
dataList
:[],
cityList
:[],
HotelList
:[],
HotelList
:[],
ckindexOne
:
-
1
,
ckindexOne
:
-
1
,
ckindexTwo
:
-
1
,
ckindexTwo
:
-
1
,
ID
:
0
,
ID
:
0
,
HotelName
:
''
HotelName
:
''
,
ProvinceList
:[],
selHotelId
:
0
,
activeName
:
''
,
};
};
},
},
methods
:
{
methods
:
{
getCheckHotel
(
sDate
){
getCheckHotel
(
sDate
){
this
.
$forceUpdate
();
this
.
apipost
(
'hotel_post_GetHasStockHotelList_V2'
,
{
this
.
apipost
(
'hotel_post_GetHasStockHotelList_V2'
,
{
//1-只查询有库存的酒店
//1-只查询有库存的酒店
IsMoreThanZero
:
0
,
IsMoreThanZero
:
0
,
...
@@ -91,49 +89,83 @@ export default {
...
@@ -91,49 +89,83 @@ export default {
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
dataList
=
res
.
data
.
data
;
this
.
dataList
=
res
.
data
.
data
;
this
.
dataList
.
forEach
(
x
=>
{
this
.
dataList
.
forEach
(
x
=>
{
x
.
cityList
.
forEach
(
y
=>
{
x
.
HotelList
.
forEach
(
y
=>
{
y
.
HotelList
.
forEach
(
z
=>
{
y
.
isChecked
=
false
;
z
.
isChecked
=
false
;
})
})
})
})
})
console
.
log
(
this
.
dataList
,
'datalist'
);
console
.
log
(
this
.
dataList
,
'子组件'
);
}
else
{
}
else
{
this
.
Error
(
res
.
data
.
message
)
this
.
Error
(
res
.
data
.
message
)
}
}
},
err
=>
{})
},
err
=>
{})
},
},
getCityList
(
item
){
getCheck
(
item
,
index
){
this
.
cityList
=
item
.
cityList
;
this
.
HotelList
.
forEach
((
x
,
subIndex
)
=>
{
this
.
HotelList
=
[];
if
(
index
==
subIndex
){
},
x
.
isChecked
=
!
x
.
isChecked
;
getHotelList
(
item
){
}
else
{
this
.
HotelList
=
item
.
HotelList
;
},
getCheck
(
item
){
this
.
HotelList
.
forEach
(
x
=>
{
x
.
isChecked
=
false
;
x
.
isChecked
=
false
;
}
})
})
item
.
isChecked
=
!
item
.
isChecked
;
this
.
$forceUpdate
();
this
.
$forceUpdate
();
},
},
//向父组件传递选中酒店
//向父组件传递选中酒店
sendCkedHotel
(){
sendCkedHotel
(){
console
.
log
(
this
.
dataList
,
'重选'
);
var
ckHotelObj
=
{};
this
.
dataList
.
forEach
(
x
=>
{
this
.
HotelList
.
forEach
((
x
,
index
)
=>
{
x
.
cityList
.
forEach
(
y
=>
{
if
(
x
.
isChecked
){
y
.
HotelList
.
forEach
(
z
=>
{
ckHotelObj
.
ID
=
x
.
ID
;
if
(
z
.
isChecked
){
ckHotelObj
.
Address
=
x
.
Address
;
this
.
ID
=
z
.
ID
;
ckHotelObj
.
Inventory
=
x
.
Inventory
;
this
.
HotelName
=
z
.
Name
;
ckHotelObj
.
Name
=
x
.
Name
;
ckHotelObj
.
PayStyle
=
x
.
PayStyle
;
ckHotelObj
.
Tel
=
x
.
Tel
;
}
}
})
})
this
.
$emit
(
"childHotel"
,
ckHotelObj
);
},
//获取日本下面的市->下拉框用
getProvinceList
(){
let
msg
=
{
Id
:
651
};
this
.
apipost
(
"dict_post_Destination_GetChildList"
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
ProvinceList
=
res
.
data
.
data
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
err
=>
{}
);
},
getChangeHotel
(
id
){
let
msg
=
{
Province
:
id
}
this
.
apipost
(
"hotel_post_GetHasStockHotelList_V2"
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
dataList
=
res
.
data
.
data
;
this
.
HotelList
=
[];
this
.
dataList
.
forEach
(
x
=>
{
x
.
HotelList
.
forEach
(
y
=>
{
y
.
isChecked
=
false
;
})
})
})
})
this
.
$emit
(
"childHotel"
,
this
.
ID
,
this
.
HotelName
);
console
.
log
(
this
.
dataList
,
'dataList'
);
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
err
=>
{}
);
},
handleClick
()
{
this
.
HotelList
=
this
.
dataList
[
this
.
activeName
].
HotelList
;
}
}
},
},
mounted
(){
mounted
()
{
}
}
};
};
...
...
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