Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
X
xzf_uniapp-wechat-web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
李智书
xzf_uniapp-wechat-web
Commits
ab7fc926
Commit
ab7fc926
authored
Dec 27, 2021
by
李智书
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.提交更新;
parent
94b4e340
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
4 deletions
+49
-4
src/pages/ConsumptionReport/ConsumptionReport.vue
src/pages/ConsumptionReport/ConsumptionReport.vue
+49
-4
No files found.
src/pages/ConsumptionReport/ConsumptionReport.vue
View file @
ab7fc926
...
@@ -490,7 +490,7 @@
...
@@ -490,7 +490,7 @@
// 日消费趋势图表数据
// 日消费趋势图表数据
dailyConsumptionData
:
[],
dailyConsumptionData
:
[],
dailyConsumptionDate
:
[],
dailyConsumptionDate
:
[],
consumptionPreferencesData
:
{},
// 消费偏好数据
consumptionPreferencesData
:
[],
// 消费偏好数据
}
}
},
},
computed
:
{
computed
:
{
...
@@ -589,7 +589,52 @@
...
@@ -589,7 +589,52 @@
})
})
},
},
// 查询周要点,消费金额
// 查询周要点,消费金额
async
queryWeekConsumerAmout
()
{
let
this_
=
this
try
{
await
new
Promise
((
resolve
,
reject
)
=>
{
$
.
ajax
({
url
:
gHost
+
'
/report-push/student-consumer-report/queryWeekConsumerAmout
'
,
type
:
'
get
'
,
dataType
:
'
json
'
,
contentType
:
'
application/x-www-form-urlencoded
'
,
data
:
{
userId
:
this_
.
specifiedConsumerInfo
.
id
||
""
,
schoolId
:
this_
.
specifiedConsumerInfo
.
schoolid
||
""
,
startDate
:
this_
.
dataRangeArr
[
this_
.
dataRangeIndex
]
?
this_
.
dataRangeArr
[
this_
.
dataRangeIndex
].
startDate
:
""
,
endDate
:
this_
.
dataRangeArr
[
this_
.
dataRangeIndex
]
?
this_
.
dataRangeArr
[
this_
.
dataRangeIndex
].
endDate
:
""
,
},
success
:
function
(
res
)
{
if
(
res
.
code
==
200
)
{
this_
.
dayConsumerTrend
=
res
.
obj
this_
.
dailyConsumptionData
=
Object
.
values
(
this_
.
dayConsumerTrend
.
dayConsumerMap
).
reverse
()
this_
.
dailyConsumptionDate
=
Object
.
keys
(
this_
.
dayConsumerTrend
.
dayConsumerMap
).
map
(
element
=>
element
.
substr
(
5
)
.
replace
(
'
-
'
,
'
/
'
)).
reverse
()
resolve
()
return
}
reject
(
res
.
message
)
},
error
:
function
(
error
)
{
reject
(
error
)
}
})
})
}
catch
(
e
)
{
console
.
warn
(
e
)
//TODO handle the exception
uni
.
showModal
({
content
:
e
.
message
})
}
},
// 日消费趋势
// 日消费趋势
async
queryDayConsumerTrend
()
{
async
queryDayConsumerTrend
()
{
let
this_
=
this
let
this_
=
this
...
@@ -638,8 +683,8 @@
...
@@ -638,8 +683,8 @@
}
}
},
},
// 消费偏好百分比
// 消费偏好百分比
consumerPreferencePercent
(
num
){
consumerPreferencePercent
(
num
)
{
return
(
Math
.
round
(
num
/
this
.
consumptionPreferencesData
.
grossAmount
*
10000
)
/
100
).
toFixed
(
1
)
+
'
%
'
return
(
Math
.
round
(
num
/
this
.
consumptionPreferencesData
.
grossAmount
*
10000
)
/
100
).
toFixed
(
1
)
+
'
%
'
}
}
}
}
}
}
...
...
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