3
This commit is contained in:
@@ -232,7 +232,7 @@ class Score extends Wxapp
|
||||
|
||||
$names = [ '拓客能力', '跟进能力', '邀约能力', '成交能力', '交付能力'];
|
||||
$series_value = [];
|
||||
$max_total = [];
|
||||
$max_total = [20,20,20,20,20];
|
||||
$indicator = [];
|
||||
|
||||
//拓客能力
|
||||
@@ -247,8 +247,13 @@ class Score extends Wxapp
|
||||
$where['biz_id'] = $this->biz_id;
|
||||
$value = $this->customers_model->count($where);
|
||||
|
||||
if($value){
|
||||
$value = $value / $max * 40;
|
||||
$value > 20 && $value = 20;
|
||||
$value < 4 && $value = 4;
|
||||
}
|
||||
|
||||
$series_value[] = $value;
|
||||
$max_total[] = $max;
|
||||
|
||||
//跟进能力
|
||||
$where_max = $where = [
|
||||
@@ -260,8 +265,13 @@ class Score extends Wxapp
|
||||
$where['biz_id'] = $this->biz_id;
|
||||
$value = $this->customers_model->count($where);
|
||||
|
||||
if($value){
|
||||
$value = $value / $max * 40;
|
||||
$value > 20 && $value = 20;
|
||||
$value < 4 && $value = 4;
|
||||
}
|
||||
|
||||
$series_value[] = $value;
|
||||
$max_total[] = $max;
|
||||
|
||||
//邀约能力
|
||||
$where_max = $where = [
|
||||
@@ -274,8 +284,13 @@ class Score extends Wxapp
|
||||
$where['biz_id'] = $this->biz_id;
|
||||
$value = $this->customers_model->count($where);
|
||||
|
||||
if($value){
|
||||
$value = $value / $max * 40;
|
||||
$value > 20 && $value = 20;
|
||||
$value < 4 && $value = 4;
|
||||
}
|
||||
|
||||
$series_value[] = $value;
|
||||
$max_total[] = $max;
|
||||
|
||||
//成交能力
|
||||
$where_max = $where = [
|
||||
@@ -288,8 +303,13 @@ class Score extends Wxapp
|
||||
$where["biz_id"] = $this->biz_id;
|
||||
$value = $this->orders_model->count($where);
|
||||
|
||||
if($value){
|
||||
$value = $value / $max * 40;
|
||||
$value > 20 && $value = 20;
|
||||
$value < 4 && $value = 4;
|
||||
}
|
||||
|
||||
$series_value[] = $value;
|
||||
$max_total[] = $max;
|
||||
|
||||
//交付能力
|
||||
$where_max = $where = [
|
||||
@@ -302,8 +322,13 @@ class Score extends Wxapp
|
||||
$where["biz_id"] = $this->biz_id;
|
||||
$value = $this->orders_model->count($where);
|
||||
|
||||
if($value){
|
||||
$value = $value / $max * 40;
|
||||
$value > 20 && $value = 20;
|
||||
$value < 4 && $value = 4;
|
||||
}
|
||||
|
||||
$series_value[] = $value;
|
||||
$max_total[] = $max;
|
||||
|
||||
foreach ($names as $key => $value) {
|
||||
$indicator[] = array('name' => $value, 'max' => $max_total[$key]);
|
||||
|
||||
Reference in New Issue
Block a user