This commit is contained in:
xiaoyu
2023-08-14 17:55:18 +08:00
parent 64aa50fd09
commit ea7917245e
+8 -1
View File
@@ -107,6 +107,7 @@ class Customers extends Wxapp
$data['baseinfo'] = [
'name' => ['value' => $row['name'], 'cn' => '客户姓名'],
'mobile' => ['value' => $this->get_mobile(['mobile' => $row['mobile'], 'of_id' => $row['of_id'], 'of2_id' => $row['of2_id']]), 'cn' => '客户电话'],
'c_brand' => $row['c_brand'],
'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'],
@@ -143,10 +144,12 @@ class Customers extends Wxapp
$re_biz = $this->get_biz();
$city_id = intval($re_biz['city_id']);
$county_id = intval($re_biz['county_id']);
$c_brand = intval($re_biz['car_brand_id']);
if ($id) {
$re_cus = $this->customers_model->get(['id' => $id]);
$re_cus['city_id'] && $city_id = $re_cus['city_id'];
$re_cus['county_id'] && $county_id = $re_cus['county_id'];
$re_cus['c_brand'] && $c_brand = $re_cus['c_brand'];
}
if ($re_biz['type'] == 5) {//异业店
if ($type == 'detail' && $re_cus) {//详情显示标签
@@ -190,7 +193,7 @@ class Customers extends Wxapp
$tag_type == 1 && count($tag_checked) == 1 && $tag_id = $tag_checked_id;
}
}
$res = ['tags' => $tags, 'city_id' => $city_id, 'county_id' => $county_id];
$res = ['tags' => $tags, 'city_id' => $city_id, 'county_id' => $county_id, 'c_brand' => $c_brand];
$tag_type == 1 && $res['tag_id'] = $tag_id;
return $res;
}
@@ -202,6 +205,7 @@ class Customers extends Wxapp
$id = $this->input_param('cus_id');
$name = $this->input_param('name');
$mobile = $this->input_param('mobile');
$c_brand = $this->input_param('c_brand');
$of_id = $this->input_param('of_id'); //线下来源一级
$of2_id = $this->input_param('of2_id'); //线下来源一级
$buy_time = $this->input_param('buy_time'); //预计购车时间
@@ -230,6 +234,7 @@ class Customers extends Wxapp
}
}
$name && $update['name'] = $name;
isset($c_brand) && $update['c_brand'] = $c_brand;
$of_id && $update['of_id'] = $of_id;
$of2_id && $update['of2_id'] = $of2_id;
$city_id && $update['city_id'] = $city_id;
@@ -295,6 +300,7 @@ class Customers extends Wxapp
$name = $this->input_param('name');
$mobile = $this->input_param('mobile');
$buy_time = $this->input_param('buy_time'); //预计购车时间
$c_brand = $this->input_param('c_brand'); //线下来源一级
$of_id = $this->input_param('of_id'); //线下来源一级
$of2_id = $this->input_param('of2_id'); //线下来源一级
$status = intval($this->input_param('status')); //状态
@@ -331,6 +337,7 @@ class Customers extends Wxapp
'name' => $name,
'mobile' => $mobile,
'biz_id' => $this->biz_id,
'c_brand' => $c_brand,
'admin_id' => $this->session['uid'],
'sales_id' => $this->session['uid'],
'level' => $level,