cm-order-information.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <template>
  2. <view class="detail">
  3. <view class="title">订单信息:</view>
  4. <view class="row">
  5. <view class="col">
  6. <view class="label">订单编号:</view>
  7. <view class="content">
  8. <text>{{ orderInfo.orderNo }}</text> <text class="copy" @click="copyOrderNum">复制</text>
  9. </view>
  10. </view>
  11. </view>
  12. <view class="row">
  13. <view class="col">
  14. <view class="label">订单总额:</view>
  15. <view class="content">¥{{ orderInfo.payTotalFee | formatPrice }}</view>
  16. </view>
  17. </view>
  18. <view class="row">
  19. <view class="col">
  20. <view class="label">下单时间:</view> <view class="content">{{ orderInfo.orderTime }}</view>
  21. </view>
  22. <view class="col"> <view class="label">运费:</view> <view class="content">包邮</view> </view>
  23. </view>
  24. <view class="row">
  25. <view class="col" v-if="orderInfo.receiptDate">
  26. <view class="label">支付时间:</view> <view class="content"> {{ orderInfo.receiptDate }} </view>
  27. </view>
  28. <view class="col">
  29. <view class="label">分享减免:</view>
  30. <view class="content">¥{{ orderInfo.reductionAmount | formatPrice }}</view>
  31. </view>
  32. </view>
  33. <view class="row">
  34. <view class="col" v-if="orderInfo.couponAmount">
  35. <view class="label">优惠券:</view>
  36. <view class="content">¥{{ orderInfo.couponAmount | formatPrice }}</view>
  37. </view>
  38. <view class="col">
  39. <view class="label">已退货/已取消:</view>
  40. <view class="content">{{ orderInfo.returnedNum }}/{{ orderInfo.actualCancelNum }}</view>
  41. </view>
  42. </view>
  43. </view>
  44. </template>
  45. <script>
  46. export default {
  47. props: {
  48. orderInfo: {
  49. type: Object,
  50. default: () => {}
  51. }
  52. },
  53. methods: {
  54. copyOrderNum() {
  55. uni.setClipboardData({
  56. data: this.orderInfo.orderNo,
  57. success: () => {
  58. this.$util.msg('复制成功', 2000, true, 'success')
  59. },
  60. fail: () => {
  61. this.$util.msg('复制失败', 2000, true, 'none')
  62. }
  63. })
  64. }
  65. }
  66. }
  67. </script>
  68. <style lang="scss" scoped>
  69. .detail {
  70. padding: 24rpx;
  71. background: #fff;
  72. line-height: 1.6;
  73. .title {
  74. display: flex;
  75. align-items: center;
  76. margin-bottom: 32rpx;
  77. font-size: 30rpx;
  78. color: #333333;
  79. &::before {
  80. content: '';
  81. display: block;
  82. width: 6rpx;
  83. height: 22rpx;
  84. background: #ff457b;
  85. border-radius: 3rpx;
  86. margin-right: 8rpx;
  87. }
  88. }
  89. .row {
  90. display: flex;
  91. justify-content: space-between;
  92. align-items: center;
  93. padding: 8rpx 0;
  94. font-size: 26rpx;
  95. color: #333333;
  96. .label {
  97. color: #999999;
  98. }
  99. .content {
  100. position: relative;
  101. .copy {
  102. display: inline-block;
  103. line-height: 40rpx;
  104. width: 80rpx;
  105. height: 40rpx;
  106. margin-left: 40rpx;
  107. background: #fff8fd;
  108. border-radius: 8px;
  109. font-size: 24rpx;
  110. color: #ff457b;
  111. vertical-align: middle;
  112. text-align: center;
  113. }
  114. }
  115. .col {
  116. display: flex;
  117. align-items: center;
  118. }
  119. }
  120. }
  121. </style>