customers defeat about
This commit is contained in:
@@ -349,7 +349,7 @@ class Customer extends HD_Controller
|
||||
$toshop = array(
|
||||
array(
|
||||
array('title' => '门店', 'value' => $row_biz['biz_name']),
|
||||
array('title' => '试驾', 'value' => $if_driver),
|
||||
//array('title' => '试驾', 'value' => $if_driver), # 2023.02.28 数据与t_num无关联,屏蔽
|
||||
array('title' => '到店次数', 'value' => $row['a_num']),
|
||||
array('title' => '试驾次数', 'value' => $row['t_num']),
|
||||
),
|
||||
@@ -617,8 +617,9 @@ class Customer extends HD_Controller
|
||||
$val['of2_id'] && $of_title .= '-' . $of_ary['list'][$val['of2_id']];
|
||||
$val['of2_id'] && $of_ary['list'][$val['of2_id']] && $of_title_2 = $of_ary['list'][$val['of2_id']];
|
||||
}
|
||||
$id = $val['id'];
|
||||
$row = array(
|
||||
'id' => $val['id'],
|
||||
'id' => $id,
|
||||
'name' => $val['name'],
|
||||
'mobile' => $val['mobile'],
|
||||
'level' => $val['level'],
|
||||
@@ -637,7 +638,7 @@ class Customer extends HD_Controller
|
||||
'wxgr_name' => $this->customers_model->wxgrAry($val['wxgr']),
|
||||
);
|
||||
|
||||
$tag = $this->get_tag($val['id']);
|
||||
$tag = $this->get_tag($id);
|
||||
foreach ($tag as $key => $val){
|
||||
$tag_key = 'tag__'.$val['id'];
|
||||
$row[$tag_key] = $val['value_str'];
|
||||
@@ -646,6 +647,15 @@ class Customer extends HD_Controller
|
||||
}
|
||||
}
|
||||
|
||||
$tag_defeat = $this->get_tag($id, 1);
|
||||
foreach ($tag_defeat as $key => $val){
|
||||
$tag_key = 'tag__'.$val['id'];
|
||||
$row[$tag_key] = $val['value_str'];
|
||||
if (!in_array($tag_key, array_keys($indexs))){
|
||||
$indexs[$tag_key] = '战败-'.$val['name'];
|
||||
}
|
||||
}
|
||||
|
||||
$data[] = $row;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -396,12 +396,27 @@ class Customers extends Wxapp
|
||||
if (!$defeat_reason) {
|
||||
throw new Exception('请输入战败理由!', ERR_PARAMS_ERROR);
|
||||
}
|
||||
$tag_str = '';
|
||||
$tag_arr_all = array();
|
||||
foreach ($invalid_tag as $key => $val){
|
||||
$tag_name = $val['name'];
|
||||
$tag_arr = [];
|
||||
foreach ($val['list'] as $kt => $vt){
|
||||
$vt['checked'] && $tag_arr[] = $vt['name'];
|
||||
}
|
||||
if (!$tag_arr){
|
||||
throw new Exception("请选择标签[{$tag_name}]!", ERR_PARAMS_ERROR);
|
||||
}
|
||||
$tag_arr_all = array_merge($tag_arr_all, $tag_arr);
|
||||
$tag_str .= $val['name'].': '.implode(', ', $tag_arr).'; ';
|
||||
}
|
||||
$tag_str = implode(', ', $tag_arr_all);
|
||||
$jsondata = $row['jsondata'] ? json_decode($row['jsondata'], true) : array();
|
||||
$jsondata['defeat']['time'] = date("Y-m-d H:i:s");
|
||||
$jsondata['defeat']['reason'] = $defeat_reason;
|
||||
$jsondata['defeat']['reason'] = $defeat_reason."({$tag_str})";
|
||||
$up_data['if_defeat'] = 1;
|
||||
$up_data['jsondata'] = json_encode($jsondata, JSON_UNESCAPED_UNICODE);
|
||||
$log_0 = '申请战败:' . $defeat_reason;
|
||||
$log_0 = '申请战败:' . $defeat_reason."({$tag_str})";
|
||||
} else {
|
||||
if (strlen($status) && $status != $row['status']) { //变更状态
|
||||
$up_data['status'] = $status;
|
||||
|
||||
Reference in New Issue
Block a user