shish 4 лет назад
Родитель
Сommit
ba7d71b66a

+ 2 - 0
biz-hd/goods/classes/GoodsClass.php

@@ -590,6 +590,7 @@ class GoodsClass extends BaseClass
             $orderId = $params['orderId'] ?? 0;
             $shopId = $params['shopId'] ?? 0;
             $orderPrice = $params['orderPrice'] ?? 0;
+            $fromType = $params['fromType'] ?? 1;
             $hasReachTime = 0;
             $reachPeriod = 0;
             $reachDate = '0000-00-00';
@@ -624,6 +625,7 @@ class GoodsClass extends BaseClass
                 'staffId' => $staffId,
                 'bookName' => $bookName,
                 'orderPrice' => $orderPrice,
+                'fromType' => $fromType,
             ];
             $main = MainClass::getById($mainId, true);
             if (empty($main)) {

+ 2 - 0
biz-hd/work/classes/WorkClass.php

@@ -100,6 +100,7 @@ class WorkClass extends BaseClass
         $staffName = $data['staffName'] ?? '';
         $staffId = $data['staffId'] ?? 0;
         $orderPrice = $data['orderPrice'] ?? 0;
+        $fromType = $data['fromType'] ?? 1;
 
         $ids = array_column($goods, 'productId');
         $info = GoodsClass::getByIds($ids, null, 'id');
@@ -160,6 +161,7 @@ class WorkClass extends BaseClass
                 'staffName' => $staffName,
                 'staffId' => $staffId,
                 'orderPrice' => $orderPrice,
+                'fromType' => $fromType,
             ];
             self::createFinish($current, $main);
         }

+ 3 - 1
biz-mall/order/classes/OrderGoodsClass.php

@@ -30,7 +30,9 @@ class OrderGoodsClass extends BaseClass
                 $goodsId = $goods->goodsId ?? 0;
                 $num = $goods->num ?? 0;
                 $orderPrice = $order->orderPrice ?? 0;
-                $params = ['orderId' => $orderId, 'orderSn' => $orderSn, 'shopId' => $shopId, 'orderPrice' => $orderPrice];
+                $fromType = $order->fromType ?? 1;
+                $params = ['orderId' => $orderId, 'orderSn' => $orderSn, 'shopId' => $shopId,
+                    'fromType' => $fromType, 'orderPrice' => $orderPrice];
                 $flower = $goods->flower ?? 0;
                 //鲜花类不需要验证库存,库存可以负数,并相应生成制作单
                 $checkStock = $flower == 0 ? true : false;