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
Show 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
;
padding
:
20px
;
/* min-height: 500px; */
}
.hotelKb
.hotel_item
{
width
:
120px
;
height
:
120px
;
border-radius
:
4px
;
margin
:
10px
;
cursor
:
pointer
;
position
:
relative
;
overflow
:
hidden
;
}
.hotelKb
.hotel_item
img
{
width
:
100%
;
height
:
100%
;
position
:
absolute
;
left
:
0
;
top
:
0
;
}
.hotelKb
.hotel_item_info
{
width
:
100%
;
height
:
100%
;
position
:
absolute
;
left
:
0
;
top
:
0
;
background-color
:
rgba
(
0
,
0
,
0
,
0.5
);
}
.hotelKb
.el-input__icon
{
line-height
:
34px
;
}
.hotelKb
.hotel_item_info_name
{
font-size
:
12px
;
padding
:
13px
14px
;
color
:
white
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
}
.hotelKb
.icon-xiaoliangyuce
{
color
:
#ffffff
;
opacity
:
0.65
;
font-size
:
16px
;
padding-right
:
10px
;
}
.hotelKb
.RemainingInventory
{
font-size
:
28px
;
color
:
white
;
}
.hotelKb
.hotel_item_info_chuang
{
position
:
absolute
;
bottom
:
10px
;
width
:
100%
;
width
:
100%
;
text-align
:
right
;
height
:
50px
;
padding-right
:
14px
;
line-height
:
50px
;
}
background
:
#e95252
;
.hotelKb
.hotel_item_info_warning
{
background-color
:
#e95252
;
}
.hotelKb
.time
.el-input--prefix
.el-input__inner
{
padding-left
:
30px
;
}
.hotelKb
.query-box
li
label
{
display
:
inline-block
;
min-width
:
80px
;
text-align
:
right
;
font-style
:
normal
;
margin
:
0
20px
0
0
;
}
/* 日期样式开始 */
.hotelKb
#calendar
{
width
:
639px
;
height
:
345px
;
margin
:
0
auto
;
box-shadow
:
0
2px
2px
0
rgba
(
0
,
0
,
0
,
0.14
),
0
3px
1px
-2px
rgba
(
0
,
0
,
0
,
0.1
),
0
1px
5px
0
rgba
(
0
,
0
,
0
,
0.12
);
}
.hotelKb
.month
ul
{
margin
:
0
;
margin
:
0
;
padding
:
0
;
padding
:
0
;
justify-content
:
space-between
;
text-align
:
center
;
}
}
.hotelKb
.year-month
{
.scenicSpotSalesBoard
.year-month
{
flex-direction
:
column
;
flex-direction
:
column
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-around
;
justify-content
:
space-around
;
}
}
.hotelKb
.year-month
>
input
{
.scenicSpotSalesBoard
.year-month
>
input
{
width
:
100px
;
width
:
100px
;
float
:
left
;
float
:
left
;
}
}
.hotelKb
.arrow
{
.scenicSpotSalesBoard
.arrow
{
padding
:
10px
;
padding
:
10px
;
font-style
:
normal
;
font-style
:
normal
;
cursor
:
pointer
;
cursor
:
pointer
;
}
}
.hotelKb
.monthminus
{
.scenicSpotSalesBoard
.monthminus
{
position
:
absolute
;
position
:
absolute
;
left
:
15px
;
left
:
0px
;
top
:
13px
;
top
:
15px
;
}
}
.hotelKb
.monthadd
{
.scenicSpotSalesBoard
.monthadd
{
position
:
absolute
;
position
:
absolute
;
right
:
21px
;
right
:
21px
;
top
:
13px
;
top
:
15px
;
}
}
.hotelKb
.month
ul
li
:first-child
{
margin-left
:
180px
;
.scenicSpotSalesBoard
.month
ul
li
{
}
font-size
:
18px
;
.hotelKb
.month
ul
li
{
color
:
#fff
;
font-size
:
12px
;
position
:
relative
;
position
:
relative
;
text-transform
:
uppercase
;
display
:
inline-block
;
float
:
left
;
letter-spacing
:
3px
;
letter-spacing
:
3px
;
}
}
.hotelKb
.month
ul
li
>
input
{
padding-left
:
10px
;
.scenicSpotSalesBoard
.month
ul
li
i
{
font-size
:
22px
;
color
:
#ff7e7e
;
cursor
:
pointer
;
}
.scenicSpotSalesBoard
.month
ul
li
>
input
{
text-align
:
center
;
text-align
:
center
;
margin
:
20px
10px
20px
;
}
}
.hotelKb
.weekdays
{
.scenicSpotSalesBoard
.weekdays
{
margin
:
0
;
margin
:
0
;
padding
:
3px
0
;
padding
:
3px
0
;
background-color
:
#13b0ae
;
background-color
:
#3fa783
;
display
:
flex
;
display
:
flex
;
width
:
645px
;
width
:
100%
;
flex-wrap
:
wrap
;
flex-wrap
:
wrap
;
color
:
#fff
;
color
:
#fff
;
justify-content
:
space-around
;
justify-content
:
space-around
;
}
}
.hotelKb
.weekdays
li
{
.scenicSpotSalesBoard
.weekdays
li
{
display
:
inline-block
;
display
:
inline-block
;
width
:
13.6
%
;
width
:
14.2857
%
;
text-align
:
center
;
text-align
:
center
;
}
}
.hotelKb
.days
{
/* width: 500px; */
.scenicSpotSalesBoard
.days
{
width
:
100%
;
padding
:
0
;
padding
:
0
;
margin
:
0
;
margin
:
0
;
border-left
:
1px
solid
#dddddd
;
border-left
:
1px
solid
#dddddd
;
/* display: flex; */
flex-wrap
:
wrap
;
flex-wrap
:
wrap
;
box-sizing
:
border-box
;
justify-content
:
space-around
;
justify-content
:
space-around
;
}
}
.hotelKb
.days
li
{
.scenicSpotSalesBoard
.days
>
li
{
list-style-type
:
none
;
list-style-type
:
none
;
width
:
91px
;
width
:
14.2857%
;
height
:
7
0px
;
height
:
14
0px
;
text-align
:
center
;
text-align
:
center
;
position
:
relative
;
position
:
relative
;
font-size
:
12px
;
font-size
:
12px
;
cursor
:
pointer
;
float
:
left
;
float
:
left
;
font-size
:
1rem
;
color
:
#000
;
color
:
#000
;
border-right
:
1px
solid
#dddddd
;
box-sizing
:
border-box
;
border-bottom
:
1px
solid
#dddddd
;
border-right
:
1px
solid
#ddd
;
}
border-bottom
:
1px
solid
#ddd
;
.hotelKb
.month
ul
li
>
input
{
}
padding-left
:
10px
;
text-align
:
center
;
.scenicSpotSalesBoard
.days
li
>
div
{
margin
:
20px
10px
20px
;
height
:
112px
;
}
width
:
100%
;
.hotelKb
.currentInput
{
overflow-y
:
auto
;
text-align
:
left
;
}
.scenicSpotSalesBoard
.days
li
>
div
>
p
{
border-bottom
:
1px
dashed
#ccc
;
height
:
28px
;
line-height
:
28px
;
width
:
100%
;
text-indent
:
10px
;
}
.scenicSpotSalesBoard
.currentInput
{
width
:
120px
;
width
:
120px
;
height
:
30px
;
height
:
30px
;
border-radius
:
17px
;
border-radius
:
17px
;
outline
:
none
;
outline
:
none
;
border
:
none
;
border
:
none
;
margin-top
:
20px
;
color
:
#fff
;
border
:
1px
solid
#dcdfe6
;
background
:
transparent
;
}
font-size
:
18px
;
.hotelKb
.days
li
.other-month
{
}
.scenicSpotSalesBoard
.days
li
.other-month
{
display
:
inline-block
;
display
:
inline-block
;
position
:
absolute
;
position
:
absolute
;
right
:
0
;
right
:
0
;
...
@@ -186,121 +136,107 @@
...
@@ -186,121 +136,107 @@
line-height
:
17px
;
line-height
:
17px
;
background-color
:
#cccccc
;
background-color
:
#cccccc
;
color
:
#fff
;
color
:
#fff
;
}
}
.hotelKb
.addCompany
{
width
:
700px
;
.scenicSpotSalesBoard
.ckStyle
{
}
width
:
100%
;
.hotelKb
.ckStyle
{
height
:
28px
;
position
:
absolute
;
line-height
:
28px
;
display
:
inline-block
;
text-align
:
center
;
width
:
24px
;
font-size
:
14px
;
height
:
17px
;
font-weight
:
bold
;
font-size
:
12px
;
background
:
#ccc
;
line-height
:
17px
;
color
:
#000
;
bottom
:
0
;
}
right
:
0
;
background-color
:
#777777
;
.scenicSpotSalesBoard
.ckStyleOther
{
color
:
#fff
;
background
:
#dddddd
!important
;
}
font-weight
:
normal
!important
;
.hotelKb
.el-dialog--center
.el-dialog__body
{
color
:
#999
;
padding-top
:
0
;
}
}
.HB_Inventor
{
.scenicSpotSalesBoard
.Owe_Room
{
display
:
block
;
color
:
#e95252
;
text-align
:
left
;
}
padding-left
:
3px
;
}
.scenicSpotSalesBoard
.Used_room
{
.HB_Inventor
>
span
{
display
:
block
;
font-size
:
12px
;
height
:
14px
;
margin-bottom
:
3px
;
}
.hotelKb
.Used_room
{
color
:
#13b0ae
;
color
:
#13b0ae
;
}
}
/* 日期样式结束*/
.scenicSpotSalesBoard
.otherMoth
{
background
:
#f2f2f2
;
}
.scenicSpotSalesBoard
.title
{
height
:
14px
;
line-height
:
14px
;
border-left
:
3px
solid
#e95252
;
font-size
:
16px
;
color
:
#333
;
text-indent
:
10px
;
margin
:
20px
0
;
}
.scenicSpotSalesBoard
.hasStock_1
{
color
:
#FFFFFF
;
background-color
:
#ff3737
;
}
.scenicSpotSalesBoard
.hasStock_2
{
background-color
:
#ff99cc
;
}
.scenicSpotSalesBoard
.hasStock_3
{
background-color
:
#bcd6ee
;
}
.scenicSpotSalesBoard
.hasStock_4
{
background-color
:
#ffffff
;
}
/* 日期样式结束*/
</
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
v-model=
"msg.Province"
filterable
@
change=
"getProvinceList(msg.Province,2)"
:placeholder=
"$t('hotel.hotel_province')"
>
<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
class=
'time'
>
<div
class=
"block"
>
<label
class=
"demonstration"
>
{{
$t
(
'pub.yearMonth'
)
}}
</label>
<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
class=
'time'
>
<div
class=
"block"
>
<label
class=
"demonstration"
>
预约方式
</label>
<el-select
v-model=
"msg.AppointmentStyle"
filterable
:placeholder=
"$t('hotel.hotel_area')"
>
<el-option
:label=
"$t('pub.unlimitedSel')"
:value=
'msg.SelectDefaultValue'
></el-option>
<el-option
label=
"预约"
:value=
'1'
>
</el-option>
</el-select>
</el-select>
</
div
>
</
span
>
</li>
</li>
<li>
<li
style=
"margin-right:50px;"
>
<
input
type=
"button"
class=
"hollowFixedBtn"
:value=
"$t('pub.searchBtn')"
@
click=
"getList()"
/
>
<
button
class=
"normalBtn"
type=
"button"
@
click=
"GetHoltelInventory()"
>
{{
$t
(
'pub.searchBtn'
)
}}
</button
>
<
input
type=
"button"
class=
"normalBtn"
:value=
"$t('hotel.hotel_dataReport')"
@
click=
"goData('HotelDataStatistics')"
/
>
<
button
class=
"normalBtn"
type=
"button"
@
click=
"DownLoadDinnerSalesBoard()"
>
下载
</button
>
</li>
</li>
</ul>
</ul>
</div>
</div>
<div
class=
"hotel_box"
v-loading=
"msg.loading"
>
<div
class=
"title"
style=
"display:none;"
>
<div
class=
"noData"
v-show=
"noData"
>
门票统计 共
{{
$t
(
'system.content_noData'
)
}}
<span
class=
"Owe_Room"
></span>
</div>
<div
class=
"hotel_item"
v-for=
"item in DataList"
@
click=
"GetRestaurantInventory(item.CouponsId),DiningName=item.DiningName"
:key=
"item.subCode"
>
<img
:src=
"item.PicPath"
>
<div
class=
"hotel_item_info"
:class=
"item.warning? 'hotel_item_info_warning':''"
>
<p
class=
"hotel_item_info_name"
>
{{
item
.
CouponsName
}}
</p>
<p
class=
"hotel_item_info_chuang"
><span
class=
'iconfont icon-xiaoliangyuce'
></span><span
class=
'RemainingInventory'
>
{{
item
.
UseAccount
}}
</span></p>
</div>
</div>
</div>
</div>
<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"
>
<div
class=
"month"
>
<ul>
<ul>
<li>
<li>
<i
class=
"arrow monthminus"
@
click=
"currentYear-=1,getDateString(),initCalendar(dateString)"
>
❮
</i>
<i
class=
"el-icon-caret-left monthminus"
@
click=
"currentYear-=1,getDateString(),initCalendar(dateString)"
></i>
<input
type=
"text"
v-model=
"currentYear"
class=
"currentInput"
@
input=
"getDateString(),initCalendar(dateString)"
/>
年
<input
type=
"text"
disabled=
"disabled"
v-model=
"currentYear"
class=
"currentInput"
<i
class=
"arrow monthadd"
@
click=
"currentYear+=1,getDateString(),initCalendar(dateString)"
>
❯
</i>
@
input=
"getDateString(),initCalendar(dateString)"
>
年
<i
class=
"el-icon-caret-right monthadd"
@
click=
"currentYear+=1,getDateString(),initCalendar(dateString)"
></i>
</li>
</li>
<li>
<li>
<i
class=
"arrow monthminus"
@
click=
"pickPre(currentYear,currentMonth)"
>
❮
</i>
<i
class=
"el-icon-caret-left monthminus"
@
click=
"pickPre(currentYear,currentMonth)"
></i>
<input
type=
"text"
v-model=
"currentMonth"
class=
"currentInput"
@
input=
"getDateString(),initCalendar(dateString)"
/>
月
<input
type=
"text"
disabled=
"disabled"
v-model=
"currentMonth"
class=
"currentInput"
<i
class=
"arrow monthadd"
@
click=
"pickNext(currentYear,currentMonth)"
>
❯
</i>
@
input=
"getDateString(),initCalendar(dateString)"
>
月
<i
class=
"el-icon-caret-right monthadd"
@
click=
"pickNext(currentYear,currentMonth)"
></i>
</li>
</li>
</ul>
</ul>
</div>
</div>
<!-- 星期 -->
<ul
class=
"weekdays"
>
<ul
class=
"weekdays"
>
<li>
{{
$t
(
'hotel.hotel_Monday'
)
}}
</li>
<li>
{{
$t
(
'hotel.hotel_Monday'
)
}}
</li>
<li>
{{
$t
(
'hotel.hotel_Tuesday'
)
}}
</li>
<li>
{{
$t
(
'hotel.hotel_Tuesday'
)
}}
</li>
...
@@ -310,178 +246,63 @@
...
@@ -310,178 +246,63 @@
<li>
{{
$t
(
'hotel.hotel_Saturday'
)
}}
</li>
<li>
{{
$t
(
'hotel.hotel_Saturday'
)
}}
</li>
<li>
{{
$t
(
'hotel.hotel_Sunday'
)
}}
</li>
<li>
{{
$t
(
'hotel.hotel_Sunday'
)
}}
</li>
</ul>
</ul>
<!-- 日期 -->
<ul
class=
"days clearfix"
v-loading=
"msg.loading"
>
<ul
class=
"days clearfix"
>
<li
v-for=
"(dayItem,index) in days"
:key=
"dayItem.index"
>
<li
@
click=
"goUrl(dayobject)"
v-for=
"(dayobject,index) in days"
<p
class=
"ckStyle"
:class=
"
{ckStyleOther:dayItem.day.getMonth()+1 != currentMonth}">
{{
dayItem
.
day
.
getDate
()
}}
:key=
"dayobject.subCode"
>
</p>
<span
v-if=
"dayobject.day.getMonth()+1 != currentMonth"
class=
"other-month"
>
{{
<div>
dayobject
.
day
.
getDate
()
}}
</span>
<p
v-for=
"item in dayItem.dayValue"
>
<span
class=
"ckStyle"
v-else
>
<span
class=
"text_underLine"
>
{{
item
.
TicketName
}}
(
{{
item
.
TicketNum
}}
)
</span>
{{
dayobject
.
day
.
getDate
()
}}
</p>
</span>
</div>
<span
class=
"HB_Inventor"
>
<span>
使用:
<span
class=
"Used_room"
>
{{
dayobject
.
UseAccount
}}
</span></span>
</span>
</li>
</li>
</ul>
</ul>
</div>
</div>
</el-dialog>
</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"
),
Month
:
new
Date
().
Format
(
"MM"
),
total
:
0
,
currentPage
:
1
,
loading
:
true
,
//下拉框默认值
SelectDefaultValue
:
-
1
,
//预约方式
AppointmentStyle
:
-
1
},
},
nowYearMonth
:
new
Date
(),
//餐厅列表
DataList
:
[],
ScenicList
:
[],
countryList
:
""
,
defaultSelectValue
:
0
,
provinceList
:
""
,
cityList
:
""
,
district
:
""
,
noData
:
false
,
outerVisible
:
false
,
currentDay
:
1
,
currentDay
:
1
,
currentMonth
:
1
,
currentMonth
:
1
,
currentYear
:
1970
,
currentYear
:
1970
,
currentWeek
:
1
,
currentWeek
:
1
,
days
:
[],
days
:
[],
//每天的酒店
库存
//每天的门票
库存
DayData
:
[],
DayData
:
[],
CouponsId
:
0
,
DiningName
:
""
};
};
},
},
methods
:
{
methods
:
{
getList
()
{
stockColor
:
function
(
type
)
{
this
.
msg
.
loading
=
true
;
if
(
type
===
1
)
{
this
.
apipost
(
return
'hasStock_1'
"ticketcouponsprice_get_ScenicSaleBoard"
,
}
else
if
(
type
===
2
)
{
this
.
msg
,
return
'hasStock_2'
res
=>
{
}
else
if
(
type
===
3
)
{
this
.
msg
.
loading
=
false
;
return
'hasStock_3'
if
(
res
.
data
.
resultCode
==
1
)
{
}
else
if
(
type
===
4
)
{
var
tempData
=
res
.
data
.
data
.
pageData
;
return
'hasStock_4'
this
.
msg
.
total
=
res
.
data
.
data
.
count
;
tempData
.
forEach
(
x
=>
{
if
(
x
.
UseAccount
<
15
)
{
x
.
warning
=
true
;
}
});
this
.
DataList
=
tempData
;
this
.
noData
=
!
this
.
msg
.
total
>
0
;
}
}
},
},
err
=>
{}
//格式化日期
);
getDateString
:
function
()
{
},
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
(
"dict_post_Destination_GetChildList"
,
msg
,
res
=>
{
if
(
type
==
1
)
{
this
.
provinceList
=
res
.
data
.
data
;
}
else
if
(
type
==
2
)
{
this
.
cityList
=
res
.
data
.
data
;
}
else
if
(
type
==
3
)
{
this
.
district
=
res
.
data
.
data
;
}
},
err
=>
{}
);
}
},
//获取国家
getCountryList
()
{
this
.
apipost
(
"dict_post_Destination_GetCountry"
,
{},
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
:
'景点详情'
}
});
},
getDateString
:
function
()
{
this
.
dateString
=
this
.
$calendarUtils
.
formatDate
(
this
.
dateString
=
this
.
$calendarUtils
.
formatDate
(
this
.
currentYear
,
this
.
currentYear
,
this
.
currentMonth
,
this
.
currentMonth
,
1
1
);
);
this
.
checkDays
();
this
.
GetHoltelInventory
();
},
},
initCalendar
:
function
(
cur
)
{
initCalendar
:
function
(
cur
)
{
var
newDays
=
this
.
$calendarUtils
.
createCalendar
(
cur
);
var
newDays
=
this
.
$calendarUtils
.
createCalendar
(
cur
);
this
.
currentDay
=
newDays
.
CurrentDay
;
this
.
currentDay
=
newDays
.
CurrentDay
;
this
.
currentYear
=
newDays
.
CurrentYear
;
this
.
currentYear
=
newDays
.
CurrentYear
;
...
@@ -497,79 +318,95 @@ export default {
...
@@ -497,79 +318,95 @@ export default {
}
}
},
},
//点击左箭头切换年月
//点击左箭头切换年月
pickPre
:
function
(
year
,
month
)
{
pickPre
:
function
(
year
,
month
)
{
var
d
=
new
Date
(
this
.
$calendarUtils
.
formatDate
(
year
,
month
,
1
));
var
d
=
new
Date
(
this
.
$calendarUtils
.
formatDate
(
year
,
month
,
1
));
d
.
setDate
(
0
);
d
.
setDate
(
0
);
this
.
nowDate
=
d
.
getFullYear
()
+
"-"
+
(
d
.
getMonth
()
+
1
)
+
"-1"
;
this
.
nowDate
=
d
.
getFullYear
()
+
"-"
+
(
d
.
getMonth
()
+
1
)
+
"-1"
;
this
.
initCalendar
(
this
.
initCalendar
(
this
.
$calendarUtils
.
formatDate
(
d
.
getFullYear
(),
d
.
getMonth
()
+
1
,
1
)
this
.
$calendarUtils
.
formatDate
(
d
.
getFullYear
(),
d
.
getMonth
()
+
1
,
1
)
);
);
this
.
checkDays
();
this
.
GetHoltelInventory
();
},
},
//点击右箭头切换年月
//点击右箭头切换年月
pickNext
:
function
(
year
,
month
)
{
pickNext
:
function
(
year
,
month
)
{
var
d
=
new
Date
(
this
.
$calendarUtils
.
formatDate
(
year
,
month
,
1
));
var
d
=
new
Date
(
this
.
$calendarUtils
.
formatDate
(
year
,
month
,
1
));
d
.
setDate
(
35
);
d
.
setDate
(
35
);
this
.
nowDate
=
d
.
getFullYear
()
+
"-"
+
(
d
.
getMonth
()
+
1
)
+
"-1"
;
this
.
nowDate
=
d
.
getFullYear
()
+
"-"
+
(
d
.
getMonth
()
+
1
)
+
"-1"
;
this
.
initCalendar
(
this
.
initCalendar
(
this
.
$calendarUtils
.
formatDate
(
d
.
getFullYear
(),
d
.
getMonth
()
+
1
,
1
)
this
.
$calendarUtils
.
formatDate
(
d
.
getFullYear
(),
d
.
getMonth
()
+
1
,
1
)
);
);
this
.
checkDays
();
this
.
GetHoltelInventory
();
},
},
//点击获取餐厅库存数据
//点击获取酒店库存数据
GetRestaurantInventory
(
CouponsId
)
{
GetHoltelInventory
()
{
this
.
outerVisible
=
true
;
this
.
msg
.
loading
=
true
;
this
.
CouponsId
=
CouponsId
;
var
that
=
this
;
this
.
msg
.
Year
=
this
.
currentYear
;
this
.
msg
.
Month
=
this
.
currentMonth
;
this
.
DayData
=
[];
this
.
apipost
(
this
.
apipost
(
"ticketcouponsprice_get_GetScenicStatistics"
,
"ticketcouponsorder_post_GetScenicMonthStatistics"
,
{
this
.
msg
,
CouponsId
:
this
.
CouponsId
,
Year
:
this
.
currentYear
,
Month
:
this
.
currentMonth
},
res
=>
{
res
=>
{
this
.
msg
.
loading
=
false
;
this
.
DayData
=
res
.
data
.
data
;
this
.
DayData
=
res
.
data
.
data
;
this
.
checkDays
();
},
err
=>
{}
);
},
checkDays
()
{
this
.
days
.
forEach
(
dayItem
=>
{
this
.
days
.
forEach
(
dayItem
=>
{
var
d
=
dayItem
.
day
;
let
d
=
dayItem
.
day
;
var
myDate
=
this
.
$calendarUtils
.
formatDate
(
let
myDate
=
this
.
$calendarUtils
.
formatDate
(
d
.
getFullYear
(),
d
.
getFullYear
(),
d
.
getMonth
()
+
1
,
d
.
getMonth
()
+
1
,
d
.
getDate
()
d
.
getDate
()
);
);
dayItem
.
dayValue
=
[];
for
(
var
j
=
0
;
j
<
this
.
DayData
.
length
;
j
++
)
{
for
(
var
j
=
0
;
j
<
this
.
DayData
.
length
;
j
++
)
{
if
(
this
.
DayData
[
j
].
UseTime
==
myDate
)
{
if
(
this
.
DayData
[
j
].
Day
==
myDate
)
{
//已用
dayItem
.
dayValue
=
this
.
DayData
[
j
].
SubList
;
dayItem
.
UseAccount
=
this
.
DayData
[
j
].
UseAccount
;
//使用时间
dayItem
.
UseTime
=
this
.
DayData
[
j
].
UseTime
;
//餐厅编号
dayItem
.
CouponsId
=
this
.
DayData
[
j
].
CouponsId
;
}
}
}
}
});
});
this
.
$forceUpdate
();
this
.
$forceUpdate
();
},
err
=>
{}
);
},
//获取酒店列表
GetScenicList
()
{
this
.
apipost
(
"ticketcoupons_post_GetList"
,
{
QCountry
:
651
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
ScenicList
=
res
.
data
.
data
;
}
}
},
},
mounted
()
{
err
=>
{}
this
.
getList
();
);
this
.
getCountryList
();
this
.
initCalendar
();
},
},
watch
:
{
//下载餐厅统计
outerVisible
:
function
toggle
()
{
DownLoadDinnerSalesBoard
()
{
if
(
!
this
.
outerVisible
)
{
if
(
this
.
msg
.
CouponsId
<=
0
)
{
var
myDate
=
new
Date
();
this
.
Info
(
"请选择景点!"
);
this
.
currentYear
=
myDate
.
getFullYear
();
//获取完整的年份(4位,1970-????)
return
;
this
.
currentMonth
=
myDate
.
getMonth
()
+
1
;
//获取当前月份(0-11,0代表1月)
this
.
initCalendar
();
}
}
this
.
msg
.
loading
=
true
;
let
fileName
=
"门票下载"
+
this
.
$commonUtils
.
getCurrentDate
()
+
".xls"
;
this
.
GetLocalFile
(
"ticketcouponsorder_post_DownLoadScenicMonthStatistics"
,
this
.
msg
,
fileName
,
res
=>
{
this
.
msg
.
loading
=
false
;
});
}
}
},
mounted
()
{
//初始化日历
let
myDate
=
new
Date
();
this
.
currentYear
=
myDate
.
getFullYear
();
this
.
currentMonth
=
myDate
.
getMonth
()
+
1
;
this
.
msg
.
Year
=
this
.
currentYear
;
this
.
msg
.
Month
=
this
.
currentDay
;
this
.
GetScenicList
();
this
.
initCalendar
();
this
.
GetHoltelInventory
();
}
}
};
};
</
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