edit-licheb-comster-status

This commit is contained in:
lccsw
2021-08-30 14:17:32 +08:00
parent 4b9c3084bb
commit bf55e6ecb7
5 changed files with 13 additions and 10 deletions
+2 -2
View File
@@ -69,7 +69,7 @@ class Customer extends HD_Controller
$count = $this->customers_model->count($where);
$lists = [];
if ($count) {
$fileds = 'id,name,mobile,cf_title,c_time,admin_id,status,biz_id';
$fileds = 'id,name,mobile,cf_title,cont_time,admin_id,status,biz_id';
$rows = $this->customers_model->select($where, 'id desc', $page, $size, $fileds);
//获取销售员
$admin_id_arr = array_unique(array_column($rows, 'admin_id'));
@@ -87,7 +87,7 @@ class Customer extends HD_Controller
'status_name' => $status_arr[$val['status']],
'admin_name' => isset($admin_rows[$val['admin_id']]) ? $admin_rows[$val['admin_id']][0]['uname'] : '',
'biz_name' => isset($biz_rows[$val['biz_id']]) ? $biz_rows[$val['biz_id']][0]['biz_name'] : '',
'c_time' => $val['c_time'] > 0 ? date('Y-m-d H:i:s', $val['c_time']) : '',
'cont_time' => $val['cont_time'] != '0000-00-00 00:00:00' ? $val['cont_time'] : '',
);
}
}
+2 -2
View File
@@ -112,7 +112,7 @@
<th width="7%"><span>所属门店</span></th>
<th width="8%"><span>状态</span></th>
<th width="4%"><span>跟进人</span></th>
<th width="7%"><span>创建时间</span></th>
<th width="7%"><span>最近联系时间</span></th>
</tr>
</thead>
<tbody>
@@ -125,7 +125,7 @@
<td>{{v.biz_name}}</td>
<td>{{v.status_name}}</td>
<td>{{v.admin_name}}</td>
<td>{{v.c_time}}</td>
<td>{{v.cont_time}}</td>
</tr>
<tr>
<td colspan="8">
+6 -2
View File
@@ -56,6 +56,10 @@ class Cusorder extends Wxapp{
$ifentrust = $this->input_param('ifentrust');
$entrust_name = $this->input_param('entrust_name');
$entrust_idcard = $this->input_param('entrust_idcard');
$name = $this->input_param('name');
$mobile = $this->input_param('mobile');
$address = $this->input_param('address');
$cardid = $this->input_param('cardid');
$row = $this->customers_model->get(['id'=>$cus_id]);
$series_row = $this->auto_series_model->get(['id'=>$car_id]);
@@ -94,8 +98,8 @@ class Cusorder extends Wxapp{
$data = [
'rid' => $cus_id,
'sid' => create_order_no(350200,$this->app_key),
'name' => $row['name'],
'mobile' => $row['mobile'],
'name' => $name ? $name : $row['name'],
'mobile' => $mobile ? $mobile : $row['mobile'],
'biz_id' => $this->session['biz_id'],
'brand_id' => $series_row['brand_id'],
's_id' => $series_row['id'],
@@ -266,6 +266,7 @@ class Customers extends Wxapp{
$a_num && $up_data['a_num = a_num+1'] = null;
$result = true;
if($up_data){
$status==1 && $up_data['cont_time'] = date('Y-m-d H:i:s'); //修改到店状态修改最后联系时间
$result = $this->customers_model->update($up_data,['id'=>$id]);
if($result){ //添加日志
$this->load->library('receiver/customers_entity');
+2 -4
View File
@@ -67,8 +67,7 @@ class Sms extends Wxapp{
$content = '【狸车】'.$content;
b2m_send_sms($mobile,$content);
$this->load->library('receiver/customers_entity');
$log = '发送短信+1';
$this->customers_entity->add_log($id,$uid,$this->session['uname'],$log,1);
$this->customers_entity->add_log($id,$uid,$this->session['uname'],$content,1);
throw new Exception('短信发送成功', API_CODE_SUCCESS);
}
//通过订单发短信
@@ -89,8 +88,7 @@ class Sms extends Wxapp{
$content = '【狸车】'.$content;
b2m_send_sms($mobile,$content);
$this->load->library('receiver/customers_entity');
$log = '发送短信+1';
$this->customers_entity->add_log($row['id'],$uid,$this->session['uname'],$log,1);
$this->customers_entity->add_log($row['id'],$uid,$this->session['uname'],$content,1);
throw new Exception('短信发送成功', API_CODE_SUCCESS);
}
}