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
8e773d0b
Commit
8e773d0b
authored
Apr 09, 2019
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
cc9b0aee
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
181 deletions
+4
-181
HouseTypeList.vue
src/components/Hotel/HouseTypeList.vue
+0
-177
config.js
src/router/config.js
+4
-4
No files found.
src/components/Hotel/HouseTypeList.vue
deleted
100644 → 0
View file @
cc9b0aee
<
template
>
<div>
<div
class=
"query-box"
style=
"border-bottom: none;"
>
<ul>
<li>
<span>
<em>
酒店
</em>
<el-select
v-model=
"msg.HotelId"
:placeholder=
"$t('pub.pleaseSel')"
filterable
>
<el-option
:label=
"$t('pub.unlimitedSel')"
:value=
"0"
></el-option>
<el-option
v-for=
"item in HotelList"
:key=
"item.ID"
:label=
"item.Name"
:value=
"item.ID"
></el-option>
</el-select>
</span>
</li>
<li><span><em>
日期
</em>
<el-date-picker
v-model=
'msg.StartDate'
class=
'w135'
value-format=
"yyyy-MM-dd"
type=
"date"
></el-date-picker>
-
<el-date-picker
v-model=
'msg.EndDate'
class=
'w135'
value-format=
"yyyy-MM-dd"
type=
"date"
></el-date-picker>
</span>
</li>
<li>
<input
type=
"button"
class=
"normalBtn"
value=
"查询"
@
click=
"getList()"
/>
</li>
</ul>
</div>
<div
style=
"width: 100%; overflow-x: auto;padding-bottom: 10px; "
class=
"ownScrollbarStyle"
>
<table
border=
"0"
cellspacing=
"1"
cellpadding=
"0"
class=
"HouseTypeList"
v-if=
"isShow"
>
<tr>
<th
width=
"300"
>
酒店名称
</th>
<th
width=
"80"
></th>
<th
v-for=
"item in dataList[0].subList"
>
{{
getDateList
(
item
.
DateStr
)
}}
</th>
</tr>
<tr>
<th></th>
<th></th>
<th
v-for=
"item in dataList[0].subList"
>
{{
getWeek
(
item
.
DateStr
)
}}
</th>
</tr>
<tr
v-for=
"item in dataList"
>
<td>
<div
style=
"min-width:300px; text-align:left;padding-left:5px;"
>
{{
item
.
HotelName
}}
</div>
</td>
<td>
<div
class=
"Hotel_kong"
style=
"min-width:60px;"
>
空房
</div>
<div
class=
"Hotel_kong"
>
超定
</div>
</td>
<td
v-for=
"subItem in item.subList"
>
<div
class=
"Hotel_kong Com_hoteldiv"
:class=
"
{'noKucun':subItem.Status==0}">
{{
subItem
.
RemainingInventory
}}
</div>
<div
class=
"Hotel_kong Com_hoteldiv"
>
<span
v-if=
"subItem.UseInventory-subItem.Inventory>0"
style=
"color:red;"
>
{{
subItem
.
UseInventory
-
subItem
.
Inventory
}}
</span>
</div>
</td>
</tr>
</table>
</div>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
msg
:{
HotelId
:
0
,
StartDate
:
new
Date
().
Format
(
"yyyy-MM-dd"
),
EndDate
:
this
.
setEdate
(),
},
HotelList
:
[],
dataList
:
[],
isShow
:
false
,
};
},
methods
:
{
getList
()
{
if
(
this
.
msg
.
StartDate
==
null
)
{
this
.
msg
.
StartDate
=
new
Date
().
Format
(
"yyyy-MM-dd"
)
}
if
(
this
.
msg
.
EndDate
==
null
)
{
this
.
msg
.
EndDate
=
this
.
setEdate
()
}
this
.
apipost
(
"dict_post_HotelOffer_GetHotelStatics"
,
this
.
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
dataList
=
res
.
data
.
data
;
this
.
isShow
=
true
;
console
.
log
(
this
.
dataList
,
'dataList'
);
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
err
=>
{}
);
},
//获取酒店列表
GetHotelList
()
{
this
.
apipost
(
"hotel_post_GetHasStockHotelList"
,
{
Country
:
651
,
IsMoreThanZero
:
1
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
HotelList
=
res
.
data
.
data
;
}
},
err
=>
{}
);
},
setEdate
(){
return
this
.
addMoth
(
new
Date
().
Format
(
"yyyy-MM-dd"
),
1
)
},
addMoth
(
d
,
m
)
{
let
ds
=
d
.
split
(
'-'
),
_d
=
ds
[
2
]
-
0
;
let
nextM
=
new
Date
(
ds
[
0
],
ds
[
1
]
-
1
+
m
+
1
,
0
);
let
max
=
nextM
.
getDate
();
d
=
new
Date
(
ds
[
0
],
ds
[
1
]
-
1
+
m
,
_d
>
max
?
max
:
_d
);
return
d
.
toLocaleDateString
().
match
(
/
\d
+/g
).
join
(
'-'
)
},
//格式化返回显示日期
getDateList
(
dateStr
){
var
str
=
dateStr
.
split
(
'-'
);
return
str
[
1
]
+
'/'
+
str
[
2
];
},
//获取星期几
getWeek
(
dateStr
){
var
weekDay
=
[
"天"
,
"一"
,
"二"
,
"三"
,
"四"
,
"五"
,
"六"
];
var
myDate
=
new
Date
(
Date
.
parse
(
dateStr
));
return
weekDay
[
myDate
.
getDay
()]
}
},
mounted
()
{
this
.
GetHotelList
();
this
.
getList
();
}
};
</
script
>
<
style
>
.HouseTypeList
{
background
:
#ccc
;
width
:
100%
;
}
.Com_hoteldiv
{
min-width
:
40px
;
}
.noKucun
{
background-color
:
black
;
}
.Hotel_kong
{
width
:
100%
;
height
:
35px
;
line-height
:
35px
;
border-bottom
:
1px
solid
#d1d1d1
;
}
.Hotel_kong
:last-child
{
border
:
0
;
}
.HouseTypeList
tr
th
{
background
:
#e6e6e6
;
height
:
35px
;
font-size
:
12px
;
color
:
#333
;
}
.HouseTypeList
tr
{
background
:
#fff
;
text-align
:
center
;
height
:
35px
;
}
.HouseTypeList
tr
td
{
font-size
:
12px
;
}
</
style
>
src/router/config.js
View file @
8e773d0b
...
...
@@ -628,11 +628,11 @@ export default {
title
:
'酒店核算详情'
},
},{
path
:
'/Ho
useTypeList'
,
//配房类型
name
:
'Ho
useType
List'
,
component
:
resolve
=>
require
([
'@/components/Hotel/Ho
useType
List'
],
resolve
),
path
:
'/Ho
telQueryList'
,
//酒店查询统计
name
:
'Ho
telQuery
List'
,
component
:
resolve
=>
require
([
'@/components/Hotel/Ho
telQuery
List'
],
resolve
),
meta
:
{
title
:
'
配房类型
'
title
:
'
酒店查询统计
'
},
},
{
...
...
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