act-1.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <template>
  2. <div id="goodsSet-1">
  3. <el-row>
  4. <el-col :span="24" class="main">
  5. <el-col :span="24" v-for="item in list" :key="item._id || item.set_id">
  6. <el-col :span="24" class="bode" v-if="item.act">
  7. <el-col :span="24">平台活动优惠</el-col>
  8. <el-col :span="24" v-for="(item, index) in item.act" :key="index">
  9. <el-col :span="8">
  10. {{
  11. item.platform_act_type == '0'
  12. ? '优惠商品合集'
  13. : item.platform_act_type == '1'
  14. ? '按单返现'
  15. : item.platform_act_type == '2'
  16. ? '买赠'
  17. : item.platform_act_type == '3'
  18. ? '特价'
  19. : item.platform_act_type == '4'
  20. ? ''
  21. : item.platform_act_type == '5'
  22. ? '满减'
  23. : item.platform_act_type == '6'
  24. ? '满减折扣'
  25. : '套装促销'
  26. }}
  27. </el-col>
  28. <el-col :span="16" class="other" v-if="item.platform_act_type == '4'">加价购 </el-col>
  29. <el-col :span="16" class="other" v-if="item.platform_act_type == '3'">
  30. <p>{{ item.sp_price }} 元</p>
  31. </el-col>
  32. <el-col :span="16" class="other" v-if="item.platform_act_type == '5' || item.platform_act_type == '6'">
  33. <p>-{{ item.discount }} 元</p>
  34. </el-col>
  35. <el-col :span="24" class="other" v-if="item.platform_act_type == '2'">
  36. <el-table :data="item.gift" border style="width: 100%">
  37. <el-table-column prop="goods_name" label="商品" width="180"> </el-table-column>
  38. <el-table-column prop="spec_name" label="规格" width="180"> </el-table-column>
  39. <el-table-column prop="num" label="数量"> </el-table-column>
  40. <el-table-column prop="desc" label="备注"> </el-table-column>
  41. </el-table>
  42. </el-col>
  43. </el-col>
  44. </el-col>
  45. </el-col>
  46. </el-col>
  47. </el-row>
  48. </div>
  49. </template>
  50. <script>
  51. import { mapState, createNamespacedHelpers } from 'vuex';
  52. export default {
  53. name: 'goodsSet-1',
  54. props: {
  55. list: { type: Array },
  56. },
  57. components: {},
  58. data: function () {
  59. return {};
  60. },
  61. created() {},
  62. methods: {},
  63. computed: {
  64. ...mapState(['user']),
  65. },
  66. metaInfo() {
  67. return { title: this.$route.meta.title };
  68. },
  69. watch: {
  70. test: {
  71. deep: true,
  72. immediate: true,
  73. handler(val) {},
  74. },
  75. },
  76. };
  77. </script>
  78. <style lang="less" scoped>
  79. .goods {
  80. padding: 10px 0;
  81. .image {
  82. padding: 0 10px 0 0;
  83. height: 100px;
  84. width: 150px;
  85. }
  86. .money {
  87. text-align: right;
  88. }
  89. }
  90. .other {
  91. text-align: right;
  92. word-break: break-all;
  93. p {
  94. color: red;
  95. font-size: 20px;
  96. }
  97. .spanfour {
  98. color: blue;
  99. }
  100. }
  101. .el-col {
  102. margin: 4px 0;
  103. }
  104. .bode {
  105. border-bottom: 1px solid rgb(238, 237, 237);
  106. }
  107. </style>