cqpCow 9 tháng trước cách đây
mục cha
commit
d23ab7edd4
3 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 1 0
      app/Model/Customer.php
  2. 2 1
      app/Service/CheckService.php
  3. 1 0
      app/Service/CustomerService.php

+ 1 - 0
app/Model/Customer.php

@@ -10,6 +10,7 @@ class Customer extends UseScopeBaseModel
     protected $dateFormat = 'U';
     const Model_type_one = 1; // 基础模板
     const Model_type_two = 2; // T9二手车客户模板
+    const special_id = -1;
     public static $model_type = [
         self::Model_type_one,
         self::Model_type_two

+ 2 - 1
app/Service/CheckService.php

@@ -4,6 +4,7 @@ namespace App\Service;
 
 use App\Model\Construction;
 use App\Model\ConstructionProductInfo;
+use App\Model\Customer;
 use App\Model\Depart;
 use App\Model\Employee;
 use App\Model\InOutRecord;
@@ -414,7 +415,7 @@ class CheckService extends Service
         $model = new SalesOrder();
         $model->model_type = SalesOrder::Model_type_two;
         $model->sales_order_type = SalesOrder::Order_type_two;
-//        $model->customer_short_name = $customer_short_name;
+        $model->customer_id = Customer::special_id;
         $model->order_number = $order_number;
         $model->crt_id = $order['crt_id'];
         $model->depart_id = $head;

+ 1 - 0
app/Service/CustomerService.php

@@ -343,6 +343,7 @@ class CustomerService extends Service
     public function customerDel($data){
         if($this->isEmpty($data,'id')) return [false,'请选择数据!'];
 
+        if($data['id'] < 0) return [false, '系统数据,操作失败!'];
         try {
             DB::beginTransaction();