order-card.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <template>
  2. <div class="order-card">
  3. <div class="card-header">
  4. <div class="order-no">订单号&emsp;{{ info.order_no }}</div>
  5. <div class="time">{{ info.create_at }}</div>
  6. </div>
  7. <div class="card-center">
  8. <div class="type">{{ info.level_name }}{{ info.level_title }}</div>
  9. <div class="price">
  10. <div>实付款</div>
  11. <div class="red">¥</div>
  12. <div class="price-num">{{ info.price_total }}</div>
  13. </div>
  14. </div>
  15. <div class="card-footer">
  16. <div class="btn" @click="toInvoice">
  17. {{
  18. info.bill_info
  19. ? info.bill_info.bill_img
  20. ? "查看发票"
  21. : "开票中"
  22. : "申请开票"
  23. }}
  24. </div>
  25. <div class="btn">联系客服</div>
  26. </div>
  27. </div>
  28. </template>
  29. <script>
  30. export default {
  31. name: "OrderCard",
  32. props: {
  33. info: {
  34. type: Object,
  35. },
  36. },
  37. methods: {
  38. toInvoice() {
  39. this.$router.push({
  40. path: this.info.bill_info
  41. ? "/vip-invoice-detail"
  42. : "/vip-invoice-apply",
  43. query: {
  44. order_id: this.info.id,
  45. },
  46. });
  47. },
  48. },
  49. };
  50. </script>
  51. <style lang="scss" scoped>
  52. .order-card {
  53. width: 100%;
  54. height: 200px;
  55. padding: 20px;
  56. display: flex;
  57. flex-direction: column;
  58. align-items: center;
  59. justify-content: space-between;
  60. box-sizing: border-box;
  61. user-select: none;
  62. .card-header {
  63. width: 100%;
  64. display: flex;
  65. align-items: center;
  66. justify-content: space-between;
  67. .order-no {
  68. font-size: 13px;
  69. font-weight: 400;
  70. color: #444444;
  71. }
  72. .time {
  73. font-size: 13px;
  74. color: #969696;
  75. }
  76. }
  77. .card-center {
  78. width: 100%;
  79. display: flex;
  80. align-items: center;
  81. justify-content: space-between;
  82. .type {
  83. font-size: 18px;
  84. font-weight: 500;
  85. color: #444444;
  86. }
  87. .price {
  88. display: flex;
  89. align-items: flex-end;
  90. div {
  91. font-size: 14px;
  92. font-weight: 500;
  93. color: #333333;
  94. line-height: 14px;
  95. }
  96. .red {
  97. color: #ff3535;
  98. margin-left: 10px;
  99. margin-right: 2px;
  100. }
  101. .price-num {
  102. font-size: 22px;
  103. font-weight: 400;
  104. color: #ff3535;
  105. line-height: 16px;
  106. }
  107. }
  108. }
  109. .card-footer {
  110. width: 100%;
  111. display: flex;
  112. align-items: center;
  113. justify-content: flex-end;
  114. .btn {
  115. width: 100px;
  116. height: 40px;
  117. text-align: center;
  118. line-height: 40px;
  119. font-size: 14px;
  120. font-weight: 400;
  121. border-radius: 4px;
  122. cursor: pointer;
  123. }
  124. :nth-child(1) {
  125. border: 1px solid #979797;
  126. color: #131415;
  127. }
  128. :nth-child(2) {
  129. border: 1px solid #0054f7;
  130. color: #0054f7;
  131. margin-left: 10px;
  132. }
  133. }
  134. }
  135. </style>