storeOrderRefundDetails.vue 14 KB

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