partner-order-item.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  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"
  9. class="book-cover" />
  10. </view>
  11. <view class="order-info">
  12. <view class="info-row">
  13. <text>{{ isBuy ? '买书' : '卖书' }}订单状态</text>
  14. <text>{{ currentOrderStatusText || "-" }}</text>
  15. </view>
  16. <view class="info-row">
  17. <text>{{ isBuy ? '买书' : '卖书' }}订单预估金额</text>
  18. <text class="amount">¥{{ order.orderExpectMoney }}</text>
  19. </view>
  20. <view class="info-row">
  21. <text>我的预估佣金</text>
  22. <text class="commission">¥{{ order.expectSettlementMoney }}</text>
  23. </view>
  24. <view class="info-row" v-if="order.status == 2 || order.status == 3">
  25. <text>{{ isBuy ? '买书' : '卖书' }}订单核算金额</text>
  26. <text class="amount">¥{{ order.orderFinalMoney || "-" }}</text>
  27. </view>
  28. <view class="info-row" v-if="order.status == 2 || order.status == 3">
  29. <text>我的结算佣金</text>
  30. <text class="commission">¥{{ order.settlementMoney || "-" }}</text>
  31. </view>
  32. </view>
  33. <view class="order-time">创建时间:{{ order.createTime }}</view>
  34. </view>
  35. </template>
  36. <script>
  37. export default {
  38. name: "partner-order-item",
  39. props: {
  40. order: {
  41. type: Object,
  42. default: () => ({}),
  43. },
  44. },
  45. data() {
  46. return {
  47. statusList: {
  48. "1": "未结算",
  49. "2": "已结算",
  50. "3": "已到账",
  51. "4": "已失效",
  52. },
  53. //-1-已取消 0-待提交 1-已删除 2-待初审 3-待取件 4-初审未通过 5-待签收 6-待收货 7-待收货 8-待审核 9-审核中 10-待到款 11-已完成
  54. sellStatusList: {
  55. "-1": "已取消",
  56. "0": "待提交",
  57. "1": "已删除",
  58. "2": "待初审",
  59. "3": "待取件",
  60. "4": "初审未通过",
  61. "5": "待签收",
  62. "6": "待收货",
  63. "7": "待收货",
  64. "8": "待审核",
  65. "9": "审核中",
  66. "10": "待到款",
  67. "11": "已完成",
  68. },
  69. // 1-待付款 2-待发货 3-待收货 4-已完成 5-已取消 6-退款中 7-已退款
  70. buyStatusList: {
  71. "1": "待付款",
  72. "2": "待发货",
  73. "3": "待收货",
  74. "4": "已完成",
  75. "5": "已取消",
  76. "6": "退款中",
  77. "7": "已退款",
  78. }
  79. };
  80. },
  81. computed: {
  82. isBuy() {
  83. return this.order.type == '2';
  84. },
  85. currentOrderStatusText() {
  86. if (this.isBuy) {
  87. return this.buyStatusList[this.order.orderStatus] || "-";
  88. } else {
  89. return this.sellStatusList[this.order.orderStatus] || "-";
  90. }
  91. }
  92. }
  93. };
  94. </script>
  95. <style lang="scss" scoped>
  96. .order-item {
  97. background: #ffffff;
  98. border-radius: 8px;
  99. padding: 16px;
  100. margin-bottom: 12px;
  101. .order-no {
  102. display: flex;
  103. justify-content: space-between;
  104. margin-bottom: 12px;
  105. font-size: 28rpx;
  106. color: #333333;
  107. line-height: 36rpx;
  108. font-family: PingFang SC;
  109. font-weight: bold;
  110. .status {
  111. color: #ff0000;
  112. }
  113. }
  114. .book-list {
  115. width: 100%;
  116. display: flex;
  117. gap: 16rpx;
  118. margin-bottom: 20rpx;
  119. overflow-x: auto;
  120. .book-cover {
  121. min-width: 132rpx;
  122. width: 132rpx;
  123. height: 185rpx;
  124. border-radius: 10rpx;
  125. }
  126. }
  127. .order-info {
  128. background: #f8f8f8;
  129. border-radius: 4px;
  130. width: 630rpx;
  131. border: 1px solid #ebebeb;
  132. .info-row {
  133. display: flex;
  134. justify-content: space-between;
  135. font-size: 14px;
  136. height: 60rpx;
  137. line-height: 60rpx;
  138. border-bottom: 1px solid #ebebeb;
  139. color: #666;
  140. &:last-child {
  141. border-bottom: none;
  142. }
  143. &:last-child {
  144. margin-bottom: 0;
  145. }
  146. text {
  147. flex: 1;
  148. padding-left: 20rpx;
  149. }
  150. text:last-child {
  151. border-left: 1px solid #ebebeb;
  152. background-color: #ffffff;
  153. }
  154. .amount {
  155. color: #333;
  156. }
  157. .commission {
  158. color: #ff0000;
  159. }
  160. }
  161. }
  162. .order-time {
  163. margin-top: 12px;
  164. font-size: 13px;
  165. color: #999;
  166. }
  167. }
  168. </style>