refundOrderDetail.vue 15 KB

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