shish 3 лет назад
Родитель
Сommit
67b079db21
1 измененных файлов с 13 добавлено и 1 удалено
  1. 13 1
      app-ghs/controllers/OrderController.php

+ 13 - 1
app-ghs/controllers/OrderController.php

@@ -748,9 +748,21 @@ class OrderController extends BaseController
         $post['mainId'] = $this->mainId;
         $post['fromType'] = 1;
         $post['expressId'] = $post['expressId'] ?? 0;
-        $post['sendCost'] = $post['sendCost'] ?? '0.00';
         $post['book'] = $post['book'] ?? 0;
 
+        $sendType = $post['sendType'] ?? 0;
+        $sendCost = 0;
+        if ($sendType == dict::getDict('sendType', 'thirdSend')) {
+            $sendCost = isset($post['sendCost']) && $post['sendCost'] > 0 ? $post['sendCost'] : 0;
+        }
+        $post['sendCost'] = $sendCost;
+        //打包费
+        $packCost = 0;
+        if ($sendType == dict::getDict('sendType', 'thirdSend') || $sendType == dict::getDict('sendType', 'carGet')) {
+            $packCost = $this->shop->packCost ?? 0;
+        }
+        $post['packCost'] = $packCost;
+
         $hasPay = $post['hasPay'] ?? dict::getDict('hasPay', 'unPay');
         $post['debt'] = OrderClass::DEBT_NO;
         if ($hasPay == dict::getDict('hasPay', 'debt')) {