diff --git a/admin/controllers/receiver/Customer.php b/admin/controllers/receiver/Customer.php index 4ee65a04..d0535756 100644 --- a/admin/controllers/receiver/Customer.php +++ b/admin/controllers/receiver/Customer.php @@ -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'] : '', ); } } diff --git a/admin/views/receiver/customer/lists.php b/admin/views/receiver/customer/lists.php index 5a00a7b6..e477fce6 100644 --- a/admin/views/receiver/customer/lists.php +++ b/admin/views/receiver/customer/lists.php @@ -112,7 +112,7 @@ 所属门店 状态 跟进人 - 创建时间 + 最近联系时间 @@ -125,7 +125,7 @@ {{v.biz_name}} {{v.status_name}} {{v.admin_name}} - {{v.c_time}} + {{v.cont_time}} diff --git a/api/controllers/wxapp/licheb/Cusorder.php b/api/controllers/wxapp/licheb/Cusorder.php index ed1cc464..c4e7fa8e 100644 --- a/api/controllers/wxapp/licheb/Cusorder.php +++ b/api/controllers/wxapp/licheb/Cusorder.php @@ -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'], diff --git a/api/controllers/wxapp/licheb/Customers.php b/api/controllers/wxapp/licheb/Customers.php index def7a628..be94ac73 100644 --- a/api/controllers/wxapp/licheb/Customers.php +++ b/api/controllers/wxapp/licheb/Customers.php @@ -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'); diff --git a/api/controllers/wxapp/licheb/Sms.php b/api/controllers/wxapp/licheb/Sms.php index 1fb5597d..72ee9733 100644 --- a/api/controllers/wxapp/licheb/Sms.php +++ b/api/controllers/wxapp/licheb/Sms.php @@ -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); } }