This commit is contained in:
lin fan
2024-11-21 15:52:40 +08:00
parent f6f84a07a2
commit 8b023aa8ff
+18 -19
View File
@@ -245,8 +245,8 @@ class Score extends Wxapp
$max = $this->customers_model->count($where_max);
$where['biz_id'] = $this->biz_id;
$value = $this->customers_model->count($where);
$series_value[] = $value > $max / 5 ? round($value / $max, 1) : 0.2;
$max_total = $max_total + $max;
$series_value[] = $value;
$max_total[] = $max;
//跟进能力
$where_max = $where = [
@@ -257,8 +257,8 @@ class Score extends Wxapp
$max = $this->customers_model->count($where_max);
$where['biz_id'] = $this->biz_id;
$value = $this->customers_model->count($where);
$series_value[] = $value > $max / 5 ? round($value / $max, 1) : 0.2;
$max_total = $max_total + $max;
$series_value[] = $value;
$max_total[] = $max;
//邀约能力
$where_max = $where = [
@@ -270,8 +270,8 @@ class Score extends Wxapp
$max = $this->customers_model->count($where_max);
$where['biz_id'] = $this->biz_id;
$value = $this->customers_model->count($where);
$series_value[] = $value > $max / 5 ? round($value / $max, 1) : 0.2;
$max_total = $max_total + $max;
$series_value[] = $value;
$max_total[] = $max;
//成交能力
$where_max = $where = [
@@ -283,8 +283,8 @@ class Score extends Wxapp
$max = $this->orders_model->count($where_max);
$where["biz_id"] = $this->biz_id;
$value = $this->orders_model->count($where);
$series_value[] = $value > $max / 5 ? round($value / $max, 1) : 0.2;
$max_total = $max_total + $max;
$series_value[] = $value;
$max_total[] = $max;
//交付能力
$where_max = $where = [
@@ -296,21 +296,20 @@ class Score extends Wxapp
$max = $this->orders_model->count($where_max);
$where["biz_id"] = $this->biz_id;
$value = $this->orders_model->count($where);
$series_value[] = $value > $max / 5 ? round($value / $max, 1) : 0.2;
$max_total = $max_total + $max;
$series_value[] = $value;
$max_total[] = $max;
foreach ($names as $key => $value) {
$indicator[] = array('name' => $value, 'max' => $max_total/5);
$series_value[$key] = ($max_total/5) * $series_value[$key];
$indicator[] = array('name' => $value, 'max' => $max_total[$key]);
}
$indicator = array(
array('name' => '拓客能力', 'max' => $max_total/5),
array('name' => '跟进能力', 'max' => $max_total/1),
array('name' => '邀约能力', 'max' => $max_total/2),
array('name' => '成交能力', 'max' => $max_total/3),
array('name' => '交付能力', 'max' => $max_total/4),
);
// $indicator = array(
// array('name' => '拓客能力', 'max' => $max_total/5),
// array('name' => '跟进能力', 'max' => $max_total/1),
// array('name' => '邀约能力', 'max' => $max_total/2),
// array('name' => '成交能力', 'max' => $max_total/3),
// array('name' => '交付能力', 'max' => $max_total/4),
// );
$data = [
'indicator' => $indicator,