orderProduct.vue 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <!--商品信息,订单列表、评论列表中展示-->
  2. <script setup lang="ts">
  3. import { toRefs } from 'vue'
  4. import useOrder from '~/composables/useOrder'
  5. const { handlerProDetailLink } = useOrder()
  6. const props = defineProps({
  7. //列表数据
  8. list: {
  9. type: Object,
  10. default: null,
  11. },
  12. refundStatus: {
  13. type: Number,
  14. default: null,
  15. },
  16. })
  17. const { list, refundStatus } = toRefs(props)
  18. //商品详情跳转
  19. const handlerNuxtLinks = async (list: any) => {
  20. if (refundStatus.value && refundStatus.value === -1) {
  21. await handlerProDetailLink(list.productId, list.type ? list.type : 0)
  22. }
  23. }
  24. //跳转至申请记录
  25. const emit = defineEmits(['onHandlerToRecord'])
  26. const handlerToRecord = async (orderNo: string) => {
  27. emit('onHandlerToRecord', orderNo)
  28. }
  29. </script>
  30. <template>
  31. <div class="flex-between-center orderProduct cursors">
  32. <div class="acea-row justify-between" @click="handlerNuxtLinks(list)">
  33. <el-image :src="list.image" class="backImg w100px h100px b-rd-12px" lazy></el-image>
  34. <div class="ml-20px acea-row flex-col justify-center">
  35. <div class="text-14px fontColor333 line1 mb14px w-635px font-500 oppoSans-M">{{ list.productName }}</div>
  36. <div class="borRadius text-14px fontColor333 line1 mb-15px font-400 oppoSans-R">规格:{{ list.sku }}</div>
  37. <div class="acea-row">
  38. <div v-if="list.price && list.payNum" class="text-14px fontColor333 oppoSans-R mr-20px">
  39. ¥{{ list.price }} ×{{ list.payNum }}
  40. </div>
  41. <div
  42. @click.stop="handlerToRecord(list.orderNo)"
  43. v-if="list.applyRefundNum + list.refundNum && refundStatus === -1"
  44. class="text-14px font-color oppoSans-R mr-20px flex-y-center"
  45. >
  46. {{ list.applyRefundNum + list.refundNum }}件商品已申请售后 <span class="iconfont icon-gengduo"></span>
  47. </div>
  48. <div v-if="list.applyRefundNum && refundStatus > -1" class="text-14px font-color oppoSans-R mr-20px">
  49. 售后申请数量:{{ list.applyRefundNum }}
  50. </div>
  51. <div v-if="list.afterSalesType" class="text-14px font-color oppoSans-R mr-20px">
  52. {{ list.afterSalesType === 1 ? '仅退款' : '退货退款' }}
  53. </div>
  54. <div v-if="list.refundStatus === 3" class="text-14px font-color">已退款:{{ list.refundPrice }}</div>
  55. </div>
  56. </div>
  57. </div>
  58. </div>
  59. </template>
  60. <style scoped lang="scss">
  61. .orderProduct {
  62. margin-bottom: 20px;
  63. }
  64. </style>