Bladeren bron

修改订单金额

YY 2 jaren geleden
bovenliggende
commit
1265155436
2 gewijzigde bestanden met toevoegingen van 20 en 6 verwijderingen
  1. 10 3
      src/views/selfShop/order/detail_order.vue
  2. 10 3
      src/views/system/order/detail_order.vue

+ 10 - 3
src/views/selfShop/order/detail_order.vue

@@ -50,7 +50,7 @@
           <el-col :span="24" class="goods_total">
             <el-col :span="6">商品金额</el-col>
             <el-col :span="18" class="other">
-              <p>¥{{ total_detail.goods_total }}</p>
+              <p>¥{{ total_detail }}</p>
             </el-col>
           </el-col>
           <el-col :span="24" class="goods_total">
@@ -87,7 +87,7 @@ export default {
       info: {},
       address: {},
       list: [],
-      total_detail: {},
+      total_detail: '',
       typeList: [],
       statusList: [],
       pay: {},
@@ -108,7 +108,14 @@ export default {
         // 商品
         this.$set(this, `list`, res.data.goods);
         // 实付金额
-        this.$set(this, `total_detail`, res.data.total_detail);
+        // this.$set(this, `total_detail`, res.data.total_detail);
+        let total_detail = 0;
+        let total = res.data.total_detail;
+        if (res.data.total_detail) {
+          total_detail = total.freight_total + total.goods_total;
+        }
+        this.$set(this, `total_detail`, total_detail);
+
         this.$set(this, `pay`, res.data.pay);
       }
     },

+ 10 - 3
src/views/system/order/detail_order.vue

@@ -50,7 +50,7 @@
           <el-col :span="24" class="goods_total">
             <el-col :span="6">商品金额</el-col>
             <el-col :span="18" class="other">
-              <p>¥{{ total_detail.goods_total }}</p>
+              <p>¥{{ total_detail }}</p>
             </el-col>
           </el-col>
           <el-col :span="24" class="goods_total">
@@ -87,7 +87,7 @@ export default {
       info: {},
       address: {},
       list: [],
-      total_detail: {},
+      total_detail: '',
       typeList: [],
       statusList: [],
       pay: {},
@@ -108,7 +108,14 @@ export default {
         // 商品
         this.$set(this, `list`, res.data.goods);
         // 实付金额
-        this.$set(this, `total_detail`, res.data.total_detail);
+        // this.$set(this, `total_detail`, res.data.total_detail);
+        let total_detail = 0;
+        let total = res.data.total_detail;
+        if (res.data.total_detail) {
+          total_detail = total.freight_total + total.goods_total;
+        }
+        this.$set(this, `total_detail`, total_detail);
+
         this.$set(this, `pay`, res.data.pay);
       }
     },