storeOrderRefundDetails.vue 15 KB

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