Przeglądaj źródła

查看物流页面金额显示问题修复

evoxwht 2 lat temu
rodzic
commit
8456a5f935

+ 8 - 0
crmeb/app/api/controller/v1/order/StoreOrderController.php

@@ -467,8 +467,14 @@ class StoreOrderController
     /**
      * 订单 查看物流
      * @param Request $request
+     * @param StoreOrderCartInfoServices $services
+     * @param ExpressServices $expressServices
      * @param $uni
+     * @param string $type
      * @return mixed
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
      */
     public function express(Request $request, StoreOrderCartInfoServices $services, ExpressServices $expressServices, $uni, $type = '')
     {
@@ -484,6 +490,7 @@ class StoreOrderController
             foreach ($order['cart_info'] as $k => $cart) {
                 $cartNew['cart_num'] = $cart['cart_num'];
                 $cartNew['truePrice'] = $cart['truePrice'];
+                $cartNew['postage_price'] = $cart['postage_price'];
                 $cartNew['productInfo']['image'] = $cart['productInfo']['image'];
                 $cartNew['productInfo']['store_name'] = $cart['productInfo']['store_name'];
                 $cartNew['productInfo']['unit_name'] = $cart['productInfo']['unit_name'] ?? '';
@@ -507,6 +514,7 @@ class StoreOrderController
                 $cart = json_decode($cart, true);
                 $cartNew['cart_num'] = $cart['cart_num'];
                 $cartNew['truePrice'] = $cart['truePrice'];
+                $cartNew['postage_price'] = $cart['postage_price'];
                 $cartNew['productInfo']['image'] = $cart['productInfo']['image'];
                 $cartNew['productInfo']['store_name'] = $cart['productInfo']['store_name'];
                 $cartNew['productInfo']['unit_name'] = $cart['productInfo']['unit_name'] ?? '';

+ 1 - 1
template/uni-app/pages/goods/goods_logistics/index.vue

@@ -8,7 +8,7 @@
 				<view class='text acea-row row-between'>
 					<view class='name line2'>{{item.productInfo.store_name}}</view>
 					<view class='money'>
-						<view>{{$t(`¥`)}}{{item.truePrice}}</view>
+						<view>{{$t(`¥`)}}{{(parseFloat(item.truePrice)+parseFloat(item.postage_price/item.cart_num)).toFixed(2)}}</view>
 						<view>x{{item.cart_num}}</view>
 					</view>
 				</view>