refundOrderDetail.vue 15 KB

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