refundOrderDetail.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616
  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-if="sales!=null&&sales.isPackage!=1" v-for="(item,index) in items" :key="index" class="item">
  116. <view class="img-box">
  117. <image :src="JSON.parse(item.jsonInfo).image" mode="aspectFill"></image>
  118. </view>
  119. <view class="info-box">
  120. <view>
  121. <view class="title ellipsis2">{{JSON.parse(item.jsonInfo).commonName&&JSON.parse(item.jsonInfo).commonName!=='-'?JSON.parse(item.jsonInfo).commonName:JSON.parse(item.jsonInfo).productName}}</view>
  122. <view class="spec">规格:{{JSON.parse(item.jsonInfo).sku}}</view>
  123. </view>
  124. <view class="price-num">
  125. <view class="price">
  126. <text class="unit">¥</text>
  127. <text class="num">{{JSON.parse(item.jsonInfo).price.toFixed(2)}}</text>
  128. </view>
  129. <view class="num">x{{JSON.parse(item.jsonInfo).num}}</view>
  130. </view>
  131. </view>
  132. </view>
  133. <view v-if="sales!=null&&sales.isPackage==1" class="item">
  134. <view class="img-box">
  135. <image :src="JSON.parse(sales.packageJson).imgUrl" mode="aspectFill"></image>
  136. </view>
  137. <view class="info-box">
  138. <view>
  139. <view class="title ellipsis2">
  140. <!-- <view class="tag">处方药</view> -->
  141. <view class="tag">套餐</view>{{JSON.parse(sales.packageJson).title}}
  142. </view>
  143. <view class="spec">{{JSON.parse(sales.packageJson).descs}}</view>
  144. </view>
  145. </view>
  146. </view>
  147. <!-- 详细信息 -->
  148. <view class="refund-det-info">
  149. <view class="det-item">
  150. <text class="label">退货原因</text>
  151. <text class="text">{{sales.reasons}}</text>
  152. </view>
  153. <view class="det-item">
  154. <text class="label">退货说明</text>
  155. <text class="text">{{sales.explains}}</text>
  156. </view>
  157. <view class="det-item">
  158. <text class="label">退款金额</text>
  159. <text class="text" v-if="sales.refundAmount!=null">¥{{sales.refundAmount.toFixed(2)}}</text>
  160. </view>
  161. <view class="det-item">
  162. <text class="label">订单编号</text>
  163. <text class="text">{{sales.orderCode}}</text>
  164. </view>
  165. <view class="det-item">
  166. <text class="label">申请时间</text>
  167. <text class="text">{{sales.createTime}}</text>
  168. </view>
  169. </view>
  170. </view>
  171. </view>
  172. </view>
  173. </view>
  174. </view>
  175. </view>
  176. </template>
  177. <script>
  178. import {getAfterSalesDetails,revoke} from '../api/storeAfterSales.js'
  179. export default {
  180. data() {
  181. return {
  182. modalTitle:"请输入快递单号",
  183. sales:{},
  184. items:[],
  185. salesId:null,
  186. // 状态栏的高度
  187. statusBarHeight: uni.getStorageSync('menuInfo').statusBarHeight,
  188. };
  189. },
  190. onLoad(option) {
  191. this.salesId = option.salesId
  192. },
  193. onShow() {
  194. this.getAfterSalesDetails()
  195. },
  196. methods: {
  197. addDeliverySn(){
  198. uni.navigateTo({
  199. url: './refundOrderDelivery?salesId=' + this.salesId
  200. })
  201. },
  202. revoke(){
  203. var data={salesId:this.salesId};
  204. revoke(data).then(res => {
  205. if(res.code==200){
  206. uni.showToast({
  207. icon:'success',
  208. title:'操作成功'
  209. });
  210. setTimeout(function() {
  211. uni.$emit('refreshAfterSales');
  212. uni.navigateBack({
  213. delta: 1
  214. })
  215. }, 500);
  216. }else{
  217. uni.showToast({
  218. icon:'none',
  219. title: res.msg
  220. });
  221. }
  222. });
  223. },
  224. getAfterSalesDetails() {
  225. //联网加载数据
  226. var that = this;
  227. var data = {
  228. salesId:this.salesId,
  229. };
  230. getAfterSalesDetails(data).then(res => {
  231. if(res.code==200){
  232. //设置列表数据
  233. this.sales=res.sales;
  234. this.items=res.items;
  235. }else{
  236. uni.showToast({
  237. icon:'none',
  238. title: res.msg
  239. });
  240. }
  241. });
  242. },
  243. // 返回上一页
  244. back() {
  245. uni.navigateBack()
  246. },
  247. showLogs(status) {
  248. uni.navigateTo({
  249. url: './refundOrderLogs?orderStatus=' + status
  250. })
  251. },
  252. }
  253. }
  254. </script>
  255. <style lang="scss">
  256. .bg-color {
  257. width: 100%;
  258. background: linear-gradient(to right, #2583EB 0%, #60CDC3 100%);
  259. height: 450rpx;
  260. }
  261. .fixed-top-box{
  262. width: 100%;
  263. background: linear-gradient(to right, #2583EB 0%, #60CDC3 100%);
  264. position: fixed;
  265. top: 0;
  266. left: 0;
  267. z-index: 1000;
  268. }
  269. .top-cont{
  270. width: 100%;
  271. height: 500upx;
  272. position: relative;
  273. .bg{
  274. width: 100%;
  275. height: 100%;
  276. position: absolute;
  277. top: 0;
  278. left: 0;
  279. z-index: 1;
  280. }
  281. .top-inner{
  282. width: 100%;
  283. height: 100%;
  284. position: absolute;
  285. top: 0;
  286. left: 0;
  287. z-index: 2;
  288. .back-box{
  289. height: 88upx;
  290. padding-left: 22upx;
  291. display: flex;
  292. align-items: center;
  293. justify-content: space-between;
  294. padding: 0 20upx;
  295. image{
  296. width: 40upx;
  297. height: 40upx;
  298. }
  299. .title{
  300. font-size: 36upx;
  301. font-family: PingFang SC;
  302. font-weight: 500;
  303. color: #FFFFFF;
  304. }
  305. }
  306. .order-status{
  307. margin-top: 60upx;
  308. display: flex;
  309. align-items: center;
  310. justify-content: space-between;
  311. padding: 0 30upx;
  312. .inner{
  313. display: flex;
  314. align-items: center;
  315. .img-box{
  316. width: 96upx;
  317. height: 96upx;
  318. margin-right: 30upx;
  319. image{
  320. width: 100%;
  321. height: 100%;
  322. }
  323. }
  324. .status-box{
  325. height: 96upx;
  326. display: flex;
  327. flex-direction: column;
  328. justify-content: center;
  329. .status{
  330. font-size: 40upx;
  331. font-family: PingFang SC;
  332. font-weight: bold;
  333. color: #FFFFFF;
  334. line-height: 1;
  335. }
  336. .desc{
  337. font-size: 26upx;
  338. font-family: PingFang SC;
  339. font-weight: 500;
  340. color: #FFFFFF;
  341. line-height: 1;
  342. margin-top: 30upx;
  343. }
  344. .det-box{
  345. display: flex;
  346. align-items: center;
  347. image{
  348. width: 14upx;
  349. height: 24upx;
  350. margin-left: 12upx;
  351. margin-top: 30upx;
  352. }
  353. }
  354. }
  355. }
  356. }
  357. .refund-info{
  358. margin-top: 50upx;
  359. padding: 0 20upx;
  360. .inner{
  361. background: #FFFFFF;
  362. border-radius: 16upx;
  363. padding: 0 30upx 15upx 30upx;
  364. .title-box{
  365. height: 88upx;
  366. border-bottom: 1px solid #F0F0F0;
  367. display: flex;
  368. align-items: center;
  369. justify-content: space-between;
  370. .left{
  371. display: flex;
  372. align-items: center;
  373. .title{
  374. font-size: 30upx;
  375. font-family: PingFang SC;
  376. font-weight: bold;
  377. color: #333333;
  378. line-height: 1;
  379. margin-right: 20upx;
  380. }
  381. .price-box{
  382. display: flex;
  383. align-items: flex-end;
  384. .unit{
  385. font-size: 24upx;
  386. font-family: PingFang SC;
  387. font-weight: 500;
  388. color: #FF6633;
  389. line-height: 1.2;
  390. margin-right: 4upx;
  391. }
  392. .num{
  393. font-size: 32upx;
  394. font-family: PingFang SC;
  395. font-weight: bold;
  396. color: #FF6633;
  397. line-height: 1;
  398. }
  399. }
  400. }
  401. .right{
  402. display: flex;
  403. align-items: center;
  404. .text{
  405. font-size: 24upx;
  406. font-family: PingFang SC;
  407. font-weight: 500;
  408. color: #999999;
  409. line-height: 1;
  410. margin-right: 10upx;
  411. }
  412. image{
  413. width: 12upx;
  414. height: 22upx;
  415. }
  416. }
  417. }
  418. .refund-item{
  419. margin-top: 40upx;
  420. .text{
  421. margin-bottom: 10upx;
  422. font-size: 26upx;
  423. font-family: PingFang SC;
  424. font-weight: 500;
  425. color: #666666;
  426. line-height: 1;
  427. }
  428. }
  429. }
  430. }
  431. }
  432. }
  433. .content{
  434. padding: 0 20upx 20upx;
  435. .return-info{
  436. margin-top: 30upx;
  437. background: #FFFFFF;
  438. border-radius: 16upx;
  439. .title-box{
  440. height: 88upx;
  441. padding: 0 30upx;
  442. display: flex;
  443. align-items: center;
  444. justify-content: space-between;
  445. .label{
  446. font-size: 30upx;
  447. font-family: PingFang SC;
  448. font-weight: bold;
  449. color: #333333;
  450. }
  451. .ret-num{
  452. font-size: 26upx;
  453. font-family: PingFang SC;
  454. font-weight: 500;
  455. color: #999999;
  456. }
  457. }
  458. .goods-list{
  459. padding: 0 30upx;
  460. background-color: #FFFFFF;
  461. border-radius: 16upx;
  462. .item{
  463. padding: 30upx 0;
  464. border-bottom: 1px solid #EDEEEF;
  465. display: flex;
  466. align-items: center;
  467. .img-box{
  468. width: 160upx;
  469. height: 160upx;
  470. margin-right: 30upx;
  471. image{
  472. width: 100%;
  473. height: 100%;
  474. }
  475. }
  476. .info-box{
  477. width: calc(100% - 190upx);
  478. height: 160upx;
  479. display: flex;
  480. flex-direction: column;
  481. justify-content: space-between;
  482. .title{
  483. font-size: 28upx;
  484. font-family: PingFang SC;
  485. font-weight: 500;
  486. color: #333333;
  487. line-height: 36upx;
  488. .tag{
  489. display: inline-block;
  490. padding: 0 6upx;
  491. height: 30upx;
  492. background: linear-gradient(90deg, #2583EB 0%, #2BC7A4 100%);
  493. border-radius: 4upx;
  494. margin-right: 10upx;
  495. font-size: 22upx;
  496. font-family: PingFang SC;
  497. font-weight: bold;
  498. color: #FFFFFF;
  499. line-height: 30upx;
  500. float: left;
  501. margin-top: 7upx;
  502. }
  503. }
  504. .spec{
  505. margin-top: 18upx;
  506. font-size: 24upx;
  507. font-family: PingFang SC;
  508. font-weight: 500;
  509. color: #999999;
  510. line-height: 1;
  511. }
  512. .price-num{
  513. display: flex;
  514. align-items: center;
  515. justify-content: space-between;
  516. .price{
  517. display: flex;
  518. align-items: flex-end;
  519. .unit{
  520. font-size: 24upx;
  521. font-family: PingFang SC;
  522. font-weight: 500;
  523. color: #111111;
  524. line-height: 1.2;
  525. margin-right: 4upx;
  526. }
  527. .num{
  528. font-size: 32upx;
  529. font-family: PingFang SC;
  530. font-weight: 500;
  531. color: #111111;
  532. line-height: 1;
  533. }
  534. }
  535. .num{
  536. font-size: 24upx;
  537. font-family: PingFang SC;
  538. font-weight: 500;
  539. color: #999999;
  540. line-height: 1;
  541. }
  542. }
  543. }
  544. }
  545. .refund-det-info{
  546. padding-bottom: 30upx;
  547. .det-item{
  548. margin-top: 40upx;
  549. display: flex;
  550. align-items: center;
  551. justify-content: space-between;
  552. .label{
  553. font-size: 26upx;
  554. font-family: PingFang SC;
  555. font-weight: 500;
  556. color: #666666;
  557. line-height: 1;
  558. }
  559. .text{
  560. font-size: 26upx;
  561. font-family: PingFang SC;
  562. font-weight: 500;
  563. color: #222222;
  564. line-height: 1;
  565. }
  566. }
  567. }
  568. }
  569. }
  570. }
  571. .btn-box{
  572. margin-top: 15upx;
  573. box-sizing: border-box;
  574. display: flex;
  575. align-items: center;
  576. justify-content: flex-end;
  577. .btn{
  578. width: 155upx;
  579. height: 64upx;
  580. line-height: 64upx;
  581. font-size: 26upx;
  582. font-family: PingFang SC;
  583. font-weight: 500;
  584. text-align: center;
  585. border-radius: 32upx;
  586. margin-left: 15upx;
  587. &:first-child{
  588. margin-left: 0;
  589. }
  590. &.cancel{
  591. border: 1px solid #DDDDDD;
  592. color: #666666;
  593. }
  594. }
  595. }
  596. </style>