YY há 2 anos atrás
pai
commit
8579967efb

+ 1 - 1
src/views/selfShop/order/detail_order.vue

@@ -33,7 +33,7 @@
               </el-col>
               <el-col :span="24">
                 <el-col :span="6">运费</el-col>
-                <el-col :span="18" class="other" v-if="!item.freight_total == '0'">{{ item.freight_total }}</el-col>
+                <el-col :span="18" class="other" v-if="!goods.freight == '0'">{{ goods.freight }}</el-col>
                 <el-col :span="18" class="other" v-else>包邮</el-col>
               </el-col>
               <el-col :span="24">

+ 11 - 5
src/views/selfShop/order/detail_orderDetail.vue

@@ -32,7 +32,7 @@
             </el-col>
             <el-col :span="24">
               <el-col :span="6">运费</el-col>
-              <el-col :span="18" class="other" v-if="!item.freight_total == '0'">{{ item.freight_total }}</el-col>
+              <el-col :span="18" class="other" v-if="!goods.freight == '0'">{{ goods.freight }}</el-col>
               <el-col :span="18" class="other" v-else>包邮</el-col>
             </el-col>
           </el-col>
@@ -48,7 +48,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">
@@ -141,11 +141,11 @@ export default {
   components: {},
   data: function () {
     return {
-      form: { transport: {} },
+      form: {},
       // 地址
       address: {},
       // 实付金额
-      total_detail: {},
+      total_detail: '',
       // 商铺
       shop: {},
       // 运单号
@@ -187,7 +187,13 @@ 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.order.pay);
       }
       let activities = [

+ 1 - 1
src/views/system/order/detail_order.vue

@@ -33,7 +33,7 @@
               </el-col>
               <el-col :span="24">
                 <el-col :span="6">运费</el-col>
-                <el-col :span="18" class="other" v-if="!item.freight_total == '0'">{{ item.freight_total }}</el-col>
+                <el-col :span="18" class="other" v-if="!goods.freight == '0'">{{ goods.freight }}</el-col>
                 <el-col :span="18" class="other" v-else>包邮</el-col>
               </el-col>
               <el-col :span="24">

+ 11 - 5
src/views/system/order/detail_orderDetail.vue

@@ -32,7 +32,7 @@
             </el-col>
             <el-col :span="24">
               <el-col :span="6">运费</el-col>
-              <el-col :span="18" class="other" v-if="!item.freight_total == '0'">{{ item.freight_total }}</el-col>
+              <el-col :span="18" class="other" v-if="!goods.freight == '0'">{{ goods.freight }}</el-col>
               <el-col :span="18" class="other" v-else>包邮</el-col>
             </el-col>
           </el-col>
@@ -48,7 +48,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">
@@ -141,11 +141,11 @@ export default {
   components: {},
   data: function () {
     return {
-      form: { transport: {} },
+      form: {},
       // 地址
       address: {},
       // 实付金额
-      total_detail: {},
+      total_detail: '',
       // 商铺
       shop: {},
       // 运单号
@@ -187,7 +187,13 @@ 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.order.pay);
       }
       let activities = [