index.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452
  1. <!-- 退款详情 -->
  2. <template>
  3. <view>
  4. <JHeader title="退款详情" width="50" height="50" style="padding: 24upx 0 0;"></JHeader>
  5. <view v-if="ifShow">
  6. <view>
  7. <view class="order-details-status">
  8. <view v-if="status == 1" class="status-title-box">
  9. <view class="l">
  10. <text class="status">审核中</text>
  11. </view>
  12. </view>
  13. <!-- 审核通过 -->
  14. <view v-if="status == 10" class="status-title-box">
  15. <view class="l">
  16. <text class="status">审核通过</text>
  17. </view>
  18. </view>
  19. <!-- 审核不通过 -->
  20. <view v-if="status == 6" class="status-title-box">
  21. <view class="l">
  22. <text class="status">审核不通过</text>
  23. </view>
  24. </view>
  25. <view v-if="status == 6" class="reason">原因: {{ itemlist.reason }}</view>
  26. <!-- 退款中 -->
  27. <view v-if="status == 2" class="status-title-box">
  28. <view class="l">
  29. <text class="status">退款中</text>
  30. </view>
  31. </view>
  32. <!-- 退款中 -->
  33. <view v-if="status == 7" class="status-title-box">
  34. <view class="l">
  35. <text class="status">评审中</text>
  36. </view>
  37. </view>
  38. <!-- 退货完成待退款 -->
  39. <view v-if="status == 4" class="status-title-box">
  40. <view class="l">
  41. <text class="status">退款成功</text>
  42. </view>
  43. </view>
  44. <!-- 退货完成拒绝退款 -->
  45. <view v-if="status == 5" class="status-title-box">
  46. <view class="l">
  47. <text class="status">退款失败</text>
  48. </view>
  49. </view>
  50. <!-- 平台介入拒绝 -->
  51. <view v-if="status == 9 && isPlaformState === 1" class="status-title-box">
  52. <view class="l">
  53. <text class="status">审核失败</text>
  54. </view>
  55. </view>
  56. <!-- 退款成功 -->
  57. <view v-if="status == 9" class="status-title-box">
  58. <view class="l">
  59. <text class="status">撤销申请</text>
  60. </view>
  61. </view>
  62. </view>
  63. <!-- 发起退款 -->
  64. <view v-if="status == 0" class="order-details-info-box mt20">
  65. <view v-if="status != 0" class="order-details-price">
  66. <text>退款总金额</text>
  67. <text class="price-box"><text class="fuhao">¥</text>{{ itemlist.price }}</text>
  68. </view>
  69. <view class="address-box return-explain-box">
  70. <view>您已成功发起退款申请,请耐心等待商家处理。</view>
  71. <view class="address-info-r mt20 mar-top-20">
  72. <view class="item fs24">
  73. <text class="circle"></text>
  74. <text class="">卖家同意或超时未处理,系统将退款给您</text>
  75. </view>
  76. <view class="item fs24">
  77. <text class="circle"></text>
  78. <text class="">如果卖家拒绝,您可以修改退款申请后再次发起,卖家会重新处理</text>
  79. </view>
  80. </view>
  81. <view class="return-explain-btn">
  82. <text class="btn" @click="cancelRefundTap">撤销申请</text>
  83. <text v-if="status == 6 || status == 8" class="btn" @click="platform(itemlist.afterId, itemlist.orderId)">
  84. 平台介入
  85. </text>
  86. </view>
  87. </view>
  88. </view>
  89. <view v-if="status == 6 || status == 8" class="order-details-info-box mt20">
  90. <view class="return-explain-btn">
  91. <text class="btn" @click="cancelRefundTap">撤销申请</text>
  92. <text class="btn" @click="platform(itemlist.afterId, itemlist.orderId)">平台介入</text>
  93. </view>
  94. </view>
  95. <!-- 退款成功 -->
  96. <view v-if="status == 4" class="order-details-info-box mt20">
  97. <view class="order-details-price return-explain-box">
  98. <text>已原路退回金额</text>
  99. <text class="price-box"><text class="fuhao">¥</text>{{ itemlist.price }}</text>
  100. </view>
  101. </view>
  102. <!-- 平台介入关闭 -->
  103. <view v-if="status == 9 && isPlaformState === 1" class="order-details-info-box mt20">
  104. <view class="address-box return-explain-box">
  105. <view>平台介入申请失败</view>
  106. </view>
  107. </view>
  108. <!-- 退款关闭 -->
  109. <view v-if="status == 9" class="order-details-info-box mt20">
  110. <view class="address-box return-explain-box">
  111. <view>因您撤销退款申请,退款已关闭</view>
  112. </view>
  113. </view>
  114. <view class="order-list-box">
  115. <view class="title">退款信息</view>
  116. <view class="item">
  117. <view class="order-info-box">
  118. <view v-for="(item, index) in itemlist.skus" :key="index" class="order-info">
  119. <view class="order-info-item">
  120. <image :src="common.seamingImgUrl(item.image)" class="product-img"></image>
  121. <view class="info-box">
  122. <text class="product-name">{{ item.productName }}</text>
  123. <view class="product-sku mt20">{{ item.value }}</view>
  124. </view>
  125. </view>
  126. </view>
  127. <view class="delivery-way-box">
  128. <view v-if="deliveryfalse" class="item">
  129. <!-- <text class="way">退款原因:多拍/错拍/不想要</text> -->
  130. </view>
  131. <view class="item">
  132. <text class="way">退款金额:¥{{ itemlist.price }}</text>
  133. </view>
  134. <view class="item">
  135. <text class="way">退款编号:{{ itemlist.afterFormid }}</text>
  136. </view>
  137. <view class="item">
  138. <text class="way">申请时间:{{ itemlist.createTime }}</text>
  139. </view>
  140. </view>
  141. </view>
  142. </view>
  143. </view>
  144. <view class="order-list-box negotiate">
  145. <view class="title">协商历史</view>
  146. <view class="orderLineBox">
  147. <tui-time-axis>
  148. <tui-timeaxis-item
  149. v-for="(item, index) in itemlist.afterHistory" v-if="itemlist.afterHistory.length > 0"
  150. :key="index" background-color="#ffffff"
  151. >
  152. <template #content>
  153. <view>
  154. <view class="order-desc">{{ item.title }}</view>
  155. <view class="order-time">{{ item.time }}</view>
  156. </view>
  157. </template>
  158. </tui-timeaxis-item>
  159. </tui-time-axis>
  160. </view>
  161. </view>
  162. </view>
  163. </view>
  164. </view>
  165. </template>
  166. <script>
  167. import {
  168. getReturnDetailByIdApi,
  169. updateCancelReturnGoodsApi
  170. } from '../../../api/anotherTFInterface'
  171. export default {
  172. name: 'RefundDetails',
  173. data() {
  174. return {
  175. orderMsg: {},
  176. itemlist: {},
  177. status: 0,
  178. deliveryfalse: false,
  179. ReturnDetailData: [],
  180. images: '',
  181. afterId: '',
  182. orderId: '',
  183. ifShow: false
  184. }
  185. },
  186. onLoad(options) {
  187. this.orderMsg = JSON.parse(options.item)
  188. this.getReturnDetail()
  189. },
  190. methods: {
  191. getReturnDetail() {
  192. getReturnDetailByIdApi({
  193. afterId: this.orderMsg.afterId,
  194. orderId: this.orderMsg.orderId
  195. }).then((res) => {
  196. this.status = res.data.afterState
  197. this.itemlist = res.data
  198. this.ifShow = true
  199. })
  200. },
  201. cancelRefundTap() {
  202. uni.showLoading({
  203. title: '正在撤销退货...'
  204. })
  205. updateCancelReturnGoodsApi({
  206. afterId: this.orderMsg.afterId,
  207. orderId: this.orderMsg.orderId
  208. }).then((res) => {
  209. uni.hideLoading()
  210. uni.showToast({
  211. title: '撤销成功'
  212. })
  213. this.$switchTab('/')
  214. })
  215. .catch((e) => {
  216. uni.hideLoading()
  217. })
  218. },
  219. // 平台介入
  220. platform(afterId, orderId) {
  221. uni.navigateTo({
  222. url: `/another-tf/another-serve/platformJoin/index?afterId=${afterId}&orderId=${orderId}`
  223. })
  224. }
  225. }
  226. }
  227. </script>
  228. <style lang="less" scoped>
  229. page {
  230. background: #f8f8f8;
  231. }
  232. .order-details-status {
  233. width: 100%;
  234. height: 302upx;
  235. background-color: #333333;
  236. background-size: contain;
  237. }
  238. .status-title-box {
  239. display: flex;
  240. flex-direction: row;
  241. align-items: center;
  242. justify-content: space-between;
  243. padding: 40upx 30upx 0;
  244. box-sizing: border-box;
  245. }
  246. .reason {
  247. padding-left: 32rpx;
  248. color: #FFFFFF;
  249. }
  250. .status-title-box .l {
  251. display: flex;
  252. flex-direction: column;
  253. }
  254. .status-title-box .l .status {
  255. font-size: 30upx;
  256. color: #fff;
  257. }
  258. .status-title-box .l .label {
  259. font-size: 24upx;
  260. color: #fff;
  261. margin-top: 14upx;
  262. }
  263. .order-details-info-box {
  264. padding: 0 30upx;
  265. box-sizing: border-box;
  266. background: #fff;
  267. }
  268. .order-details-info-box.mt20 {
  269. margin-top: 20upx;
  270. }
  271. .order-details-price {
  272. display: flex;
  273. flex-direction: row;
  274. align-items: center;
  275. justify-content: space-between;
  276. height: 100upx;
  277. border-bottom: 1px solid #e5e5e5;
  278. font-size: 30upx;
  279. color: #333;
  280. }
  281. .order-details-price .price-box {
  282. font-size: 36upx;
  283. color: #C83732;
  284. }
  285. .order-details-price .fuhao {
  286. font-size: 24upx;
  287. }
  288. .address-box {
  289. background: #fff;
  290. padding: 30upx 0;
  291. box-sizing: border-box;
  292. display: flex;
  293. flex-direction: column;
  294. font-size: 28upx;
  295. color: #333;
  296. border-bottom: 1px solid #e5e5e5;
  297. }
  298. .address-box .address-info-r .title {
  299. display: inline-block;
  300. width: 100upx;
  301. text-align: justify;
  302. text-justify: distribute-all-lines;
  303. text-align-last: justify;
  304. }
  305. .return-explain-btn {
  306. display: flex;
  307. flex-direction: row;
  308. align-items: center;
  309. justify-content: flex-end;
  310. margin-top: 20upx;
  311. }
  312. .negotiate {
  313. padding-bottom: 20rpx;
  314. background: #FFFFFF;
  315. }
  316. .return-explain-btn .btn {
  317. width: 130upx;
  318. height: 56upx;
  319. background: #fff;
  320. border: 1px solid #bbb;
  321. border-radius: 4upx;
  322. text-align: center;
  323. line-height: 56upx;
  324. margin-left: 20upx;
  325. color: #333;
  326. font-size: 26upx;
  327. }
  328. .return-explain-btn .btn.on {
  329. color: #ff7911;
  330. border: 1px solid #ff7911;
  331. }
  332. .order-list-box {
  333. margin-top: 20upx;
  334. }
  335. .orderLineBox {
  336. padding: 0 30rpx;
  337. background: #FFFFFF;
  338. }
  339. .order-list-box .title {
  340. padding: 30upx;
  341. box-sizing: border-box;
  342. font-size: 30upx;
  343. color: #333;
  344. background: #fff;
  345. }
  346. .order-list-box .item {
  347. margin-bottom: 20upx;
  348. background: #fff;
  349. border-radius: 10upx;
  350. }
  351. .order-info-box {
  352. padding: 0 30upx;
  353. box-sizing: border-box;
  354. }
  355. .order-info {
  356. border-bottom: 1px solid #eee;
  357. }
  358. .order-info-item {
  359. display: flex;
  360. flex-direction: row;
  361. padding: 20upx 0;
  362. }
  363. .product-img {
  364. width: 180upx;
  365. height: 180upx;
  366. border-radius: 10upx;
  367. margin-right: 30upx;
  368. }
  369. .info-box {
  370. flex: 1;
  371. display: flex;
  372. flex-direction: column;
  373. }
  374. .product-name {
  375. font-size: 26upx;
  376. color: #333;
  377. height: 68upx;
  378. line-height: 34upx;
  379. display: -webkit-box;
  380. overflow: hidden;
  381. text-overflow: ellipsis;
  382. word-break: break-all;
  383. -webkit-box-orient: vertical;
  384. -webkit-line-clamp: 2;
  385. }
  386. .product-sku {
  387. font-size: 24upx;
  388. color: #999;
  389. }
  390. .delivery-way-box {
  391. display: flex;
  392. flex-direction: column;
  393. margin: 30upx 0 10upx;
  394. }
  395. .delivery-way-box .item {
  396. display: flex;
  397. flex-direction: row;
  398. align-items: center;
  399. font-size: 26upx;
  400. color: #333;
  401. }
  402. .delivery-way-box .item .way {
  403. color: #999;
  404. }
  405. .order-desc {
  406. color: rgb(150, 150, 150);
  407. font-size: 28rpx;
  408. margin-bottom: 6rpx;
  409. }
  410. .order-time {
  411. color: rgb(200, 200, 200);
  412. font-size: 26rpx;
  413. }
  414. </style>