order-report-card.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <template>
  2. <div class="reportCard">
  3. <slot name="InsUsername" :username="odRpCd"></slot>
  4. <div class="title">{{ odRpCd.clubName }}</div>
  5. <div class="item">
  6. <div>联系人:</div>
  7. <div>{{ odRpCd.linkMan }}</div>
  8. </div>
  9. <div class="item">
  10. <div>手机号:</div>
  11. <div>{{ odRpCd.mobile }}</div>
  12. </div>
  13. <div class="goods">
  14. <div class="text">意向商品:</div>
  15. <div class="goodsInfo" v-if="odRpCd.distributionProduct">
  16. <div class="img">
  17. <img class="img" :src="odRpCd.distributionProduct.mainImage" alt="">
  18. </div>
  19. <div class="content">
  20. <div class="goods_title">{{ odRpCd.distributionProduct.name }}</div>
  21. <div class="name">
  22. 供应商:<span>{{ odRpCd.distributionProduct.shopName }}</span>
  23. </div>
  24. <div class="price">¥{{ odRpCd.distributionProduct.price && odRpCd.distributionProduct.price.toFixed(2) }}</div>
  25. </div>
  26. </div>
  27. </div>
  28. <div class="line"></div>
  29. <slot name="card-foot" :data="odRpCd"></slot>
  30. <van-image
  31. class="image"
  32. :src="statusImage"
  33. v-if="isTabImg && statusImage"
  34. ></van-image>
  35. </div>
  36. </template>
  37. <script>
  38. export default {
  39. props: {
  40. isTabImg: {
  41. type: Boolean,
  42. default: false
  43. },
  44. odRpCd: {
  45. type: Object,
  46. default: () => ({})
  47. }
  48. },
  49. computed: {
  50. statusImage () {
  51. return this.odRpCd.orderStatus * 1 === 1
  52. ? 'https://static.caimei365.com/app/mini-distribution/order-success.png'
  53. : ''
  54. }
  55. }
  56. }
  57. </script>
  58. <style lang="scss" scoped>
  59. .reportCard {
  60. padding: 5.3vw 3.2vw;
  61. background: #fff;
  62. position: relative;
  63. .title {
  64. color: #333333;
  65. font-size: 4.3vw;
  66. font-weight: 600;
  67. margin-bottom: 3.2vw;
  68. }
  69. .item {
  70. font-size: 3.7vw;
  71. color: #999999;
  72. display: flex;
  73. align-items: center;
  74. margin-bottom: 2.1vw;
  75. div:nth-child(2) {
  76. color: #333333;
  77. }
  78. }
  79. .goods {
  80. .text {
  81. font-size: 3.7vw;
  82. color: #999;
  83. margin-bottom: 2.1vw;
  84. }
  85. .goodsInfo {
  86. background: #f7f7f7;
  87. display: flex;
  88. align-items: center;
  89. padding: 3.5vw;
  90. border-radius: 1.1vw;
  91. .img {
  92. width: 17.1vw;
  93. height: 17.1vw;
  94. border-radius: 0.5vw;
  95. margin-right: 3.2vw;
  96. }
  97. .content {
  98. display: flex;
  99. justify-content: space-between;
  100. flex-direction: column;
  101. height: 17.1vw;
  102. .goods_title {
  103. color: #333333;
  104. font-weight: 600;
  105. font-size: 3.7vw;
  106. @include webkit-line-clamp(1)
  107. }
  108. .name {
  109. font-size: 3.2vw;
  110. color: #999999;
  111. span {
  112. color: #333333;
  113. }
  114. }
  115. .price {
  116. color: #f94b4b;
  117. font-size: 3.2vw;
  118. }
  119. }
  120. }
  121. }
  122. .line {
  123. margin: 4.5vw 0;
  124. height: 1px;
  125. background: #e1e1e1;
  126. }
  127. .image {
  128. top: 4.3vw;
  129. right: 4.3vw;
  130. position: absolute;
  131. width: 21.3vw;
  132. height: 21.3vw;
  133. }
  134. }
  135. </style>