微信

customerCard.vue 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <template>
  2. <div class="card-content">
  3. <div class="tag" v-if='data.showTag'>
  4. <span>我推荐</span>
  5. </div>
  6. <div class="card-top flex-h">
  7. <div class="flex-h">
  8. <img :src="data.Headimgurl" alt="">
  9. <div>
  10. <span>姓名:{{data.Name}}</span>
  11. <span>手机号:{{data.Phone}}</span>
  12. </div>
  13. </div>
  14. <div>
  15. <div @click="record">领取记录</div>
  16. <div @click="history">历史备注</div>
  17. </div>
  18. </div>
  19. <div class="card-bottom">
  20. <span>备注:{{data.Remark}}</span>
  21. <span @click="remark">+ 添加备注</span>
  22. </div>
  23. </div>
  24. </template>
  25. <script>
  26. import inv from '../../common/icon/inv.png'
  27. export default {
  28. name: 'myCard',
  29. data () {
  30. return {
  31. inv
  32. }
  33. },
  34. props: {
  35. data: {
  36. type: Object,
  37. default: () => { }
  38. }
  39. },
  40. methods: {
  41. record () {
  42. this.$emit('record', this.data)
  43. },
  44. remark () {
  45. this.$emit('remark', this.data)
  46. },
  47. history () {
  48. this.$emit('history', this.data)
  49. }
  50. }
  51. }
  52. </script>
  53. <style lang="scss" scoped>
  54. .card-content {
  55. box-shadow: 0px 2px 0.1rem 0px rgba(193, 204, 217, 0.5);
  56. border-radius: 0.08rem;
  57. overflow: hidden;
  58. margin-bottom: 0.2rem;
  59. position: relative;
  60. .tag {
  61. position: absolute;
  62. top: 0;
  63. left: 0;
  64. transform: rotate(-45deg);
  65. width: 0.8rem;
  66. height: 0.8rem;
  67. top: -0.42rem;
  68. left: -0.42rem;
  69. background: linear-gradient(
  70. 138deg,
  71. rgba(255, 149, 41, 1) 0%,
  72. rgba(255, 63, 41, 1) 100%
  73. );
  74. span {
  75. position: absolute;
  76. bottom: 2px;
  77. left: 50%;
  78. transform: translateX(-50%);
  79. color: #fff;
  80. font-size: .12rem;
  81. width: 100%;
  82. text-align: center;
  83. }
  84. }
  85. .card-top {
  86. padding: 0.3rem 0.1rem;
  87. > div:nth-of-type(1) {
  88. align-items: center;
  89. img {
  90. width: 0.5rem;
  91. height: 0.5rem;
  92. border-radius: 50%;
  93. padding-right: 0.2rem;
  94. }
  95. div {
  96. span {
  97. display: block;
  98. padding: 0.02rem 0;
  99. }
  100. }
  101. }
  102. > div:nth-of-type(2) {
  103. display: flex;
  104. flex-flow: column nowrap;
  105. align-items: center;
  106. justify-content: center;
  107. flex: 1;
  108. padding-left: 0.15rem;
  109. div {
  110. color: #fc6243;
  111. font-size: 0.12rem;
  112. padding: 0.02rem 0.15rem;
  113. border: 1px solid #fc6243;
  114. border-radius: 20px;
  115. margin: 0.05rem 0;
  116. }
  117. }
  118. }
  119. .card-bottom {
  120. background: #f2f2f2;
  121. display: flex;
  122. padding: 0.15rem;
  123. justify-content: space-between;
  124. align-items: center;
  125. span:nth-of-type(1) {
  126. color: #323645;
  127. width: 2.3rem;
  128. white-space: nowrap;
  129. overflow: hidden;
  130. text-overflow: ellipsis;
  131. }
  132. span:nth-of-type(2) {
  133. color: #909090;
  134. }
  135. }
  136. }
  137. </style>