refundOrderDetail.vue 15 KB

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