shish 5 rokov pred
rodič
commit
4765acc7db

+ 1 - 0
app-hd/controllers/ItemClassController.php

@@ -50,4 +50,5 @@ class ItemClassController extends BaseController
         $data = ItemClassClass::getGhsItemClassAll($this->sjId);
         util::success($data);
     }
+
 }

+ 1 - 1
app-hd/controllers/PurchaseController.php

@@ -34,7 +34,7 @@ class PurchaseController extends BaseController
         $product = $post['product'] ?? '';
         $productList = json_decode($product, true);
         //判断product数据是不是同个供货商的
-        ProductClass::valid($productList, $ghsShopId);
+        //ProductClass::valid($productList, $ghsShopId);
         $post['product'] = $productList;
         $respond = PurchaseClass::addPurchase($post);
         $orderSn = $respond['orderSn'] ?? '';

+ 4 - 1
biz-hd/purchase/classes/PurchaseClass.php

@@ -3,6 +3,7 @@
 namespace bizHd\purchase\classes;
 
 use biz\ghs\classes\GhsClass;
+use biz\shop\classes\ShopClass;
 use bizGhs\admin\classes\AdminClass;
 use bizGhs\custom\classes\CustomClass;
 use biz\sj\classes\MerchantClass;
@@ -49,6 +50,7 @@ class PurchaseClass extends BaseClass
 
         //供货商增加订单
         $ghsSjId = $data['ghsSjId'] ?? 0;
+        $ghsShopId = $data['ghsShopId'] ?? 0;
         $orderData = [
             'prePrice' => 0.01,
             'actPrice' => 0.01,
@@ -57,7 +59,8 @@ class PurchaseClass extends BaseClass
             'product' => $productList,
             'merchantId' => $ghsSjId,
         ];
-        \bizGhs\order\classes\OrderClass::addOrder($orderData);
+        $shop = ShopClass::getShopInfo($ghsShopId);
+        \bizGhs\order\classes\OrderClass::addOrder($orderData,$shop);
 
         return $respond;
     }