refundOrderDetail.vue 15 KB

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