partner-order-item.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <template>
  2. <view class="order-item">
  3. <view class="order-no">
  4. 订单编号:{{ order.orderNo }}
  5. <text class="status">{{ order.status }}</text>
  6. </view>
  7. <view class="book-list">
  8. <image v-for="(book, index) in order.books" :key="index" :src="book.cover" mode="aspectFill" class="book-cover"/>
  9. </view>
  10. <view class="order-info">
  11. <view class="info-row">
  12. <text>买书订单状态</text>
  13. <text>{{ order.orderStatus }}</text>
  14. </view>
  15. <view class="info-row">
  16. <text>买书订单预估金额</text>
  17. <text class="amount">¥{{ order.estimatedAmount }}</text>
  18. </view>
  19. <view class="info-row">
  20. <text>我的预估佣金</text>
  21. <text class="commission">¥{{ order.estimatedCommission }}</text>
  22. </view>
  23. <view class="info-row" v-if="order.finalAmount">
  24. <text>买书订单核算金额</text>
  25. <text class="amount">¥{{ order.finalAmount }}</text>
  26. </view>
  27. <view class="info-row" v-if="order.finalCommission">
  28. <text>我的结算佣金</text>
  29. <text class="commission">¥{{ order.finalCommission }}</text>
  30. </view>
  31. </view>
  32. <view class="order-time">创建时间:{{ order.createTime }}</view>
  33. </view>
  34. </template>
  35. <script>
  36. export default {
  37. name: 'partner-order-item',
  38. props: {
  39. order: {
  40. type: Object,
  41. default: () => ({})
  42. }
  43. }
  44. }
  45. </script>
  46. <style lang="scss" scoped>
  47. .order-item {
  48. background: #FFFFFF;
  49. border-radius: 8px;
  50. padding: 16px;
  51. margin-bottom: 12px;
  52. .order-no {
  53. display: flex;
  54. justify-content: space-between;
  55. font-size: 14px;
  56. color: #333;
  57. margin-bottom: 12px;
  58. .status {
  59. color: #FF0000;
  60. }
  61. }
  62. .book-list {
  63. display: flex;
  64. gap: 8px;
  65. margin-bottom: 12px;
  66. .book-cover {
  67. width: 60px;
  68. height: 80px;
  69. border-radius: 4px;
  70. }
  71. }
  72. .order-info {
  73. background: #F8F8F8;
  74. padding: 12px;
  75. border-radius: 4px;
  76. .info-row {
  77. display: flex;
  78. justify-content: space-between;
  79. font-size: 14px;
  80. margin-bottom: 8px;
  81. color: #666;
  82. &:last-child {
  83. margin-bottom: 0;
  84. }
  85. .amount {
  86. color: #333;
  87. }
  88. .commission {
  89. color: #FF0000;
  90. }
  91. }
  92. }
  93. .order-time {
  94. margin-top: 12px;
  95. font-size: 12px;
  96. color: #999;
  97. }
  98. }
  99. </style>