refundOrderDetail.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613
  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()" >填写1物流</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. console.log("option是",option)
  191. this.salesId = option.id
  192. },
  193. onShow() {
  194. this.getAfterSalesDetails()
  195. },
  196. methods: {
  197. addDeliverySn(){
  198. console.log("点了填写物流")
  199. console.log("点了填写物流", this.salesId)
  200. uni.navigateTo({
  201. url: './refundOrderDelivery?salesId=' + this.salesId
  202. })
  203. },
  204. revoke(){
  205. var data={salesId:this.salesId};
  206. revoke(data).then(res => {
  207. if(res.code==200){
  208. uni.showToast({
  209. icon:'success',
  210. title:'操作成功'
  211. });
  212. setTimeout(function() {
  213. uni.$emit('refreshAfterSales');
  214. uni.navigateBack({
  215. delta: 1
  216. })
  217. }, 500);
  218. }else{
  219. uni.showToast({
  220. icon:'none',
  221. title: res.msg
  222. });
  223. }
  224. });
  225. },
  226. getAfterSalesDetails() {
  227. //联网加载数据
  228. var that = this;
  229. var data = {
  230. salesId:this.salesId,
  231. };
  232. getAfterSalesDetails(data).then(res => {
  233. if(res.code==200){
  234. //设置列表数据
  235. this.sales=res.sales;
  236. this.items=res.items;
  237. }else{
  238. uni.showToast({
  239. icon:'none',
  240. title: res.msg
  241. });
  242. }
  243. });
  244. },
  245. // 返回上一页
  246. back() {
  247. uni.navigateBack()
  248. },
  249. showLogs(status) {
  250. uni.navigateTo({
  251. url: './refundOrderLogs?orderStatus=' + status
  252. })
  253. },
  254. }
  255. }
  256. </script>
  257. <style lang="scss">
  258. .fixed-top-box{
  259. width: 100%;
  260. background: linear-gradient(135deg, #2BC7B9 0%, #60CDC3 100%);
  261. position: fixed;
  262. top: 0;
  263. left: 0;
  264. z-index: 1000;
  265. }
  266. .top-cont{
  267. width: 100%;
  268. height: 500upx;
  269. position: relative;
  270. .bg{
  271. width: 100%;
  272. height: 100%;
  273. position: absolute;
  274. top: 0;
  275. left: 0;
  276. z-index: 1;
  277. }
  278. .top-inner{
  279. width: 100%;
  280. height: 100%;
  281. position: absolute;
  282. top: 0;
  283. left: 0;
  284. z-index: 2;
  285. .back-box{
  286. height: 88upx;
  287. padding-left: 22upx;
  288. display: flex;
  289. align-items: center;
  290. justify-content: space-between;
  291. padding: 0 20upx;
  292. image{
  293. width: 40upx;
  294. height: 40upx;
  295. }
  296. .title{
  297. font-size: 36upx;
  298. font-family: PingFang SC;
  299. font-weight: 500;
  300. color: #FFFFFF;
  301. }
  302. }
  303. .order-status{
  304. margin-top: 60upx;
  305. display: flex;
  306. align-items: center;
  307. justify-content: space-between;
  308. padding: 0 30upx;
  309. .inner{
  310. display: flex;
  311. align-items: center;
  312. .img-box{
  313. width: 96upx;
  314. height: 96upx;
  315. margin-right: 30upx;
  316. image{
  317. width: 100%;
  318. height: 100%;
  319. }
  320. }
  321. .status-box{
  322. height: 96upx;
  323. display: flex;
  324. flex-direction: column;
  325. justify-content: center;
  326. .status{
  327. font-size: 40upx;
  328. font-family: PingFang SC;
  329. font-weight: bold;
  330. color: #FFFFFF;
  331. line-height: 1;
  332. }
  333. .desc{
  334. font-size: 26upx;
  335. font-family: PingFang SC;
  336. font-weight: 500;
  337. color: #FFFFFF;
  338. line-height: 1;
  339. margin-top: 30upx;
  340. }
  341. .det-box{
  342. display: flex;
  343. align-items: center;
  344. image{
  345. width: 14upx;
  346. height: 24upx;
  347. margin-left: 12upx;
  348. margin-top: 30upx;
  349. }
  350. }
  351. }
  352. }
  353. }
  354. .refund-info{
  355. margin-top: 50upx;
  356. padding: 0 20upx;
  357. .inner{
  358. background: #FFFFFF;
  359. border-radius: 16upx;
  360. padding: 0 30upx 15upx 30upx;
  361. .title-box{
  362. height: 88upx;
  363. border-bottom: 1px solid #F0F0F0;
  364. display: flex;
  365. align-items: center;
  366. justify-content: space-between;
  367. .left{
  368. display: flex;
  369. align-items: center;
  370. .title{
  371. font-size: 30upx;
  372. font-family: PingFang SC;
  373. font-weight: bold;
  374. color: #333333;
  375. line-height: 1;
  376. margin-right: 20upx;
  377. }
  378. .price-box{
  379. display: flex;
  380. align-items: flex-end;
  381. .unit{
  382. font-size: 24upx;
  383. font-family: PingFang SC;
  384. font-weight: 500;
  385. color: #FF6633;
  386. line-height: 1.2;
  387. margin-right: 4upx;
  388. }
  389. .num{
  390. font-size: 32upx;
  391. font-family: PingFang SC;
  392. font-weight: bold;
  393. color: #FF6633;
  394. line-height: 1;
  395. }
  396. }
  397. }
  398. .right{
  399. display: flex;
  400. align-items: center;
  401. .text{
  402. font-size: 24upx;
  403. font-family: PingFang SC;
  404. font-weight: 500;
  405. color: #999999;
  406. line-height: 1;
  407. margin-right: 10upx;
  408. }
  409. image{
  410. width: 12upx;
  411. height: 22upx;
  412. }
  413. }
  414. }
  415. .refund-item{
  416. margin-top: 40upx;
  417. .text{
  418. margin-bottom: 10upx;
  419. font-size: 26upx;
  420. font-family: PingFang SC;
  421. font-weight: 500;
  422. color: #666666;
  423. line-height: 1;
  424. }
  425. }
  426. }
  427. }
  428. }
  429. }
  430. .content{
  431. padding: 0 20upx 20upx;
  432. .return-info{
  433. margin-top: 30upx;
  434. background: #FFFFFF;
  435. border-radius: 16upx;
  436. .title-box{
  437. height: 88upx;
  438. padding: 0 30upx;
  439. display: flex;
  440. align-items: center;
  441. justify-content: space-between;
  442. .label{
  443. font-size: 30upx;
  444. font-family: PingFang SC;
  445. font-weight: bold;
  446. color: #333333;
  447. }
  448. .ret-num{
  449. font-size: 26upx;
  450. font-family: PingFang SC;
  451. font-weight: 500;
  452. color: #999999;
  453. }
  454. }
  455. .goods-list{
  456. padding: 0 30upx;
  457. background-color: #FFFFFF;
  458. border-radius: 16upx;
  459. .item{
  460. padding: 30upx 0;
  461. border-bottom: 1px solid #EDEEEF;
  462. display: flex;
  463. align-items: center;
  464. .img-box{
  465. width: 160upx;
  466. height: 160upx;
  467. margin-right: 30upx;
  468. image{
  469. width: 100%;
  470. height: 100%;
  471. }
  472. }
  473. .info-box{
  474. width: calc(100% - 190upx);
  475. height: 160upx;
  476. display: flex;
  477. flex-direction: column;
  478. justify-content: space-between;
  479. .title{
  480. font-size: 28upx;
  481. font-family: PingFang SC;
  482. font-weight: 500;
  483. color: #333333;
  484. line-height: 36upx;
  485. .tag{
  486. display: inline-block;
  487. padding: 0 6upx;
  488. height: 30upx;
  489. background: linear-gradient(90deg, #2BC7B9 0%, #2BC7A4 100%);
  490. border-radius: 4upx;
  491. margin-right: 10upx;
  492. font-size: 22upx;
  493. font-family: PingFang SC;
  494. font-weight: bold;
  495. color: #FFFFFF;
  496. line-height: 30upx;
  497. float: left;
  498. margin-top: 7upx;
  499. }
  500. }
  501. .spec{
  502. margin-top: 18upx;
  503. font-size: 24upx;
  504. font-family: PingFang SC;
  505. font-weight: 500;
  506. color: #999999;
  507. line-height: 1;
  508. }
  509. .price-num{
  510. display: flex;
  511. align-items: center;
  512. justify-content: space-between;
  513. .price{
  514. display: flex;
  515. align-items: flex-end;
  516. .unit{
  517. font-size: 24upx;
  518. font-family: PingFang SC;
  519. font-weight: 500;
  520. color: #111111;
  521. line-height: 1.2;
  522. margin-right: 4upx;
  523. }
  524. .num{
  525. font-size: 32upx;
  526. font-family: PingFang SC;
  527. font-weight: 500;
  528. color: #111111;
  529. line-height: 1;
  530. }
  531. }
  532. .num{
  533. font-size: 24upx;
  534. font-family: PingFang SC;
  535. font-weight: 500;
  536. color: #999999;
  537. line-height: 1;
  538. }
  539. }
  540. }
  541. }
  542. .refund-det-info{
  543. padding-bottom: 30upx;
  544. .det-item{
  545. margin-top: 40upx;
  546. display: flex;
  547. align-items: center;
  548. justify-content: space-between;
  549. .label{
  550. font-size: 26upx;
  551. font-family: PingFang SC;
  552. font-weight: 500;
  553. color: #666666;
  554. line-height: 1;
  555. }
  556. .text{
  557. font-size: 26upx;
  558. font-family: PingFang SC;
  559. font-weight: 500;
  560. color: #222222;
  561. line-height: 1;
  562. }
  563. }
  564. }
  565. }
  566. }
  567. }
  568. .btn-box{
  569. margin-top: 15upx;
  570. box-sizing: border-box;
  571. display: flex;
  572. align-items: center;
  573. justify-content: flex-end;
  574. .btn{
  575. width: 155upx;
  576. height: 64upx;
  577. line-height: 64upx;
  578. font-size: 26upx;
  579. font-family: PingFang SC;
  580. font-weight: 500;
  581. text-align: center;
  582. border-radius: 32upx;
  583. margin-left: 15upx;
  584. &:first-child{
  585. margin-left: 0;
  586. }
  587. &.cancel{
  588. border: 1px solid #DDDDDD;
  589. color: #666666;
  590. }
  591. }
  592. }
  593. </style>