listItem.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. <!-- 售后列表内容 -->
  2. <template>
  3. <view class="productItem">
  4. <view class="title">
  5. <view class="shopName">
  6. 订单号:{{ item.orderCode }}
  7. </view>
  8. </view>
  9. <view class="content" v-for="(i, index) in item.cartInfo">
  10. <image class="img"
  11. :src="JSON.parse(i.img)[0].url"
  12. mode=""
  13. @click.stop="goGoodsCon(i)"
  14. ></image>
  15. <view class="info">
  16. <view class="infoTitle">
  17. {{ i.productTitle }}
  18. </view>
  19. <view class="infoSku">
  20. <view class="sku">
  21. {{ i.productAttrTitle || '' }}
  22. </view>
  23. <view class="num">
  24. x {{ 1 }}
  25. </view>
  26. </view>
  27. <view class="infoMoney">
  28. 退款:<view class="red">
  29. ¥{{ i.price }}
  30. </view>
  31. </view>
  32. </view>
  33. </view>
  34. <view class="money">
  35. <view class="status">
  36. <view v-if="item.salesState === 0">
  37. <view v-if="item.state === 0">商家处理中</view>
  38. <view v-if="item.state === 1">售后中</view>
  39. <view v-if="item.state === 2">等待商家收货</view>
  40. <view v-if="item.state === 3">已完成</view>
  41. </view>
  42. <view v-if="item.salesState === 1">
  43. 已撤销
  44. </view>
  45. <view v-if="item.salesState === 2">
  46. 商家拒绝
  47. </view>
  48. </view>
  49. <view class="refundMoney">
  50. 退款:<view class="red">
  51. ¥{{ item.refundAmount }}
  52. </view>
  53. </view>
  54. </view>
  55. <view class="btns">
  56. <view class="button def"
  57. @click="toDetail"
  58. v-if="item.state === 2"
  59. >删除记录</view>
  60. <view class="button greenBtn" @click="toDetail(item)">查看详情</view>
  61. </view>
  62. </view>
  63. </template>
  64. <script>
  65. export default {
  66. props: {
  67. item: {
  68. type: Object,
  69. default: () => ({})
  70. }
  71. },
  72. methods:{
  73. // 跳转商品
  74. goGoodsCon(item) {
  75. uni.navigateTo({
  76. url: "/pages/product/detail?id=" + item.productId
  77. })
  78. },
  79. // 跳转售后详情
  80. toDetail (item) {
  81. console.log(item)
  82. uni.navigateTo({
  83. url: "/pages/refund/detail?orderId="+item.orderCode+"&id="+item.id
  84. });
  85. }
  86. }
  87. }
  88. </script>
  89. <style lang="scss" scoped>
  90. .productItem{
  91. margin: 10rpx 0;
  92. background-color: #FFF;
  93. .title{
  94. height: 80rpx;
  95. padding: 0 30rpx;
  96. color: #333;
  97. font-size: 28rpx;
  98. display: flex;
  99. justify-content: space-between;
  100. align-items: center;
  101. }
  102. .content{
  103. padding: 20rpx 30rpx;
  104. border: 2rpx solid #F3F4F5;
  105. display: flex;
  106. .img{
  107. width: 180rpx;
  108. height: 180rpx;
  109. }
  110. .info{
  111. flex: 1;
  112. margin-left: 16rpx;
  113. display: flex;
  114. flex-direction: column;
  115. justify-content: space-around;
  116. .infoTitle{
  117. width: 100%;
  118. height: 80rpx;
  119. font-size: 28rpx;
  120. color: #333333;
  121. overflow: hidden;
  122. text-overflow: ellipsis;
  123. }
  124. .infoSku{
  125. font-size: 24rpx;
  126. color: #999999;
  127. display: flex;
  128. justify-content: space-between;
  129. }
  130. .infoMoney{
  131. font-size: 24rpx;
  132. }
  133. }
  134. }
  135. .money{
  136. height: 80rpx;
  137. padding: 0 30rpx;
  138. font-size: 28rpx;
  139. font-family: PingFang SC;
  140. color: #333333;
  141. border: 2rpx solid #F3F4F5;
  142. display: flex;
  143. justify-content: space-between;
  144. align-items: center;
  145. }
  146. .btns{
  147. padding: 20rpx 30rpx;
  148. display: flex;
  149. justify-content: flex-end;
  150. .button{
  151. width: 160rpx;
  152. height: 58rpx;
  153. margin: 0 10rpx;
  154. border-radius: 180rpx;
  155. font-size: 24rpx;
  156. line-height: 54rpx;
  157. text-align: center;
  158. }
  159. .def{
  160. color: #DDD;
  161. border: 2rpx solid #DDDDDD;
  162. }
  163. .greenBtn{
  164. color: #FFF;
  165. background-color: #39b54a;
  166. border: 2rpx solid #39b54a;
  167. }
  168. }
  169. .red{
  170. display: inline-block;
  171. color: #EB3729;
  172. }
  173. }
  174. </style>