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
160234dc
Commit
160234dc
authored
Aug 02, 2019
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增景点统计下载
parent
dd39e46e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
382 additions
and
545 deletions
+382
-545
scenicSpotSalesBoard.vue
src/components/scenicSpot/scenicSpotSalesBoard.vue
+382
-545
No files found.
src/components/scenicSpot/scenicSpotSalesBoard.vue
View file @
160234dc
<
style
>
<
style
>
.hotelKb
.hotel_box
{
/* 日期样式开始 */
display
:
flex
;
.scenicSpotSalesBoard
.month
ul
{
flex-wrap
:
wrap
;
border-radius
:
4px
4px
0
0
;
position
:
relative
;
width
:
100%
;
padding
:
20px
;
height
:
50px
;
/* min-height: 500px; */
line-height
:
50px
;
}
background
:
#e95252
;
.hotelKb
.hotel_item
{
margin
:
0
;
width
:
120px
;
padding
:
0
;
height
:
120px
;
text-align
:
center
;
border-radius
:
4px
;
}
margin
:
10px
;
cursor
:
pointer
;
.scenicSpotSalesBoard
.year-month
{
position
:
relative
;
flex-direction
:
column
;
overflow
:
hidden
;
align-items
:
center
;
}
justify-content
:
space-around
;
.hotelKb
.hotel_item
img
{
}
width
:
100%
;
height
:
100%
;
.scenicSpotSalesBoard
.year-month
>
input
{
position
:
absolute
;
width
:
100px
;
left
:
0
;
float
:
left
;
top
:
0
;
}
}
.hotelKb
.hotel_item_info
{
.scenicSpotSalesBoard
.arrow
{
width
:
100%
;
padding
:
10px
;
height
:
100%
;
font-style
:
normal
;
position
:
absolute
;
cursor
:
pointer
;
left
:
0
;
}
top
:
0
;
background-color
:
rgba
(
0
,
0
,
0
,
0.5
);
.scenicSpotSalesBoard
.monthminus
{
}
position
:
absolute
;
.hotelKb
.el-input__icon
{
left
:
0px
;
line-height
:
34px
;
top
:
15px
;
}
}
.hotelKb
.hotel_item_info_name
{
font-size
:
12px
;
.scenicSpotSalesBoard
.monthadd
{
padding
:
13px
14px
;
position
:
absolute
;
color
:
white
;
right
:
21px
;
white-space
:
nowrap
;
top
:
15px
;
text-overflow
:
ellipsis
;
}
overflow
:
hidden
;
}
.scenicSpotSalesBoard
.month
ul
li
{
.hotelKb
.icon-xiaoliangyuce
{
font-size
:
18px
;
color
:
#ffffff
;
color
:
#fff
;
opacity
:
0.65
;
position
:
relative
;
font-size
:
16px
;
display
:
inline-block
;
padding-right
:
10px
;
letter-spacing
:
3px
;
}
}
.hotelKb
.RemainingInventory
{
font-size
:
28px
;
.scenicSpotSalesBoard
.month
ul
li
i
{
color
:
white
;
font-size
:
22px
;
}
color
:
#ff7e7e
;
.hotelKb
.hotel_item_info_chuang
{
cursor
:
pointer
;
position
:
absolute
;
}
bottom
:
10px
;
width
:
100%
;
.scenicSpotSalesBoard
.month
ul
li
>
input
{
text-align
:
right
;
text-align
:
center
;
padding-right
:
14px
;
}
}
.hotelKb
.hotel_item_info_warning
{
.scenicSpotSalesBoard
.weekdays
{
background-color
:
#e95252
;
margin
:
0
;
}
padding
:
3px
0
;
.hotelKb
.time
.el-input--prefix
.el-input__inner
{
background-color
:
#3fa783
;
padding-left
:
30px
;
display
:
flex
;
}
width
:
100%
;
.hotelKb
.query-box
li
label
{
flex-wrap
:
wrap
;
display
:
inline-block
;
color
:
#fff
;
min-width
:
80px
;
justify-content
:
space-around
;
text-align
:
right
;
}
font-style
:
normal
;
margin
:
0
20px
0
0
;
.scenicSpotSalesBoard
.weekdays
li
{
}
display
:
inline-block
;
/* 日期样式开始 */
width
:
14.2857%
;
.hotelKb
#calendar
{
text-align
:
center
;
width
:
639px
;
}
height
:
345px
;
margin
:
0
auto
;
.scenicSpotSalesBoard
.days
{
box-shadow
:
0
2px
2px
0
rgba
(
0
,
0
,
0
,
0.14
),
0
3px
1px
-2px
rgba
(
0
,
0
,
0
,
0.1
),
width
:
100%
;
0
1px
5px
0
rgba
(
0
,
0
,
0
,
0.12
);
padding
:
0
;
}
margin
:
0
;
.hotelKb
.month
ul
{
border-left
:
1px
solid
#dddddd
;
margin
:
0
;
flex-wrap
:
wrap
;
padding
:
0
;
box-sizing
:
border-box
;
justify-content
:
space-between
;
justify-content
:
space-around
;
}
}
.hotelKb
.year-month
{
flex-direction
:
column
;
.scenicSpotSalesBoard
.days
>
li
{
align-items
:
center
;
list-style-type
:
none
;
justify-content
:
space-around
;
width
:
14.2857%
;
}
height
:
140px
;
.hotelKb
.year-month
>
input
{
text-align
:
center
;
width
:
100px
;
position
:
relative
;
float
:
left
;
font-size
:
12px
;
}
float
:
left
;
.hotelKb
.arrow
{
color
:
#000
;
padding
:
10px
;
box-sizing
:
border-box
;
font-style
:
normal
;
border-right
:
1px
solid
#ddd
;
cursor
:
pointer
;
border-bottom
:
1px
solid
#ddd
;
}
}
.hotelKb
.monthminus
{
position
:
absolute
;
.scenicSpotSalesBoard
.days
li
>
div
{
left
:
15px
;
height
:
112px
;
top
:
13px
;
width
:
100%
;
}
overflow-y
:
auto
;
.hotelKb
.monthadd
{
text-align
:
left
;
position
:
absolute
;
}
right
:
21px
;
top
:
13px
;
.scenicSpotSalesBoard
.days
li
>
div
>
p
{
}
border-bottom
:
1px
dashed
#ccc
;
.hotelKb
.month
ul
li
:first-child
{
height
:
28px
;
margin-left
:
180px
;
line-height
:
28px
;
}
width
:
100%
;
.hotelKb
.month
ul
li
{
text-indent
:
10px
;
font-size
:
12px
;
}
position
:
relative
;
text-transform
:
uppercase
;
.scenicSpotSalesBoard
.currentInput
{
float
:
left
;
width
:
120px
;
letter-spacing
:
3px
;
height
:
30px
;
}
border-radius
:
17px
;
.hotelKb
.month
ul
li
>
input
{
outline
:
none
;
padding-left
:
10px
;
border
:
none
;
text-align
:
center
;
color
:
#fff
;
margin
:
20px
10px
20px
;
background
:
transparent
;
}
font-size
:
18px
;
.hotelKb
.weekdays
{
}
margin
:
0
;
padding
:
3px
0
;
.scenicSpotSalesBoard
.days
li
.other-month
{
background-color
:
#13b0ae
;
display
:
inline-block
;
display
:
flex
;
position
:
absolute
;
width
:
645px
;
right
:
0
;
flex-wrap
:
wrap
;
bottom
:
0
;
color
:
#fff
;
width
:
24px
;
justify-content
:
space-around
;
height
:
17px
;
}
font-size
:
12px
;
.hotelKb
.weekdays
li
{
line-height
:
17px
;
display
:
inline-block
;
background-color
:
#cccccc
;
width
:
13.6%
;
color
:
#fff
;
text-align
:
center
;
}
}
.hotelKb
.days
{
.scenicSpotSalesBoard
.ckStyle
{
/* width: 500px; */
width
:
100%
;
padding
:
0
;
height
:
28px
;
margin
:
0
;
line-height
:
28px
;
border-left
:
1px
solid
#dddddd
;
text-align
:
center
;
/* display: flex; */
font-size
:
14px
;
flex-wrap
:
wrap
;
font-weight
:
bold
;
justify-content
:
space-around
;
background
:
#ccc
;
}
color
:
#000
;
.hotelKb
.days
li
{
}
list-style-type
:
none
;
width
:
91px
;
.scenicSpotSalesBoard
.ckStyleOther
{
height
:
70px
;
background
:
#dddddd
!important
;
text-align
:
center
;
font-weight
:
normal
!important
;
position
:
relative
;
color
:
#999
;
font-size
:
12px
;
}
cursor
:
pointer
;
float
:
left
;
.scenicSpotSalesBoard
.Owe_Room
{
font-size
:
1rem
;
color
:
#e95252
;
color
:
#000
;
}
border-right
:
1px
solid
#dddddd
;
border-bottom
:
1px
solid
#dddddd
;
.scenicSpotSalesBoard
.Used_room
{
}
color
:
#13b0ae
;
.hotelKb
.month
ul
li
>
input
{
}
padding-left
:
10px
;
text-align
:
center
;
.scenicSpotSalesBoard
.otherMoth
{
margin
:
20px
10px
20px
;
background
:
#f2f2f2
;
}
}
.hotelKb
.currentInput
{
width
:
120px
;
.scenicSpotSalesBoard
.title
{
height
:
30px
;
height
:
14px
;
border-radius
:
17px
;
line-height
:
14px
;
outline
:
none
;
border-left
:
3px
solid
#e95252
;
border
:
none
;
font-size
:
16px
;
margin-top
:
20px
;
color
:
#333
;
border
:
1px
solid
#dcdfe6
;
text-indent
:
10px
;
}
margin
:
20px
0
;
.hotelKb
.days
li
.other-month
{
}
display
:
inline-block
;
position
:
absolute
;
.scenicSpotSalesBoard
.hasStock_1
{
right
:
0
;
color
:
#FFFFFF
;
bottom
:
0
;
background-color
:
#ff3737
;
width
:
24px
;
}
height
:
17px
;
font-size
:
12px
;
.scenicSpotSalesBoard
.hasStock_2
{
line-height
:
17px
;
background-color
:
#ff99cc
;
background-color
:
#cccccc
;
}
color
:
#fff
;
}
.scenicSpotSalesBoard
.hasStock_3
{
.hotelKb
.addCompany
{
background-color
:
#bcd6ee
;
width
:
700px
;
}
}
.hotelKb
.ckStyle
{
.scenicSpotSalesBoard
.hasStock_4
{
position
:
absolute
;
background-color
:
#ffffff
;
display
:
inline-block
;
}
width
:
24px
;
height
:
17px
;
/* 日期样式结束*/
font-size
:
12px
;
line-height
:
17px
;
bottom
:
0
;
right
:
0
;
background-color
:
#777777
;
color
:
#fff
;
}
.hotelKb
.el-dialog--center
.el-dialog__body
{
padding-top
:
0
;
}
.HB_Inventor
{
display
:
block
;
text-align
:
left
;
padding-left
:
3px
;
}
.HB_Inventor
>
span
{
display
:
block
;
font-size
:
12px
;
height
:
14px
;
margin-bottom
:
3px
;
}
.hotelKb
.Used_room
{
color
:
#13b0ae
;
}
/* 日期样式结束*/
</
style
>
</
style
>
<
template
>
<
template
>
<div
class=
"flexOne
hotelKb
"
>
<div
class=
"flexOne
scenicSpotSalesBoard
"
>
<div
class=
"query-box"
>
<div
class=
"query-box
Plan_Query
"
>
<ul>
<ul>
<li>
<li>
<label
class=
""
>
{{
$t
(
'system.quety_area'
)
}}
</label>
<span>
<el-select
v-model=
"msg.Country"
clearable
filterable
@
change=
"getProvinceList(msg.Country,1)"
:placeholder=
"$t('system.table_country')"
>
<em>
景点
</em>
<el-option
:label=
"$t('pub.unlimitedSel')"
value=
''
></el-option>
<el-select
v-model=
"msg.CouponsId"
:placeholder=
"$t('pub.pleaseSel')"
filterable
>
<el-option
v-for=
'item in countryList'
:key=
"item.ID"
:label=
"item.Name"
:value=
"item.ID"
>
<el-option
:label=
"$t('pub.unlimitedSel')"
:value=
"defaultSelectValue"
></el-option>
</el-option>
<el-option
v-for=
"item in ScenicList"
:key=
"item.ID"
:label=
"item.Name"
:value=
"item.ID"
></el-option>
</el-select>
</el-select>
<el-select
v-model=
"msg.Province"
filterable
@
change=
"getProvinceList(msg.Province,2)"
:placeholder=
"$t('hotel.hotel_province')"
>
</span>
<el-option
v-for=
'item in provinceList'
:key=
"item.ID"
:label=
"item.Name"
:value=
"item.ID"
>
</el-option>
</el-select>
<el-select
v-model=
"msg.City"
filterable
@
change=
"getProvinceList(msg.City,3)"
:placeholder=
"$t('hotel.hotel_city')"
>
<el-option
v-for=
'item in cityList'
:key=
"item.ID"
:label=
"item.Name"
:value=
"item.ID"
>
</el-option>
</el-select>
<el-select
v-model=
"msg.District"
filterable
:placeholder=
"$t('hotel.hotel_area')"
>
<el-option
v-for=
'item in district'
:key=
"item.ID"
:label=
"item.Name"
:value=
"item.ID"
>
</el-option>
</el-select>
</li>
</li>
<li
class=
'time'
>
<li
style=
"margin-right:50px;"
>
<div
class=
"block"
>
<button
class=
"normalBtn"
type=
"button"
@
click=
"GetHoltelInventory()"
>
{{
$t
(
'pub.searchBtn'
)
}}
</button>
<label
class=
"demonstration"
>
{{
$t
(
'pub.yearMonth'
)
}}
</label>
<button
class=
"normalBtn"
type=
"button"
@
click=
"DownLoadDinnerSalesBoard()"
>
下载
</button>
<el-date-picker
v-model=
"nowYearMonth"
type=
"month"
:clearable=
false
:editable=
false
placeholder=
"选择年月"
format=
"yyyy-MM"
value-format=
"yyyy-MM"
@
change=
"getMonthYear"
>
</el-date-picker>
</div>
</li>
</li>
<li
class=
'time'
>
</ul>
<div
class=
"block"
>
</div>
<label
class=
"demonstration"
>
预约方式
</label>
<div
class=
"title"
style=
"display:none;"
>
<el-select
v-model=
"msg.AppointmentStyle"
filterable
:placeholder=
"$t('hotel.hotel_area')"
>
门票统计 共
<el-option
:label=
"$t('pub.unlimitedSel')"
:value=
'msg.SelectDefaultValue'
></el-option>
<span
class=
"Owe_Room"
></span>
<el-option
label=
"预约"
:value=
'1'
>
</div>
</el-option>
<div
class=
"month"
>
</el-select>
<ul>
</div>
<li>
<i
class=
"el-icon-caret-left monthminus"
@
click=
"currentYear-=1,getDateString(),initCalendar(dateString)"
></i>
<input
type=
"text"
disabled=
"disabled"
v-model=
"currentYear"
class=
"currentInput"
@
input=
"getDateString(),initCalendar(dateString)"
>
年
<i
class=
"el-icon-caret-right monthadd"
@
click=
"currentYear+=1,getDateString(),initCalendar(dateString)"
></i>
</li>
</li>
<li>
<li>
<input
type=
"button"
class=
"hollowFixedBtn"
:value=
"$t('pub.searchBtn')"
@
click=
"getList()"
/>
<i
class=
"el-icon-caret-left monthminus"
@
click=
"pickPre(currentYear,currentMonth)"
></i>
<input
type=
"button"
class=
"normalBtn"
:value=
"$t('hotel.hotel_dataReport')"
@
click=
"goData('HotelDataStatistics')"
/>
<input
type=
"text"
disabled=
"disabled"
v-model=
"currentMonth"
class=
"currentInput"
@
input=
"getDateString(),initCalendar(dateString)"
>
月
<i
class=
"el-icon-caret-right monthadd"
@
click=
"pickNext(currentYear,currentMonth)"
></i>
</li>
</li>
</ul>
</ul>
</div>
</div>
<div
class=
"hotel_box"
v-loading=
"msg.loading"
>
<div
class=
"noData"
v-show=
"noData"
>
<ul
class=
"weekdays"
>
{{
$t
(
'system.content_noData'
)
}}
<li>
{{
$t
(
'hotel.hotel_Monday'
)
}}
</li>
</div>
<li>
{{
$t
(
'hotel.hotel_Tuesday'
)
}}
</li>
<div
class=
"hotel_item"
v-for=
"item in DataList"
@
click=
"GetRestaurantInventory(item.CouponsId),DiningName=item.DiningName"
:key=
"item.subCode"
>
<li>
{{
$t
(
'hotel.hotel_Wednesday'
)
}}
</li>
<img
:src=
"item.PicPath"
>
<li>
{{
$t
(
'hotel.hotel_Thursday'
)
}}
</li>
<div
class=
"hotel_item_info"
:class=
"item.warning? 'hotel_item_info_warning':''"
>
<li>
{{
$t
(
'hotel.hotel_Friday'
)
}}
</li>
<p
class=
"hotel_item_info_name"
>
{{
item
.
CouponsName
}}
</p>
<li>
{{
$t
(
'hotel.hotel_Saturday'
)
}}
</li>
<p
class=
"hotel_item_info_chuang"
><span
class=
'iconfont icon-xiaoliangyuce'
></span><span
class=
'RemainingInventory'
>
{{
item
.
UseAccount
}}
</span></p>
<li>
{{
$t
(
'hotel.hotel_Sunday'
)
}}
</li>
</ul>
<ul
class=
"days clearfix"
v-loading=
"msg.loading"
>
<li
v-for=
"(dayItem,index) in days"
:key=
"dayItem.index"
>
<p
class=
"ckStyle"
:class=
"
{ckStyleOther:dayItem.day.getMonth()+1 != currentMonth}">
{{
dayItem
.
day
.
getDate
()
}}
</p>
<div>
<p
v-for=
"item in dayItem.dayValue"
>
<span
class=
"text_underLine"
>
{{
item
.
TicketName
}}
(
{{
item
.
TicketNum
}}
)
</span>
</p>
</div>
</div>
</div>
</li>
</div>
</ul>
<el-pagination
background
@
current-change=
"handleCurrentChange"
:current-page
.
sync=
"msg.currentPage"
layout=
"total,prev, pager, next, jumper"
:page-size=
"msg.pageSize"
:total=
"msg.total"
>
</el-pagination>
<el-dialog
custom-class=
'addCompany'
title=
"日期"
:visible
.
sync=
"outerVisible"
center
>
<div
class=
"priceDate"
id=
"DayAll"
>
<div
class=
"month"
>
<ul>
<li>
<i
class=
"arrow monthminus"
@
click=
"currentYear-=1,getDateString(),initCalendar(dateString)"
>
❮
</i>
<input
type=
"text"
v-model=
"currentYear"
class=
"currentInput"
@
input=
"getDateString(),initCalendar(dateString)"
/>
年
<i
class=
"arrow monthadd"
@
click=
"currentYear+=1,getDateString(),initCalendar(dateString)"
>
❯
</i>
</li>
<li>
<i
class=
"arrow monthminus"
@
click=
"pickPre(currentYear,currentMonth)"
>
❮
</i>
<input
type=
"text"
v-model=
"currentMonth"
class=
"currentInput"
@
input=
"getDateString(),initCalendar(dateString)"
/>
月
<i
class=
"arrow monthadd"
@
click=
"pickNext(currentYear,currentMonth)"
>
❯
</i>
</li>
</ul>
</div>
<!-- 星期 -->
<ul
class=
"weekdays"
>
<li>
{{
$t
(
'hotel.hotel_Monday'
)
}}
</li>
<li>
{{
$t
(
'hotel.hotel_Tuesday'
)
}}
</li>
<li>
{{
$t
(
'hotel.hotel_Wednesday'
)
}}
</li>
<li>
{{
$t
(
'hotel.hotel_Thursday'
)
}}
</li>
<li>
{{
$t
(
'hotel.hotel_Friday'
)
}}
</li>
<li>
{{
$t
(
'hotel.hotel_Saturday'
)
}}
</li>
<li>
{{
$t
(
'hotel.hotel_Sunday'
)
}}
</li>
</ul>
<!-- 日期 -->
<ul
class=
"days clearfix"
>
<li
@
click=
"goUrl(dayobject)"
v-for=
"(dayobject,index) in days"
:key=
"dayobject.subCode"
>
<span
v-if=
"dayobject.day.getMonth()+1 != currentMonth"
class=
"other-month"
>
{{
dayobject
.
day
.
getDate
()
}}
</span>
<span
class=
"ckStyle"
v-else
>
{{
dayobject
.
day
.
getDate
()
}}
</span>
<span
class=
"HB_Inventor"
>
<span>
使用:
<span
class=
"Used_room"
>
{{
dayobject
.
UseAccount
}}
</span></span>
</span>
</li>
</ul>
</div>
</el-dialog>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
msg
:
{
msg
:
{
pageIndex
:
1
,
Year
:
0
,
pageSize
:
30
,
Month
:
0
,
Country
:
""
,
CouponsId
:
0
,
Province
:
""
,
loading
:
false
City
:
""
,
},
District
:
""
,
//餐厅列表
Year
:
new
Date
().
Format
(
"yyyy"
),
ScenicList
:
[],
Month
:
new
Date
().
Format
(
"MM"
),
defaultSelectValue
:
0
,
total
:
0
,
currentDay
:
1
,
currentPage
:
1
,
currentMonth
:
1
,
loading
:
true
,
currentYear
:
1970
,
//下拉框默认值
currentWeek
:
1
,
SelectDefaultValue
:
-
1
,
days
:
[],
//预约方式
//每天的门票库存
AppointmentStyle
:
-
1
DayData
:
[],
};
},
methods
:
{
stockColor
:
function
(
type
)
{
if
(
type
===
1
)
{
return
'hasStock_1'
}
else
if
(
type
===
2
)
{
return
'hasStock_2'
}
else
if
(
type
===
3
)
{
return
'hasStock_3'
}
else
if
(
type
===
4
)
{
return
'hasStock_4'
}
},
//格式化日期
getDateString
:
function
()
{
this
.
dateString
=
this
.
$calendarUtils
.
formatDate
(
this
.
currentYear
,
this
.
currentMonth
,
1
);
this
.
GetHoltelInventory
();
},
},
nowYearMonth
:
new
Date
(),
initCalendar
:
function
(
cur
)
{
DataList
:
[],
var
newDays
=
this
.
$calendarUtils
.
createCalendar
(
cur
);
countryList
:
""
,
this
.
currentDay
=
newDays
.
CurrentDay
;
provinceList
:
""
,
this
.
currentYear
=
newDays
.
CurrentYear
;
cityList
:
""
,
this
.
currentMonth
=
newDays
.
CurrentMonth
;
district
:
""
,
this
.
currentWeek
=
newDays
.
CurrentWeek
;
noData
:
false
,
this
.
days
.
length
=
0
;
outerVisible
:
false
,
var
dateArray
=
newDays
.
DayArray
;
currentDay
:
1
,
for
(
var
i
=
0
;
i
<
dateArray
.
length
;
i
++
)
{
currentMonth
:
1
,
var
d
=
dateArray
[
i
].
day
;
currentYear
:
1970
,
var
dayobject
=
{};
currentWeek
:
1
,
dayobject
.
day
=
d
;
days
:
[],
this
.
days
.
push
(
dayobject
);
//每天的酒店库存
}
DayData
:
[],
},
CouponsId
:
0
,
//点击左箭头切换年月
DiningName
:
""
pickPre
:
function
(
year
,
month
)
{
};
var
d
=
new
Date
(
this
.
$calendarUtils
.
formatDate
(
year
,
month
,
1
));
},
d
.
setDate
(
0
);
methods
:
{
this
.
nowDate
=
d
.
getFullYear
()
+
"-"
+
(
d
.
getMonth
()
+
1
)
+
"-1"
;
getList
()
{
this
.
initCalendar
(
this
.
msg
.
loading
=
true
;
this
.
$calendarUtils
.
formatDate
(
d
.
getFullYear
(),
d
.
getMonth
()
+
1
,
1
)
this
.
apipost
(
);
"ticketcouponsprice_get_ScenicSaleBoard"
,
this
.
GetHoltelInventory
();
this
.
msg
,
},
res
=>
{
//点击右箭头切换年月
this
.
msg
.
loading
=
false
;
pickNext
:
function
(
year
,
month
)
{
if
(
res
.
data
.
resultCode
==
1
)
{
var
d
=
new
Date
(
this
.
$calendarUtils
.
formatDate
(
year
,
month
,
1
));
var
tempData
=
res
.
data
.
data
.
pageData
;
d
.
setDate
(
35
);
this
.
msg
.
total
=
res
.
data
.
data
.
count
;
this
.
nowDate
=
d
.
getFullYear
()
+
"-"
+
(
d
.
getMonth
()
+
1
)
+
"-1"
;
tempData
.
forEach
(
x
=>
{
this
.
initCalendar
(
if
(
x
.
UseAccount
<
15
)
{
this
.
$calendarUtils
.
formatDate
(
d
.
getFullYear
(),
d
.
getMonth
()
+
1
,
1
)
x
.
warning
=
true
;
);
this
.
GetHoltelInventory
();
},
//点击获取酒店库存数据
GetHoltelInventory
()
{
this
.
msg
.
loading
=
true
;
var
that
=
this
;
this
.
msg
.
Year
=
this
.
currentYear
;
this
.
msg
.
Month
=
this
.
currentMonth
;
this
.
DayData
=
[];
this
.
apipost
(
"ticketcouponsorder_post_GetScenicMonthStatistics"
,
this
.
msg
,
res
=>
{
this
.
msg
.
loading
=
false
;
this
.
DayData
=
res
.
data
.
data
;
this
.
days
.
forEach
(
dayItem
=>
{
let
d
=
dayItem
.
day
;
let
myDate
=
this
.
$calendarUtils
.
formatDate
(
d
.
getFullYear
(),
d
.
getMonth
()
+
1
,
d
.
getDate
()
);
dayItem
.
dayValue
=
[];
for
(
var
j
=
0
;
j
<
this
.
DayData
.
length
;
j
++
)
{
if
(
this
.
DayData
[
j
].
Day
==
myDate
)
{
dayItem
.
dayValue
=
this
.
DayData
[
j
].
SubList
;
}
}
}
});
});
this
.
DataList
=
tempData
;
this
.
$forceUpdate
();
this
.
noData
=
!
this
.
msg
.
total
>
0
;
},
}
err
=>
{}
},
);
err
=>
{}
},
);
//获取酒店列表
},
GetScenicList
()
{
getProvinceList
(
ID
,
type
)
{
//根据省份获取城市
let
msg
=
{
Id
:
ID
};
if
(
type
==
1
)
{
this
.
msg
.
Province
=
""
;
this
.
msg
.
City
=
""
;
this
.
msg
.
District
=
""
;
this
.
provinceList
=
[];
this
.
cityList
=
[];
}
else
if
(
type
==
2
)
{
this
.
msg
.
City
=
""
;
this
.
msg
.
District
=
""
;
this
.
cityList
=
[];
}
else
if
(
type
==
3
)
{
this
.
msg
.
District
=
""
;
}
if
(
this
.
msg
.
Country
!==
""
)
{
this
.
apipost
(
this
.
apipost
(
"dict_post_Destination_GetChildList"
,
"ticketcoupons_post_GetList"
,
{
QCountry
:
651
},
msg
,
res
=>
{
res
=>
{
if
(
type
==
1
)
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
provinceList
=
res
.
data
.
data
;
this
.
ScenicList
=
res
.
data
.
data
;
}
else
if
(
type
==
2
)
{
this
.
cityList
=
res
.
data
.
data
;
}
else
if
(
type
==
3
)
{
this
.
district
=
res
.
data
.
data
;
}
}
},
},
err
=>
{}
err
=>
{}
);
);
}
},
},
//下载餐厅统计
//获取国家
DownLoadDinnerSalesBoard
()
{
getCountryList
()
{
if
(
this
.
msg
.
CouponsId
<=
0
)
{
this
.
apipost
(
this
.
Info
(
"请选择景点!"
);
"dict_post_Destination_GetCountry"
,
return
;
{},
res
=>
{
this
.
countryList
=
res
.
data
.
data
;
},
err
=>
{}
);
},
//查询初始化页码
resetPageIndex
()
{
this
.
msg
.
pageIndex
=
1
;
this
.
msg
.
currentPage
=
1
;
},
//翻页功能按钮
handleCurrentChange
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
},
getMonthYear
()
{
let
newMonthYear
=
this
.
nowYearMonth
.
split
(
"-"
);
let
nums
=
[];
for
(
var
i
=
0
;
i
<
newMonthYear
.
length
;
i
++
)
{
nums
.
push
(
parseInt
(
newMonthYear
[
i
]));
}
this
.
msg
.
Year
=
nums
[
0
].
toString
();
this
.
msg
.
Month
=
nums
[
1
].
toString
();
},
goData
(
path
)
{
this
.
$router
.
push
({
path
:
path
});
},
//跳转订单
goUrl
(
dayItem
)
{
this
.
$router
.
push
({
path
:
"scenicSpotInfo"
,
query
:
{
id
:
dayItem
.
CouponsId
,
date
:
dayItem
.
UseTime
,
blank
:
'y'
,
tab
:
'景点详情'
}
}
});
this
.
msg
.
loading
=
true
;
},
let
fileName
=
"门票下载"
+
this
.
$commonUtils
.
getCurrentDate
()
+
".xls"
;
getDateString
:
function
()
{
this
.
GetLocalFile
(
"ticketcouponsorder_post_DownLoadScenicMonthStatistics"
,
this
.
msg
,
fileName
,
this
.
dateString
=
this
.
$calendarUtils
.
formatDate
(
res
=>
{
this
.
currentYear
,
this
.
msg
.
loading
=
false
;
this
.
currentMonth
,
});
1
);
this
.
checkDays
();
},
initCalendar
:
function
(
cur
)
{
var
newDays
=
this
.
$calendarUtils
.
createCalendar
(
cur
);
this
.
currentDay
=
newDays
.
CurrentDay
;
this
.
currentYear
=
newDays
.
CurrentYear
;
this
.
currentMonth
=
newDays
.
CurrentMonth
;
this
.
currentWeek
=
newDays
.
CurrentWeek
;
this
.
days
.
length
=
0
;
var
dateArray
=
newDays
.
DayArray
;
for
(
var
i
=
0
;
i
<
dateArray
.
length
;
i
++
)
{
var
d
=
dateArray
[
i
].
day
;
var
dayobject
=
{};
dayobject
.
day
=
d
;
this
.
days
.
push
(
dayobject
);
}
}
},
},
//点击左箭头切换年月
mounted
()
{
pickPre
:
function
(
year
,
month
)
{
//初始化日历
var
d
=
new
Date
(
this
.
$calendarUtils
.
formatDate
(
year
,
month
,
1
));
let
myDate
=
new
Date
();
d
.
setDate
(
0
);
this
.
currentYear
=
myDate
.
getFullYear
();
this
.
nowDate
=
d
.
getFullYear
()
+
"-"
+
(
d
.
getMonth
()
+
1
)
+
"-1"
;
this
.
currentMonth
=
myDate
.
getMonth
()
+
1
;
this
.
initCalendar
(
this
.
msg
.
Year
=
this
.
currentYear
;
this
.
$calendarUtils
.
formatDate
(
d
.
getFullYear
(),
d
.
getMonth
()
+
1
,
1
)
this
.
msg
.
Month
=
this
.
currentDay
;
);
this
.
checkDays
();
this
.
GetScenicList
();
},
this
.
initCalendar
();
//点击右箭头切换年月
this
.
GetHoltelInventory
();
pickNext
:
function
(
year
,
month
)
{
var
d
=
new
Date
(
this
.
$calendarUtils
.
formatDate
(
year
,
month
,
1
));
d
.
setDate
(
35
);
this
.
nowDate
=
d
.
getFullYear
()
+
"-"
+
(
d
.
getMonth
()
+
1
)
+
"-1"
;
this
.
initCalendar
(
this
.
$calendarUtils
.
formatDate
(
d
.
getFullYear
(),
d
.
getMonth
()
+
1
,
1
)
);
this
.
checkDays
();
},
//点击获取餐厅库存数据
GetRestaurantInventory
(
CouponsId
)
{
this
.
outerVisible
=
true
;
this
.
CouponsId
=
CouponsId
;
this
.
apipost
(
"ticketcouponsprice_get_GetScenicStatistics"
,
{
CouponsId
:
this
.
CouponsId
,
Year
:
this
.
currentYear
,
Month
:
this
.
currentMonth
},
res
=>
{
this
.
DayData
=
res
.
data
.
data
;
this
.
checkDays
();
},
err
=>
{}
);
},
checkDays
()
{
this
.
days
.
forEach
(
dayItem
=>
{
var
d
=
dayItem
.
day
;
var
myDate
=
this
.
$calendarUtils
.
formatDate
(
d
.
getFullYear
(),
d
.
getMonth
()
+
1
,
d
.
getDate
()
);
for
(
var
j
=
0
;
j
<
this
.
DayData
.
length
;
j
++
)
{
if
(
this
.
DayData
[
j
].
UseTime
==
myDate
)
{
//已用
dayItem
.
UseAccount
=
this
.
DayData
[
j
].
UseAccount
;
//使用时间
dayItem
.
UseTime
=
this
.
DayData
[
j
].
UseTime
;
//餐厅编号
dayItem
.
CouponsId
=
this
.
DayData
[
j
].
CouponsId
;
}
}
});
this
.
$forceUpdate
();
}
},
mounted
()
{
this
.
getList
();
this
.
getCountryList
();
this
.
initCalendar
();
},
watch
:
{
outerVisible
:
function
toggle
()
{
if
(
!
this
.
outerVisible
)
{
var
myDate
=
new
Date
();
this
.
currentYear
=
myDate
.
getFullYear
();
//获取完整的年份(4位,1970-????)
this
.
currentMonth
=
myDate
.
getMonth
()
+
1
;
//获取当前月份(0-11,0代表1月)
this
.
initCalendar
();
}
}
}
}
}
;
};
</
script
>
</
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