Просмотр исходного кода

Merge branch 'main' of https://gitlab.com/tea28/client

hejie 3 лет назад
Родитель
Сommit
d24a6a70f6
1 измененных файлов с 6 добавлено и 14 удалено
  1. 6 14
      src/pages/to-pay-list/index.vue

+ 6 - 14
src/pages/to-pay-list/index.vue

@@ -67,17 +67,9 @@
             </view>
             <view class="order_list flex_r flex_ac flex_jb" v-if="Data.type != 5">
                 <view class="list_name flex_r flex_jb"><text>商</text><text>品</text><text>金</text><text>额</text></view>
-                <view class="list_con">¥{{Data.type == 2 ? goodsInfo.trade_price : goodsInfo.cost_price}}</view>
+                <view class="list_con">¥{{(Data.type == 2 ? goodsInfo.trade_price : goodsInfo.cost_price) * Data.num || 0}}</view>
             </view>
-            <view class="order_list flex_r flex_ac flex_jb" v-if="Data.type == 5">
-                <view class="list_name flex_r flex_jb"><text>消</text><text>费</text><text>积</text><text>分</text></view>
-                <view class="list_con">{{basicsInfo.stayPay}}消费积分</view>
-            </view>
-            <view class="order_list flex_r flex_ac flex_jb" v-if="Data.type == 5">
-                <view class="list_name flex_r flex_jb"><text>可</text><text>用</text><text>积</text><text>分</text></view>
-                <view class="list_con">{{userinfo.integral}}消费积分</view>
-            </view>
-            <view class="order_list flex_r flex_ac flex_jb">
+            <view class="order_list flex_r flex_ac flex_jb" v-if="Data.type != 4">
                 <view class="list_name flex_r flex_jb"><text>可</text><text>用</text><text>余</text><text>额</text></view>
                 <view class="list_con p_color">¥{{userinfo.user_money}}</view>
             </view>
@@ -136,15 +128,15 @@ export default {
                 if (res.code === 0) {
                     this.goodsInfo = res.data.data
                     post("goods/freight", { type: da.type }).then(res => {
-                        if (res.code === 0) {
-                            this.freight = res.data.freight;
-                        }
+                        if (res.code === 0) this.freight = res.data.freight;
+
                         // 计算待支付
                         let p = this.Data.type == 2 ? this.goodsInfo.trade_price : this.goodsInfo.cost_price; //商品单价
                         let y = this.Data.is_sell == 1 ? 0 : this.freight; // 运费   寄售的话退运费为0
                         let a = (p * this.Data.num + y * this.Data.num) * 100; //商品总价
                         let b = (a - this.userinfo.user_money * 100) / 100; //待支付金额
-                        this.obligation = b > 0 ? b : 0
+                        if(this.Data.type == 4) this.obligation = a / 100
+                        else this.obligation = b > 0 ? b : 0
                     })
                 }
             })