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
f2cf9551
Commit
f2cf9551
authored
Jul 09, 2019
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
酒店库存页面优化
parent
b86c0861
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
465 additions
and
441 deletions
+465
-441
HotelProductManage.vue
src/components/Hotel/HotelProductManage.vue
+462
-438
HotelProductManage2.vue
src/components/Hotel/HotelProductManage2.vue
+3
-3
No files found.
src/components/Hotel/HotelProductManage.vue
View file @
f2cf9551
<
style
>
<
style
>
.hotelproduct
.addGroup
{
.hotelproduct
.addGroup
{
width
:
500px
;
width
:
500px
;
}
}
.hotelproduct
.f1
{
float
:
left
;
.hotelproduct
.f1
{
margin
:
10px
18px
0
0
;
float
:
left
;
}
margin
:
10px
18px
0
0
;
.hotelproduct
.remarkTextarea
{
}
margin-top
:
13px
;
}
.hotelproduct
.remarkTextarea
{
.hotelproduct
.el-form-item__label
{
margin-top
:
13px
;
width
:
100px
;
}
line-height
:
45px
;
}
.hotelproduct
.el-form-item__label
{
.hotelproduct
.el-textarea__inner
{
width
:
100px
;
resize
:
none
;
line-height
:
45px
;
height
:
100px
;
}
display
:
inline-block
;
font-family
:
"微软雅黑"
;
.hotelproduct
.el-textarea__inner
{
}
resize
:
none
;
.hotelproduct
.el-form-item__error
{
height
:
100px
;
left
:
100px
;
display
:
inline-block
;
}
font-family
:
"微软雅黑"
;
.hotelproduct
.el-dialog--center
.el-dialog__body
{
}
padding
:
25px
0
0
25px
;
}
.hotelproduct
.el-form-item__error
{
.hotelproduct
.el-scrollbar
{
left
:
100px
;
width
:
300px
;
}
}
.hotelproduct
.addGroup
.el-scrollbar
{
.hotelproduct
.el-dialog--center
.el-dialog__body
{
width
:
400px
!important
;
padding
:
25px
0
0
25px
;
}
}
.hotelproduct
.el-scrollbar
{
width
:
300px
;
}
.hotelproduct
.addGroup
.el-scrollbar
{
width
:
400px
!important
;
}
.hotelproduct
.singeRowTable
tr
:nth-child
(
n
+
2
)
:hover
{
background-color
:
white
;
box-shadow
:
0px
0px
14px
0px
#adadad
;
z-index
:
10
;
position
:
relative
;
}
.hotelproduct
.DaysInfo
span
{
display
:
inline-block
;
background-color
:
#2aaef2
;
color
:
white
;
border-radius
:
4px
;
padding
:
0
10px
;
height
:
30px
;
line-height
:
30px
;
}
.hotelproduct
.DaysInfo
span
i
{
margin-right
:
10px
;
}
.hotelproduct
.singeRowTable
tr
:nth-child
(
n
+
2
)
{
height
:
80px
;
text-align
:
center
;
}
.hotelproduct
.detailsIT
.singeRowTable
tr
:nth-child
(
n
+
2
)
:hover
{
background-color
:
white
;
box-shadow
:
0px
0px
14px
0px
#adadad
;
z-index
:
10
;
position
:
relative
;
}
.hotelproduct
.Ldata
{
color
:
#333333
;
margin-top
:
5px
;
text-align
:
center
;
}
.hotelproduct
.LP
{
color
:
#e95252
;
}
.hotelproduct
.HP
{
color
:
#2aaef2
!important
;
text-align
:
left
;
font-weight
:
bold
;
padding-left
:
5px
;
font-size
:
14px
!important
;
}
.hotelproduct
.tit_name
{
display
:
inline-block
;
width
:
70px
;
text-align
:
left
;
font-size
:
12px
;
color
:
#666666
;
}
.hotelproduct
.T1
{
text-align
:
right
;
color
:
#666666
;
}
.hotelproduct
.T2
{
text-align
:
left
;
color
:
#e95252
;
font-size
:
14px
;
font-weight
:
bold
;
padding-left
:
5px
;
}
.hotelproduct
.descripTion
{
border-radius
:
4px
;
width
:
266px
;
text-align
:
left
;
padding
:
5px
;
height
:
40px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-box-orient
:
vertical
;
-webkit-line-clamp
:
2
;
}
.hotelproduct
.singeRowTable
tr
:nth-child
(
n
+
2
)
:hover
.descripTion
{
background-color
:
#ededed
;
}
.hotelproduct
.roomName
{
display
:
inline-block
;
width
:
200px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
text-align
:
left
;
padding-left
:
20px
;
}
.hotelproduct
.singeRowTable
tr
:nth-child
(
n
+
2
)
:hover
{
background-color
:
white
;
box-shadow
:
0px
0px
14px
0px
#adadad
;
z-index
:
10
;
position
:
relative
;
}
.hotelproduct
.DaysInfo
span
{
display
:
inline-block
;
background-color
:
#2aaef2
;
color
:
white
;
border-radius
:
4px
;
padding
:
0
10px
;
height
:
30px
;
line-height
:
30px
;
}
.hotelproduct
.DaysInfo
span
i
{
margin-right
:
10px
;
}
.hotelproduct
.singeRowTable
tr
:nth-child
(
n
+
2
)
{
height
:
80px
;
text-align
:
center
;
}
.hotelproduct
.detailsIT
.singeRowTable
tr
:nth-child
(
n
+
2
)
:hover
{
background-color
:
white
;
box-shadow
:
0px
0px
14px
0px
#adadad
;
z-index
:
10
;
position
:
relative
;
}
.hotelproduct
.Ldata
{
color
:
#333333
;
margin-top
:
5px
;
text-align
:
center
;
}
.hotelproduct
.LP
{
color
:
#e95252
;
}
.hotelproduct
.HP
{
color
:
#2aaef2
!important
;
text-align
:
left
;
font-weight
:
bold
;
padding-left
:
5px
;
font-size
:
14px
!important
;
}
.hotelproduct
.tit_name
{
display
:
inline-block
;
width
:
70px
;
text-align
:
left
;
font-size
:
12px
;
color
:
#666666
;
}
.hotelproduct
.T1
{
text-align
:
right
;
color
:
#666666
;
}
.hotelproduct
.T2
{
text-align
:
left
;
color
:
#e95252
;
font-size
:
14px
;
font-weight
:
bold
;
padding-left
:
5px
;
}
.hotelproduct
.descripTion
{
border-radius
:
4px
;
width
:
266px
;
text-align
:
left
;
padding
:
5px
;
height
:
40px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-box-orient
:
vertical
;
-webkit-line-clamp
:
2
;
}
.hotelproduct
.singeRowTable
tr
:nth-child
(
n
+
2
)
:hover
.descripTion
{
background-color
:
#ededed
;
}
.hotelproduct
.roomName
{
display
:
inline-block
;
width
:
200px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
text-align
:
left
;
padding-left
:
20px
;
}
</
style
>
</
style
>
<
template
>
<
template
>
<div
class=
"flexOne hotelproduct"
>
<div
class=
"flexOne hotelproduct"
>
<div
class=
"query-box"
>
<div
class=
"query-box"
>
<ul>
<ul>
<li>
<li>
<span>
<span>
<em>
{{
$t
(
'hotel.hotel_roomName'
)
}}
</em>
<em>
{{
$t
(
'hotel.hotel_roomName'
)
}}
</em>
<el-select
filterable
v-model=
'msg.HotelProductType'
:placeholder=
"$t('pub.pleaseSel')"
>
<el-select
filterable
v-model=
'msg.HotelProductType'
:placeholder=
"$t('pub.pleaseSel')"
>
<el-option
v-for=
'item in SelectHotelProductType'
<el-option
v-for=
'item in SelectHotelProductType'
:label=
'item.Name'
:value=
'item.Id'
:key=
'item.Id'
>
:label=
'item.Name'
</el-option>
:value=
'item.Id'
</el-select>
:key=
'item.Id'
>
</span>
</el-option>
</li>
</el-select>
<li>
<!--
<el-input
v-model=
"msg.Name"
maxlength=
"20"
class=
"permiss-input"
@
keyup
.
native
.
enter=
"initData"
:placeholder=
"$t('pub.pleaseImport')"
></el-input>
-->
<button
class=
"hollowFixedBtn"
type=
"success"
</span>
@
click=
"resetPageIndex(),initData()"
>
{{
$t
(
'pub.searchBtn'
)
}}
</button>
</li>
<button
class=
"normalBtn"
type=
"success"
<li>
@
click=
"outerVisible = true,dialogTitle='添加酒店产品',initAddMsg()"
>
{{
$t
(
'pub.addBtn'
)
}}
</button>
<button
class=
"hollowFixedBtn"
type=
"success"
@
click=
"resetPageIndex(),initData()"
>
{{
$t
(
'pub.searchBtn'
)
}}
</button>
</li>
<button
class=
"normalBtn"
type=
"success"
@
click=
"outerVisible = true,dialogTitle='添加酒店产品',initAddMsg()"
>
{{
$t
(
'pub.addBtn'
)
}}
</button>
</ul>
</li>
</ul>
</div>
<el-dialog
custom-class=
'addGroup'
:visible
.
sync=
"outerVisible"
:title=
"dialogTitle"
center
:before-close=
"closeChangeMachie"
>
<el-form
:model=
"addMsg"
:rules=
"rules"
ref=
"addMsg"
>
<el-form-item
:label=
"$t('hotel.hotel_resource')"
prop=
"Hotel_ID"
>
<el-select
:placeholder=
"$t('pub.pleaseSel')"
filterable
class=
"w300"
disabled
clearable
v-model=
"addMsg.Hotel_ID"
>
<el-option
v-for=
"item in HotelName"
:key=
"item.ID"
:label=
"item.Name"
:value=
"item.ID"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('hotel.product_name')"
prop=
"HotelProductType"
>
<el-select
filterable
v-model=
'addMsg.HotelProductType'
:placeholder=
"$t('pub.pleaseSel')"
>
<el-option
v-for=
'item in HotelProductTypeList'
:label=
'item.Name'
:value=
'item.Id'
:key=
'item.Id'
>
</el-option>
</el-select>
</el-form-item>
<!--
<el-form-item
:label=
"$t('hotel.product_name')"
prop=
"HotelProductType"
>
<el-input
type=
"text"
class=
"w300"
v-model=
"addMsg.HotelProductType"
></el-input>
</el-form-item>
-->
<el-form-item
:label=
"$t('hotel.table_servers')"
prop=
"ServiceNumber"
>
<el-input
type=
"text"
class=
"w300"
v-model=
"addMsg.ServiceNumber"
@
keyup
.
native=
"checkInteger(addMsg,'ServiceNumber')"
></el-input>
</el-form-item>
<el-form-item
:label=
"$t('hotel.hotel_produceDes')"
prop=
"Description"
>
<el-input
class=
"w300"
type=
"textarea"
v-model=
"addMsg.Description"
></el-input>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<button
class=
"hollowFixedBtn"
@
click=
"resetForm('addMsg'),outerVisible = false"
>
{{
$t
(
'pub.cancelBtn'
)
}}
</button>
<button
class=
"normalBtn"
type=
"primary"
@
click=
"submitForm('addMsg')"
>
{{
$t
(
'pub.saveBtn'
)
}}
</button>
</div>
</el-dialog>
<table
class=
"singeRowTable"
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
v-loading=
"loading"
style=
"border-collapse:separate;border-spacing:0px 10px;table-layout:fixed;"
>
<tr>
<th>
{{
$t
(
'hotel.hotel_roomName'
)
}}
</th>
<th>
{{
$t
(
'scen.sc_bjts'
)
}}
</th>
<th>
{{
$t
(
'scen.sc_dj'
)
}}
</th>
<th>
{{
$t
(
'scen.sc_gj'
)
}}
</th>
<th>
{{
$t
(
'hotel.hotel_remark'
)
}}
</th>
<th>
{{
$t
(
'hotel.table_operat'
)
}}
</th>
</tr>
<tr
v-for=
"(item,index) in pageData"
:key=
"item.subCode"
>
<td>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"item.Name"
placement=
"top-start"
popper-class=
"max-w250"
>
<span
class=
"roomName"
>
{{
item
.
Name
}}
</span>
</el-tooltip>
</td>
<td
class=
"DaysInfo"
>
<span><i
class=
"iconfont icon-kaoqintongji"
></i>
{{
item
.
Days
}}{{
$t
(
'hotel.hotel_day'
)
}}
</span>
</td>
<td>
<p
class=
"clearfix"
>
<span
class=
"tit_name T1"
>
CNY
</span><span
class=
'tit_name T2'
>
{{
item
.
LPrice
}}
</span>
</p>
<p
class=
"Ldata"
>
{{
item
.
LDate
}}
</p>
</td>
<td>
<p
class=
"clearfix"
>
<span
class=
"tit_name T1"
>
CNY
</span>
<span
class=
'tit_name HP'
>
{{
item
.
HPrice
}}
</span>
</p>
<p
class=
"Ldata"
>
{{
item
.
HDate
}}
</p>
</td>
<td>
<el-tooltip
v-if=
"item.Description"
class=
"item"
effect=
"dark"
:content=
"item.Description"
placement=
"top-start"
popper-class=
"max-w250"
>
<span
class=
"descripTion"
>
{{
item
.
Description
}}
</span>
</el-tooltip>
</td>
<td>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"修改"
placement=
"top-start"
>
<el-button
type=
"primary"
@
click=
"outerVisible = true,dialogTitle='修改酒店产品',updateProduct(index,item.ID)"
icon=
"el-icon-edit"
circle
></el-button>
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"报价管理"
placement=
"top-start"
>
<el-button
type=
"info"
@
click=
"goUrl('HotelPrice',item.ID)"
icon=
"el-icon-document"
circle
></el-button>
</el-tooltip>
</td>
</tr>
</table>
<el-pagination
background
@
current-change=
"handleCurrentChange"
:current-page=
"1"
:page-size=
"this.msg.PageSize"
layout=
"total,prev, pager, next, jumper"
:total=
"total"
>
</el-pagination>
</div>
</div>
<el-dialog
custom-class=
'addGroup'
:visible
.
sync=
"outerVisible"
:title=
"dialogTitle"
center
:before-close=
"closeChangeMachie"
>
<el-form
:model=
"addMsg"
:rules=
"rules"
ref=
"addMsg"
>
<el-form-item
:label=
"$t('hotel.hotel_resource')"
prop=
"Hotel_ID"
>
<el-select
:placeholder=
"$t('pub.pleaseSel')"
filterable
class=
"w300"
disabled
clearable
v-model=
"addMsg.Hotel_ID"
>
<el-option
v-for=
"item in HotelName"
:key=
"item.ID"
:label=
"item.Name"
:value=
"item.ID"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('hotel.product_name')"
prop=
"HotelProductType"
>
<el-select
filterable
v-model=
'addMsg.HotelProductType'
:placeholder=
"$t('pub.pleaseSel')"
>
<el-option
v-for=
'item in HotelProductTypeList'
:label=
'item.Name'
:value=
'item.Id'
:key=
'item.Id'
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('hotel.table_servers')"
prop=
"ServiceNumber"
>
<el-input
type=
"text"
class=
"w300"
v-model=
"addMsg.ServiceNumber"
@
keyup
.
native=
"checkInteger(addMsg,'ServiceNumber')"
></el-input>
</el-form-item>
<el-form-item
:label=
"$t('hotel.hotel_produceDes')"
prop=
"Description"
>
<el-input
class=
"w300"
type=
"textarea"
v-model=
"addMsg.Description"
></el-input>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<button
class=
"hollowFixedBtn"
@
click=
"resetForm('addMsg'),outerVisible = false"
>
{{
$t
(
'pub.cancelBtn'
)
}}
</button>
<button
class=
"normalBtn"
type=
"primary"
@
click=
"submitForm('addMsg')"
>
{{
$t
(
'pub.saveBtn'
)
}}
</button>
</div>
</el-dialog>
<table
class=
"singeRowTable"
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
v-loading=
"loading"
style=
"border-collapse:separate;border-spacing:0px 10px;table-layout:fixed;"
>
<tr>
<th>
{{
$t
(
'hotel.hotel_roomName'
)
}}
</th>
<th>
{{
$t
(
'scen.sc_bjts'
)
}}
</th>
<th>
{{
$t
(
'scen.sc_dj'
)
}}
</th>
<th>
{{
$t
(
'scen.sc_gj'
)
}}
</th>
<th>
{{
$t
(
'hotel.hotel_remark'
)
}}
</th>
<th>
{{
$t
(
'hotel.table_operat'
)
}}
</th>
</tr>
<tr
v-for=
"(item,index) in pageData"
:key=
"item.subCode"
>
<td>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"item.Name"
placement=
"top-start"
popper-class=
"max-w250"
>
<span
class=
"roomName"
>
{{
item
.
Name
}}
</span>
</el-tooltip>
</td>
<td
class=
"DaysInfo"
>
<span><i
class=
"iconfont icon-kaoqintongji"
></i>
{{
item
.
Days
}}{{
$t
(
'hotel.hotel_day'
)
}}
</span>
</td>
<td>
<p
class=
"clearfix"
>
<span
class=
"tit_name T1"
>
CNY
</span><span
class=
'tit_name T2'
>
{{
item
.
LPrice
}}
</span>
</p>
<p
class=
"Ldata"
>
{{
item
.
LDate
}}
</p>
</td>
<td>
<p
class=
"clearfix"
>
<span
class=
"tit_name T1"
>
CNY
</span>
<span
class=
'tit_name HP'
>
{{
item
.
HPrice
}}
</span>
</p>
<p
class=
"Ldata"
>
{{
item
.
HDate
}}
</p>
</td>
<td>
<el-tooltip
v-if=
"item.Description"
class=
"item"
effect=
"dark"
:content=
"item.Description"
placement=
"top-start"
popper-class=
"max-w250"
>
<span
class=
"descripTion"
>
{{
item
.
Description
}}
</span>
</el-tooltip>
</td>
<td>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"修改"
placement=
"top-start"
>
<el-button
type=
"primary"
@
click=
"outerVisible = true,dialogTitle='修改酒店产品',updateProduct(index,item.ID)"
icon=
"el-icon-edit"
circle
></el-button>
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"报价管理"
placement=
"top-start"
>
<el-button
type=
"info"
@
click=
"goUrl('HotelPrice',item.ID)"
icon=
"el-icon-document"
circle
></el-button>
</el-tooltip>
</td>
</tr>
</table>
<el-pagination
background
@
current-change=
"handleCurrentChange"
:current-page=
"1"
:page-size=
"this.msg.PageSize"
layout=
"total,prev, pager, next, jumper"
:total=
"total"
>
</el-pagination>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
total
:
0
,
total
:
0
,
outerVisible
:
false
,
outerVisible
:
false
,
dialogTitle
:
""
,
dialogTitle
:
""
,
productName
:
""
,
productName
:
""
,
pageData
:
""
,
pageData
:
""
,
HotelName
:
""
,
HotelName
:
""
,
HotelID
:
""
,
HotelID
:
""
,
Country
:
''
,
Country
:
''
,
IsSelfBook
:
''
,
IsSelfBook
:
''
,
uodateId
:
""
,
uodateId
:
""
,
loading
:
"true"
,
loading
:
"true"
,
msg
:
{
msg
:
{
//初始化数据
//初始化数据
PageSize
:
10
,
PageSize
:
10
,
pageIndex
:
1
,
pageIndex
:
1
,
Name
:
""
,
Name
:
""
,
HotelProductType
:
""
,
HotelProductType
:
""
,
Hotel_ID
:
""
Hotel_ID
:
""
},
},
HotelProductTypeList
:[],
HotelProductTypeList
:
[],
SelectHotelProductType
:[],
SelectHotelProductType
:
[],
addMsg
:
{
addMsg
:
{
ID
:
0
,
ID
:
0
,
Hotel_ID
:
""
,
Hotel_ID
:
""
,
Name
:
""
,
Name
:
""
,
HotelProductType
:
0
,
HotelProductType
:
0
,
Description
:
""
,
Description
:
""
,
ServiceNumber
:
""
ServiceNumber
:
""
},
},
rules
:
{
rules
:
{
//表单必填验证
//表单必填验证
Hotel_ID
:
[{
required
:
true
,
message
:
"请选择酒店资源"
}],
Hotel_ID
:
[{
HotelProductType
:
[{
required
:
true
,
message
:
"请选择产品名称"
}],
required
:
true
,
ServiceNumber
:
[
message
:
"请选择酒店资源"
{
}],
HotelProductType
:
[{
required
:
true
,
message
:
"请选择产品名称"
}],
ServiceNumber
:
[{
required
:
true
,
required
:
true
,
pattern
:
this
.
$commonUtils
.
Regex
.
el_isInteger
,
pattern
:
this
.
$commonUtils
.
Regex
.
el_isInteger
,
message
:
"请输入正确的数字"
message
:
"请输入正确的数字"
}
}]
]
}
}
};
},
methods
:
{
handleCurrentChange
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
initData
();
},
resetPageIndex
()
{
this
.
msg
.
pageIndex
=
1
;
this
.
currentPage
=
1
;
},
initData
()
{
this
.
msg
.
Hotel_ID
=
this
.
HotelID
;
this
.
apipost
(
"dict_post_HotelProduct_GetPageList"
,
this
.
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
total
=
res
.
data
.
data
.
count
;
this
.
loading
=
false
;
res
.
data
.
data
.
pageData
.
forEach
(
x
=>
{
if
(
x
.
Days
==
null
)
{
x
.
Days
=
0
;
}
if
(
x
.
HPrice
==
null
)
{
x
.
HPrice
=
0
;
}
if
(
x
.
LPrice
==
null
)
{
x
.
LPrice
=
0
;
}
});
this
.
pageData
=
res
.
data
.
data
.
pageData
;
}
},
null
);
},
isdelete
(
ID
)
{
this
.
innerVisible
=
true
;
this
.
insideDialogTxt
=
"是否删除?"
;
this
.
isDeleteNote
=
false
;
this
.
deleteID
=
ID
;
},
delProduct
()
{
var
msg
=
{
ProductId
:
this
.
deleteID
};
};
this
.
apipost
(
"dict_post_HotelProduct_Remove"
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
initData
();
this
.
insideDialogTxt
=
res
.
data
.
message
;
this
.
isDeleteNote
=
true
;
}
},
null
);
},
},
//初始化酒店列表
methods
:
{
initHotel
()
{
handleCurrentChange
(
val
)
{
this
.
apipost
(
this
.
msg
.
pageIndex
=
val
;
"hotel_post_GetList"
,
this
.
initData
();
{},
},
res
=>
{
resetPageIndex
()
{
this
.
msg
.
pageIndex
=
1
;
this
.
currentPage
=
1
;
},
initData
()
{
this
.
msg
.
Hotel_ID
=
this
.
HotelID
;
this
.
apipost
(
"dict_post_HotelProduct_GetPageList"
,
this
.
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
total
=
res
.
data
.
data
.
count
;
this
.
loading
=
false
;
res
.
data
.
data
.
pageData
.
forEach
(
x
=>
{
if
(
x
.
Days
==
null
)
{
x
.
Days
=
0
;
}
if
(
x
.
HPrice
==
null
)
{
x
.
HPrice
=
0
;
}
if
(
x
.
LPrice
==
null
)
{
x
.
LPrice
=
0
;
}
});
this
.
pageData
=
res
.
data
.
data
.
pageData
;
}
},
null
);
},
isdelete
(
ID
)
{
this
.
innerVisible
=
true
;
this
.
insideDialogTxt
=
"是否删除?"
;
this
.
isDeleteNote
=
false
;
this
.
deleteID
=
ID
;
},
delProduct
()
{
var
msg
=
{
ProductId
:
this
.
deleteID
};
this
.
apipost
(
"dict_post_HotelProduct_Remove"
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
initData
();
this
.
insideDialogTxt
=
res
.
data
.
message
;
this
.
isDeleteNote
=
true
;
}
},
null
);
},
//初始化酒店列表
initHotel
()
{
this
.
apipost
(
"hotel_post_GetList"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
HotelName
=
res
.
data
.
data
;
}
},
null
);
},
GetHotelProductType
()
{
this
.
apipost
(
'dict_post_GetHotelProductTypeList'
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
HotelName
=
res
.
data
.
data
;
this
.
HotelProductTypeList
=
res
.
data
.
data
this
.
SelectHotelProductType
=
res
.
data
.
data
}
}
},
},
err
=>
{})
null
},
);
saveInfo
()
{
},
GetHotelProductType
(){
this
.
apipost
(
'dict_post_GetHotelProductTypeList'
,{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
HotelProductTypeList
=
res
.
data
.
data
this
.
SelectHotelProductType
=
res
.
data
.
data
}
},
err
=>
{})
},
saveInfo
()
{
this
.
HotelProductTypeList
.
forEach
(
item
=>
{
this
.
HotelProductTypeList
.
forEach
(
item
=>
{
if
(
this
.
addMsg
.
HotelProductType
==
item
.
Id
)
if
(
this
.
addMsg
.
HotelProductType
==
item
.
Id
)
{
{
this
.
addMsg
.
Name
=
item
.
Name
this
.
addMsg
.
Name
=
item
.
Name
}
})
this
.
apipost
(
"dict_post_HotelProduct_Set"
,
this
.
addMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
tips
(
"保存成功!"
,
"success"
);
this
.
initData
();
this
.
resetForm
(
"addMsg"
);
this
.
outerVisible
=
false
;
}
else
{
this
.
innerVisible
=
true
;
this
.
insideDialogTxt
=
res
.
data
.
message
;
this
.
isDeleteNote
=
true
;
}
}
},
})
null
);
this
.
apipost
(
},
"dict_post_HotelProduct_Set"
,
initAddMsg
()
{
this
.
addMsg
,
//初始化创建、修改表单数据
res
=>
{
let
newMsg
=
{
if
(
res
.
data
.
resultCode
==
1
)
{
ID
:
0
,
this
.
tips
(
"保存成功!"
,
"success"
);
Hotel_ID
:
parseInt
(
this
.
HotelID
),
this
.
initData
();
Name
:
""
,
this
.
resetForm
(
"addMsg"
);
Description
:
""
,
this
.
outerVisible
=
false
;
ServiceNumber
:
""
}
else
{
};
this
.
innerVisible
=
true
;
this
.
addMsg
=
newMsg
;
this
.
insideDialogTxt
=
res
.
data
.
message
;
},
this
.
isDeleteNote
=
true
;
closeChangeMachie
(
done
)
{
}
//弹出框关闭初始化弹框内表单
},
done
();
null
this
.
resetForm
(
"addMsg"
);
);
},
},
resetForm
(
formName
)
{
initAddMsg
()
{
//弹出框取消 初始化谈框内表单
//初始化创建、修改表单数据
this
.
$refs
[
formName
].
resetFields
();
let
newMsg
=
{
},
ID
:
0
,
updateProduct
(
index
,
ID
)
{
Hotel_ID
:
parseInt
(
this
.
HotelID
),
let
msg
=
{
ProductId
:
ID
};
Name
:
""
,
this
.
apipost
(
Description
:
""
,
"dict_post_HotelProduct_Get"
,
ServiceNumber
:
""
msg
,
};
res
=>
{
this
.
addMsg
=
newMsg
;
if
(
res
.
data
.
resultCode
==
1
)
{
},
this
.
addMsg
=
res
.
data
.
data
;
closeChangeMachie
(
done
)
{
//弹出框关闭初始化弹框内表单
done
();
this
.
resetForm
(
"addMsg"
);
},
resetForm
(
formName
)
{
//弹出框取消 初始化谈框内表单
this
.
$refs
[
formName
].
resetFields
();
},
updateProduct
(
index
,
ID
)
{
let
msg
=
{
ProductId
:
ID
};
this
.
apipost
(
"dict_post_HotelProduct_Get"
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
addMsg
=
res
.
data
.
data
;
}
},
null
);
},
goUrl
(
path
,
id
)
{
this
.
$router
.
push
({
path
:
path
,
query
:
{
id
:
id
,
HotelID
:
this
.
HotelID
,
Country
:
this
.
Country
,
IsSelfBook
:
this
.
IsSelfBook
,
blank
:
'y'
,
tab
:
'报价管理'
}
}
}
,
}
);
null
},
);
submitForm
(
addMsg
)
{
},
//提交创建、修改表单
goUrl
(
path
,
id
)
{
let
that
=
this
;
this
.
$router
.
push
(
{
that
.
$refs
[
addMsg
].
validate
(
valid
=>
{
path
:
path
,
if
(
valid
)
{
query
:
{
id
:
id
,
HotelID
:
this
.
HotelID
,
Country
:
this
.
Country
,
IsSelfBook
:
this
.
IsSelfBook
,
blank
:
'y'
,
tab
:
'报价管理'
}
that
.
saveInfo
();
});
}
else
{
},
return
false
;
submitForm
(
addMsg
)
{
}
//提交创建、修改表单
});
let
that
=
this
;
},
t
hat
.
$refs
[
addMsg
].
validate
(
valid
=>
{
t
ips
(
msg
,
type
)
{
if
(
valid
)
{
this
.
$message
(
{
that
.
saveInfo
();
message
:
msg
,
}
else
{
duration
:
2000
,
return
false
;
type
:
type
}
}
);
}
);
}
},
},
tips
(
msg
,
type
)
{
mounted
()
{
this
.
$message
({
this
.
HotelID
=
this
.
$route
.
query
.
id
;
message
:
msg
,
this
.
Country
=
this
.
$route
.
query
.
Country
;
duration
:
2000
,
this
.
IsSelfBook
=
this
.
$route
.
query
.
IsSelfBook
;
type
:
type
this
.
initData
();
});
this
.
initHotel
();
this
.
GetHotelProductType
();
}
}
},
};
mounted
()
{
this
.
HotelID
=
this
.
$route
.
query
.
id
;
</
script
>
this
.
Country
=
this
.
$route
.
query
.
Country
;
this
.
IsSelfBook
=
this
.
$route
.
query
.
IsSelfBook
;
this
.
initData
();
this
.
initHotel
();
this
.
GetHotelProductType
();
}
};
</
script
>
\ No newline at end of file
src/components/Hotel/HotelProductManage2.vue
View file @
f2cf9551
...
@@ -73,13 +73,13 @@
...
@@ -73,13 +73,13 @@
<td
style=
"text-align:center"
>
<td
style=
"text-align:center"
>
{{
childItem
.
BatchNumber
}}
{{
childItem
.
BatchNumber
}}
</td>
</td>
<td
style=
"text-align:center"
>
<td
style=
"text-align:center
;white-space:nowrap;
"
>
{{
childItem
.
CostPrice
}}
{{
childItem
.
CostPrice
}}
</td>
</td>
<td
style=
"text-align:center"
>
<td
style=
"text-align:center
;white-space:nowrap;
"
>
{{
childItem
.
Inventory
}}
{{
childItem
.
Inventory
}}
</td>
</td>
<td
style=
"text-align:center"
>
<td
style=
"text-align:center
;white-space:nowrap;
"
>
{{
childItem
.
RemainingInventory
}}
{{
childItem
.
RemainingInventory
}}
</td>
</td>
<td
style=
"text-align:left"
>
<td
style=
"text-align:left"
>
...
...
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