cqp 2 месяцев назад
Родитель
Сommit
0696f4abcd
2 измененных файлов с 4 добавлено и 1 удалено
  1. 1 1
      app/Model/QuantizationCreate.php
  2. 3 0
      app/Service/QuantizationService.php

+ 1 - 1
app/Model/QuantizationCreate.php

@@ -10,7 +10,7 @@ class QuantizationCreate extends UseScopeBaseModel
     protected $dateFormat = 'U';
     const employee_column = "crt_id";
 
-    public static $field = ['customer_supply_id','id','crt_time','crt_id','type','products','score','start_time','end_time'];
+    public static $field = ['customer_supply_id','id','crt_time','crt_id','type','products','score','start_time','end_time','quantization_id'];
 
     const type_one = 1;
     const type_two = 2;

+ 3 - 0
app/Service/QuantizationService.php

@@ -282,6 +282,7 @@ class QuantizationService extends Service
 
             $model = QuantizationCreate::where('id',$data['id'])->first();
             $model->customer_supply_id = $data['customer_supply_id'];
+            $model->quantization_id = $data['quantization_id'];
             $model->start_time = $data['start_time'] ?? 0;
             $model->end_time = $data['end_time'] ?? 0;
             $model->products = $data['products'] ?? '';
@@ -313,6 +314,7 @@ class QuantizationService extends Service
 
             $model = new Quantization();
             $model->customer_supply_id = $data['customer_supply_id'];
+            $model->quantization_id = $data['quantization_id'];
             $model->start_time = $data['start_time'] ?? 0;
             $model->end_time = $data['end_time'] ?? 0;
             $model->products = $data['products'] ?? '';
@@ -434,6 +436,7 @@ class QuantizationService extends Service
         $customer['organization_title'] = $e['organization_title'] ?? "";
         $customer['customer_supply_title'] = $e['title'] ?? "";
         $customer['customer_supply_code'] = $e['code'] ?? "";
+        $customer['quantization_title'] = Quantization::where('id', $customer['quantization_id'])->value('title');
 
         $details = $this->getDetail1($customer['id']);
         $customer['details'] = $details;