refundOrderDetail.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641
  1. <template>
  2. <view>
  3. <view class="top-cont">
  4. <!-- 背景图片 -->
  5. <view class="bg-color"></view>
  6. <!-- <image class="bg" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/images/order_top_bg.png" mode=""></image> -->
  7. <view class="top-inner">
  8. <!-- 这里是状态栏 -->
  9. <view class="fixed-top-box">
  10. <view class="status_bar" :style="{height: statusBarHeight}"></view>
  11. <view class="back-box" @click="back">
  12. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/images/back_white.png" mode=""></image>
  13. <text class="title">售后详情</text>
  14. <text></text>
  15. </view>
  16. </view>
  17. <!-- 顶部固定后站位元素 -->
  18. <view style="padding-bottom: 88upx;">
  19. <view :style="{height: statusBarHeight}"></view>
  20. </view>
  21. <!-- 订单状态 -->
  22. <view class="order-status" >
  23. <!-- 处理中 -->
  24. <view v-if="sales.salesStatus == 0" class="inner">
  25. <view class="img-box">
  26. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/images/deal96.png" mode=""></image>
  27. </view>
  28. <view class="status-box">
  29. <text class="status">售后中</text>
  30. <text class="desc">请等待客服处理...</text>
  31. </view>
  32. </view>
  33. <view v-if="sales.salesStatus == 1" class="inner">
  34. <view class="img-box">
  35. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/images/close_trade.png" mode=""></image>
  36. </view>
  37. <view class="status-box">
  38. <text class="status">售后取消</text>
  39. <text class="desc">用户已取消售后</text>
  40. </view>
  41. </view>
  42. <view v-if="sales.salesStatus == 2" class="inner">
  43. <view class="img-box">
  44. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/images/close_trade.png" mode=""></image>
  45. </view>
  46. <view class="status-box">
  47. <text class="status">售后取消</text>
  48. <text class="desc">商家已拒绝...</text>
  49. </view>
  50. </view>
  51. <!-- 退款成功 -->
  52. <view v-if="sales.salesStatus == 3" class="inner">
  53. <view class="img-box">
  54. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/images/compel96.png" mode=""></image>
  55. </view>
  56. <view class="status-box">
  57. <text class="status">退款成功</text>
  58. <text class="desc">已退款,退款金额将按原支付退回</text>
  59. </view>
  60. </view>
  61. </view>
  62. <!-- 退款信息 -->
  63. <view class="refund-info">
  64. <view class="inner">
  65. <view class="title-box">
  66. <view class="left">
  67. <text class="title">退款金额</text>
  68. <view class="price-box">
  69. <text class="unit">¥</text>
  70. <text class="num" v-if="sales.refundAmount!=null">{{sales.refundAmount.toFixed(2)}}</text>
  71. </view>
  72. </view>
  73. <view class="right">
  74. <text class="text" v-if="sales.salesStatus==0">
  75. <text class="text success">{{$getDictLabelName("storeAfterSalesStatus",sales.status)}}</text>
  76. </text>
  77. </view>
  78. </view>
  79. <view class="refund-item" v-if="sales.status>=1&&sales.serviceType==1">
  80. <view class="text">收件人:{{sales.consignee}} </view>
  81. <view class="text">电话:{{sales.address}} </view>
  82. <view class="text">收件地址:{{sales.phoneNumber}}</view>
  83. </view>
  84. <view class="btn-box" v-if="sales.salesStatus==0" >
  85. <view v-if="sales.status==1" class="btn cancel" @click="addDeliverySn()" >填写物流</view>
  86. <view v-if="sales.status==0||sales.status==1" class="btn cancel" @click="revoke()" >撤销申请</view>
  87. <!-- <view class="btn cancel" @click="showLogs()" >查看进度</view> -->
  88. </view>
  89. <view class="refund-item" v-if="sales.status==0">
  90. <view class="text">已提交等待平台审核 </view>
  91. </view>
  92. <view class="refund-item" v-if="sales.status==1">
  93. <view class="text">平台已审核,等待用户发货 </view>
  94. </view>
  95. <view class="refund-item" v-if="sales.status==2">
  96. <view class="text">用户已发货,等待仓库审核 </view>
  97. </view>
  98. <view class="refund-item" v-if="sales.status==3">
  99. <view class="text">财务审核 </view>
  100. </view>
  101. <view class="refund-item" v-if="sales.status==4">
  102. <view class="text">已完成 </view>
  103. </view>
  104. </view>
  105. </view>
  106. <view class="content">
  107. <!-- 退货信息 -->
  108. <view class="return-info">
  109. <!-- <view class="title-box">
  110. <text class="label">退货信息</text>
  111. <text class="ret-num">共2件</text>
  112. </view> -->
  113. <!-- 退货列表 -->
  114. <view class="goods-list">
  115. <view v-for="(item,index) in items" :key="index" class="item">
  116. <view class="img-box">
  117. <image :src="item.imgUrl" mode="aspectFill"></image>
  118. </view>
  119. <view class="info-box">
  120. <view>
  121. <view class="title ellipsis2">{{item.goodsName||''}}</view>
  122. <!-- <view class="spec">规格:{{JSON.parse(item.jsonInfo).sku}}</view> -->
  123. </view>
  124. <view class="num-box">
  125. <view class="price">
  126. <text class="num" >{{item.integral}}</text>
  127. <text class="unit">积分</text>
  128. <text class="num" v-if="item.cash>0">+{{item.cash}}</text>
  129. <text class="unit" v-if="item.cash>0">元</text>
  130. </view>
  131. <view class="amount">x{{item.num}}</view>
  132. </view>
  133. </view>
  134. </view>
  135. <!-- 详细信息 -->
  136. <view class="refund-det-info">
  137. <view class="det-item">
  138. <text class="label">退货原因</text>
  139. <text class="text">{{sales.reasons}}</text>
  140. </view>
  141. <view class="det-item">
  142. <text class="label">退货说明</text>
  143. <text class="text">{{sales.explains}}</text>
  144. </view>
  145. <view class="det-item">
  146. <text class="label">退款金额</text>
  147. <text class="text" v-if="sales.refundAmount!=null">¥{{sales.refundAmount.toFixed(2)}}</text>
  148. </view>
  149. <view class="det-item">
  150. <text class="label">退还积分</text>
  151. <text class="text" v-if="sales.refundIntegral!=null">¥{{sales.refundIntegral||0}}</text>
  152. </view>
  153. <view class="det-item">
  154. <text class="label">订单编号</text>
  155. <view class="sn-box">
  156. <text class="text">{{sales.orderCode}}</text>
  157. <view class="copy-btn" @click="copyOrderSn(sales.orderCode)">复制</view>
  158. </view>
  159. </view>
  160. <view class="det-item">
  161. <text class="label">申请时间</text>
  162. <text class="text">{{sales.createTime}}</text>
  163. </view>
  164. </view>
  165. </view>
  166. </view>
  167. </view>
  168. </view>
  169. </view>
  170. </view>
  171. </template>
  172. <script>
  173. import {getAfterSalesDetails,revoke} from '../api/integralAfterSales.js'
  174. export default {
  175. data() {
  176. return {
  177. modalTitle:"请输入快递单号",
  178. sales:{},
  179. items:[],
  180. salesId:null,
  181. // 状态栏的高度
  182. statusBarHeight: uni.getStorageSync('menuInfo').statusBarHeight,
  183. };
  184. },
  185. onLoad(option) {
  186. this.salesId = option.salesId
  187. },
  188. onShow() {
  189. this.getAfterSalesDetails()
  190. },
  191. methods: {
  192. // 复制订单编号
  193. copyOrderSn(text) {
  194. // 复制方法
  195. uni.setClipboardData({
  196. data:text,
  197. success:()=>{
  198. uni.showToast({
  199. title:'内容已成功复制到剪切板',
  200. icon:'none'
  201. })
  202. }
  203. });
  204. },
  205. addDeliverySn(){
  206. uni.navigateTo({
  207. url: './refundOrderDelivery?salesId=' + this.salesId
  208. })
  209. },
  210. revoke(){
  211. var data={id:this.salesId};
  212. revoke(data).then(res => {
  213. if(res.code==200){
  214. uni.showToast({
  215. icon:'success',
  216. title:'操作成功'
  217. });
  218. setTimeout(function() {
  219. uni.$emit('refreshAfterSales');
  220. uni.navigateBack({
  221. delta: 1
  222. })
  223. }, 500);
  224. }else{
  225. uni.showToast({
  226. icon:'none',
  227. title: res.msg
  228. });
  229. }
  230. });
  231. },
  232. getAfterSalesDetails() {
  233. //联网加载数据
  234. var that = this;
  235. var data = {
  236. salesId:this.salesId,
  237. };
  238. getAfterSalesDetails(data).then(res => {
  239. if(res.code==200){
  240. //设置列表数据
  241. this.sales=res.sales;
  242. this.items=res.items;
  243. }else{
  244. uni.showToast({
  245. icon:'none',
  246. title: res.msg
  247. });
  248. }
  249. });
  250. },
  251. // 返回上一页
  252. back() {
  253. uni.navigateBack()
  254. },
  255. showLogs(status) {
  256. uni.navigateTo({
  257. url: './refundOrderLogs?orderStatus=' + status
  258. })
  259. },
  260. }
  261. }
  262. </script>
  263. <style lang="scss">
  264. .bg-color {
  265. width: 100%;
  266. background: linear-gradient(to right, #2583EB 0%, #60CDC3 100%);
  267. height: 450rpx;
  268. }
  269. .fixed-top-box{
  270. width: 100%;
  271. background: linear-gradient(to right, #2583EB 0%, #60CDC3 100%);
  272. position: fixed;
  273. top: 0;
  274. left: 0;
  275. z-index: 1000;
  276. }
  277. .top-cont{
  278. width: 100%;
  279. height: 500upx;
  280. position: relative;
  281. .bg{
  282. width: 100%;
  283. height: 100%;
  284. position: absolute;
  285. top: 0;
  286. left: 0;
  287. z-index: 1;
  288. }
  289. .top-inner{
  290. width: 100%;
  291. height: 100%;
  292. position: absolute;
  293. top: 0;
  294. left: 0;
  295. z-index: 2;
  296. .back-box{
  297. height: 88upx;
  298. padding-left: 22upx;
  299. display: flex;
  300. align-items: center;
  301. justify-content: space-between;
  302. padding: 0 20upx;
  303. image{
  304. width: 40upx;
  305. height: 40upx;
  306. }
  307. .title{
  308. font-size: 36upx;
  309. font-family: PingFang SC;
  310. font-weight: 500;
  311. color: #FFFFFF;
  312. }
  313. }
  314. .order-status{
  315. margin-top: 60upx;
  316. display: flex;
  317. align-items: center;
  318. justify-content: space-between;
  319. padding: 0 30upx;
  320. .inner{
  321. display: flex;
  322. align-items: center;
  323. .img-box{
  324. width: 96upx;
  325. height: 96upx;
  326. margin-right: 30upx;
  327. image{
  328. width: 100%;
  329. height: 100%;
  330. }
  331. }
  332. .status-box{
  333. height: 96upx;
  334. display: flex;
  335. flex-direction: column;
  336. justify-content: center;
  337. .status{
  338. font-size: 40upx;
  339. font-family: PingFang SC;
  340. font-weight: bold;
  341. color: #FFFFFF;
  342. line-height: 1;
  343. }
  344. .desc{
  345. font-size: 26upx;
  346. font-family: PingFang SC;
  347. font-weight: 500;
  348. color: #FFFFFF;
  349. line-height: 1;
  350. margin-top: 30upx;
  351. }
  352. .det-box{
  353. display: flex;
  354. align-items: center;
  355. image{
  356. width: 14upx;
  357. height: 24upx;
  358. margin-left: 12upx;
  359. margin-top: 30upx;
  360. }
  361. }
  362. }
  363. }
  364. }
  365. .refund-info{
  366. margin-top: 50upx;
  367. padding: 0 20upx;
  368. .inner{
  369. background: #FFFFFF;
  370. border-radius: 16upx;
  371. padding: 0 30upx 15upx 30upx;
  372. .title-box{
  373. height: 88upx;
  374. border-bottom: 1px solid #F0F0F0;
  375. display: flex;
  376. align-items: center;
  377. justify-content: space-between;
  378. .left{
  379. display: flex;
  380. align-items: center;
  381. .title{
  382. font-size: 30upx;
  383. font-family: PingFang SC;
  384. font-weight: bold;
  385. color: #333333;
  386. line-height: 1;
  387. margin-right: 20upx;
  388. }
  389. .price-box{
  390. display: flex;
  391. align-items: flex-end;
  392. .unit{
  393. font-size: 24upx;
  394. font-family: PingFang SC;
  395. font-weight: 500;
  396. color: #FF6633;
  397. line-height: 1.2;
  398. margin-right: 4upx;
  399. }
  400. .num{
  401. font-size: 32upx;
  402. font-family: PingFang SC;
  403. font-weight: bold;
  404. color: #FF6633;
  405. line-height: 1;
  406. }
  407. }
  408. }
  409. .right{
  410. display: flex;
  411. align-items: center;
  412. .text{
  413. font-size: 24upx;
  414. font-family: PingFang SC;
  415. font-weight: 500;
  416. color: #999999;
  417. line-height: 1;
  418. margin-right: 10upx;
  419. }
  420. image{
  421. width: 12upx;
  422. height: 22upx;
  423. }
  424. }
  425. }
  426. .refund-item{
  427. margin-top: 40upx;
  428. .text{
  429. margin-bottom: 10upx;
  430. font-size: 26upx;
  431. font-family: PingFang SC;
  432. font-weight: 500;
  433. color: #666666;
  434. line-height: 1;
  435. }
  436. }
  437. }
  438. }
  439. }
  440. }
  441. .content{
  442. padding: 0 20upx 20upx;
  443. .return-info{
  444. margin-top: 30upx;
  445. background: #FFFFFF;
  446. border-radius: 16upx;
  447. .title-box{
  448. height: 88upx;
  449. padding: 0 30upx;
  450. display: flex;
  451. align-items: center;
  452. justify-content: space-between;
  453. .label{
  454. font-size: 30upx;
  455. font-family: PingFang SC;
  456. font-weight: bold;
  457. color: #333333;
  458. }
  459. .ret-num{
  460. font-size: 26upx;
  461. font-family: PingFang SC;
  462. font-weight: 500;
  463. color: #999999;
  464. }
  465. }
  466. .goods-list{
  467. padding: 0 30upx;
  468. background-color: #FFFFFF;
  469. border-radius: 16upx;
  470. .item{
  471. padding: 30upx 0;
  472. border-bottom: 1px solid #EDEEEF;
  473. display: flex;
  474. align-items: center;
  475. .img-box{
  476. width: 160upx;
  477. height: 160upx;
  478. margin-right: 30upx;
  479. image{
  480. width: 100%;
  481. height: 100%;
  482. }
  483. }
  484. .info-box{
  485. width: calc(100% - 190upx);
  486. height: 160upx;
  487. display: flex;
  488. flex-direction: column;
  489. justify-content: space-between;
  490. .title{
  491. font-size: 28upx;
  492. font-family: PingFang SC;
  493. font-weight: 500;
  494. color: #333333;
  495. line-height: 36upx;
  496. .tag{
  497. display: inline-block;
  498. padding: 0 6upx;
  499. height: 30upx;
  500. background: linear-gradient(90deg, #2583EB 0%, #2BC7A4 100%);
  501. border-radius: 4upx;
  502. margin-right: 10upx;
  503. font-size: 22upx;
  504. font-family: PingFang SC;
  505. font-weight: bold;
  506. color: #FFFFFF;
  507. line-height: 30upx;
  508. float: left;
  509. margin-top: 7upx;
  510. }
  511. }
  512. .spec{
  513. margin-top: 18upx;
  514. font-size: 24upx;
  515. font-family: PingFang SC;
  516. font-weight: 500;
  517. color: #999999;
  518. line-height: 1;
  519. }
  520. .num-box{
  521. display: flex;
  522. align-items: center;
  523. justify-content: space-between;
  524. .price{
  525. display: flex;
  526. align-items: flex-end;
  527. .unit{
  528. font-size: 24upx;
  529. font-family: PingFang SC;
  530. font-weight: 500;
  531. color: #111111;
  532. line-height: 1.2;
  533. margin-right: 4upx;
  534. }
  535. .num{
  536. font-size: 32upx;
  537. font-family: PingFang SC;
  538. font-weight: 500;
  539. color: #111111;
  540. line-height: 1;
  541. }
  542. }
  543. .amount{
  544. font-size: 24upx;
  545. font-family: PingFang SC;
  546. font-weight: 500;
  547. color: #999999;
  548. line-height: 1;
  549. }
  550. }
  551. }
  552. }
  553. .refund-det-info{
  554. padding-bottom: 30upx;
  555. .det-item{
  556. margin-top: 40upx;
  557. display: flex;
  558. align-items: center;
  559. justify-content: space-between;
  560. .label{
  561. font-size: 26upx;
  562. font-family: PingFang SC;
  563. font-weight: 500;
  564. color: #666666;
  565. line-height: 1;
  566. }
  567. .text{
  568. font-size: 26upx;
  569. font-family: PingFang SC;
  570. font-weight: 500;
  571. color: #222222;
  572. line-height: 1;
  573. }
  574. }
  575. .sn-box{
  576. display: flex;
  577. align-items: center;
  578. .copy-btn{
  579. width: 58upx;
  580. height: 32upx;
  581. line-height: 32upx;
  582. text-align: center;
  583. font-size: 22upx;
  584. font-family: PingFang SC;
  585. font-weight: 500;
  586. color: #222222;
  587. background: #F5F5F5;
  588. border-radius: 4upx;
  589. margin-left: 24upx;
  590. }
  591. }
  592. }
  593. }
  594. }
  595. }
  596. .btn-box{
  597. margin-top: 15upx;
  598. box-sizing: border-box;
  599. display: flex;
  600. align-items: center;
  601. justify-content: flex-end;
  602. .btn{
  603. width: 155upx;
  604. height: 64upx;
  605. line-height: 64upx;
  606. font-size: 26upx;
  607. font-family: PingFang SC;
  608. font-weight: 500;
  609. text-align: center;
  610. border-radius: 32upx;
  611. margin-left: 15upx;
  612. &:first-child{
  613. margin-left: 0;
  614. }
  615. &.cancel{
  616. border: 1px solid #DDDDDD;
  617. color: #666666;
  618. }
  619. }
  620. }
  621. </style>