storeOrderRefundDetails.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599
  1. <template>
  2. <view>
  3. <view class="top-cont">
  4. <view class="bg"></view>
  5. <view class="top-inner">
  6. <!-- 订单状态 -->
  7. <view class="order-status" >
  8. <!-- 处理中 -->
  9. <view v-if="sales.salesStatus == 0" class="inner">
  10. <view class="img-box">
  11. <image src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/a4bf17c7fb7342118f5ba52911fbcd84.png" mode=""></image>
  12. </view>
  13. <view class="status-box">
  14. <text class="status">售后中</text>
  15. <text class="desc">请等待客服处理...</text>
  16. </view>
  17. </view>
  18. <view v-if="sales.salesStatus == 1" class="inner">
  19. <view class="img-box">
  20. <image src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/5be93a404ff148c99ff41b39a3b23665.png" mode=""></image>
  21. </view>
  22. <view class="status-box">
  23. <text class="status">售后取消</text>
  24. <text class="desc">用户已取消售后</text>
  25. </view>
  26. </view>
  27. <view v-if="sales.salesStatus == 2" class="inner">
  28. <view class="img-box">
  29. <image src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/5be93a404ff148c99ff41b39a3b23665.png" mode=""></image>
  30. </view>
  31. <view class="status-box">
  32. <text class="status">售后取消</text>
  33. <text class="desc">商家已拒绝...</text>
  34. </view>
  35. </view>
  36. <!-- 退款成功 -->
  37. <view v-if="sales.salesStatus == 3" class="inner">
  38. <view class="img-box">
  39. <image src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/09e5cf7de97d4ee6aa9f0c778599d760.png" mode=""></image>
  40. </view>
  41. <view class="status-box">
  42. <text class="status">退款成功</text>
  43. <text class="desc">已退款,退款金额将按原支付退回</text>
  44. </view>
  45. </view>
  46. </view>
  47. <!-- 退款信息 -->
  48. <view class="refund-info">
  49. <view class="inner">
  50. <view class="title-box">
  51. <view class="left">
  52. <text class="title">退款金额</text>
  53. <view class="price-box">
  54. <text class="unit">¥</text>
  55. <text class="num" v-if="sales.refundAmount!=null">{{sales.refundAmount.toFixed(2)}}</text>
  56. </view>
  57. </view>
  58. <view class="right">
  59. <text class="text" >
  60. <text class="text success">
  61. <!-- {{$getDictLabelName(statusOptions,sales.salesStatus)}} -->
  62. </text>
  63. </text>
  64. </view>
  65. </view>
  66. <view class="refund-item" v-if="sales.status>=1&&sales.refundType==1">
  67. <view class="text">收件人:{{sales.consignee}} </view>
  68. <view class="text">电话:{{sales.address}} </view>
  69. <view class="text">收件地址:{{sales.phoneNumber}}</view>
  70. </view>
  71. <view class="btn-box" v-if="sales.salesStatus==0" >
  72. <view v-if="sales.status==1" class="btn cancel" @click="addDeliverySn()" >填写物流</view>
  73. <view v-if="sales.status==0||sales.status==1" class="btn cancel" @click="revoke()" >撤销申请</view>
  74. <!-- <view class="btn cancel" @click="showLogs()" >查看进度</view> -->
  75. </view>
  76. <view class="refund-item" v-if="sales.status==0">
  77. <view class="text">已提交等待平台审核 </view>
  78. </view>
  79. <view class="refund-item" v-if="sales.status==1">
  80. <view class="text">平台已审核,等待用户发货 </view>
  81. </view>
  82. <view class="refund-item" v-if="sales.status==2">
  83. <view class="text">用户已发货,等待仓库审核 </view>
  84. </view>
  85. <view class="refund-item" v-if="sales.status==3">
  86. <view class="text">财务审核 </view>
  87. </view>
  88. <view class="refund-item" v-if="sales.status==4">
  89. <view class="text">已完成 </view>
  90. </view>
  91. </view>
  92. </view>
  93. <view class="content">
  94. <!-- 退货信息 -->
  95. <view class="return-info">
  96. <!-- <view class="title-box">
  97. <text class="label">退货信息</text>
  98. <text class="ret-num">共{{items.length}}件</text>
  99. </view> -->
  100. <!-- 退货列表 -->
  101. <view class="goods-list">
  102. <view v-if="sales!=null" v-for="(item,index) in items" :key="index" class="item">
  103. <view class="img-box">
  104. <image :src="JSON.parse(item.jsonInfo).image==''?'/static/images/drug.svg':JSON.parse(item.jsonInfo).image" mode="aspectFill"></image>
  105. </view>
  106. <view class="info-box">
  107. <view>
  108. <view class="title ellipsis2">{{JSON.parse(item.jsonInfo).productName}}</view>
  109. <view class="spec">规格:{{JSON.parse(item.jsonInfo).sku}}</view>
  110. </view>
  111. <view class="price-num">
  112. <view class="price">
  113. <text class="unit">¥</text>
  114. <text class="num">{{JSON.parse(item.jsonInfo).price.toFixed(2)}}</text>
  115. </view>
  116. <view class="num">x{{JSON.parse(item.jsonInfo).num}}</view>
  117. </view>
  118. </view>
  119. </view>
  120. <!-- 详细信息 -->
  121. <view class="refund-det-info">
  122. <view class="det-item">
  123. <text class="label">退货原因</text>
  124. <text class="text">{{sales.reasons}}</text>
  125. </view>
  126. <view class="det-item">
  127. <text class="label">退货说明</text>
  128. <text class="text">{{sales.explains}}</text>
  129. </view>
  130. <view class="det-item">
  131. <text class="label">退款金额</text>
  132. <text class="text" v-if="sales.refundAmount!=null">¥{{sales.refundAmount.toFixed(2)}}</text>
  133. </view>
  134. <view class="det-item">
  135. <text class="label">订单编号</text>
  136. <text class="text">{{order?.orderCode}}</text>
  137. </view>
  138. <view class="det-item">
  139. <text class="label">申请时间</text>
  140. <text class="text">{{sales.createTime}}</text>
  141. </view>
  142. </view>
  143. </view>
  144. </view>
  145. </view>
  146. </view>
  147. </view>
  148. </view>
  149. </template>
  150. <script>
  151. import {getStoreAfterSalesById,revoke} from '@/api/order.js'
  152. // import {getDictByKey} from '@/api/common.js'
  153. // import {getStoreAfterSalesById,revoke} from '@/api/storeAfterSales.js'
  154. export default {
  155. data() {
  156. return {
  157. statusOptions:[],
  158. sales:{},
  159. items:[],
  160. order:null,
  161. salesId:null,
  162. // 状态栏的高度
  163. statusBarHeight: uni.getStorageSync('menuInfo').statusBarHeight,
  164. };
  165. },
  166. onLoad(option) {
  167. this.id = option.id
  168. },
  169. onShow() {
  170. this.getStoreAfterSalesById()
  171. // this.getDictByKey("sys_after_sales_status")
  172. },
  173. methods: {
  174. // getDictByKey(key){
  175. // var data={key:key}
  176. // getDictByKey(data).then(
  177. // res => {
  178. // if(res.code==200){
  179. // if(key=="sys_after_sales_status"){
  180. // this.statusOptions=res.data;
  181. // }
  182. // }
  183. // },
  184. // err => {
  185. // }
  186. // );
  187. // },
  188. addDeliverySn(){
  189. uni.navigateTo({
  190. url: './storeOrderRefundAddDelivery?id=' + this.id
  191. })
  192. },
  193. revoke(){
  194. var data={id:this.id};
  195. revoke(data).then(res => {
  196. if(res.code==200){
  197. uni.showToast({
  198. icon:'success',
  199. title:'操作成功'
  200. });
  201. setTimeout(function() {
  202. uni.$emit('refreshAfterSales');
  203. uni.navigateBack({
  204. delta: 1
  205. })
  206. }, 500);
  207. }else{
  208. uni.showToast({
  209. icon:'none',
  210. title: res.msg
  211. });
  212. }
  213. });
  214. },
  215. getStoreAfterSalesById() {
  216. //联网加载数据
  217. getStoreAfterSalesById(this.id).then(res => {
  218. if(res.code==200){
  219. //设置列表数据
  220. this.sales=res.sales;
  221. this.items=res.items;
  222. this.order=res.order;
  223. }else{
  224. uni.showToast({
  225. icon:'none',
  226. title: res.msg
  227. });
  228. }
  229. });
  230. },
  231. // showLogs(status) {
  232. // uni.navigateTo({
  233. // url: './refundOrderLogs?orderStatus=' + status
  234. // })
  235. // },
  236. }
  237. }
  238. </script>
  239. <style lang="scss">
  240. .fixed-top-box{
  241. width: 100%;
  242. background: linear-gradient(135deg, #2BC7B9 0%, #60CDC3 100%);
  243. position: fixed;
  244. top: 0;
  245. left: 0;
  246. z-index: 1000;
  247. }
  248. .top-cont{
  249. width: 100%;
  250. height: 500upx;
  251. position: relative;
  252. .bg{
  253. width: 100%;
  254. height: 350upx;
  255. position: absolute;
  256. top: 0;
  257. left: 0;
  258. z-index: 1;
  259. background-color: #FF5C03;
  260. background: linear-gradient(#FF5C03, #E2C99E);
  261. border-radius: 0rpx 0rpx 100rpx 100rpx;
  262. }
  263. .top-inner{
  264. width: 100%;
  265. height: 100%;
  266. position: absolute;
  267. top: 0;
  268. left: 0;
  269. z-index: 2;
  270. .back-box{
  271. height: 88upx;
  272. padding-left: 22upx;
  273. display: flex;
  274. align-items: center;
  275. justify-content: space-between;
  276. padding: 0 20upx;
  277. image{
  278. width: 40upx;
  279. height: 40upx;
  280. }
  281. .title{
  282. font-size: 36upx;
  283. font-family: PingFang SC;
  284. font-weight: 500;
  285. color: #FFFFFF;
  286. }
  287. }
  288. .order-status{
  289. margin-top: 60upx;
  290. display: flex;
  291. align-items: center;
  292. justify-content: space-between;
  293. padding: 0 30upx;
  294. .inner{
  295. display: flex;
  296. align-items: center;
  297. .img-box{
  298. width: 96upx;
  299. height: 96upx;
  300. margin-right: 30upx;
  301. image{
  302. width: 100%;
  303. height: 100%;
  304. }
  305. }
  306. .status-box{
  307. height: 96upx;
  308. display: flex;
  309. flex-direction: column;
  310. justify-content: center;
  311. .status{
  312. font-size: 40upx;
  313. font-family: PingFang SC;
  314. font-weight: bold;
  315. color: #FFFFFF;
  316. line-height: 1;
  317. }
  318. .desc{
  319. font-size: 26upx;
  320. font-family: PingFang SC;
  321. font-weight: 500;
  322. color: #FFFFFF;
  323. line-height: 1;
  324. margin-top: 30upx;
  325. }
  326. .det-box{
  327. display: flex;
  328. align-items: center;
  329. image{
  330. width: 14upx;
  331. height: 24upx;
  332. margin-left: 12upx;
  333. margin-top: 30upx;
  334. }
  335. }
  336. }
  337. }
  338. }
  339. .refund-info{
  340. margin-top: 50upx;
  341. padding: 0 20upx;
  342. .inner{
  343. background: #FFFFFF;
  344. border-radius: 16upx;
  345. padding: 0 30upx 15upx 30upx;
  346. .title-box{
  347. height: 88upx;
  348. border-bottom: 1px solid #F0F0F0;
  349. display: flex;
  350. align-items: center;
  351. justify-content: space-between;
  352. .left{
  353. display: flex;
  354. align-items: center;
  355. .title{
  356. font-size: 30upx;
  357. font-family: PingFang SC;
  358. font-weight: bold;
  359. color: #333333;
  360. line-height: 1;
  361. margin-right: 20upx;
  362. }
  363. .price-box{
  364. display: flex;
  365. align-items: flex-end;
  366. .unit{
  367. font-size: 24upx;
  368. font-family: PingFang SC;
  369. font-weight: 500;
  370. color: #FF6633;
  371. line-height: 1.2;
  372. margin-right: 4upx;
  373. }
  374. .num{
  375. font-size: 32upx;
  376. font-family: PingFang SC;
  377. font-weight: bold;
  378. color: #FF6633;
  379. line-height: 1;
  380. }
  381. }
  382. }
  383. .right{
  384. display: flex;
  385. align-items: center;
  386. .text{
  387. font-size: 24upx;
  388. font-family: PingFang SC;
  389. font-weight: 500;
  390. color: #999999;
  391. line-height: 1;
  392. margin-right: 10upx;
  393. }
  394. image{
  395. width: 12upx;
  396. height: 22upx;
  397. }
  398. }
  399. }
  400. .refund-item{
  401. margin-top: 40upx;
  402. .text{
  403. margin-bottom: 10upx;
  404. font-size: 26upx;
  405. font-family: PingFang SC;
  406. font-weight: 500;
  407. color: #666666;
  408. line-height: 1;
  409. }
  410. }
  411. }
  412. }
  413. }
  414. }
  415. .content{
  416. padding: 0 20upx 20upx;
  417. .return-info{
  418. margin-top: 30upx;
  419. background: #FFFFFF;
  420. border-radius: 16upx;
  421. .title-box{
  422. height: 88upx;
  423. padding: 0 30upx;
  424. display: flex;
  425. align-items: center;
  426. justify-content: space-between;
  427. .label{
  428. font-size: 30upx;
  429. font-family: PingFang SC;
  430. font-weight: bold;
  431. color: #333333;
  432. }
  433. .ret-num{
  434. font-size: 26upx;
  435. font-family: PingFang SC;
  436. font-weight: 500;
  437. color: #999999;
  438. }
  439. }
  440. .goods-list{
  441. padding: 0 30upx;
  442. background-color: #FFFFFF;
  443. border-radius: 16upx;
  444. .item{
  445. padding: 30upx 0;
  446. border-bottom: 1px solid #EDEEEF;
  447. display: flex;
  448. align-items: center;
  449. .img-box{
  450. width: 160upx;
  451. height: 160upx;
  452. margin-right: 30upx;
  453. image{
  454. width: 100%;
  455. height: 100%;
  456. }
  457. }
  458. .info-box{
  459. width: calc(100% - 190upx);
  460. height: 160upx;
  461. display: flex;
  462. flex-direction: column;
  463. justify-content: space-between;
  464. .title{
  465. font-size: 28upx;
  466. font-family: PingFang SC;
  467. font-weight: 500;
  468. color: #333333;
  469. line-height: 36upx;
  470. .tag{
  471. display: inline-block;
  472. padding: 0 6upx;
  473. height: 30upx;
  474. background: linear-gradient(90deg, #2BC7B9 0%, #2BC7A4 100%);
  475. border-radius: 4upx;
  476. margin-right: 10upx;
  477. font-size: 22upx;
  478. font-family: PingFang SC;
  479. font-weight: bold;
  480. color: #FFFFFF;
  481. line-height: 30upx;
  482. float: left;
  483. margin-top: 7upx;
  484. }
  485. }
  486. .spec{
  487. margin-top: 18upx;
  488. font-size: 24upx;
  489. font-family: PingFang SC;
  490. font-weight: 500;
  491. color: #999999;
  492. line-height: 1;
  493. }
  494. .price-num{
  495. display: flex;
  496. align-items: center;
  497. justify-content: space-between;
  498. .price{
  499. display: flex;
  500. align-items: flex-end;
  501. .unit{
  502. font-size: 24upx;
  503. font-family: PingFang SC;
  504. font-weight: 500;
  505. color: #111111;
  506. line-height: 1.2;
  507. margin-right: 4upx;
  508. }
  509. .num{
  510. font-size: 32upx;
  511. font-family: PingFang SC;
  512. font-weight: 500;
  513. color: #111111;
  514. line-height: 1;
  515. }
  516. }
  517. .num{
  518. font-size: 24upx;
  519. font-family: PingFang SC;
  520. font-weight: 500;
  521. color: #999999;
  522. line-height: 1;
  523. }
  524. }
  525. }
  526. }
  527. .refund-det-info{
  528. padding-bottom: 30upx;
  529. .det-item{
  530. margin-top: 40upx;
  531. display: flex;
  532. align-items: center;
  533. justify-content: space-between;
  534. .label{
  535. font-size: 26upx;
  536. font-family: PingFang SC;
  537. font-weight: 500;
  538. color: #666666;
  539. line-height: 1;
  540. }
  541. .text{
  542. font-size: 26upx;
  543. font-family: PingFang SC;
  544. font-weight: 500;
  545. color: #222222;
  546. line-height: 1;
  547. }
  548. }
  549. }
  550. }
  551. }
  552. }
  553. .btn-box{
  554. margin-top: 15upx;
  555. box-sizing: border-box;
  556. display: flex;
  557. align-items: center;
  558. justify-content: flex-end;
  559. .btn{
  560. width: 155upx;
  561. height: 64upx;
  562. line-height: 64upx;
  563. font-size: 26upx;
  564. font-family: PingFang SC;
  565. font-weight: 500;
  566. text-align: center;
  567. border-radius: 32upx;
  568. margin-left: 15upx;
  569. &:first-child{
  570. margin-left: 0;
  571. }
  572. &.cancel{
  573. border: 1px solid #DDDDDD;
  574. color: #666666;
  575. }
  576. }
  577. }
  578. </style>