viewRefund.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <template>
  2. <view class="">
  3. <u-navbar
  4. title="退款/售后"
  5. :autoBack="true"
  6. :safeAreaInsetTop="true"
  7. >
  8. </u-navbar>
  9. <view class="page-wrap">
  10. <view class="status">{{pageData.status|filterRefundState}}</view>
  11. <view class="box">
  12. <view class="order-product page-wrap">
  13. <view class="product u-flex" v-for="(item,index) in pageData.goodsList" :key="item.id">
  14. <u--image :showLoading="true" :src="item.mainImg" width="180rpx" height="180rpx"></u--image>
  15. <view class="text">
  16. <view class="up">
  17. <view class="name ellipsis-2">{{item.goodsName}}</view>
  18. <view class="info">
  19. {{item.specification}}
  20. {{item.unit}}
  21. </view>
  22. </view>
  23. <view class="down u-flex u-row-between">
  24. <view class="left">
  25. <text class="price">¥ <text class="price-num">{{item.price}}</text></text>
  26. </view>
  27. <u-number-box v-model="item.quantity" :disabled="true" @change="changeQuantity(index, $event)" integer></u-number-box>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. <view class="box order-info page-wrap">
  34. <view class="order-info-item" v-for="(item,index) in orderInfo" :key="index">
  35. <text class="til">{{item.til}}</text>
  36. <text class="con">
  37. <text v-if="item.isMoney">¥</text>
  38. {{pageData[item.con]}}
  39. </text>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. </template>
  45. <script>
  46. export default {
  47. data() {
  48. return {
  49. orderId:'',
  50. pageData:{},
  51. orderInfo:[
  52. {til:'订单编号',con:'orderNum'},
  53. {til:'申请金额',con:'orderAmount',isMoney:true},
  54. // {til:'申请件数',con:'quantity'},
  55. {til:'申请原因',con:'refundReason'},
  56. {til:'问题描述',con:'remark'},
  57. ]
  58. }
  59. },
  60. onShow() {
  61. this.getData()
  62. },
  63. onLoad(page) {
  64. this.orderId =page.orderId
  65. },
  66. methods: {
  67. getData(){
  68. this.$u.api.refundInfo({orderId:this.orderId}).then(res=>{
  69. this.pageData = res.data
  70. console.log('res',res.data);
  71. }).catch(err=>{
  72. console.log('refundInfo',err);
  73. })
  74. }
  75. }
  76. }
  77. </script>
  78. <style>
  79. page{
  80. background-color: #F5F5F5;
  81. }
  82. </style>
  83. <style lang="scss" scoped>
  84. .status{
  85. text-align: center;
  86. font-size: 32rpx;
  87. font-weight: 600;
  88. color: #FFB100;
  89. line-height: 45rpx;
  90. margin-bottom: 20rpx;
  91. }
  92. .box{
  93. background-color: #fff;
  94. border-radius: 8rpx;
  95. margin-bottom: 20rpx;
  96. }
  97. .order-info{
  98. .order-info-item{
  99. font-size: 30rpx;
  100. font-weight: 400;
  101. color: #333333;
  102. line-height: 42rpx;
  103. padding: 30rpx 20rpx;
  104. &:not(:last-child){
  105. border-bottom: 0.5px solid #eee;
  106. }
  107. .til{
  108. font-size: 24rpx;
  109. font-weight: 400;
  110. color: #999999;
  111. margin-right: 90rpx;
  112. }
  113. }
  114. }
  115. </style>