cqpCow 1 rok pred
rodič
commit
b59cf0adc4
1 zmenil súbory, kde vykonal 2 pridanie a 7 odobranie
  1. 2 7
      app/Service/CustomerService.php

+ 2 - 7
app/Service/CustomerService.php

@@ -48,7 +48,6 @@ class CustomerService extends Service
 //            $model->company_short_name = $data['company_short_name'] ?? '';
             $model->state_type = $data['state_type'] ?? 0;
             $model->customer_state = $data['customer_state'] ?? 0;
-            $model->customer_grade = $data['customer_grade'] ?? 0;
             $model->save();
             $time = time();
 
@@ -181,7 +180,6 @@ class CustomerService extends Service
             $model->top_depart_id = $data['top_depart_id'] ?? 0;
             $model->state_type = $data['state_type'] ?? 0;
             $model->customer_state = $data['customer_state'] ?? 0;
-            $model->customer_grade = $data['customer_grade'] ?? 0;
             $model->save();
             $time = time();
 
@@ -344,7 +342,6 @@ class CustomerService extends Service
             $customer['progress_stage'],
             $customer['state_type'],
             $customer['customer_state'],
-            $customer['customer_grade'],
         ];
         $basic_map = BasicType::whereIn('id',$array)
             ->pluck('title','id')
@@ -359,7 +356,6 @@ class CustomerService extends Service
             $customer[$key]['progress_stage_title'] = $basic_map[$value['progress_stage']] ?? '';
             $customer[$key]['state_type_title'] = $basic_map[$value['state_type']] ?? '';
             $customer[$key]['customer_state_title'] = $basic_map[$value['customer_state']] ?? '';
-            $customer[$key]['customer_grade_title'] = $basic_map[$value['customer_grade']] ?? '';
             $customer[$key]['depart_title'] = $depart_title ?? '';
         }
         $customer = $customer[0];
@@ -447,7 +443,7 @@ class CustomerService extends Service
     public function customerList($data,$user){
         $model = Customer::Clear($user,$data);
         $model = $model->where('del_time',0)
-            ->select('title','id','model_type','customer_intention','customer_from','customer_type','car_type','consulting_product','intention_product','progress_stage','address1','address2','crt_id','crt_time','mark','importance','company','company_short_name','depart_id','state_type','customer_state','customer_grade','pond_state','top_depart_id','code')
+            ->select('title','id','model_type','customer_intention','customer_from','customer_type','car_type','consulting_product','intention_product','progress_stage','address1','address2','crt_id','crt_time','mark','importance','company','company_short_name','depart_id','state_type','customer_state','pond_state','top_depart_id','code')
             ->orderby('id', 'desc');
 
         if(! empty($data['pond_state'])) {
@@ -548,7 +544,7 @@ class CustomerService extends Service
     public function fillData($data){
         if(empty($data['data'])) return $data;
 
-        $array = array_unique(array_merge_recursive(array_column($data['data'],'customer_intention'),array_column($data['data'],'customer_from'),array_column($data['data'],'customer_type'),array_column($data['data'],'car_type'),array_column($data['data'],'progress_stage'),array_column($data['data'],'state_type'),array_column($data['data'],'customer_state'),array_column($data['data'],'customer_grade')));
+        $array = array_unique(array_merge_recursive(array_column($data['data'],'customer_intention'),array_column($data['data'],'customer_from'),array_column($data['data'],'customer_type'),array_column($data['data'],'car_type'),array_column($data['data'],'progress_stage'),array_column($data['data'],'state_type'),array_column($data['data'],'customer_state')));
         $basic_map = BasicType::whereIn('id',$array)
             ->pluck('title','id')
             ->toArray();
@@ -579,7 +575,6 @@ class CustomerService extends Service
             $data['data'][$key]['progress_stage_title'] = $basic_map[$value['progress_stage']] ?? '';
             $data['data'][$key]['state_type_title'] = $basic_map[$value['state_type']] ?? '';
             $data['data'][$key]['customer_state_title'] = $basic_map[$value['customer_state']] ?? '';
-            $data['data'][$key]['customer_grade_title'] = $basic_map[$value['customer_grade']] ?? '';
             $data['data'][$key]['depart_title'] = $depart_title[$value['depart_id']] ?? '';
             $data['data'][$key]['crt_time'] = $value['crt_time'] ? date('Y-m-d H:i:s',$value['crt_time']) : '';
             $data['data'][$key]['crt_name'] = $emp[$value['crt_id']] ?? '';