From 0ce5f9b26ff1c4be1e9f49cf8b32afd24955a7c7 Mon Sep 17 00:00:00 2001 From: qianhy Date: Wed, 1 Mar 2023 09:59:13 +0800 Subject: [PATCH] customers put add wxgr about, clues c_from fix --- admin/controllers/receiver/Clues.php | 7 ++++++- admin/views/receiver/clues/edit.php | 2 +- admin/views/receiver/clues/lists.php | 4 ++-- api/controllers/wxapp/licheb/Customers.php | 5 +++++ 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/admin/controllers/receiver/Clues.php b/admin/controllers/receiver/Clues.php index 1c7cca25..f1776264 100644 --- a/admin/controllers/receiver/Clues.php +++ b/admin/controllers/receiver/Clues.php @@ -185,7 +185,12 @@ class Clues extends HD_Controller } $dataInfo['editType'] = 0; $re_cf = $this->clues_cfrom_model->get(array('id' => $re['cf_id'])); - $info_show['cfrom_title'] = $re_cf['title'] ? $re_cf['title'] : ''; + $re_cf_title_p = ''; + if ($re_cf && $re_cf['pid']){ + $re_cf_pid = $this->clues_cfrom_model->get(array('id' => $re_cf['pid'])); + $re_cf_title_p = $re_cf_pid['title'] ? $re_cf_pid['title'].'-' : ''; + } + $info_show['cfrom_title'] = $re_cf['title'] ? $re_cf_title_p.$re_cf['title'] : ''; $info_show['statusList'] = $statusList; $info_show['status2List'] = $status2List; $info_show['c_time'] = date('Y-m-d H:i', $re['c_time']); diff --git a/admin/views/receiver/clues/edit.php b/admin/views/receiver/clues/edit.php index 9cb2aa16..68420614 100644 --- a/admin/views/receiver/clues/edit.php +++ b/admin/views/receiver/clues/edit.php @@ -78,7 +78,7 @@
-
渠道来源:
+
线索来源:
{{infoShow.cfrom_title}}
diff --git a/admin/views/receiver/clues/lists.php b/admin/views/receiver/clues/lists.php index 19099967..445eab68 100644 --- a/admin/views/receiver/clues/lists.php +++ b/admin/views/receiver/clues/lists.php @@ -86,7 +86,7 @@
- +
全选 客户姓名 客户电话 - 客户来源 + 线索来源 状态 跟进人 创建时间 diff --git a/api/controllers/wxapp/licheb/Customers.php b/api/controllers/wxapp/licheb/Customers.php index cfd64a00..7dc962e3 100644 --- a/api/controllers/wxapp/licheb/Customers.php +++ b/api/controllers/wxapp/licheb/Customers.php @@ -105,6 +105,7 @@ class Customers extends Wxapp 'mobile' => ['value' => $this->get_mobile(['mobile' => $row['mobile'], 'of_id' => $row['of_id'], 'of2_id' => $row['of2_id']]), 'cn' => '客户电话'], 'of_id' => ['value' => $of_title, 'of_id' => intval($row['of_id']), 'of2_id' => intval($row['of2_id']), 'cn' => '线索来源'], 'buy_time' => ['value' => $row['buy_time'], 'cn' => '预计购车时间'], + 'wxgr' => $row['wxgr'], ]; return $data; } @@ -175,6 +176,7 @@ class Customers extends Wxapp $tag = $this->input_param('tag'); //客户标签 $city_id = $this->input_param('city_id'); //城市id $county_id = $this->input_param('county_id'); //区id + $wxgr = $this->input_param('wxgr'); //是否加个微 $row = $this->customers_model->get(['id' => $id]); if (!$row) { throw new Exception('参数错误', ERR_PARAMS_ERROR); @@ -196,6 +198,7 @@ class Customers extends Wxapp $of2_id && $update['of2_id'] = $of2_id; $city_id && $update['city_id'] = $city_id; $county_id && $update['county_id'] = $county_id; + $wxgr && $update['wxgr'] = intval($wxgr) ? 1 : 0; if ($buy_time) { $this->load->library('receiver/customers_entity'); $update['level'] = $this->customers_entity->cal_level($buy_time); @@ -243,6 +246,7 @@ class Customers extends Wxapp $tag = $this->input_param('tag'); //客户标签 $city_id = $this->input_param('city_id'); //城市id $county_id = $this->input_param('county_id'); //区id + $wxgr = $this->input_param('wxgr'); //是否加个微 if (!mobile_valid($mobile)) throw new Exception('请输入正确的手机号码', ERR_PARAMS_ERROR); if (!$city_id || !$county_id) { throw new Exception('请选择城市与行政区', API_CODE_FAIL); @@ -276,6 +280,7 @@ class Customers extends Wxapp 'status' => $status, 'city_id' => $city_id, 'county_id' => $county_id, + 'wxgr' => intval($wxgr) ? 1 : 0, 'c_time' => time() ]; if ($biz_row['type'] == 5) {//异业店