detail.vue 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. <template>
  2. <view class="returnList">
  3. <view class="data bgRed">
  4. <view v-if="orderDetail.salesState === 0">
  5. <view class="state" v-if="orderDetail.state === 0">
  6. 已提交申请,请耐心等待卖家处理
  7. </view>
  8. <view class="state" v-if="orderDetail.state === 1">
  9. <view class="state" v-if="orderDetail.serviceType === 0">
  10. 已通过平台审核,正在退款
  11. </view>
  12. <view class="state" v-if="orderDetail.serviceType === 1">
  13. 已通过平台审核 ,请填写退货物流
  14. </view>
  15. </view>
  16. <view class="state" v-if="orderDetail.state === 2">
  17. 已发货,等待商家审核
  18. </view>
  19. <view class="state" v-if="orderDetail.state === 3">
  20. 售后订单已完成
  21. </view>
  22. </view>
  23. <view v-if="orderDetail.salesState === 1">
  24. 已撤销售后订单
  25. </view>
  26. <view v-if="orderDetail.salesState === 2">
  27. 商家已拒绝售后申请
  28. </view>
  29. </view>
  30. <!-- 退款总金额 -->
  31. <view class="money">
  32. <view class="top">
  33. <text>退款总金额</text>
  34. <text class="colorRed">¥{{ orderDetail.refundAmount || 0 }}</text>
  35. </view>
  36. <view class="express" v-if="orderDetail.state === 1 && orderDetail.serviceType === 1 && orderDetail.deliverySn===null">
  37. <view class="title">商家已同意退货申请,请尽快发货。</view>
  38. <view class="info people"> 收货人: {{ orderDetail.consignee || '' }} </view>
  39. <view class="info address"> 收货地址: {{ orderDetail.address || '' }} </view>
  40. <view class="info phone"> 收货电话: {{ orderDetail.phoneNumber || '' }} </view>
  41. </view>
  42. <!-- 退款信息 -->
  43. <view class="tips" v-if="orderDetail.state === 0 && orderDetail.salesState !== 1 && orderDetail.salesState !== 2 ">
  44. <text class="title">您已成功发起退款申请,请耐心等待商家处理</text>
  45. <view class="content">
  46. <view>· 卖家同意或超时未处理,系统将退款给您</view>
  47. <view>· 如果卖家拒绝,您可以修改退款申请后再次发起,卖家会重新处理</view>
  48. </view>
  49. </view>
  50. <view class="bottom">
  51. <view class="btns def" v-if="orderDetail.salesState === 0 && orderDetail.state !== 2 && orderDetail.state !== 3" @click="cancelReq">撤销申请</view>
  52. </view>
  53. </view>
  54. <!-- 退款信息 -->
  55. <view class="rebackInfo">
  56. <view class="top">
  57. 退款信息
  58. </view>
  59. <view class="rebackItem" v-for="item in orderDetail.cartInfo" :key="item.id">
  60. <image class="img" :src="JSON.parse(item.img)[0].url" mode=""></image>
  61. <view class="info">
  62. <view class="productName">
  63. {{ item.productTitle }}
  64. </view>
  65. <view class="sku">
  66. {{ item.productAttrTitle }}
  67. </view>
  68. </view>
  69. </view>
  70. <view class="bottom">
  71. <view class="reason">
  72. <view class="left">
  73. 退款原因:
  74. </view>
  75. <view class="right">
  76. {{ orderDetail.reasons || '' }}
  77. </view>
  78. </view>
  79. <view class="reason">
  80. <view class="left">
  81. 退款金额:
  82. </view>
  83. <view class="right"> ¥{{ orderDetail.refundAmount || 0 }} </view>
  84. </view>
  85. <view class="reason">
  86. <view class="left">
  87. 退款编号:
  88. </view>
  89. <view class="right">
  90. {{ orderDetail.id || '' }}
  91. </view>
  92. </view>
  93. <view class="reason">
  94. <view class="left">
  95. 申请时间:
  96. </view>
  97. <view class="right">
  98. {{ orderDetail.createTime || '' }}
  99. </view>
  100. </view>
  101. </view>
  102. </view>
  103. </view>
  104. </template>
  105. <script>
  106. export default {
  107. data() {
  108. return {
  109. orderId: '',
  110. id: '',
  111. orderInfo: {},
  112. orderDetail: {},
  113. }
  114. },
  115. onLoad(options) {
  116. this.orderId = options.orderId
  117. this.id = options.id
  118. this.getReturnDetail()
  119. },
  120. methods: {
  121. /** state售后状态 0已提交等待平台审核 1平台已审核 等待用户发货/退款 2 用户已发货 3已完成 */
  122. async getReturnDetail() {
  123. this.$api.request('get', 'order/app/storeAfterSales/get', {"orderId":this.orderId,"id":this.id}).then(res => {
  124. this.orderDetail = res.data
  125. }).catch(err => {
  126. uni.showToast({
  127. title: '订单异常',
  128. icon: 'none',
  129. duration: 2000,
  130. })
  131. })
  132. },
  133. // 撤销申请
  134. async cancelReq() {
  135. this.$api.request('get', 'order/app/storeAfterSales/revoke', {"orderId":this.orderId,"id":this.id}).then(res => {
  136. uni.showToast({
  137. title: '已撤销',
  138. icon: 'none',
  139. duration: 2000,
  140. })
  141. setTimeout(() => {
  142. uni.navigateBack({
  143. delta: 1 // delta 默认为 1,表示返回上一页
  144. });
  145. }, 1500)
  146. })
  147. .catch(err => {
  148. uni.showToast({
  149. title: err.msg || '撤销失败',
  150. icon: 'none',
  151. duration: 2000,
  152. })
  153. })
  154. },
  155. // 修改申请
  156. editReq() {},
  157. },
  158. }
  159. </script>
  160. <style scoped lang="scss">
  161. $green: #39b54a;
  162. .returnList {
  163. .colorRed {
  164. color: $green;
  165. }
  166. .bgRed {
  167. background-color: $green;
  168. }
  169. .data {
  170. width: 100%;
  171. height: 150rpx;
  172. line-height: 150rpx;
  173. padding-left: 30rpx;
  174. color: #fff;
  175. }
  176. .money {
  177. background-color: #fff;
  178. .top {
  179. padding: 20rpx 30rpx;
  180. font-size: 30rpx;
  181. display: flex;
  182. justify-content: space-between;
  183. border-bottom: 2rpx solid #f3f4f5;
  184. }
  185. .express {
  186. padding: 20rpx 30rpx;
  187. font-size: 26rpx;
  188. .title {
  189. color: #333333;
  190. }
  191. .info {
  192. color: #999999;
  193. }
  194. }
  195. .tips {
  196. height: 160rpx;
  197. padding: 20rpx 30rpx;
  198. color: #999999;
  199. border-bottom: 2rpx solid #f3f4f5;
  200. font-size: 26rpx;
  201. .title {
  202. overflow: hidden;
  203. white-space: nowrap;
  204. text-overflow: ellipsis;
  205. }
  206. .content {
  207. font-size: 20rpx;
  208. }
  209. }
  210. .bottom {
  211. padding: 20rpx 30rpx;
  212. display: flex;
  213. justify-content: flex-end;
  214. .btns {
  215. width: 160rpx;
  216. height: 58rpx;
  217. margin: 0 10rpx;
  218. font-size: 24rpx;
  219. text-align: center;
  220. line-height: 58rpx;
  221. border-radius: 180rpx;
  222. }
  223. .def {
  224. color: #dddddd;
  225. border: 2rpx solid #dddddd;
  226. }
  227. .greenBtn {
  228. color: #fff;
  229. background-color: $green;
  230. }
  231. }
  232. }
  233. .rebackInfo {
  234. padding: 0 30rpx;
  235. background-color: #fff;
  236. .top {
  237. height: 80rpx;
  238. margin: 20rpx 0;
  239. line-height: 80rpx;
  240. font-size: 30rpx;
  241. font-weight: bold;
  242. color: #333333;
  243. border-bottom: 2rpx solid #f3f4f5;
  244. }
  245. .rebackItem {
  246. padding: 20rpx 0;
  247. font-size: 28rpx;
  248. display: flex;
  249. border-bottom: 2rpx solid #f3f4f5;
  250. .img {
  251. width: 120rpx;
  252. height: 120rpx;
  253. }
  254. .info {
  255. margin-left: 16rpx;
  256. flex: 1;
  257. .productName {
  258. width: 100%;
  259. height: 80rpx;
  260. overflow: hidden;
  261. text-overflow: ellipsis;
  262. color: #333333;
  263. }
  264. .sku {
  265. font-size: 24rpx;
  266. color: #cccccc;
  267. }
  268. }
  269. }
  270. .bottom {
  271. padding: 20rpx 0;
  272. .reason {
  273. font-size: 28rpx;
  274. color: #333333;
  275. display: flex;
  276. justify-content: space-between;
  277. .right {
  278. color: #aaaaaa;
  279. }
  280. }
  281. }
  282. }
  283. }
  284. </style>