refundOrderDetail.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608
  1. <template>
  2. <view>
  3. <view class="top-cont">
  4. <!-- 背景图片 -->
  5. <view class="bgViewClass"></view>
  6. <view class="top-inner">
  7. <u-navbar bgColor="transparent" :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%, #FF233C 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. .bgViewClass{
  265. width: 100%;
  266. height: 100%;
  267. position: absolute;
  268. top: 0;
  269. left: 0;
  270. z-index: 1;
  271. background: linear-gradient(to bottom, #FF233C, #FFF5F5);;
  272. border-radius: 0 0 40rpx 40rpx;
  273. }
  274. .top-inner{
  275. width: 100%;
  276. height: 100%;
  277. position: absolute;
  278. top: 0;
  279. left: 0;
  280. z-index: 2;
  281. .back-box{
  282. height: 88upx;
  283. padding-left: 22upx;
  284. display: flex;
  285. align-items: center;
  286. justify-content: space-between;
  287. padding: 0 20upx;
  288. image{
  289. width: 40upx;
  290. height: 40upx;
  291. }
  292. .title{
  293. font-size: 36upx;
  294. font-family: PingFang SC;
  295. font-weight: 500;
  296. color: #FFFFFF;
  297. }
  298. }
  299. .order-status{
  300. margin-top: 60upx;
  301. display: flex;
  302. align-items: center;
  303. justify-content: space-between;
  304. padding: 0 30upx;
  305. .inner{
  306. display: flex;
  307. align-items: center;
  308. .img-box{
  309. width: 96upx;
  310. height: 96upx;
  311. margin-right: 30upx;
  312. image{
  313. width: 100%;
  314. height: 100%;
  315. }
  316. }
  317. .status-box{
  318. height: 96upx;
  319. display: flex;
  320. flex-direction: column;
  321. justify-content: center;
  322. .status{
  323. font-size: 40upx;
  324. font-family: PingFang SC;
  325. font-weight: bold;
  326. color: #FFFFFF;
  327. line-height: 1;
  328. }
  329. .desc{
  330. font-size: 26upx;
  331. font-family: PingFang SC;
  332. font-weight: 500;
  333. color: #FFFFFF;
  334. line-height: 1;
  335. margin-top: 30upx;
  336. }
  337. .det-box{
  338. display: flex;
  339. align-items: center;
  340. image{
  341. width: 14upx;
  342. height: 24upx;
  343. margin-left: 12upx;
  344. margin-top: 30upx;
  345. }
  346. }
  347. }
  348. }
  349. }
  350. .refund-info{
  351. margin-top: 50upx;
  352. padding: 0 20upx;
  353. .inner{
  354. background: #FFFFFF;
  355. border-radius: 16upx;
  356. padding: 0 30upx 15upx 30upx;
  357. .title-box{
  358. height: 88upx;
  359. border-bottom: 1px solid #F0F0F0;
  360. display: flex;
  361. align-items: center;
  362. justify-content: space-between;
  363. .left{
  364. display: flex;
  365. align-items: center;
  366. .title{
  367. font-size: 30upx;
  368. font-family: PingFang SC;
  369. font-weight: bold;
  370. color: #333333;
  371. line-height: 1;
  372. margin-right: 20upx;
  373. }
  374. .price-box{
  375. display: flex;
  376. align-items: flex-end;
  377. .unit{
  378. font-size: 24upx;
  379. font-family: PingFang SC;
  380. font-weight: 500;
  381. color: #FF6633;
  382. line-height: 1.2;
  383. margin-right: 4upx;
  384. }
  385. .num{
  386. font-size: 32upx;
  387. font-family: PingFang SC;
  388. font-weight: bold;
  389. color: #FF6633;
  390. line-height: 1;
  391. }
  392. }
  393. }
  394. .right{
  395. display: flex;
  396. align-items: center;
  397. .text{
  398. font-size: 24upx;
  399. font-family: PingFang SC;
  400. font-weight: 500;
  401. color: #999999;
  402. line-height: 1;
  403. margin-right: 10upx;
  404. }
  405. image{
  406. width: 12upx;
  407. height: 22upx;
  408. }
  409. }
  410. }
  411. .refund-item{
  412. margin-top: 40upx;
  413. .text{
  414. margin-bottom: 10upx;
  415. font-size: 26upx;
  416. font-family: PingFang SC;
  417. font-weight: 500;
  418. color: #666666;
  419. line-height: 1;
  420. }
  421. }
  422. }
  423. }
  424. }
  425. }
  426. .content{
  427. padding: 0 20upx 20upx;
  428. .return-info{
  429. margin-top: 30upx;
  430. background: #FFFFFF;
  431. border-radius: 16upx;
  432. .title-box{
  433. height: 88upx;
  434. padding: 0 30upx;
  435. display: flex;
  436. align-items: center;
  437. justify-content: space-between;
  438. .label{
  439. font-size: 30upx;
  440. font-family: PingFang SC;
  441. font-weight: bold;
  442. color: #333333;
  443. }
  444. .ret-num{
  445. font-size: 26upx;
  446. font-family: PingFang SC;
  447. font-weight: 500;
  448. color: #999999;
  449. }
  450. }
  451. .goods-list{
  452. padding: 0 30upx;
  453. background-color: #FFFFFF;
  454. border-radius: 16upx;
  455. .item{
  456. padding: 30upx 0;
  457. border-bottom: 1px solid #EDEEEF;
  458. display: flex;
  459. align-items: center;
  460. .img-box{
  461. width: 160upx;
  462. height: 160upx;
  463. margin-right: 30upx;
  464. image{
  465. width: 100%;
  466. height: 100%;
  467. }
  468. }
  469. .info-box{
  470. width: calc(100% - 190upx);
  471. height: 160upx;
  472. display: flex;
  473. flex-direction: column;
  474. justify-content: space-between;
  475. .title{
  476. font-size: 28upx;
  477. font-family: PingFang SC;
  478. font-weight: 500;
  479. color: #333333;
  480. line-height: 36upx;
  481. .tag{
  482. display: inline-block;
  483. padding: 0 6upx;
  484. height: 30upx;
  485. background: linear-gradient(90deg, #66b2ef 0%, #FF233C 100%);
  486. border-radius: 4upx;
  487. margin-right: 10upx;
  488. font-size: 22upx;
  489. font-family: PingFang SC;
  490. font-weight: bold;
  491. color: #FFFFFF;
  492. line-height: 30upx;
  493. float: left;
  494. margin-top: 7upx;
  495. }
  496. }
  497. .spec{
  498. margin-top: 18upx;
  499. font-size: 24upx;
  500. font-family: PingFang SC;
  501. font-weight: 500;
  502. color: #999999;
  503. line-height: 1;
  504. }
  505. .price-num{
  506. display: flex;
  507. align-items: center;
  508. justify-content: space-between;
  509. .price{
  510. display: flex;
  511. align-items: flex-end;
  512. .unit{
  513. font-size: 24upx;
  514. font-family: PingFang SC;
  515. font-weight: 500;
  516. color: #111111;
  517. line-height: 1.2;
  518. margin-right: 4upx;
  519. }
  520. .num{
  521. font-size: 32upx;
  522. font-family: PingFang SC;
  523. font-weight: 500;
  524. color: #111111;
  525. line-height: 1;
  526. }
  527. }
  528. .num{
  529. font-size: 24upx;
  530. font-family: PingFang SC;
  531. font-weight: 500;
  532. color: #999999;
  533. line-height: 1;
  534. }
  535. }
  536. }
  537. }
  538. .refund-det-info{
  539. padding-bottom: 30upx;
  540. .det-item{
  541. margin-top: 40upx;
  542. display: flex;
  543. align-items: center;
  544. justify-content: space-between;
  545. .label{
  546. font-size: 26upx;
  547. font-family: PingFang SC;
  548. font-weight: 500;
  549. color: #666666;
  550. line-height: 1;
  551. }
  552. .text{
  553. font-size: 26upx;
  554. font-family: PingFang SC;
  555. font-weight: 500;
  556. color: #222222;
  557. line-height: 1;
  558. }
  559. }
  560. }
  561. }
  562. }
  563. }
  564. .btn-box{
  565. margin-top: 15upx;
  566. box-sizing: border-box;
  567. display: flex;
  568. align-items: center;
  569. justify-content: flex-end;
  570. .btn{
  571. width: 155upx;
  572. height: 64upx;
  573. line-height: 64upx;
  574. font-size: 26upx;
  575. font-family: PingFang SC;
  576. font-weight: 500;
  577. text-align: center;
  578. border-radius: 32upx;
  579. margin-left: 15upx;
  580. &:first-child{
  581. margin-left: 0;
  582. }
  583. &.cancel{
  584. border: 1px solid #DDDDDD;
  585. color: #666666;
  586. }
  587. }
  588. }
  589. </style>