customer tag_type=2 can not null
This commit is contained in:
@@ -426,6 +426,42 @@ class Customers extends Wxapp
|
||||
if (!$row['admin_id'] && $status == 1) {
|
||||
$up_data['admin_id'] = $uid;
|
||||
}
|
||||
$daodian_tag_str = '';
|
||||
if ($daodian_tag){
|
||||
|
||||
$tag_arr_all = array();
|
||||
$tag_checked = 0;
|
||||
foreach ($daodian_tag as $key => $val){
|
||||
$tag_arr = [];
|
||||
foreach ($val['list'] as $kt => $vt){
|
||||
$vt['checked'] && $tag_arr[] = $vt['name'];
|
||||
$vt['checked'] && $tag_checked = 1;
|
||||
}
|
||||
$tag_arr_all = array_merge($tag_arr_all, $tag_arr);
|
||||
$tag_arr && $daodian_tag_str .= $val['name'].': '.implode(', ', $tag_arr).'; ';
|
||||
}
|
||||
if (!$tag_checked){
|
||||
throw new Exception("到店意向不能为空!", ERR_PARAMS_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
$goumai_tag_str = '';
|
||||
if ($goumai_tag){
|
||||
$tag_arr_all = array();
|
||||
$tag_checked = 0;
|
||||
foreach ($goumai_tag as $key => $val){
|
||||
$tag_arr = [];
|
||||
foreach ($val['list'] as $kt => $vt){
|
||||
$vt['checked'] && $tag_arr[] = $vt['name'];
|
||||
$vt['checked'] && $tag_checked = 1;
|
||||
}
|
||||
$tag_arr_all = array_merge($tag_arr_all, $tag_arr);
|
||||
$tag_arr && $goumai_tag_str .= $val['name'].': '.implode(', ', $tag_arr).'; ';
|
||||
}
|
||||
if (!$tag_checked){
|
||||
throw new Exception("购买意向不能为空!", ERR_PARAMS_ERROR);
|
||||
}
|
||||
}
|
||||
$log_0 = $log_4 = $log_9 = '';
|
||||
if ($status == 3) {
|
||||
if (!$defeat_reason) {
|
||||
@@ -514,7 +550,8 @@ class Customers extends Wxapp
|
||||
$this->customers_entity->add_log($id, $uid, $uname, '客户试驾', 5);
|
||||
}
|
||||
if ($wxgr){
|
||||
$this->customers_entity->add_log($id, $uid, $uname, '加个微', 10);
|
||||
$res = $this->customer_oplogs_model->get(['customer_id' => $id, 'uid'=> $uid, 'type' => 10]);
|
||||
!$res && $this->customers_entity->add_log($id, $uid, $uname, '加个微', 10);
|
||||
}
|
||||
if ($log_0) {//小记
|
||||
$this->customers_entity->add_log($id, $uid, $uname, $log_0, 0);
|
||||
@@ -528,6 +565,8 @@ class Customers extends Wxapp
|
||||
$follow_channel && $content = "跟进渠道($follow_channel):" . $content;
|
||||
if ($visit_time) {
|
||||
$content .= '。计划回访时间:' . $visit_time;
|
||||
$daodian_tag_str && $content .= '。'.$daodian_tag_str;
|
||||
$goumai_tag_str && $content .= '。'.$goumai_tag_str;
|
||||
$sales_id = $row['admin_id'] ? $row['admin_id'] : $uid;//有销售id,回访归属销售
|
||||
$where_vis = ['c_id' => $id, 'biz_id' => $biz_id, 'sales_id' => $sales_id, 't_day' => $visit_time];
|
||||
$re_vis = $this->mdCustomerVisitData->get($where_vis);
|
||||
|
||||
Reference in New Issue
Block a user