partner-order-item.vue 5.7 KB

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