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
d5bf8476
Commit
d5bf8476
authored
5 years ago
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
851b4aca
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
171 additions
and
141 deletions
+171
-141
roomReservationsDetails.vue
src/components/Hotel/roomReservationsDetails.vue
+46
-7
comCheckHotel.vue
src/components/commonPage/comCheckHotel.vue
+125
-134
No files found.
src/components/Hotel/roomReservationsDetails.vue
View file @
d5bf8476
...
...
@@ -116,10 +116,19 @@
<td
v-if=
"childIndex==0"
:rowspan=
"5"
>
<table
class=
"hotelTable"
>
<tr>
<td
width=
"70"
style=
"text-align:right;"
>
酒店
</td>
<td>
<!--:disabled="subItem.OPState==1"-->
<el-select
class=
'w120 sel'
v-model=
'subItem.NewHotelId'
filterable
<td
width=
"70"
style=
"text-align:center;"
colspan=
"2"
>
<span
style=
"color:red"
>
{{
subItem
.
NewHotelName
}}
</span>
<el-popover
placement=
"right"
width=
"500"
trigger=
"click"
v-model=
"subItem.isShowPop"
>
<comCheckHotel
:ref=
"'comCheckHotel'+index+subIndex+''"
v-on:childHotel=
"childHotelList"
:UseDate=
"item.UseTimeStr"
>
</comCheckHotel>
<el-button
size=
"small"
type=
"danger"
:data-index=
"'comCheckHotel'+index+subIndex+''"
slot=
"reference"
style=
"cursor:pointer;"
@
click=
"getChildHotel(index,subIndex),subItem.isShowPop=true"
>
酒店选择
</el-button>
</el-popover>
<!--
<el-select
class=
'w120 sel'
v-model=
'subItem.NewHotelId'
filterable
:placeholder=
"$t('pub.pleaseSel')"
@
visible-change=
'getHotelList(subItem)'
@
change=
'sendValue(subItem)'
>
<el-option
v-for=
'itemHotel in subItem.hotelList'
:label=
'itemHotel.Name'
:value=
'itemHotel.ID'
...
...
@@ -127,14 +136,14 @@
<span
style=
"float: left"
>
{{
itemHotel
.
Name
}}
</span>
<span
style=
"float: right; color:red; font-size: 13px"
>
{{
itemHotel
.
Inventory
}}
</span>
</el-option>
</el-select>
</el-select>
-->
</td>
</tr>
<tr>
<td
colspan=
"2"
style=
"height:5px;"
></td>
</tr>
<tr>
<td
width=
"70"
style=
"text-align:right;"
>
<td
width=
"70"
style=
"text-align:right;"
>
供应商
</td>
<td>
...
...
@@ -282,7 +291,7 @@
<el-tooltip
class=
"item"
effect=
"dark"
content=
"新增"
placement=
"top-start"
>
<el-button
@
click=
'AddHotel(item,subIndex)'
icon=
"iconfont icon-tianjia"
type=
"primary"
></el-button>
</el-tooltip>
<el-tooltip
v-if=
"item.HotelOrderList.length>1
||index==0
"
class=
"item"
effect=
"dark"
content=
"删除"
<el-tooltip
v-if=
"item.HotelOrderList.length>1"
class=
"item"
effect=
"dark"
content=
"删除"
placement=
"top-start"
>
<el-button
type=
"primary"
icon=
"iconfont icon-shanchu"
@
click=
'DeleteHotel(item,subIndex)'
>
</el-button>
...
...
@@ -300,6 +309,7 @@
</div>
</template>
<
script
>
import
comCheckHotel
from
"../commonPage/comCheckHotel.vue"
;
export
default
{
data
()
{
return
{
...
...
@@ -327,9 +337,36 @@
IsOperation
:
''
,
//供应商列表
SupplierList
:
[],
ckedHotelId
:
0
,
ckedHotelName
:
''
,
showHotelList
:
false
,
findex
:
0
,
childIndex
:
0
,
}
},
components
:
{
comCheckHotel
},
methods
:
{
childHotelList
(
ckedObj
)
{
this
.
list
.
forEach
(
x
=>
{
x
.
HotelOrderList
.
forEach
(
y
=>
{
y
.
isShowPop
=
false
;
})
})
this
.
list
[
this
.
findex
].
HotelOrderList
[
this
.
childIndex
].
Address
=
ckedObj
.
Address
;
this
.
list
[
this
.
findex
].
HotelOrderList
[
this
.
childIndex
].
NewHotelName
=
ckedObj
.
Name
;
this
.
list
[
this
.
findex
].
HotelOrderList
[
this
.
childIndex
].
Tel
=
ckedObj
.
Tel
;
this
.
list
[
this
.
findex
].
HotelOrderList
[
this
.
childIndex
].
NewHotelId
=
ckedObj
.
ID
;
this
.
list
[
this
.
findex
].
HotelOrderList
[
this
.
childIndex
].
PayStyle
=
ckedObj
.
PayStyle
;
this
.
list
[
this
.
findex
].
HotelOrderList
[
this
.
childIndex
].
PayStyleExt
=
ckedObj
.
PayStyle
;
},
getChildHotel
(
index
,
subIndex
)
{
this
.
findex
=
index
;
this
.
childIndex
=
subIndex
;
let
str
=
`comCheckHotel
${
index
}${
subIndex
}
`
this
.
$refs
[
str
][
0
].
getCheckHotel
();
},
getItem
(
index
,
subIndex
)
{
this
.
checkedIndex
=
index
this
.
checkedsubIndex
=
subIndex
...
...
@@ -465,6 +502,8 @@
if
(
subItem
.
ReserveNo
==
''
||
subItem
.
ReserveNo
==
null
)
{
subItem
.
ReserveNo
=
this
.
$route
.
query
.
NewCombinationNum
;
}
subItem
.
isShowPop
=
false
;
subItem
.
ckedHotelName
=
""
;
})
});
this
.
list
=
list
;
...
...
This diff is collapsed.
Click to expand it.
src/components/commonPage/comCheckHotel.vue
View file @
d5bf8476
<
style
>
.comCheckHotel
{
padding-bottom
:
20px
;
border-bottom
:
1px
solid
#d1d1d1
;
}
.comCheckHotel
>
div
{
width
:
100%
;
height
:
200px
;
overflow
:
auto
}
.comCk_list
{
cursor
:
pointer
;
padding
:
0
20px
;
margin
:
0
15px
5px
0
;
}
.cm_Inventory
{
margin-left
:
20px
;
color
:
red
;
display
:
inline-block
;
}
.cm_hotelTitle
{
width
:
100%
;
text-align
:
center
;
margin-bottom
:
20px
;
border-bottom
:
1px
solid
#d1d1d1
;
padding
:
0
20px
10px
20px
;
}
.com_SaveBtn
{
margin
:
10px
20px
0
45%
;
}
.ckedList
{
background-color
:
#E95252
;
color
:
#fff
;
}
.comCheckHotel
>
div
{
width
:
100%
;
height
:
150px
;
overflow
:
auto
}
.comCk_list
{
cursor
:
pointer
;
padding
:
0
20px
;
margin
:
0
15px
5px
0
;
}
.cm_Inventory
{
margin-left
:
20px
;
color
:
red
;
display
:
inline-block
;
}
.cm_hotelTitle
{
width
:
100%
;
text-align
:
center
;
margin-bottom
:
20px
;
border-bottom
:
1px
solid
#d1d1d1
;
padding
:
0
20px
10px
20px
;
}
.com_SaveBtn
{
margin
:
10px
20px
0
45%
;
}
.ckedList
{
background-color
:
#E95252
;
color
:
#fff
;
}
.Ck_hotelInfo
{
width
:
100%
;
height
:
40px
;
background-color
:
#F6F8FB
;
text-align
:
center
;
line-height
:
40px
;
margin-bottom
:
10px
;
}
</
style
>
<
template
>
<div>
<div
class=
"Ck_hotelInfo"
>
<span
style=
"color:red"
>
{{
UseDate
}}
</span>
酒店库存信息
</div>
<div
class=
"cm_hotelTitle"
>
地区筛选:
<el-select
filterable
v-model=
"ProvinceId"
@
change=
"getCheckHotel()"
:placeholder=
"$t('pub.pleaseSel')"
>
<el-option
label=
"不限"
:value=
'0'
></el-option>
<el-option
v-for=
"item in ProvinceList"
:label=
'item.Name'
:value=
'item.ID'
:key=
'item.ID'
>
</el-option>
</el-select>
</div>
<div>
<div
class=
"cm_hotelTitle"
>
<el-select
filterable
v-model=
"selHotelId"
@
change=
"getChangeHotel(selHotelId)"
:placeholder=
"$t('pub.pleaseSel')"
>
<el-option
label=
"不限"
:value=
'0'
></el-option>
<el-option
v-for=
"item in ProvinceList"
:label=
'item.Name'
:value=
'item.ID'
:key=
'item.ID'
>
</el-option>
</el-select>
酒店信息
</div>
<div>
<el-tabs
v-model=
"activeName"
type=
"card"
@
tab-click=
"handleClick"
>
<el-tab-pane
:label=
"item.ProvinceName"
v-for=
"item in dataList"
></el-tab-pane>
</el-tabs>
</div>
<div
class=
"clearfix comCheckHotel"
>
<el-tabs
type=
"border-card"
v-loading=
"loading"
>
<el-tab-pane
:label=
"item.ProvinceName"
v-for=
"(item,index) in dataList"
>
<div
class=
"clearfix comCheckHotel"
>
<div>
<div
class=
"comCk_list"
v-for=
"(item,index) in HotelList"
>
<input
type=
"checkbox"
v-model=
"item.isChecked"
@
click=
"getCheck(item,index)"
style=
""
/>
{{
item
.
Name
}}
<span
class=
"cm_Inventory"
>
{{
item
.
Inventory
}}
</span>
</div>
<div
class=
"comCk_list"
v-for=
"(subItem,subIndex) in item.HotelList"
>
<input
type=
"checkbox"
v-model=
"subItem.isChecked"
@
click=
"getCheck(item.HotelList,subIndex)"
style=
""
/>
{{
subItem
.
Name
}}
<span
class=
"cm_Inventory"
>
{{
subItem
.
Inventory
}}
</span>
</div>
</div>
</div>
<input
type=
"button"
class=
"normalBtn com_SaveBtn"
@
click=
"sendCkedHotel()"
value=
"保存"
/>
</div>
</el-tab-pane>
</el-tabs>
</div>
<input
type=
"button"
class=
"normalBtn com_SaveBtn"
@
click=
"sendCkedHotel()"
value=
"保存"
/>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
dataList
:[],
HotelList
:[],
ckindexOne
:
-
1
,
ckindexTwo
:
-
1
,
ID
:
0
,
HotelName
:
''
,
ProvinceList
:[],
selHotelId
:
0
,
activeName
:
''
,
};
},
methods
:
{
getCheckHotel
(
sDate
){
export
default
{
props
:
[
"UseDate"
],
data
()
{
return
{
loading
:
false
,
dataList
:
[],
ProvinceList
:
[],
ProvinceId
:
0
,
//选择个省份编号
};
},
methods
:
{
getCheckHotel
()
{
this
.
loading
=
true
;
this
.
dataList
=
[];
this
.
HotelList
=
[];
this
.
apipost
(
'hotel_post_GetHasStockHotelList_V2'
,
{
//1-只查询有库存的酒店
IsMoreThanZero
:
0
,
Country
:
"651"
,
IsAllHotel
:
1
,
sDate
:
sDate
Province
:
this
.
ProvinceId
,
sDate
:
this
.
UseDate
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
dataList
=
res
.
data
.
data
;
this
.
dataList
.
forEach
(
x
=>
{
x
.
HotelList
.
forEach
(
y
=>
{
y
.
isChecked
=
false
;
})
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
dataList
=
res
.
data
.
data
;
this
.
dataList
.
forEach
(
x
=>
{
x
.
HotelList
.
forEach
(
y
=>
{
y
.
isChecked
=
false
;
})
})
console
.
log
(
this
.
dataList
,
'datalist'
);
}
else
{
this
.
Error
(
res
.
data
.
message
)
this
.
Error
(
res
.
data
.
message
)
}
},
err
=>
{})
},
getCheck
(
item
,
index
)
{
this
.
HotelList
.
forEach
((
x
,
subIndex
)
=>
{
if
(
index
==
subIndex
)
{
x
.
isChecked
=
!
x
.
isChecked
;
}
else
{
x
.
isChecked
=
false
;
}
})
this
.
$forceUpdate
();
getCheck
(
hotelList
,
index
)
{
hotelList
.
forEach
((
x
,
subIndex
)
=>
{
if
(
index
==
subIndex
)
{
x
.
isChecked
=
!
x
.
isChecked
;
}
else
{
x
.
isChecked
=
false
;
}
})
this
.
$forceUpdate
();
},
//向父组件传递选中酒店
sendCkedHotel
(){
sendCkedHotel
()
{
var
ckHotelObj
=
{};
this
.
HotelList
.
forEach
((
x
,
index
)
=>
{
if
(
x
.
isChecked
){
ckHotelObj
.
ID
=
x
.
ID
;
ckHotelObj
.
Address
=
x
.
Address
;
ckHotelObj
.
Inventory
=
x
.
Inventory
;
ckHotelObj
.
Name
=
x
.
Name
;
ckHotelObj
.
PayStyle
=
x
.
PayStyle
;
ckHotelObj
.
Tel
=
x
.
Tel
;
this
.
dataList
.
forEach
((
x
,
index
)
=>
{
x
.
HotelList
.
forEach
(
subItem
=>
{
if
(
subItem
.
isChecked
)
{
ckHotelObj
.
ID
=
subItem
.
ID
;
ckHotelObj
.
Address
=
subItem
.
Address
;
ckHotelObj
.
Inventory
=
subItem
.
Inventory
;
ckHotelObj
.
Name
=
subItem
.
Name
;
ckHotelObj
.
PayStyle
=
subItem
.
PayStyle
;
ckHotelObj
.
Tel
=
subItem
.
Tel
;
}
});
})
this
.
$emit
(
"childHotel"
,
ckHotelObj
);
},
//获取日本下面的市->下拉框用
getProvinceList
(){
getProvinceList
()
{
let
msg
=
{
Id
:
651
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
);
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
;
})
})
console
.
log
(
this
.
dataList
,
'dataList'
);
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
err
=>
{}
);
},
handleClick
()
{
this
.
HotelList
=
this
.
dataList
[
this
.
activeName
].
HotelList
;
}
},
mounted
()
{
},
mounted
()
{
this
.
getProvinceList
();
}
};
}
};
</
script
>
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