Ver código fonte

修改价格

shish 2 anos atrás
pai
commit
bfecb9fbad

+ 0 - 12
app-ghs/controllers/OrderController.php

@@ -1011,20 +1011,8 @@ class OrderController extends BaseController
         }
         }
 
 
         if ($book == 1) {
         if ($book == 1) {
-            foreach ($productList as $currentKey => $currentProduct) {
-                //帮开预订单没有价格
-                $productList[$currentKey]['price'] = 0.06;
-            }
             $post['hasPay'] = 2;
             $post['hasPay'] = 2;
             $post['payWay'] = 0;
             $post['payWay'] = 0;
-        } else {
-            foreach ($productList as $currentKey => $currentProduct) {
-                //预订单用了0.06这个价格
-                $nowPrice = $currentProduct['price'];
-                if ($nowPrice == 0.06) {
-                    util::fail('花材不允许使用0.06元,请改其它价');
-                }
-            }
         }
         }
 
 
         $historyDate = $post['historyDate'] ?? '';
         $historyDate = $post['historyDate'] ?? '';

+ 8 - 5
biz-ghs/order/classes/OrderClass.php

@@ -867,11 +867,14 @@ class OrderClass extends BaseClass
                 $productId = $val['productId'] ?? 0;
                 $productId = $val['productId'] ?? 0;
                 $currentInfo = $productInfo[$productId];
                 $currentInfo = $productInfo[$productId];
                 $currentPrice = $productInfo[$productId]['price'] ?? 0;
                 $currentPrice = $productInfo[$productId]['price'] ?? 0;
-                if ($bookSavePrice == 0) {
-                    $list[$key]['currentHdPrice'] = floatval($currentPrice);
-                } else {
-                    $list[$key]['currentHdPrice'] = $val['xhUnitPrice'] ?? 0;
-                }
+                $unitPrice = isset($val['xhUnitPrice']) ? floatval($val['xhUnitPrice']) : 0;
+
+                $list[$key]['currentHdPrice'] = $unitPrice;
+                //原有售价
+                $list[$key]['itemSalePrice'] = floatval($currentPrice);
+                //自己填的价格
+                $list[$key]['itemModifyPrice'] = $unitPrice;
+
                 $list[$key]['property'] = '';
                 $list[$key]['property'] = '';
                 $list[$key]['cost'] = $currentInfo['cost'] ?? 0;
                 $list[$key]['cost'] = $currentInfo['cost'] ?? 0;
                 $list[$key]['stock'] = $currentInfo['stock'] ? floatval($currentInfo['stock']) : 0;
                 $list[$key]['stock'] = $currentInfo['stock'] ? floatval($currentInfo['stock']) : 0;

+ 0 - 4
biz-ghs/product/classes/ProductClass.php

@@ -696,10 +696,6 @@ 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) {
-            return 0;
-        }
         //开单改价优先级最高
         //开单改价优先级最高
         if ($changePrice > 0) {
         if ($changePrice > 0) {
             return $changePrice;
             return $changePrice;