Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7-Eleven
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
高淑倩
7-Eleven
Commits
68e2e24b
Commit
68e2e24b
authored
Oct 28, 2019
by
谢中龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
业绩界面接口拆开
parent
b1f086db
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
27 deletions
+60
-27
achievement.js
src/shoppingGuid/page/pages/achievement/achievement.js
+55
-22
achievement.wxml
src/shoppingGuid/page/pages/achievement/achievement.wxml
+5
-5
No files found.
src/shoppingGuid/page/pages/achievement/achievement.js
View file @
68e2e24b
...
...
@@ -11,15 +11,16 @@ wxService.page({
*/
data
:
{
filterBar
:
[
{
name
:
'本月'
,
isActive
:
true
,
index
:
0
},
{
name
:
'上月'
,
isActive
:
false
,
index
:
1
},
{
name
:
'3个月'
,
isActive
:
false
,
index
:
2
}
{
name
:
'本月'
,
isActive
:
true
,
index
:
1
},
{
name
:
'上月'
,
isActive
:
false
,
index
:
2
},
{
name
:
'3个月'
,
isActive
:
false
,
index
:
3
}
],
current
:
0
,
current
:
1
,
currentOrderData
:
{},
info
:
{},
achievement
:
{},
memberPreview
:
{},
},
...
...
@@ -32,13 +33,13 @@ wxService.page({
this
.
data
.
filterBar
[
index
].
isActive
=
true
;
this
.
data
.
current
=
this
.
data
.
filterBar
[
index
].
index
;
this
.
data
.
currentOrderData
=
this
.
data
.
achievement
.
monthAchievement
[
this
.
data
.
current
];
this
.
setData
({
filterBar
:
this
.
data
.
filterBar
,
current
:
this
.
data
.
current
,
currentOrderData
:
this
.
data
.
currentOrderData
});
this
.
getGuidOrderPreview
(
this
.
data
.
current
);
},
/**
* 生命周期函数--监听页面加载
...
...
@@ -69,7 +70,13 @@ wxService.page({
});
//获取导购业绩
this
.
getGuidAchievement
();
// this.getGuidAchievement();
//获取导购业绩月统计
this
.
getGuidAchievementMonth
();
//获取导购业界订单概览
this
.
getGuidOrderPreview
(
this
.
data
.
current
);
//获取导购业绩日统计
this
.
getGuidAchievementDay
();
},
/**
...
...
@@ -116,33 +123,58 @@ wxService.page({
});
},
//获取导购业绩
getGuidAchievement
(){
wxService
.
post
(
'/marketing/shoppingguide/achievement'
).
then
(
res
=>
{
if
(
!
res
)
return
;
this
.
data
.
currentOrderData
=
res
.
data
.
data
.
monthAchievement
[
this
.
data
.
current
];
res
.
data
.
data
.
rank
=
res
.
data
.
data
.
rank
?
res
.
data
.
data
.
rank
:
'暂无'
;
this
.
setData
({
achievement
:
res
.
data
.
data
,
currentOrderData
:
this
.
data
.
currentOrderData
,
});
let
obj
=
res
.
data
.
data
;
//导购招募会员概览
getGuidMemberPreview
(){
wxService
.
post
(
'/marketing/shoppingguide/achievement/memberPreview'
).
then
(
res
=>
{
if
(
!
res
)
return
;
let
data
=
res
.
data
.
data
;
let
series
=
[
{
name
:
'本月'
,
color
:
'rgba(0,145,255,0.2)'
,
data
:
[
obj
.
memberRecruitAmountMonth
,
obj
.
plusMemberRecruitAmountMonth
,
obj
.
achievementMonth
],
data
:
[
data
.
memberRecruitAmountMonth
,
data
.
plusMemberRecruitAmountMonth
,
this
.
data
.
achievement
.
achievementMonth
],
},
{
name
:
'累计'
,
color
:
'rgba(0, 145, 255, 1)'
,
data
:
[
obj
.
memberRecruitAmountTotal
,
obj
.
plusMemberRecruitAmountTotal
,
obj
.
achievementTotal
],
data
:
[
data
.
memberRecruitAmountTotal
,
data
.
plusMemberRecruitAmountTotal
,
this
.
data
.
achievement
.
achievementTotal
],
}
];
this
.
initBarChart
(
series
);
});
},
//获取导购业绩月统计
getGuidAchievementMonth
(){
wxService
.
post
(
'/marketing/shoppingguide/achievement/month'
).
then
(
res
=>
{
if
(
!
res
)
return
;
this
.
data
.
achievement
=
res
.
data
.
data
;
this
.
setData
({
achievement
:
this
.
data
.
achievement
});
//获取会员统计
this
.
getGuidMemberPreview
();
});
},
//导购业绩订单概览
getGuidOrderPreview
(
type
){
wxService
.
post
(
'/marketing/shoppingguide/achievement/orderPreview?type='
+
type
).
then
(
res
=>
{
if
(
!
res
)
return
;
this
.
data
.
currentOrderData
=
res
.
data
.
data
;
this
.
setData
({
currentOrderData
:
this
.
data
.
currentOrderData
})
});
},
//获取导购业绩日统计
getGuidAchievementDay
(){
wxService
.
post
(
'/marketing/shoppingguide/achievement/recruit'
).
then
(
res
=>
{
if
(
!
res
)
return
;
this
.
data
.
memberPreview
=
res
.
data
.
data
;
this
.
setData
({
memberPreview
:
this
.
data
.
memberPreview
});
});
},
})
\ No newline at end of file
src/shoppingGuid/page/pages/achievement/achievement.wxml
View file @
68e2e24b
...
...
@@ -15,11 +15,11 @@
<!-- 今日排行 -->
<view class='today-top'>
<view class='items'>
<view class='number'>{{
achievement
.rank}}</view>
<view class='number'>{{
memberPreview
.rank}}</view>
<view>我的今日招募排名</view>
</view>
<view class='items'>
<view class='number2'>{{
achievement
.recruitAmountToday}}</view>
<view class='number2'>{{
memberPreview
.recruitAmountToday}}</view>
<view>今日招募</view>
</view>
</view>
...
...
@@ -28,7 +28,7 @@
<view class='total' bindtap='onTapToMyMemberList'>
<text>招募总量:</text>
<view class='number'>
<text class='total-colors'>{{
achievement
.recruitTotal}} </text>
<text class='total-colors'>{{
memberPreview
.recruitTotal}} </text>
<image src='/assets/imgs/shoppingGuide/right.png' mode='aspectFit'></image>
</view>
...
...
@@ -39,11 +39,11 @@
<view class='month-data'>
<view class='data-item'>
<text class='data-item-title'>本月业绩(元)</text>
<text class='data-item-number'>{{achievement.
recruitTotal
}}</text>
<text class='data-item-number'>{{achievement.
achievementMonth
}}</text>
</view>
<view class='data-item'>
<text class='data-item-title'>本月新增会员</text>
<text class='data-item-number'>{{
achievement
.recruitAmountMonth}}</text>
<text class='data-item-number'>{{
memberPreview
.recruitAmountMonth}}</text>
</view>
<view class='data-item'>
<text class='data-item-title'>本月新增订单</text>
...
...
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