|
|
@@ -54,10 +54,12 @@ class PurchaseClass extends BaseClass
|
|
|
//传过滤的productId 是供货商的,需要转换为零售端(hd)的productId
|
|
|
//补充了hdProductId
|
|
|
//[{"productId":"113","bigNum":1,"smallNum":0,"classId":"-2","hdProductId":1}]
|
|
|
- $productList = ProductClass::toggleProductList($productList,$hdShopId,$hdSjId);
|
|
|
+ $hdShopId = $data['shopId'] ?? 0;
|
|
|
+ $hdSjId = $data['merchantId'] ?? 0;
|
|
|
+ $productList = ProductClass::toggleProductList($productList, $hdShopId, $hdSjId);
|
|
|
|
|
|
- $productData = self::getProductMapData($productList,"productId");
|
|
|
- $hdProductData = self::getProductMapData($productList,"hdProductId");
|
|
|
+ $productData = self::getProductMapData($productList, "productId");
|
|
|
+ $hdProductData = self::getProductMapData($productList, "hdProductId");
|
|
|
|
|
|
//计算价格= 各个productId的price*num(bigNum,smallNum) + sendCost(配送费)
|
|
|
$bigNum = 0; //总共多少扎
|
|
|
@@ -102,7 +104,7 @@ class PurchaseClass extends BaseClass
|
|
|
$prePrice = bcadd($prePrice, $sellPrice, 2);
|
|
|
|
|
|
//加库存
|
|
|
- ProductClass::addStockByItemNum($hdProductId,$itemNum);
|
|
|
+ ProductClass::addStockByItemNum($hdProductId, $itemNum);
|
|
|
|
|
|
}
|
|
|
$sendCost = $data['sendCost'] ?? 0.00;
|