card-3.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. <template>
  2. <div id="card-1">
  3. <el-row>
  4. <el-col :span="24" class="main">
  5. <el-col :span="12" class="main_one">
  6. <el-col :span="24" class="add">
  7. <el-col :span="2">
  8. <i class="el-icon-location"></i>
  9. </el-col>
  10. <el-col :span="22">
  11. <el-col :span="24"> {{ address.name }},{{ address.phone }} </el-col>
  12. <el-col :span="24"> {{ address.province }} , {{ address.city }} , {{ address.area }} , {{ address.address }} </el-col>
  13. </el-col>
  14. </el-col>
  15. <el-col :span="24" class="shop"> <i class="el-icon-s-shop"></i>{{ shop.name }}</el-col>
  16. <el-col :span="24">
  17. <el-col :span="24" class="goods bode">
  18. <el-col :span="6" class="image"><el-image :src="getFile()"></el-image></el-col>
  19. <el-col :span="18">
  20. <el-col :span="12">
  21. <el-col :span="24"> {{ goods.name }} </el-col>
  22. <el-col :span="24"> 规格:{{ spec.name }} </el-col>
  23. </el-col>
  24. <el-col :span="12" class="money">
  25. <el-col :span="24" style="color: red; font-size: 20px">
  26. <p>¥{{ spec.price }}</p>
  27. </el-col>
  28. <el-col :span="24"> X{{ spec.num }} </el-col>
  29. <el-col :span="24">
  30. <span class="spanfour" style="color: blue" @click="toUrl(goods.url)"> 查看商品来源:{{ goods.source }}</span>
  31. </el-col>
  32. <el-col :span="24"> {{ form.is_afterSale == true ? '已申请售后' : '未申请售后' }} </el-col>
  33. </el-col>
  34. </el-col>
  35. </el-col>
  36. </el-col>
  37. <el-col :span="24" class="bode">
  38. <el-col :span="6">下单时间</el-col>
  39. <el-col :span="18" class="other">{{ form.buy_time }}</el-col>
  40. </el-col>
  41. <el-col :span="24" class="bode">
  42. <el-col :span="6">订单备注</el-col>
  43. <el-col :span="18" class="other">{{ form.remarks || '' }}</el-col>
  44. </el-col>
  45. <el-col :span="24" class="bode">
  46. <el-col :span="6">配送方式</el-col>
  47. <el-col :span="18" class="other">{{ form.transport_type_name || '待填写' }}</el-col>
  48. </el-col>
  49. <el-col :span="24" class="goods_total bode">
  50. <el-col :span="24" v-for="(item, index) in total_detail" :key="index">
  51. <el-col :span="8">{{ item.zh }}</el-col>
  52. <el-col :span="16" class="other">
  53. <p>¥{{ item.money }}</p>
  54. </el-col>
  55. </el-col>
  56. </el-col>
  57. <el-col :span="24" class="goods_total bode">
  58. <el-col :span="8">实付金额</el-col>
  59. <el-col :span="16" class="other">
  60. <p>¥{{ pay.pay_money }} 元</p>
  61. </el-col>
  62. </el-col>
  63. </el-col>
  64. </el-col>
  65. </el-row>
  66. </div>
  67. </template>
  68. <script>
  69. import { mapState, createNamespacedHelpers } from 'vuex';
  70. export default {
  71. name: 'card-1',
  72. props: {
  73. address: { type: Object },
  74. shop: { type: Object },
  75. goods: { type: Object },
  76. spec: { type: Object },
  77. form: { type: Object },
  78. pay: { type: Object },
  79. total_detail: { type: Array },
  80. },
  81. components: {},
  82. data: function () {
  83. return {};
  84. },
  85. created() {
  86. this.search();
  87. },
  88. methods: {
  89. search() {},
  90. toUrl(url) {
  91. if (url) window.open(url, '_blank');
  92. else this.$message.error('该商品还未添加来源网址,无法跳转');
  93. },
  94. getActLength() {
  95. return _.get(this.total_detail, 'act.length');
  96. },
  97. // 选择商品
  98. getFile(value) {
  99. let name;
  100. if (this.spec.file && this.spec.file.length != 0) name = this.spec.file[0].url;
  101. else if (this.goods.file && this.goods.file.length != 0) name = this.goods.file[0].url;
  102. return name;
  103. },
  104. },
  105. computed: {
  106. ...mapState(['user']),
  107. },
  108. metaInfo() {
  109. return { title: this.$route.meta.title };
  110. },
  111. watch: {
  112. test: {
  113. deep: true,
  114. immediate: true,
  115. handler(val) {},
  116. },
  117. },
  118. };
  119. </script>
  120. <style lang="less" scoped>
  121. .main {
  122. // padding: 0 5%;
  123. .main_one {
  124. padding: 0 5%;
  125. }
  126. .add {
  127. border-bottom: 2px dashed #ccc;
  128. margin: 0 0 5px 0;
  129. padding: 5px 0;
  130. }
  131. .shop {
  132. padding: 4px 0;
  133. font-size: 18px;
  134. border-bottom: 1px solid #ccc;
  135. }
  136. .goods {
  137. padding: 10px 0;
  138. .image {
  139. padding: 0 10px 0 0;
  140. }
  141. .money {
  142. text-align: right;
  143. }
  144. }
  145. .transport {
  146. margin: 50px;
  147. padding: 5px;
  148. border: 1px solid rgb(254, 195, 195);
  149. }
  150. .other {
  151. text-align: right;
  152. word-break: break-all;
  153. p {
  154. color: red;
  155. font-size: 20px;
  156. }
  157. .spanfour {
  158. color: blue;
  159. }
  160. }
  161. .el-col {
  162. margin: 3px 0;
  163. }
  164. .bode {
  165. border-bottom: 1px solid rgb(238, 237, 237);
  166. }
  167. .form {
  168. margin: 20px 0 0 0;
  169. }
  170. }
  171. /deep/.el-timeline {
  172. margin: 20px 0 0 0;
  173. font-size: 16px;
  174. }
  175. /deep/.el-timeline-item__node:nth-child(1) {
  176. background-color: green;
  177. }
  178. </style>