diff --git a/commons/js/config.js b/commons/js/config.js
index 9a150cb..8ae72c4 100644
--- a/commons/js/config.js
+++ b/commons/js/config.js
@@ -69,6 +69,7 @@ api = {
appStatisticsOcust: "app/statistics/ocust", //数据分析-订单数据
appStatisticsHcust: "app/statistics/hcust", //首页-客户图标数据
appStatisticsHorder: "app/statistics/horder", //首页-订单图表数据
+ appScore: "app/score", //首页-最新运营分
appStatisticsStats: "app/statistics/stats", //获取渠道经理数据分析入口数据
appStatisticsStats_days: "app/statistics/stats_days", //获取渠道经理数据分析数据
@@ -183,7 +184,10 @@ api = {
appSign: "app/sign", //用户签到
- appSeriesMbrand: "app/series/mbrand" //获取车系品牌
+ appSeriesMbrand: "app/series/mbrand", //获取车系品牌
+
+ appScoreLists: "app/score/lists", //运营分排行
+ appScoreDetail: "app/score/detail", //运营分详情
}
//远程图片存储地址
diff --git a/commons/js/utils/apiQuery.js b/commons/js/utils/apiQuery.js
index 646efb3..de58b52 100644
--- a/commons/js/utils/apiQuery.js
+++ b/commons/js/utils/apiQuery.js
@@ -397,6 +397,13 @@ apiQuery.getAppStatisticsHorder = function(params){
})
}
+//首页-最新运营分
+apiQuery.getAppScore = function(params){
+ return new Promise(function (resolve, reject) {
+ HttpRequest(false, Config.api.appScore, 2, params, "GET", resolve, reject)
+ })
+}
+
//更新用户店铺id
apiQuery.putAppUserResetbiz = function (params) {
return new Promise(function (resolve, reject) {
@@ -1059,4 +1066,19 @@ apiQuery.getMbrand = function (params) {
HttpRequest(false, Config.api.appSeriesMbrand, 2, params, "GET", resolve, reject)
})
}
+
+//运营分排行列表
+apiQuery.appScoreLists = function(params){
+ return new Promise(function (resolve, reject) {
+ HttpRequest(false, Config.api.appScoreLists, 2, params, "GET", resolve, reject)
+ })
+}
+
+//运营分详情
+apiQuery.appScoreDetail = function(params){
+ return new Promise(function (resolve, reject) {
+ HttpRequest(false, Config.api.appScoreDetail, 2, params, "GET", resolve, reject)
+ })
+}
+
export default apiQuery;
\ No newline at end of file
diff --git a/pages/index/index.js b/pages/index/index.js
index 4b9b7ed..0e387a9 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -140,6 +140,7 @@ Page({
isShowGoods:false,
});
this.getAppUserCal()
+ this.getScore()
// this.getAppTransferRemind()
// this.getAppInventoryRemind()
// this.getAppGoodsRemind()
@@ -181,6 +182,7 @@ Page({
});
this.getUserInfo()
this.getAppUserCal()
+ this.getScore()
// this.getAppTransferRemind()
// this.getAppInventoryRemind()
// this.getAppGoodsRemind()
@@ -342,6 +344,11 @@ Page({
this.setData({
userInfo: res
})
+ if(res.group_id>2){
+ this.setData({
+ score_role_cur:1
+ })
+ }
});
},
@@ -544,10 +551,23 @@ Page({
//0924
changeScoreRoleTab(e){
this.setData({
- score_role_cur:e.currentTarget.dataset.index
+ score_role_cur:parseInt(e.currentTarget.dataset.index)
+ })
+ this.getScore()
+ },
+ //加载最新运营分
+ getScore(){
+ let params = {};
+ if(this.data.score_role_cur){
+ params['type'] = 1;
+ }
+ _.apiQuery.getAppScore(params).then(res => {
+ this.setData({
+ scoreData:res.data,
+ score_trend:res.data.score_trend ?? 1
+ })
})
},
-
//页面相关事件处理函数--监听用户下拉动作
onPullDownRefresh: function () {
this.setData({
@@ -558,6 +578,7 @@ Page({
});
this.getAppUserCal()
this.getAppStatisticsHcust()
+ this.getScore()
//this.getAppStatisticsHorder()
// this.getAppTransferRemind()
// this.getAppInventoryRemind()
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index 3a7c1a0..fb3d391 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -65,33 +65,31 @@
最新运营分
+ 个人
+ 门店
+
-
+
-
- 较上日上升100分
+
+ {{scoreData.title}}
- *更新于09月10日
- 当前显示为昨日运营情况评分
+ {{scoreData.u_time_text}}
+ {{scoreData.sub_title}}
- 详情
+ 详情
diff --git a/pages/score/detail.js b/pages/score/detail.js
index ff04bfe..03fb877 100644
--- a/pages/score/detail.js
+++ b/pages/score/detail.js
@@ -20,72 +20,8 @@ Page({
score_up_color: '#31cbad',
score_down_color: '#ff895b',
score_trend: 1, //用这个参数控制样式:1 上升 、2 下降
- list: [{
- name: '基础分',
- score: 60,
- trend: 1,
- data: [{
- name: '正常开工',
- score: '+180'
- }]
- }, {
- name: '线索分',
- score: 660,
- trend: 1,
- data: [{
- name: '线索建档',
- score: '+180'
- },{
- name: '添加微信',
- score: '+180'
- },{
- name: '跟进小记',
- score: '+180'
- },{
- name: '语音通话',
- score: '+180'
- },{
- name: '二次派发',
- score: '+180'
- },{
- name: '首次跟进',
- score: '+180'
- }]
- }, {
- name: '订单分',
- score: 260,
- trend: 1,
- data: [{
- name: '成交数',
- score: '+180'
- },{
- name: '成交率',
- score: '+180'
- },{
- name: '开票率',
- score: '+180'
- },{
- name: '交付率',
- score: '+180'
- }]
- }, {
- name: '扣分项',
- score: 260,
- trend: 2,
- data: [{
- name: '逾期未跟进',
- score: '-80'
- },{
- name: '战败未处理',
- score: '-180'
- },{
- name: '开票后录单',
- score: '-180'
- },{
- name: '建档即订单',
- score: '-180'
- }]
- }]
+ list: [],
+ res_data: [],
},
/**
@@ -108,7 +44,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
-
+ this.getScoreDetail()
},
/**
@@ -144,5 +80,19 @@ Page({
*/
onShareAppMessage() {
+ },
+ //获取排行列表
+ getScoreDetail() {
+ let params = {};
+ params['day_type'] = this.data.tab_date_cur
+ params['type'] = this.data.tab_rank_cur
+ _.apiQuery.appScoreDetail(params).then(res => {
+ this.setData({
+ list: res.data.data,
+ score_trend: res.data.score_trend,
+ res_data: res.data
+ })
+ })
}
+
})
\ No newline at end of file
diff --git a/pages/score/detail.wxml b/pages/score/detail.wxml
index e8cfefe..91c951c 100644
--- a/pages/score/detail.wxml
+++ b/pages/score/detail.wxml
@@ -5,19 +5,16 @@
昨日运营分
- 798
+ {{res_data.score}}
上一日运营分
- 798
+ {{res_data.up_data_score}}
-
+
-
- 较上日上升100分
+
+ {{res_data.change_text}}
@@ -33,8 +30,8 @@
- {{it.name}}
- {{it.score}}
+ {{it.name}}
+ {{it.score}}
diff --git a/pages/score/index.js b/pages/score/index.js
index 5a2f4b3..d61d4cb 100644
--- a/pages/score/index.js
+++ b/pages/score/index.js
@@ -25,35 +25,11 @@ Page({
name: '昨日'
}, {
id: 2,
- name: '本月'
+ name: '上月'
}],
tab_date_cur: 0,
-
+
score_detail_data: [{
- name: '998',
- tip: '运营分'
- }, {
- name: '=',
- tip: ''
- }, {
- name: '98',
- tip: '运营分'
- }, {
- name: '+',
- tip: ''
- }, {
- name: '98',
- tip: '运营分'
- }, {
- name: '+',
- tip: ''
- }, {
- name: '98',
- tip: '运营分'
- }, {
- name: '+',
- tip: ''
- }, {
name: '98',
tip: '运营分'
}],
@@ -66,59 +42,11 @@ Page({
name: '门店排名'
}],
tab_rank_cur: 0,
- rank_data: [{
- name: '张三',
- is_manager: true,
- trend: 1, //1 上升 、2 下降
- score: '180分'
- }, {
- name: '张三',
- is_manager: false,
- trend: 2, //1 上升 、2 下降
- score: '5分'
- }, {
- name: '张三',
- is_manager: false,
- trend: 2, //1 上升 、2 下降
- score: '80分'
- }, {
- name: '张三',
- is_manager: false,
- trend: 1, //1 上升 、2 下降
- score: '80分'
- }, {
- name: '张三',
- is_manager: false,
- trend: 2, //1 上升 、2 下降
- score: '5分'
- }, {
- name: '张三',
- is_manager: false,
- trend: 2, //1 上升 、2 下降
- score: '80分'
- }, {
- name: '张三',
- is_manager: false,
- trend: 1, //1 上升 、2 下降
- score: '80分'
- }, {
- name: '张三',
- is_manager: false,
- trend: 2, //1 上升 、2 下降
- score: '5分'
- }, {
- name: '张三',
- is_manager: false,
- trend: 2, //1 上升 、2 下降
- score: '80分'
- }, {
- name: '张三',
- is_manager: false,
- trend: 1, //1 上升 、2 下降
- score: '80分'
- }],
- content: 'asdfasdf
asdfasdf
asdfasdf
asdfasdf
asdfasdf
asdfasdf
asdfasdf
asdfasdf
asdfasdf
asdfasdf
asdfasdf
asdfasdf
asdfasdf
asdfasdf
asdfasdf
asdfasdf
asdfasdf
asdfasdf
asdfasdf
asdfasdf
asdfasdf
asdfasdf
asdfasdf
asdfasdf
asdfasdf
asdfasdf
asdfasdf
asdfasdf
asdfasdf
asdfasdf
asdfasdf
asdfasdf
asdfasdf
asdfasdf
',
- setid: ''
+ rank_data: [],
+ content: '',
+ setid: '',
+ is_biz: 0, //是否选择门店跳转过来
+ scoreData: [],
},
/**
@@ -128,6 +56,11 @@ Page({
wx.setNavigationBarTitle({
'title': '个人运营分'
})
+ for (let key in options) {
+ this.setData({
+ [key]: options[key]
+ })
+ }
},
/**
@@ -141,7 +74,8 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
-
+ this.getScore()
+ this.getScoreLists()
},
/**
@@ -179,9 +113,56 @@ Page({
},
- scrollToRule(){
+ scrollToRule() {
this.setData({
setid: 'richhtml'
})
+ },
+ //推送链接
+ pushLink(e) {
+ if (e.currentTarget.dataset.url) {
+ _.$router.openUrlScheme(e.currentTarget.dataset.url)
+ }
+ },
+ //时间切换
+ changeDateTab(e) {
+ this.setData({
+ tab_date_cur: parseInt(e.currentTarget.dataset.index),
+ tab_rank_cur: 0
+ })
+ this.getScore()
+ this.getScoreLists()
+ },
+ //切换排行类型
+ changeRankTab(e) {
+ this.setData({
+ tab_rank_cur: parseInt(e.currentTarget.dataset.index)
+ })
+ this.getScoreLists()
+ },
+ //首页积分信息
+ getScore() {
+ let params = {};
+ params['day_type'] = this.data.tab_date_cur
+ if (this.data.is_biz == 1) {
+ params['type'] = 1
+ }
+ _.apiQuery.getAppScore(params).then(res => {
+ this.setData({
+ scoreData: res.data,
+ score_trend: res.data.score_trend ?? 1
+ })
+ })
+ },
+ //获取排行列表
+ getScoreLists() {
+ let params = {};
+ params['day_type'] = this.data.tab_date_cur
+ params['type'] = this.data.tab_rank_cur
+ _.apiQuery.appScoreLists(params).then(res => {
+ this.setData({
+ rank_data: res.data.lists,
+ })
+ })
}
})
\ No newline at end of file
diff --git a/pages/score/index.wxml b/pages/score/index.wxml
index 709053e..de91e7c 100644
--- a/pages/score/index.wxml
+++ b/pages/score/index.wxml
@@ -1,12 +1,12 @@
-
+
- {{item.name}}
+ {{item.name}}
@@ -15,35 +15,37 @@
-
+
-
- 较上日上升100分
+
+ {{scoreData.title}}
- *更新于09月10日
- 当前显示为昨日运营情况评分
+ {{scoreData.u_time_text}}
+ {{scoreData.sub_title}}
-
-
+
+
- {{item.name}}
- {{item.tip}}
+ {{scoreData.score}}
+ 运营分
-
-
-
- 查看明细
-
+ =
+
+ {{item.operator}}
+
+ {{item.value}}
+ {{item.name}}
+
+
+
+
+ 查看明细
+
+
@@ -58,20 +60,20 @@
{{index+1}}
{{item.name}}
- 店长
+ {{item.tip}}
-
+
{{item.score}}
-
+
-
-
+
+