OrderFeesInfo.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. <template>
  2. <view class="info-card">
  3. <!-- <view class="card-header">
  4. <image src="/static/images/verification/icon-fee.png"></image>
  5. <text class="card-title">费用信息</text>
  6. </view> -->
  7. <view class="card-body">
  8. <view class="info-row">
  9. <text class="info-label">代收货款:</text>
  10. <text class="info-value">¥{{orderDetail.shopOrderAmount}}</text>
  11. </view>
  12. <view class="info-row">
  13. <text class="info-label">保价{{orderDetail.platformShopCommissionPercent}}%:</text>
  14. <text class="info-value">{{orderDetail.platformServiceFee}}</text>
  15. </view>
  16. <view class="info-row">
  17. <text class="info-label">全额保:</text>
  18. <text class="info-value price">{{commission}}</text>
  19. </view>
  20. <view class="info-row">
  21. <text class="info-label">签单返还:</text>
  22. <text class="info-value">{{orderDetail.memberPromotionFee}}</text>
  23. </view>
  24. <view class="info-row">
  25. <text class="info-label">包装服务:</text>
  26. <text class="info-value">{{orderDetail.actualIncomeAmount}}</text>
  27. </view>
  28. <view class="info-row">
  29. <text class="info-label">预约派送:</text>
  30. <text class="info-value">{{orderDetail.actualIncomeAmount}}</text>
  31. </view>
  32. <view class="info-row">
  33. <text class="info-label">指定签收:</text>
  34. <text class="info-value">{{orderDetail.actualIncomeAmount}}</text>
  35. </view>
  36. </view>
  37. </view>
  38. </template>
  39. <script setup>
  40. import {
  41. ref,
  42. computed,
  43. defineProps
  44. } from 'vue'
  45. import { onShow } from '@dcloudio/uni-app'
  46. const props = defineProps({
  47. isGrab: {
  48. type: Boolean,
  49. default: false
  50. },
  51. orderDetail: {
  52. type: Object,
  53. default: () => ({
  54. dispatchInfo: null,
  55. platformServiceFee:0, //平台服务费
  56. memberPromotionFee:0, //会员推广费
  57. actualIncomeAmount:0, //实际收入金额
  58. goodsCommission: null,
  59. goodsInfo: {},
  60. grabInfo: {},
  61. id: 22,
  62. orderCreateTime: "2025-11-19 15:20:18",
  63. refundReason: null,
  64. serviceProviderInfo: null,
  65. serviceTaskInfo: {},
  66. shopConfirmStatus: null,
  67. shopDesc: null,
  68. shopDispatchVerifyStatus: "3",
  69. shopEvaluateStatus: "1",
  70. shopGoodsId: 10,
  71. shopOrderAmount: 101,
  72. shopOrderId: "6234567",
  73. shopOrderNum: 1,
  74. shopOrderStatus: "5",
  75. shopPrice: 101,
  76. shopRefundReviewStatus: null,
  77. shopServiceStatus: "2",
  78. shopUserTime: null,
  79. userId: "",
  80. platformShopCommissionPercent:'5'
  81. })
  82. }
  83. })
  84. // 计算属性 - 佣金单位
  85. const commissionUnit = ref('元')
  86. const percent = ref('5')
  87. // formData.commissionType === '0' ? '%' : '元'
  88. const commission = computed(() => {
  89. //bs_service_user_task.serivce_commission > bs_service_user_grab.service_commission > bs_shop_goods.service_commission
  90. // if(props.orderDetail.serviceTaskInfo && props.orderDetail.serviceTaskInfo.serviceCommission){
  91. // return props.orderDetail.serviceTaskInfo.serviceCommission
  92. // }
  93. // if(props.orderDetail.grabInfo && props.orderDetail.grabInfo.serviceCommission){
  94. // return props.orderDetail.grabInfo.serviceCommission
  95. // }
  96. // // if(props.orderDetail.goodsInfo && props.orderDetail.goodsInfo.serviceCommission){
  97. // // // commissionUnit.value = props.orderDetail.goodsInfo.serviceCommission === '0' ? '%' : '元'
  98. // // return props.orderDetail.goodsInfo.serviceCommission
  99. // // }
  100. // // platformPercent()
  101. // return props.orderDetail.serviceCommission || props.orderDetail.goodsCommission || ''
  102. return ''
  103. })
  104. // onShow(()=>{
  105. // platformPercent()
  106. // })
  107. const platformPercent = ()=>{
  108. getPlatformPerentApi().then(res=>{
  109. if(res.code == 200){
  110. percent.value = res.data.platformShopCommissionPercent
  111. }
  112. })
  113. }
  114. </script>
  115. <style scoped lang="scss">
  116. .info-card {
  117. background-color: #ffffff;
  118. border-radius: 16rpx;
  119. overflow: hidden;
  120. padding: 20rpx;
  121. .card-header {
  122. display: flex;
  123. align-items: center;
  124. image {
  125. width: 35rpx;
  126. height: 35rpx;
  127. }
  128. .card-title {
  129. height: 48rpx;
  130. line-height: 48rpx;
  131. font-weight: 400;
  132. font-size: 32rpx;
  133. font-weight: bold;
  134. color: #333;
  135. margin-left: 10rpx;
  136. }
  137. }
  138. }
  139. .info-row {
  140. height: 44rpx;
  141. line-height: 44rpx;
  142. display: flex;
  143. justify-content: space-between;
  144. align-items: center;
  145. margin-top: 16rpx;
  146. &:last-child {
  147. border-bottom: none;
  148. }
  149. .info-label {
  150. font-size: 28rpx;
  151. color: #666666;
  152. }
  153. .info-value {
  154. font-size: 28rpx;
  155. color: #333;
  156. &.price {
  157. color: #FD5F3C;
  158. font-weight: bold;
  159. }
  160. }
  161. }
  162. </style>