|
@@ -78,6 +78,7 @@ class FollowUpRecordService extends Service
|
|
|
$model->crt_id = $user['id'];
|
|
|
$model->result = $data['result'] ?? '';
|
|
|
$model->customer_contact = $data['customer_contact'] ?? '';
|
|
|
+ $model->follow_type = $data['follow_type'] ?? 0;
|
|
|
$model->save();
|
|
|
|
|
|
$time = time();
|
|
@@ -171,13 +172,14 @@ class FollowUpRecordService extends Service
|
|
|
|
|
|
public function followUpRecordList($data,$user){
|
|
|
$model = FollowUpRecord::where('del_time',0)
|
|
|
- ->select('data_id','data_title','basic_type_id','visit_time','id','content','is_remind','crt_time','crt_id','type','result')
|
|
|
+ ->select('data_id','data_title','basic_type_id','visit_time','id','content','is_remind','crt_time','crt_id','type','result','follow_type')
|
|
|
->orderBy('id','desc');
|
|
|
|
|
|
if(! empty($data['data_id'])) $model->where('data_id',$data['data_id']);
|
|
|
if(! empty($data['basic_type_id'])) $model->where('basic_type_id', $data['basic_type_id']);
|
|
|
if(! empty($data['crt_id'])) $model->where('crt_id',$data['crt_id']);
|
|
|
if(! empty($data['type'])) $model->where('type',$data['type']);
|
|
|
+ if(! empty($data['follow_type'])) $model->where('follow_type',$data['follow_type']);
|
|
|
|
|
|
$list = $this->limit($model,'',$data);
|
|
|
$list = $this->organizationData($list);
|
|
@@ -203,6 +205,7 @@ class FollowUpRecordService extends Service
|
|
|
if(in_array($value['id'], $follow_up_record_id)) $has_image = 1;
|
|
|
$data['data'][$key]['has_image'] = $has_image;
|
|
|
$data['data'][$key]['basic_type_name'] = $basic_type[$value['basic_type_id']] ?? '';
|
|
|
+ $data['data'][$key]['follow_type_title'] = FollowUpRecord::$follow_type[$value['follow_type']] ?? '';
|
|
|
$data['data'][$key]['crt_time'] = $value['crt_time'] ? date("Y-m-d H:i:s",$value['crt_time']): '';
|
|
|
}
|
|
|
return $data;
|