refundCard.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. <template>
  2. <view class="detail">
  3. <view class="title">
  4. <view class="title-left">
  5. <image class="header-img" :src="itemInfo.image" mode=""></image>
  6. <text>{{ itemInfo.merchant_name }}</text>
  7. <image
  8. class="right-325"
  9. src="../../../static/mine/325.png"
  10. mode=""
  11. ></image>
  12. </view>
  13. <text
  14. class="order-status"
  15. v-if="itemInfo.order_goods[0].refund.status == 0"
  16. >退款中</text
  17. >
  18. <text
  19. class="order-status"
  20. v-if="itemInfo.order_goods[0].refund.status == 1"
  21. >退款成功</text
  22. >
  23. <text
  24. class="order-status"
  25. v-if="itemInfo.order_goods[0].refund.status == 2"
  26. >拒绝退款</text
  27. >
  28. <text
  29. class="order-status"
  30. v-if="itemInfo.order_goods[0].refund.status == 3"
  31. >平台介入</text
  32. >
  33. </view>
  34. <view
  35. class="commodity-information"
  36. v-for="item in itemInfo.order_goods"
  37. @click.stop="$emit('toRefundDetail', item)"
  38. >
  39. <view class="commodity-1" v-if="item.refund">
  40. <image class="commodity-img" :src="item.sku_item.image" mode=""></image>
  41. <view class="information-right">
  42. <view class="commodity-2">
  43. <view class="commodity-title">
  44. {{ item.goods_name }}
  45. </view>
  46. </view>
  47. <view class="commodity-3">
  48. <view class="specifications"> {{ item.sku_item.item }} </view>
  49. </view>
  50. <view
  51. style="
  52. display: flex;
  53. justify-content: space-between;
  54. align-items: center;
  55. "
  56. >
  57. <view
  58. class="commodity-price"
  59. v-if="item.refund.actual_refund_price"
  60. >
  61. <text style="color: #222; font-size: 26rpx">退款</text>
  62. <text style="font-size: 20rpx">¥</text>
  63. <text>{{ item.refund.actual_refund_price.split(".")[0] }}</text
  64. >.
  65. <text style="font-size: 20rpx">{{
  66. item.refund.actual_refund_price.split(".")[1]
  67. }}</text>
  68. </view>
  69. <view class="commodity-price" v-else>
  70. <text style="color: #222; font-size: 26rpx">退款</text>
  71. <text style="font-size: 20rpx">¥</text>
  72. <text>{{ item.refund.refund_price.split(".")[0] }}</text
  73. >.
  74. <text style="font-size: 20rpx">{{
  75. item.refund.refund_price.split(".")[1]
  76. }}</text>
  77. </view>
  78. <view class="btn-list">
  79. <button
  80. class="status-1"
  81. v-if="item.refund.status == 1"
  82. @click.stop="$emit('deleteAfterOrder', item)"
  83. >
  84. 删除记录</button
  85. ><button
  86. class="status-2"
  87. v-if="
  88. item.refund.status == 1 ||
  89. item.refund.status == 0 ||
  90. item.refund.status == 3
  91. "
  92. @click.stop="$emit('toRefundDetail', item)"
  93. >
  94. 售后详情
  95. </button>
  96. <button
  97. class="status-2"
  98. v-if="item.refund.status == 2 || item.refund.status == 3"
  99. @click.stop="$emit('unreviewAfter', item)"
  100. >
  101. 继续申请
  102. </button>
  103. </view>
  104. </view>
  105. </view>
  106. </view>
  107. </view>
  108. <view class="result" v-if="itemInfo.order_goods[0].refund.status == 0">
  109. <view class="result-left"> 申请中 </view>
  110. <view class="result-right"> 等待卖家同意退款 </view>
  111. </view>
  112. <view class="result" v-if="itemInfo.order_goods[0].refund.status == 1">
  113. <view class="result-left"> 退款成功 </view>
  114. <view class="result-right">
  115. 退款成功¥{{
  116. itemInfo.order_goods[0].refund.actual_refund_price &&
  117. Number(itemInfo.order_goods[0].refund.actual_refund_price) != 0
  118. ? itemInfo.order_goods[0].refund.actual_refund_price
  119. : itemInfo.order_goods[0].refund.refund_price
  120. }}
  121. </view>
  122. </view>
  123. <view class="result" v-if="itemInfo.order_goods[0].refund.status == 2">
  124. <view class="result-left"> 退款失败 </view>
  125. <view class="result-right"> 卖家拒绝退款 </view>
  126. </view>
  127. </view>
  128. </template>
  129. <script>
  130. export default {
  131. props: {
  132. refundDetail: {
  133. typeof: Object,
  134. default: {},
  135. },
  136. itemInfo: {
  137. typeof: Object,
  138. default: () => {
  139. return {};
  140. },
  141. },
  142. },
  143. data() {
  144. return {};
  145. },
  146. };
  147. </script>
  148. <style scoped lang="scss">
  149. .detail {
  150. padding: 28rpx 20rpx;
  151. background-color: #fff;
  152. border-radius: 16rpx;
  153. margin-top: 28rpx;
  154. .title {
  155. display: flex;
  156. justify-content: space-between;
  157. .title-left {
  158. display: flex;
  159. font-size: 32rpx;
  160. align-items: center;
  161. .header-img {
  162. width: 36rpx;
  163. height: 36rpx;
  164. border-radius: 50%;
  165. margin-right: 20rpx;
  166. }
  167. .right-325 {
  168. width: 32rpx;
  169. height: 32rpx;
  170. }
  171. }
  172. .order-status {
  173. color: #f83224;
  174. font-size: 26rpx;
  175. }
  176. }
  177. .commodity-information {
  178. margin-top: 28rpx;
  179. .information-right {
  180. width: 70%;
  181. }
  182. .commodity-1 {
  183. display: flex;
  184. .commodity-img {
  185. width: 180rpx;
  186. height: 180rpx;
  187. margin-right: 20rpx;
  188. border-radius: 10rpx;
  189. }
  190. .commodity-2 {
  191. display: flex;
  192. justify-content: space-between;
  193. .commodity-title {
  194. width: 100%;
  195. overflow: hidden;
  196. white-space: nowrap;
  197. text-overflow: ellipsis;
  198. margin-right: 38rpx;
  199. }
  200. }
  201. .commodity-3 {
  202. display: flex;
  203. justify-content: space-between;
  204. margin-top: 20rpx;
  205. color: #777;
  206. .specifications {
  207. font-size: 28rpx;
  208. color: #777;
  209. }
  210. }
  211. .commodity-price {
  212. margin-top: 40rpx;
  213. }
  214. }
  215. }
  216. .price {
  217. display: flex;
  218. justify-content: flex-end;
  219. font-size: 28rpx;
  220. align-items: flex-end;
  221. }
  222. .result {
  223. background-color: #f4f4f4;
  224. border-radius: 16rpx;
  225. height: 76rpx;
  226. display: flex;
  227. align-items: center;
  228. margin-top: 20rpx;
  229. padding-left: 24rpx;
  230. .result-left {
  231. margin-right: 32rpx;
  232. color: #222;
  233. font-size: 28rpx;
  234. }
  235. .result-right {
  236. color: #333;
  237. font-size: 28rpx;
  238. }
  239. }
  240. .btn-list {
  241. display: flex;
  242. justify-content: flex-end;
  243. margin-top: 34rpx;
  244. .status-1 {
  245. background-color: #fff;
  246. border-radius: 34rpx;
  247. margin: 0;
  248. padding: 0;
  249. font-size: 20rpx;
  250. color: #222;
  251. width: 128rpx;
  252. height: 58rpx;
  253. line-height: 58rpx;
  254. margin-right: 20rpx;
  255. border: 2rpx solid #979797;
  256. }
  257. .status-2 {
  258. background-color: #ffffff;
  259. border-radius: 34rpx;
  260. margin: 0;
  261. padding: 0;
  262. font-size: 20rpx;
  263. color: #f83224;
  264. width: 128rpx;
  265. height: 58rpx;
  266. line-height: 58rpx;
  267. border: 2rpx solid #f83224;
  268. margin-left: 10rpx;
  269. }
  270. }
  271. }
  272. </style>