YY 2 lat temu
rodzic
commit
bcfb8f0c6e

+ 81 - 59
src/components/orderParts/detail/detail_order.vue

@@ -22,77 +22,99 @@
               <p>{{ address.province }} , {{ address.city }} , {{ address.area }} , {{ address.address }}</p>
             </el-col>
           </el-col>
-          <el-col :span="24" v-for="(item, index) in list" :key="index">
-            <el-col :span="24" class="shop"> <i class="el-icon-s-shop"></i>{{ item.shop_name }}</el-col>
-            <el-col :span="24" v-for="(goods, index) in item.goods" :key="index">
-              <el-col :span="24" class="goods bode">
-                <el-col :span="6"><el-image class="image" :src="goods.goods.file[0].url"></el-image></el-col>
-                <el-col :span="18">
-                  <el-col :span="12">
-                    <p>{{ goods.goods.name }}</p>
-                    <p>规格:{{ goods.name }}</p>
+          <el-col :span="24" v-for="item in list" :key="item._id || item.set_id">
+            <el-col :span="24" v-if="!item.set_id">
+              <el-col :span="24" class="shop"> <i class="el-icon-s-shop"></i>{{ item.shop_name }}</el-col>
+              <el-col :span="24" v-for="goods in item.goods" :key="goods._id">
+                <el-col :span="24" class="goods bode">
+                  <el-col :span="6"><el-image class="image" :src="goods.goods.file[0].url"></el-image></el-col>
+                  <el-col :span="18">
+                    <el-col :span="12">
+                      <p>{{ goods.goods.name }}</p>
+                      <p>规格:{{ goods.name }}</p>
+                    </el-col>
+                    <el-col :span="12" class="money">
+                      <el-col :span="24" style="color: red; font-size: 20px">
+                        <p v-if="info.type == '0' && goods.price">¥{{ goods.price }}</p>
+                        <p v-else-if="info.type == '0' && !goods.price">¥{{ goods.sell_money }}</p>
+                        <p v-else-if="info.type == '1'">¥{{ goods.group_config.money }}</p>
+                      </el-col>
+                      <p>X{{ goods.buy_num }}</p>
+                      <el-col>
+                        <span class="spanfour" style="color: blue" @click="toUrl(goods.goods.url)"> 查看商品来源:{{ goods.goods.source }}</span>
+                      </el-col>
+                    </el-col>
                   </el-col>
-                  <el-col :span="12" class="money">
-                    <el-col :span="24" style="color: red; font-size: 20px">
-                      <p v-if="info.type == '0' && goods.price">¥{{ goods.price }}</p>
-                      <p v-else-if="info.type == '0' && !goods.price">¥{{ goods.sell_money }}</p>
-                      <p v-else-if="info.type == '1'">¥{{ goods.group_config.money }}</p>
+                </el-col>
+                <el-col :span="24" class="bode">
+                  <el-col :span="6">运费</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" class="bode" v-if="goods.act">
+                  <el-col :span="24">平台活动优惠</el-col>
+                  <el-col :span="24" v-for="(act, index) in goods.act" :key="index">
+                    <el-col :span="8">
+                      {{
+                        act.platform_act_type == '0'
+                          ? '优惠商品合集'
+                          : act.platform_act_type == '1'
+                          ? '按单返现'
+                          : act.platform_act_type == '2'
+                          ? '买赠'
+                          : act.platform_act_type == '3'
+                          ? '特价'
+                          : act.platform_act_type == '4'
+                          ? ''
+                          : act.platform_act_type == '5'
+                          ? '满减'
+                          : act.platform_act_type == '6'
+                          ? '满减折扣'
+                          : '套装促销'
+                      }}
+                    </el-col>
+                    <el-col :span="16" class="other" v-if="act.platform_act_type == '4'">加价购 </el-col>
+                    <el-col :span="16" class="other" v-if="act.platform_act_type == '3'">
+                      <p>{{ act.sp_price }} 元</p>
+                    </el-col>
+                    <el-col :span="16" class="other" v-if="act.platform_act_type == '5' || act.platform_act_type == '6'">
+                      <p>{{ act.discount }} 元</p>
                     </el-col>
-                    <p>X{{ goods.buy_num }}</p>
-                    <el-col>
-                      <span class="spanfour" style="color: blue" @click="toUrl(goods.goods.url)"> 查看商品来源:{{ goods.goods.source }}</span>
+                    <el-col :span="24" class="other" v-if="act.platform_act_type == '2'">
+                      <el-table :data="act.gift" border style="width: 100%">
+                        <el-table-column prop="goods_name" label="商品" width="180"> </el-table-column>
+                        <el-table-column prop="spec_name" label="规格" width="180"> </el-table-column>
+                        <el-table-column prop="num" label="数量"> </el-table-column>
+                        <el-table-column prop="desc" label="备注"> </el-table-column>
+                      </el-table>
                     </el-col>
                   </el-col>
                 </el-col>
               </el-col>
               <el-col :span="24" class="bode">
-                <el-col :span="6">运费</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 :span="6">订单备注</el-col>
+                <el-col :span="18" class="other">{{ item.remarks || '' }}</el-col>
               </el-col>
-              <el-col :span="24" class="bode" v-if="goods.act">
-                <el-col :span="24">平台活动优惠</el-col>
-                <el-col :span="24" v-for="(act, index) in goods.act" :key="index">
-                  <el-col :span="8">
-                    {{
-                      act.platform_act_type == '0'
-                        ? '优惠商品合集'
-                        : act.platform_act_type == '1'
-                        ? '按单返现'
-                        : act.platform_act_type == '2'
-                        ? '买赠'
-                        : act.platform_act_type == '3'
-                        ? '特价'
-                        : act.platform_act_type == '4'
-                        ? ''
-                        : act.platform_act_type == '5'
-                        ? '满减'
-                        : act.platform_act_type == '6'
-                        ? '满减折扣'
-                        : '套装促销'
-                    }}
-                  </el-col>
-                  <el-col :span="16" class="other" v-if="act.platform_act_type == '4'">加价购 </el-col>
-                  <el-col :span="16" class="other" v-if="act.platform_act_type == '3'">
-                    <p>{{ act.sp_price }} 元</p>
-                  </el-col>
-                  <el-col :span="16" class="other" v-if="act.platform_act_type == '5' || act.platform_act_type == '6'">
-                    <p>{{ act.discount }} 元</p>
+            </el-col>
+            <el-col :span="24" class="goods bode" v-else-if="item.is_set == '0'">
+              <el-col :span="24" style="text-align: center; font-size: 18px">{{ item.name || '套装名称' }}</el-col>
+              <el-col :span="24" v-for="i in item.goods" :key="i.spec._id">
+                <el-col :span="6" class="image" v-if="i.spec.file && i.spec.file.length != 0"><el-image :src="i.spec.file[0].url"></el-image></el-col>
+                <el-col :span="6" class="image" v-else-if="i.goods.file && i.goods.file.length != 0"><el-image :src="i.goods.file[0].url"></el-image></el-col>
+                <el-col :span="18">
+                  <el-col :span="12">
+                    <el-col :span="24"> {{ i.goods_name }} </el-col>
+                    <el-col :span="24"> 规格:{{ i.spec_name }} </el-col>
                   </el-col>
-                  <el-col :span="24" class="other" v-if="act.platform_act_type == '2'">
-                    <el-table :data="act.gift" border style="width: 100%">
-                      <el-table-column prop="goods_name" label="商品" width="180"> </el-table-column>
-                      <el-table-column prop="spec_name" label="规格" width="180"> </el-table-column>
-                      <el-table-column prop="num" label="数量"> </el-table-column>
-                      <el-table-column prop="desc" label="备注"> </el-table-column>
-                    </el-table>
+                  <el-col :span="12" class="money">
+                    <el-col :span="24"> X{{ i.set_num }} </el-col>
+                    <el-col :span="24">
+                      <span class="spanfour" style="color: blue" @click="toUrl(i.goods.url)"> 查看商品来源:{{ i.goods.source }}</span>
+                    </el-col>
                   </el-col>
                 </el-col>
               </el-col>
-            </el-col>
-            <el-col :span="24" class="bode">
-              <el-col :span="6">订单备注</el-col>
-              <el-col :span="18" class="other">{{ item.remarks || '' }}</el-col>
+              <el-col :span="24" style="text-align: right; font-size: 18px"> X{{ item.buy_num }} </el-col>
             </el-col>
           </el-col>
           <el-col :span="24" class="goods_total bode">

+ 52 - 38
src/components/orderParts/detail/detail_sales_order.vue

@@ -12,7 +12,7 @@
         <el-col class="top-btn">
           <el-button type="primary" size="mini" @click="toBack()">返回</el-button>
         </el-col>
-        <el-col :span="8" class="one">
+        <el-col :span="10" class="one">
           <el-col :span="24" class="add">
             <el-col :span="2">
               <i class="el-icon-location"></i>
@@ -22,54 +22,68 @@
               <p>{{ address.province }} , {{ address.city }} , {{ address.area }} , {{ address.address }}</p>
             </el-col>
           </el-col>
-          <el-col :span="24" v-for="(item, index) in list" :key="index">
-            <el-col :span="24" class="shop"> <i class="el-icon-s-shop"></i>{{ item.shop_name }}</el-col>
-            <el-col :span="24" v-for="(goods, index) in item.goods" :key="index">
-              <el-col :span="24" class="goods">
-                <el-col :span="6" v-if="goods.file && goods.file.length != 0"><el-image class="image" :src="goods.file[0].url"></el-image></el-col>
-                <el-col :span="6" v-else><el-image class="image" :src="goods.goods.file[0].url"></el-image></el-col>
+          <el-col :span="24" v-for="item in list" :key="item._id || item.set_id">
+            <el-col :span="24" v-if="!item.is_set">
+              <el-col :span="24" class="shop"> <i class="el-icon-s-shop"></i>{{ item.shop_name }}</el-col>
+              <el-col :span="24" v-for="(goods, index) in item.goods" :key="index">
+                <el-col :span="24" class="goods">
+                  <el-col :span="6" v-if="goods.file && goods.file.length != 0"><el-image class="image" :src="goods.file[0].url"></el-image></el-col>
+                  <el-col :span="6" v-else><el-image class="image" :src="goods.goods.file[0].url"></el-image></el-col>
+                  <el-col :span="18">
+                    <el-col :span="12">
+                      <p>{{ goods.goods.name }}</p>
+                      <p>规格:{{ goods.name }}</p>
+                    </el-col>
+                    <el-col :span="12" class="money">
+                      <p v-if="info.type == '0'">¥{{ goods.sell_money }}</p>
+                      <p v-else-if="info.type == '1'">¥{{ goods.group_config.money }}</p>
+                      <p>X{{ goods.buy_num }}</p>
+                      <el-col>
+                        <span class="spanfour" style="color: blue" @click="toUrl(goods.goods.url)"> 查看商品来源:{{ goods.goods.source }}</span>
+                      </el-col>
+                      <el-button type="danger" @click="toSales()"> 取消订单 </el-button>
+                    </el-col>
+                  </el-col>
+                </el-col>
+                <el-col :span="24">
+                  <el-col :span="6">运费</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">
+                  <el-col :span="6">订单备注</el-col>
+                  <el-col :span="18" class="other" v-if="item.remarks">{{ item.remarks }}</el-col>
+                  <el-col :span="18" class="other" v-else>暂无备注</el-col>
+                </el-col>
+              </el-col>
+            </el-col>
+            <el-col :span="24" class="goods bode" v-else-if="item.is_set == '0'">
+              <el-col :span="24" style="text-align: center; font-size: 18px">{{ item.name || '套装名称' }}</el-col>
+              <el-col :span="24" v-for="i in item.goods" :key="i.spec._id">
+                <el-col :span="6" class="image" v-if="i.spec.file && i.spec.file.length != 0"><el-image :src="i.spec.file[0].url"></el-image></el-col>
+                <el-col :span="6" class="image" v-else-if="i.goods.file && i.goods.file.length != 0"><el-image :src="i.goods.file[0].url"></el-image></el-col>
                 <el-col :span="18">
                   <el-col :span="12">
-                    <p>{{ goods.goods.name }}</p>
-                    <p>规格:{{ goods.name }}</p>
+                    <el-col :span="24"> {{ i.goods_name }} </el-col>
+                    <el-col :span="24"> 规格:{{ i.spec_name }} </el-col>
                   </el-col>
                   <el-col :span="12" class="money">
-                    <p v-if="info.type == '0'">¥{{ goods.sell_money }}</p>
-                    <p v-else-if="info.type == '1'">¥{{ goods.group_config.money }}</p>
-                    <p>X{{ goods.buy_num }}</p>
-                    <el-col>
-                      <span class="spanfour" style="color: blue" @click="toUrl(goods.goods.url)"> 查看商品来源:{{ goods.goods.source }}</span>
+                    <el-col :span="24"> X{{ i.set_num }} </el-col>
+                    <el-col :span="24">
+                      <span class="spanfour" style="color: blue" @click="toUrl(i.goods.url)"> 查看商品来源:{{ i.goods.source }}</span>
                     </el-col>
                     <el-button type="danger" @click="toSales()"> 取消订单 </el-button>
                   </el-col>
                 </el-col>
               </el-col>
-              <el-col :span="24">
-                <el-col :span="6">运费</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">
-                <el-col :span="6">订单备注</el-col>
-                <el-col :span="18" class="other" v-if="item.remarks">{{ item.remarks }}</el-col>
-                <el-col :span="18" class="other" v-else>暂无备注</el-col>
-              </el-col>
-            </el-col>
-          </el-col>
-          <el-col :span="24">
-            <el-col :span="6">配送方式</el-col>
-            <el-col :span="18" class="other">快递配送</el-col>
-          </el-col>
-          <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>
+              <el-col :span="24" style="text-align: right; font-size: 18px"> X{{ item.buy_num }} </el-col>
+              <el-col :span="24" style="text-align: right; font-size: 18px"> X{{ item.buy_num }} </el-col>
             </el-col>
           </el-col>
-          <el-col :span="24" class="goods_total">
-            <el-col :span="6">快递费</el-col>
-            <el-col :span="18" class="other">
-              <p>¥{{ total_detail.freight_total || '0' }}</p>
+          <el-col :span="24" v-for="(item, index) in total_detail" :key="index">
+            <el-col :span="8">{{ item.zh }}</el-col>
+            <el-col :span="16" class="other">
+              <p>¥{{ item.money }}</p>
             </el-col>
           </el-col>
           <el-col :span="24" class="goods_total">

+ 20 - 11
src/components/orderParts/detail/parts/card-1.vue

@@ -38,7 +38,13 @@
                   <el-col :span="24">{{ item.is_rate == true ? '已评价' : '未评价' }}</el-col>
                 </el-col>
               </el-col>
+              <el-col :span="24" class="bode">
+                <el-col :span="6">运费</el-col>
+                <el-col :span="18" class="other" v-if="!item.goods.freight == '0'">{{ item.goods.freight }}</el-col>
+                <el-col :span="18" class="other" v-else>包邮</el-col>
+              </el-col>
             </el-col>
+            <!-- 套装 -->
             <el-col :span="24" class="goods bode" v-if="item.is_set == '0'">
               <el-col :span="24">{{ item.name || '套装名称' }}</el-col>
               <el-col :span="24" v-for="i in item.goods" :key="i.spec._id">
@@ -50,25 +56,28 @@
                     <el-col :span="24"> 规格:{{ i.spec_name }} </el-col>
                   </el-col>
                   <el-col :span="12" class="money">
-                    <el-col :span="24" style="color: red; font-size: 20px">
-                      <p>¥{{ i.set_money }}</p>
-                    </el-col>
                     <el-col :span="24"> X{{ i.set_num }} </el-col>
                     <el-col :span="24">
                       <span class="spanfour" style="color: blue" @click="toUrl(i.goods.url)"> 查看商品来源:{{ i.goods.source }}</span>
                     </el-col>
+                    <el-col :span="24" style="text-align: right">
+                      <el-col :span="24"> {{ i.is_afterSale == true ? '已申请售后' : '未申请售后' }} </el-col>
+                      <el-col :span="24">{{ i.is_rate == true ? '已评价' : '未评价' }}</el-col>
+                    </el-col>
                   </el-col>
                 </el-col>
               </el-col>
-              <el-col :span="24" style="text-align: right">
-                <el-col :span="24"> {{ item.is_afterSale == true ? '已申请售后' : '未申请售后' }} </el-col>
-                <el-col :span="24">{{ item.is_rate == true ? '已评价' : '未评价' }}</el-col>
+              <el-col :span="24">
+                <el-col :span="6">运费</el-col>
+                <el-col :span="18" class="other" v-if="!item.freight == '0'">{{ item.freight }}</el-col>
+                <el-col :span="18" class="other" v-else>包邮</el-col>
+              </el-col>
+              <el-col :span="24" class="money">
+                <el-col :span="24" style="color: red; font-size: 20px">
+                  <p>¥{{ item.sell_money }}</p>
+                </el-col>
+                <el-col :span="24"> X{{ item.buy_num }} </el-col>
               </el-col>
-            </el-col>
-            <el-col :span="24" class="bode">
-              <el-col :span="6">运费</el-col>
-              <el-col :span="18" class="other" v-if="!item.goods.freight == '0'">{{ item.goods.freight }}</el-col>
-              <el-col :span="18" class="other" v-else>包邮</el-col>
             </el-col>
             <el-col :span="24" class="bode" v-if="item.act">
               <el-col :span="24">平台活动优惠</el-col>

+ 5 - 5
src/views/selfShop/goodsSet/index.vue

@@ -88,7 +88,6 @@ export default {
       ],
       fields: [
         { label: '套装名称', model: 'name' },
-        // { label: '店铺名称', model: 'shop.name' },
         { label: '套装销售金额', model: 'sell_money' },
         { label: '运费', model: 'freight' },
         {
@@ -152,10 +151,6 @@ export default {
       this.$set(this, `id`, data.id);
       this.$set(this, `view`, 'info');
     },
-    toBack() {
-      this.view = 'list';
-      this.search(this.searchQuery);
-    },
     // 商品管理
     async toManage({ data }) {
       this.$set(this, `set`, data.set);
@@ -183,6 +178,11 @@ export default {
       res = await this.dictQuery({ code: 'use' });
       if (this.$checkRes(res)) this.$set(this, `isuseList`, res.data);
     },
+    // 返回
+    toBack() {
+      this.view = 'list';
+      this.search(this.searchQuery);
+    },
   },
   computed: {
     ...mapState(['user']),