|
|
@@ -257,7 +257,9 @@ class PurchaseController extends BaseController
|
|
|
//昆明发货包装费和运费的计算
|
|
|
$totalWeight = 0;
|
|
|
foreach ($productList as $itemData) {
|
|
|
- $currentWeight = $itemData['weight'] ?? 0;
|
|
|
+ $bigNum = $itemData['bigNum'] ?? 0;
|
|
|
+ $thisWeight = $itemData['weight'] ?? 0;
|
|
|
+ $currentWeight = bcmul($thisWeight, $bigNum, 2);
|
|
|
$totalWeight = bcadd($currentWeight, $totalWeight, 2);
|
|
|
}
|
|
|
$kmPackCost = dict::getDict('kmPackCost');
|
|
|
@@ -305,7 +307,9 @@ class PurchaseController extends BaseController
|
|
|
if ($sendType == dict::getDict('sendType', 'thirdSend')) {
|
|
|
$weight = 0;
|
|
|
foreach ($productList as $itemData) {
|
|
|
- $currentWeight = $itemData['weight'] ?? 0;
|
|
|
+ $bigNum = $itemData['bigNum'] ?? 0;
|
|
|
+ $thisWeight = $itemData['weight'] ?? 0;
|
|
|
+ $currentWeight = bcmul($thisWeight, $bigNum, 2);
|
|
|
$weight = bcadd($currentWeight, $weight, 2);
|
|
|
}
|
|
|
$result = PurchaseClass::getDistanceFee($this->shop, $ghsShopInfo, $weight);
|