diff --git a/api/controllers/plan/Licheb.php b/api/controllers/plan/Licheb.php index b49d70ef..e2c82902 100644 --- a/api/controllers/plan/Licheb.php +++ b/api/controllers/plan/Licheb.php @@ -164,4 +164,23 @@ class Licheb extends HD_Controller echo json_encode($res_c, JSON_UNESCAPED_UNICODE); } + public function up_level() + { + $params = $this->input->get(); + $level = ''; + if ($params['type'] == 'a') { + $level = 'A'; + } else if ($params['type'] == 'b') { + $level = 'B'; + } else if ($params['type'] == 'c') { + $level = 'C'; + } else if ($params['type'] == 'd') { + $level = 'D'; + } + if ($level) { + $this->mdCustomers->update(array('level' => $level), array('level' => $params['type'])); + echo 'level=' . $level; + } + } + } diff --git a/api/controllers/wxapp/licheb/Customers.php b/api/controllers/wxapp/licheb/Customers.php index 309c5826..fcf156d2 100644 --- a/api/controllers/wxapp/licheb/Customers.php +++ b/api/controllers/wxapp/licheb/Customers.php @@ -592,7 +592,7 @@ class Customers extends Wxapp } /** - * Notes:战败客户列表 + * Notes:战败申请列表 * Created on: 2021/10/21 15:19 * Created by: dengbw * @return array diff --git a/api/controllers/wxapp/licheb/User.php b/api/controllers/wxapp/licheb/User.php index f6507096..0c1a854b 100644 --- a/api/controllers/wxapp/licheb/User.php +++ b/api/controllers/wxapp/licheb/User.php @@ -220,7 +220,9 @@ class User extends Wxapp ['title' => '交付确认', 'icon' => 'icon-jiaofu', 'total' => $del_count, 'page' => '/pages/order/filterList/index?key=5&ismy=1'], ]; //客户代办事项 - $visit_count = $this->mdCustomersVisit->count_visit(array('a.biz_id' => $biz_id, 'a.admin_id' => $uid, 'b.contact=' => 1, 'b.status=' => 1)); + $where_v = array('a.biz_id' => $biz_id, 'b.contact=' => 1, 'b.status=' => 1); + $group_id == 1 && $where_v['a.admin_id'] = $uid; + $visit_count = $this->mdCustomersVisit->count_visit($where_v); if ($group_id == 1) { $customer_op_list = [ ['title' => '待回访客户(人)', 'icon' => 'icon-dengji', 'total' => $visit_count, 'page' => '/pages/customer/filterList/index?visit=1&title=待回访客户'], @@ -234,7 +236,7 @@ class User extends Wxapp $customer_op_list = [ ['title' => '待分配客户(人)', 'icon' => 'icon-daifenpei', 'total' => $unuse_count, 'page' => '/pages/customer/allot/index'], ['title' => '待回访客户(人)', 'icon' => 'icon-statistics-custom-4', 'total' => $visit_count, 'page' => '/pages/customer/filterList/index?visit=1&title=待回访客户'], - ['title' => '战败客户(人)', 'icon' => 'icon-statistics-custom-5', 'total' => $defeat_count, 'page' => '/pages/customer/optDefeat/index'], + ['title' => '战败申请(人)', 'icon' => 'icon-statistics-custom-5', 'total' => $defeat_count, 'page' => '/pages/customer/optDefeat/index'], ]; } $data = [