refundOrderDetail.vue 15 KB

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