partner-order-item.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <template>
  2. <view class="order-item">
  3. <view class="order-no">
  4. 订单编号:{{ order.orderId }}
  5. <text class="status">{{ statusList[order.status] }}</text>
  6. </view>
  7. <view class="book-list">
  8. <image v-for="(book, index) in order.detailCoverList" :key="index" :src="book" 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.orderExpectMoney }}</text>
  18. </view>
  19. <view class="info-row">
  20. <text>我的预估佣金</text>
  21. <text class="commission">¥{{ order.expectSettlementMoney }}</text>
  22. </view>
  23. <view class="info-row" v-if="order.status==2||order.status==3">
  24. <text>买书订单核算金额</text>
  25. <text class="amount">¥{{ order.orderFinalMoney || '-' }}</text>
  26. </view>
  27. <view class="info-row" v-if="order.status==2||order.status==3">
  28. <text>我的结算佣金</text>
  29. <text class="commission">¥{{ order.settlementMoney || '-' }}</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. data() {
  45. return {
  46. statusList: {
  47. 1: '未结算',
  48. 2: '已结算',
  49. 3: '已到账',
  50. 4: '已失效'
  51. }
  52. }
  53. }
  54. }
  55. </script>
  56. <style lang="scss" scoped>
  57. .order-item {
  58. background: #FFFFFF;
  59. border-radius: 8px;
  60. padding: 16px;
  61. margin-bottom: 12px;
  62. .order-no {
  63. display: flex;
  64. justify-content: space-between;
  65. margin-bottom: 12px;
  66. font-size: 28rpx;
  67. color: #333333;
  68. line-height: 36rpx;
  69. .status {
  70. color: #FF0000;
  71. }
  72. }
  73. .book-list {
  74. width: 100%;
  75. display: flex;
  76. gap: 16rpx;
  77. margin-bottom: 20rpx;
  78. overflow-x: auto;
  79. .book-cover {
  80. width: 132rpx;
  81. height: 185rpx;
  82. border-radius: 10rpx;
  83. }
  84. }
  85. .order-info {
  86. background: #F8F8F8;
  87. padding: 12px;
  88. border-radius: 4px;
  89. .info-row {
  90. display: flex;
  91. justify-content: space-between;
  92. font-size: 14px;
  93. margin-bottom: 8px;
  94. color: #666;
  95. &:last-child {
  96. margin-bottom: 0;
  97. }
  98. .amount {
  99. color: #333;
  100. }
  101. .commission {
  102. color: #FF0000;
  103. }
  104. }
  105. }
  106. .order-time {
  107. margin-top: 12px;
  108. font-size: 12px;
  109. color: #999;
  110. }
  111. }
  112. </style>