parent
71f1c85492
commit
698f5166f4
|
|
@ -200,11 +200,17 @@ class ProductController extends Controller
|
|||
$totals = $this->computeOrderMoney($request);
|
||||
$shipping = array_column($totals['data'],null,'code')['shipping'] ?? [];
|
||||
// $logisticsItem['shipping_fee'] = $shipping['show_tips'] == 0 ? $shipping['amount_format'] : trans('shop/carts.to_be_negotiated');
|
||||
if($shipping['show_tips'] == 0) $logisticsItem['shipping_fee'] = $shipping['amount_format'];
|
||||
else $logisticsItem = [];
|
||||
if($shipping['show_tips'] == 0) {
|
||||
$logisticsItem['shipping_fee'] = $shipping['amount_format'];
|
||||
$logisticsItem['amount'] = $shipping['amount'];
|
||||
}else $logisticsItem = [];
|
||||
}
|
||||
}
|
||||
|
||||
// 存在多个物流 根据物流费用进行排序
|
||||
if(count($data['list']) > 1){
|
||||
$amounts = array_column($data['list'],'amount');
|
||||
if($amounts) array_multisort($amounts,SORT_ASC,$data['list']);
|
||||
}
|
||||
|
||||
$data['list'] = array_filter($data['list']);
|
||||
return json_success(trans('common.success'),$data);
|
||||
|
|
|
|||
|
|
@ -198,6 +198,7 @@ class ShippingService{
|
|||
foreach(self::$productsList as $productInfo){
|
||||
// 计算体积重 并且取数值大的作为重量计算
|
||||
$volumeWeight = $productInfo['volume_weight'] / $logisticsInfo['throwing_ratio'];
|
||||
$volumeWeight = (float)sprintf("%.2f",Weight::convert($volumeWeight,$productInfo['weight_class']));
|
||||
$sumWeight = $productInfo['sum_weight'] > $volumeWeight ? $productInfo['sum_weight'] : $volumeWeight;
|
||||
// 首重运费
|
||||
$amount += (float)sprintf("%.2f",$firstWeightFee);
|
||||
|
|
|
|||
|
|
@ -233,10 +233,10 @@
|
|||
<div class="price-wrap d-flex align-items-end sku-price-wrap" v-if="price_setting === 'sku'">
|
||||
<div class="sku-price-wrap-content fs-3">
|
||||
<span>{{ $product['trade_term'] ?? 'DAP'}}<i class="bi bi-question-circle" id="tradeTerm" style="font-size: 15px;"></i></span>
|
||||
@{{ product.price_format }}
|
||||
<span v-if="product.price != product.origin_price && product.origin_price !== 0"> - @{{ product.origin_price_format }}</span>
|
||||
<span class="fw-bold">@{{ product.price_format }}</span>
|
||||
<span v-if="product.price != product.origin_price && product.origin_price !== 0" class="fw-bold"> - @{{ product.origin_price_format }}</span>
|
||||
@if($product['unit'])
|
||||
<span>/ {{explode('/',$product['unit'])[0]}}</span>
|
||||
<span style="font-weight: 700 !important;">/ {{explode('/',$product['unit'])[0]}}</span>
|
||||
@endif
|
||||
<span v-if="minimum_order > 0" style="font-size: 18px;">
|
||||
@if($product['sales_method'] == 'piece')
|
||||
|
|
|
|||
Loading…
Reference in New Issue