refundOrderDetail.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621
  1. <template>
  2. <view>
  3. <view class="top-cont">
  4. <!-- 背景图片 -->
  5. <image class="bg" src="../../static/images/order_top_bg.png" mode=""></image>
  6. <view class="top-inner">
  7. <!-- 这里是状态栏 -->
  8. <view class="fixed-top-box">
  9. <view class="status_bar" :style="{height: statusBarHeight}"></view>
  10. <view class="back-box" @click="back">
  11. <image src="../../static/images/back_white.png" mode=""></image>
  12. <text class="title">售后详情</text>
  13. <text></text>
  14. </view>
  15. </view>
  16. <!-- 顶部固定后站位元素 -->
  17. <view style="padding-bottom: 88upx;">
  18. <view :style="{height: statusBarHeight}"></view>
  19. </view>
  20. <!-- 订单状态 -->
  21. <view class="order-status" >
  22. <!-- 处理中 -->
  23. <view v-if="sales.salesStatus == 0" class="inner">
  24. <view class="img-box">
  25. <image src="../../static/images/deal96.png" mode=""></image>
  26. </view>
  27. <view class="status-box">
  28. <text class="status">售后中</text>
  29. <text class="desc">请等待客服处理...</text>
  30. </view>
  31. </view>
  32. <view v-if="sales.salesStatus == 1" class="inner">
  33. <view class="img-box">
  34. <image src="../../static/images/close_trade.png" mode=""></image>
  35. </view>
  36. <view class="status-box">
  37. <text class="status">售后取消</text>
  38. <text class="desc">用户已取消售后</text>
  39. </view>
  40. </view>
  41. <view v-if="sales.salesStatus == 2" class="inner">
  42. <view class="img-box">
  43. <image src="../../static/images/close_trade.png" mode=""></image>
  44. </view>
  45. <view class="status-box">
  46. <text class="status">售后取消</text>
  47. <text class="desc">商家已拒绝...</text>
  48. </view>
  49. </view>
  50. <!-- 退款成功 -->
  51. <view v-if="sales.salesStatus == 3" class="inner">
  52. <view class="img-box">
  53. <image src="../../static/images/compel96.png" mode=""></image>
  54. </view>
  55. <view class="status-box">
  56. <text class="status">退款成功</text>
  57. <text class="desc">已退款,退款金额将按原支付退回</text>
  58. </view>
  59. </view>
  60. </view>
  61. <!-- 退款信息 -->
  62. <view class="refund-info">
  63. <view class="inner">
  64. <view class="title-box">
  65. <view class="left">
  66. <text class="title">退款金额</text>
  67. <view class="price-box">
  68. <text class="unit">¥</text>
  69. <text class="num" v-if="sales.refundAmount!=null">{{sales.refundAmount.toFixed(2)}}</text>
  70. </view>
  71. </view>
  72. <view class="right">
  73. <text class="text" v-if="sales.salesStatus==0">
  74. <text class="text success">{{utils.getDictLabelName("storeAfterSalesStatus",sales.status)}}</text>
  75. </text>
  76. </view>
  77. </view>
  78. <view class="refund-item" v-if="sales.status>=1&&sales.serviceType==1">
  79. <view class="text">收件人:{{sales.consignee}} </view>
  80. <view class="text">电话:{{sales.address}} </view>
  81. <view class="text">收件地址:{{sales.phoneNumber}}</view>
  82. </view>
  83. <view class="btn-box" v-if="sales.salesStatus==0" >
  84. <view v-if="sales.status==1" class="btn cancel" @click="addDeliverySn()" >填写物流</view>
  85. <view v-if="sales.status==0||sales.status==1" class="btn cancel" @click="revoke()" >撤销申请</view>
  86. <!-- <view class="btn cancel" @click="showLogs()" >查看进度</view> -->
  87. </view>
  88. <view class="refund-item" v-if="sales.status==0">
  89. <view class="text">已提交等待平台审核 </view>
  90. </view>
  91. <view class="refund-item" v-if="sales.status==1">
  92. <view class="text">平台已审核,等待用户发货 </view>
  93. </view>
  94. <view class="refund-item" v-if="sales.status==2">
  95. <view class="text">用户已发货,等待仓库审核 </view>
  96. </view>
  97. <view class="refund-item" v-if="sales.status==3">
  98. <view class="text">财务审核 </view>
  99. </view>
  100. <view class="refund-item" v-if="sales.status==4">
  101. <view class="text">已完成 </view>
  102. </view>
  103. </view>
  104. </view>
  105. <view class="content">
  106. <!-- 退货信息 -->
  107. <view class="return-info">
  108. <!-- <view class="title-box">
  109. <text class="label">退货信息</text>
  110. <text class="ret-num">共2件</text>
  111. </view> -->
  112. <!-- 退货列表 -->
  113. <view class="goods-list">
  114. <view class="storeName" v-show="order.storeName">{{order.storeName || ""}}</view>
  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).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. .fixed-top-box{
  257. width: 100%;
  258. background: linear-gradient(135deg, #66b2ef 0%, #018C39 100%);
  259. position: fixed;
  260. top: 0;
  261. left: 0;
  262. z-index: 1000;
  263. }
  264. .top-cont{
  265. width: 100%;
  266. height: 500upx;
  267. position: relative;
  268. .bg{
  269. width: 100%;
  270. height: 100%;
  271. position: absolute;
  272. top: 0;
  273. left: 0;
  274. z-index: 1;
  275. }
  276. .top-inner{
  277. width: 100%;
  278. height: 100%;
  279. position: absolute;
  280. top: 0;
  281. left: 0;
  282. z-index: 2;
  283. .back-box{
  284. height: 88upx;
  285. padding-left: 22upx;
  286. display: flex;
  287. align-items: center;
  288. justify-content: space-between;
  289. padding: 0 20upx;
  290. image{
  291. width: 40upx;
  292. height: 40upx;
  293. }
  294. .title{
  295. font-size: 36upx;
  296. font-family: PingFang SC;
  297. font-weight: 500;
  298. color: #FFFFFF;
  299. }
  300. }
  301. .order-status{
  302. margin-top: 60upx;
  303. display: flex;
  304. align-items: center;
  305. justify-content: space-between;
  306. padding: 0 30upx;
  307. .inner{
  308. display: flex;
  309. align-items: center;
  310. .img-box{
  311. width: 96upx;
  312. height: 96upx;
  313. margin-right: 30upx;
  314. image{
  315. width: 100%;
  316. height: 100%;
  317. }
  318. }
  319. .status-box{
  320. height: 96upx;
  321. display: flex;
  322. flex-direction: column;
  323. justify-content: center;
  324. .status{
  325. font-size: 40upx;
  326. font-family: PingFang SC;
  327. font-weight: bold;
  328. color: #FFFFFF;
  329. line-height: 1;
  330. }
  331. .desc{
  332. font-size: 26upx;
  333. font-family: PingFang SC;
  334. font-weight: 500;
  335. color: #FFFFFF;
  336. line-height: 1;
  337. margin-top: 30upx;
  338. }
  339. .det-box{
  340. display: flex;
  341. align-items: center;
  342. image{
  343. width: 14upx;
  344. height: 24upx;
  345. margin-left: 12upx;
  346. margin-top: 30upx;
  347. }
  348. }
  349. }
  350. }
  351. }
  352. .refund-info{
  353. margin-top: 50upx;
  354. padding: 0 20upx;
  355. .inner{
  356. background: #FFFFFF;
  357. border-radius: 16upx;
  358. padding: 0 30upx 15upx 30upx;
  359. .title-box{
  360. height: 88upx;
  361. border-bottom: 1px solid #F0F0F0;
  362. display: flex;
  363. align-items: center;
  364. justify-content: space-between;
  365. .left{
  366. display: flex;
  367. align-items: center;
  368. .title{
  369. font-size: 30upx;
  370. font-family: PingFang SC;
  371. font-weight: bold;
  372. color: #333333;
  373. line-height: 1;
  374. margin-right: 20upx;
  375. }
  376. .price-box{
  377. display: flex;
  378. align-items: flex-end;
  379. .unit{
  380. font-size: 24upx;
  381. font-family: PingFang SC;
  382. font-weight: 500;
  383. color: #FF6633;
  384. line-height: 1.2;
  385. margin-right: 4upx;
  386. }
  387. .num{
  388. font-size: 32upx;
  389. font-family: PingFang SC;
  390. font-weight: bold;
  391. color: #FF6633;
  392. line-height: 1;
  393. }
  394. }
  395. }
  396. .right{
  397. display: flex;
  398. align-items: center;
  399. .text{
  400. font-size: 24upx;
  401. font-family: PingFang SC;
  402. font-weight: 500;
  403. color: #999999;
  404. line-height: 1;
  405. margin-right: 10upx;
  406. }
  407. image{
  408. width: 12upx;
  409. height: 22upx;
  410. }
  411. }
  412. }
  413. .refund-item{
  414. margin-top: 40upx;
  415. .text{
  416. margin-bottom: 10upx;
  417. font-size: 26upx;
  418. font-family: PingFang SC;
  419. font-weight: 500;
  420. color: #666666;
  421. line-height: 1;
  422. }
  423. }
  424. }
  425. }
  426. }
  427. }
  428. .content{
  429. padding: 0 20upx 20upx;
  430. .return-info{
  431. margin-top: 30upx;
  432. background: #FFFFFF;
  433. border-radius: 16upx;
  434. .title-box{
  435. height: 88upx;
  436. padding: 0 30upx;
  437. display: flex;
  438. align-items: center;
  439. justify-content: space-between;
  440. .label{
  441. font-size: 30upx;
  442. font-family: PingFang SC;
  443. font-weight: bold;
  444. color: #333333;
  445. }
  446. .ret-num{
  447. font-size: 26upx;
  448. font-family: PingFang SC;
  449. font-weight: 500;
  450. color: #999999;
  451. }
  452. }
  453. .storeName {
  454. padding-top: 30rpx;
  455. overflow: hidden;
  456. white-space: nowrap;
  457. text-overflow: ellipsis;
  458. font-size: 28rpx;
  459. font-family: PingFang SC;
  460. font-weight: 600;
  461. color: #111111;
  462. }
  463. .goods-list{
  464. padding: 0 30upx;
  465. background-color: #FFFFFF;
  466. border-radius: 16upx;
  467. .item{
  468. padding: 30upx 0;
  469. border-bottom: 1px solid #EDEEEF;
  470. display: flex;
  471. align-items: center;
  472. .img-box{
  473. width: 160upx;
  474. height: 160upx;
  475. margin-right: 30upx;
  476. image{
  477. width: 100%;
  478. height: 100%;
  479. }
  480. }
  481. .info-box{
  482. width: calc(100% - 190upx);
  483. height: 160upx;
  484. display: flex;
  485. flex-direction: column;
  486. justify-content: space-between;
  487. .title{
  488. font-size: 28upx;
  489. font-family: PingFang SC;
  490. font-weight: 500;
  491. color: #333333;
  492. line-height: 36upx;
  493. .tag{
  494. display: inline-block;
  495. padding: 0 6upx;
  496. height: 30upx;
  497. background: linear-gradient(90deg, #66b2ef 0%, #018C39 100%);
  498. border-radius: 4upx;
  499. margin-right: 10upx;
  500. font-size: 22upx;
  501. font-family: PingFang SC;
  502. font-weight: bold;
  503. color: #FFFFFF;
  504. line-height: 30upx;
  505. float: left;
  506. margin-top: 7upx;
  507. }
  508. }
  509. .spec{
  510. margin-top: 18upx;
  511. font-size: 24upx;
  512. font-family: PingFang SC;
  513. font-weight: 500;
  514. color: #999999;
  515. line-height: 1;
  516. }
  517. .price-num{
  518. display: flex;
  519. align-items: center;
  520. justify-content: space-between;
  521. .price{
  522. display: flex;
  523. align-items: flex-end;
  524. .unit{
  525. font-size: 24upx;
  526. font-family: PingFang SC;
  527. font-weight: 500;
  528. color: #111111;
  529. line-height: 1.2;
  530. margin-right: 4upx;
  531. }
  532. .num{
  533. font-size: 32upx;
  534. font-family: PingFang SC;
  535. font-weight: 500;
  536. color: #111111;
  537. line-height: 1;
  538. }
  539. }
  540. .num{
  541. font-size: 24upx;
  542. font-family: PingFang SC;
  543. font-weight: 500;
  544. color: #999999;
  545. line-height: 1;
  546. }
  547. }
  548. }
  549. }
  550. .refund-det-info{
  551. padding-bottom: 30upx;
  552. .det-item{
  553. margin-top: 40upx;
  554. display: flex;
  555. align-items: center;
  556. justify-content: space-between;
  557. .label{
  558. font-size: 26upx;
  559. font-family: PingFang SC;
  560. font-weight: 500;
  561. color: #666666;
  562. line-height: 1;
  563. }
  564. .text{
  565. font-size: 26upx;
  566. font-family: PingFang SC;
  567. font-weight: 500;
  568. color: #222222;
  569. line-height: 1;
  570. }
  571. }
  572. }
  573. }
  574. }
  575. }
  576. .btn-box{
  577. margin-top: 15upx;
  578. box-sizing: border-box;
  579. display: flex;
  580. align-items: center;
  581. justify-content: flex-end;
  582. .btn{
  583. width: 155upx;
  584. height: 64upx;
  585. line-height: 64upx;
  586. font-size: 26upx;
  587. font-family: PingFang SC;
  588. font-weight: 500;
  589. text-align: center;
  590. border-radius: 32upx;
  591. margin-left: 15upx;
  592. &:first-child{
  593. margin-left: 0;
  594. }
  595. &.cancel{
  596. border: 1px solid #DDDDDD;
  597. color: #666666;
  598. }
  599. }
  600. }
  601. </style>