|
@@ -21,7 +21,8 @@ class FollowUpRecordService extends Service
|
|
$model->basic_type_id = $data['basic_type_id'] ;
|
|
$model->basic_type_id = $data['basic_type_id'] ;
|
|
$model->visit_time = $data['visit_time'];
|
|
$model->visit_time = $data['visit_time'];
|
|
$model->content = $data['content'];
|
|
$model->content = $data['content'];
|
|
- $model->is_remind = $data['is_remind'];
|
|
|
|
|
|
+ $model->is_remind = $data['is_remind'] ?? 0;
|
|
|
|
+ $model->result = $data['result'] ?? '';
|
|
$model->save();
|
|
$model->save();
|
|
|
|
|
|
return [true,''];
|
|
return [true,''];
|
|
@@ -37,8 +38,9 @@ class FollowUpRecordService extends Service
|
|
$model->basic_type_id = $data['basic_type_id'] ;
|
|
$model->basic_type_id = $data['basic_type_id'] ;
|
|
$model->visit_time = $data['visit_time'];
|
|
$model->visit_time = $data['visit_time'];
|
|
$model->content = $data['content'];
|
|
$model->content = $data['content'];
|
|
- $model->is_remind = $data['is_remind'];
|
|
|
|
|
|
+ $model->is_remind = $data['is_remind'] ?? 0;
|
|
$model->crt_id = $user['id'];
|
|
$model->crt_id = $user['id'];
|
|
|
|
+ $model->result = $data['result'] ?? '';
|
|
$model->save();
|
|
$model->save();
|
|
|
|
|
|
return [true,''];
|
|
return [true,''];
|
|
@@ -56,7 +58,7 @@ class FollowUpRecordService extends Service
|
|
|
|
|
|
public function followUpRecordList($data,$user){
|
|
public function followUpRecordList($data,$user){
|
|
$model = FollowUpRecord::where('del_time',0)
|
|
$model = FollowUpRecord::where('del_time',0)
|
|
- ->select('customer_id','basic_type_id','visit_time','id','content','is_remind','crt_time','crt_id','sales_order_id')
|
|
|
|
|
|
+ ->select('customer_id','basic_type_id','visit_time','id','content','is_remind','crt_time','crt_id','sales_order_id','result')
|
|
->orderBy('id','desc');
|
|
->orderBy('id','desc');
|
|
|
|
|
|
if(! empty($data['customer_id'])) $model->where('customer_id',$data['customer_id']);
|
|
if(! empty($data['customer_id'])) $model->where('customer_id',$data['customer_id']);
|
|
@@ -95,7 +97,6 @@ class FollowUpRecordService extends Service
|
|
if($this->isEmpty($data,'basic_type_id')) return [false,'跟进方式不能为空'];
|
|
if($this->isEmpty($data,'basic_type_id')) return [false,'跟进方式不能为空'];
|
|
if($this->isEmpty($data,'visit_time')) return [false,'拜访时间不能为空'];
|
|
if($this->isEmpty($data,'visit_time')) return [false,'拜访时间不能为空'];
|
|
if($this->isEmpty($data,'content')) return [false,'跟进内容不能为空'];
|
|
if($this->isEmpty($data,'content')) return [false,'跟进内容不能为空'];
|
|
- if($this->isEmpty($data,'sales_order_id')) return [false,'请选择合同'];
|
|
|
|
|
|
|
|
if(! $is_add){
|
|
if(! $is_add){
|
|
if($this->isEmpty($data,'id')) return [false,'ID不能为空!'];
|
|
if($this->isEmpty($data,'id')) return [false,'ID不能为空!'];
|