Parcourir la source

施工单修改交车逻辑

cqp il y a 2 mois
Parent
commit
f713462a15
2 fichiers modifiés avec 8 ajouts et 5 suppressions
  1. 7 5
      app/Service/ConstructionService.php
  2. 1 0
      app/Service/TSpaceService.php

+ 7 - 5
app/Service/ConstructionService.php

@@ -1860,8 +1860,8 @@ class ConstructionService extends Service
     public function checkWarranty($order, &$data){
         if($order['state'] != Construction::STATE_FIVE) return [false, '施工单未处在待交车状态,操作失败'];
         if(empty($order['vin_no'])) return [false, '车架号不能为空'];
-        $bool = $this->isValidVin($order['vin_no']);
-        if(! $bool) return [false, '车架号错误,请查看原施工单车架号,编辑输入完整车架号'];
+//        $bool = $this->isValidVin($order['vin_no']);
+//        if(! $bool) return [false, '车架号错误,请查看原施工单车架号,编辑输入完整车架号'];
         if(empty($order['customer_id'])) {
             if(empty($data['customer_title']) && empty($data['customer_contact'])) return [false, "请输入客户信息"];
             $order['customer_info'] = $data['customer_contact'];
@@ -1883,9 +1883,11 @@ class ConstructionService extends Service
             $order['customer_title'] = $customer['title'];
         }
 
-        if(empty($data['product'])) return [false, '产品不能为空'];
-        list($status, $msg) = $this->checkSnConstructionRule($data);
-        if(! $status) return [false, $msg];
+//        if(empty($data['product'])) return [false, '产品不能为空'];
+        if(! empty($data['product'])){
+            list($status, $msg) = $this->checkSnConstructionRule($data);
+            if(! $status) return [false, $msg];
+        }
 
         return [true, $order];
     }

+ 1 - 0
app/Service/TSpaceService.php

@@ -968,6 +968,7 @@ class TSpaceService extends Service
     }
 
     public function warrantyAddNew($order, $data, $user){
+        if(empty($data['product'])) return [true, ''];
         try {
             DB::beginTransaction();