shish 2 лет назад
Родитель
Сommit
a63442e5f6
2 измененных файлов с 10 добавлено и 4 удалено
  1. 1 1
      biz-ghs/product/classes/ProductClass.php
  2. 9 3
      biz-hd/purchase/classes/PurchaseClass.php

+ 1 - 1
biz-ghs/product/classes/ProductClass.php

@@ -685,7 +685,7 @@ class ProductClass extends BaseClass
     //输出价格 ssh 20211009
     //输出价格 ssh 20211009
     public static function getFinalPrice($product, $level, $priceMap, $addPriceMap, $changePrice = 0, $buyNum = 0)
     public static function getFinalPrice($product, $level, $priceMap, $addPriceMap, $changePrice = 0, $buyNum = 0)
     {
     {
-        //帮开预订单
+        //帮开预订单,默认价格0
         if ($changePrice == 0.06) {
         if ($changePrice == 0.06) {
             return 0;
             return 0;
         }
         }

+ 9 - 3
biz-hd/purchase/classes/PurchaseClass.php

@@ -574,6 +574,8 @@ class PurchaseClass extends BaseClass
         $sjId = $data['sjId'] ?? 0;
         $sjId = $data['sjId'] ?? 0;
         $mainId = $data['mainId'] ?? 0;
         $mainId = $data['mainId'] ?? 0;
         $ghsId = $data['ghsId'] ?? 0;
         $ghsId = $data['ghsId'] ?? 0;
+        $book = $data['book'] ?? 0;
+        $shopAdminId = $data['shopAdminId'] ?? 0;
 
 
         if ($live == 1) {
         if ($live == 1) {
             //花店真实向批发店采购花材,因为拿的供货商的ID,所以需要转化花店的id
             //花店真实向批发店采购花材,因为拿的供货商的ID,所以需要转化花店的id
@@ -634,8 +636,13 @@ class PurchaseClass extends BaseClass
                 //用批发店的花材名称
                 //用批发店的花材名称
                 $itemName = $currentGhsProduct['name'] ?? '';
                 $itemName = $currentGhsProduct['name'] ?? '';
                 $cover = $currentGhsProduct['cover'] ?? '';
                 $cover = $currentGhsProduct['cover'] ?? '';
-                //用批发店花材的价格
-                $price = ProductClass::getFinalPrice($currentGhsProduct, $giveLevel, $priceMap, $addPriceMap, $userPrice, $itemNum);
+                //如果零售店自己下预订单,预付0.1元
+                if ($book == 1 && $shopAdminId > 0) {
+                    $price = 0.1;
+                } else {
+                    //用批发店花材的价格
+                    $price = ProductClass::getFinalPrice($currentGhsProduct, $giveLevel, $priceMap, $addPriceMap, $userPrice, $itemNum);
+                }
                 $thisPrice = $price;
                 $thisPrice = $price;
 
 
                 $reachNum = $currentGhsProduct['reachNum'] ?? 0;
                 $reachNum = $currentGhsProduct['reachNum'] ?? 0;
@@ -740,7 +747,6 @@ class PurchaseClass extends BaseClass
         $data['weight'] = $totalWeight;
         $data['weight'] = $totalWeight;
 
 
         //预订单需要增加服务费
         //预订单需要增加服务费
-        $book = $data['book'] ?? 0;
         if ($book == 1) {
         if ($book == 1) {
             $kiloFee = $ghs['kiloFee'] ?? 0;
             $kiloFee = $ghs['kiloFee'] ?? 0;
             $miniKilo = $ghs['miniKilo'] ?? 0;
             $miniKilo = $ghs['miniKilo'] ?? 0;