refundOrderDetail.vue 15 KB

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