1
This commit is contained in:
@@ -228,6 +228,7 @@ class Score extends Wxapp
|
||||
$bizs = (new Biz_model())->select(['province_id' => $province_id, 'status' => 1]);
|
||||
$biz_id_arr = implode(',', array_unique(array_column($bizs, 'id')));
|
||||
!$biz_id_arr && $biz_id_arr = 0;
|
||||
$biz_count = count($bizs);
|
||||
|
||||
$names = [ '拓客能力', '跟进能力', '邀约能力', '成交能力', '交付能力'];
|
||||
$series_value = [];
|
||||
@@ -246,7 +247,7 @@ class Score extends Wxapp
|
||||
$where['biz_id'] = $this->biz_id;
|
||||
$value = $this->customers_model->count($where);
|
||||
$series_value[] = $value ? $value : 1;
|
||||
$max_total[] = $max ? $max : 10 ;
|
||||
$max_total[] = $max ? $max/$biz_count*5 : 10 ;
|
||||
|
||||
//跟进能力
|
||||
$where_max = $where = [
|
||||
@@ -258,7 +259,7 @@ class Score extends Wxapp
|
||||
$where['biz_id'] = $this->biz_id;
|
||||
$value = $this->customers_model->count($where);
|
||||
$series_value[] = $value ? $value : 1;
|
||||
$max_total[] = $max ? $max : 10 ;
|
||||
$max_total[] = $max ? $max/$biz_count*5 : 10 ;
|
||||
|
||||
//邀约能力
|
||||
$where_max = $where = [
|
||||
@@ -271,7 +272,7 @@ class Score extends Wxapp
|
||||
$where['biz_id'] = $this->biz_id;
|
||||
$value = $this->customers_model->count($where);
|
||||
$series_value[] = $value ? $value : 1;
|
||||
$max_total[] = $max ? $max : 10 ;
|
||||
$max_total[] = $max ? $max/$biz_count*5 : 10 ;
|
||||
|
||||
//成交能力
|
||||
$where_max = $where = [
|
||||
@@ -284,7 +285,7 @@ class Score extends Wxapp
|
||||
$where["biz_id"] = $this->biz_id;
|
||||
$value = $this->orders_model->count($where);
|
||||
$series_value[] = $value ? $value : 1;
|
||||
$max_total[] = $max ? $max : 10 ;
|
||||
$max_total[] = $max ? $max/$biz_count*5 : 10 ;
|
||||
|
||||
//交付能力
|
||||
$where_max = $where = [
|
||||
@@ -297,7 +298,7 @@ class Score extends Wxapp
|
||||
$where["biz_id"] = $this->biz_id;
|
||||
$value = $this->orders_model->count($where);
|
||||
$series_value[] = $value ? $value : 1;
|
||||
$max_total[] = $max ? $max : 10 ;
|
||||
$max_total[] = $max ? $max/$biz_count*5 : 10 ;
|
||||
|
||||
foreach ($names as $key => $value) {
|
||||
$indicator[] = array('name' => $value, 'max' => $max_total[$key]);
|
||||
|
||||
Reference in New Issue
Block a user