detail.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402
  1. <template>
  2. <view class="refund-detail">
  3. <view class="head">
  4. <!-- status 0审核中 1待发货 2待收货 3已退款 -1已拒绝 -->
  5. <block v-if="type == -1">
  6. <view class="txt">退款失败</view>
  7. <view class="time">申请时间:{{detail.status_time}}</view>
  8. </block>
  9. <block v-if="type == 0">
  10. <view class="txt">审核中</view>
  11. <view class="time">申请时间:{{detail.status_time}}</view>
  12. </block>
  13. <block v-if="type == 1">
  14. <view class="txt">请退货并填写物流信息</view>
  15. <view class="time">申请时间:{{detail.status_time}}</view>
  16. </block>
  17. <block v-if="type == 2">
  18. <view class="txt">请等待商家收货并退款</view>
  19. <view class="time">还剩:
  20. <countDown :is-day="true" :tip-text="' '" :day-text="'天'" :hour-text="':'" :minute-text="':'" :second-text="' '"
  21. :datatime="datatime"></countDown>
  22. </view>
  23. </block>
  24. <block v-if="type == 3">
  25. <view class="txt">退款成功,金额 ¥{{detail.refund_price}}</view>
  26. <view class="time">申请时间:{{detail.status_time}}</view>
  27. </block>
  28. </view>
  29. <!-- 拒绝 -->
  30. <view class="box" v-if="type == -1">
  31. <view class="txt">拒绝退款原因</view>
  32. <view class="des">{{detail.fail_message}}</view>
  33. </view>
  34. <!-- 待退货 -->
  35. <view class="info-box" v-if="type == 1">
  36. <view class="title">商家已同意您的退货申请,请尽早退货</view>
  37. <view class="store-info">
  38. <view class="text">收货人姓名:<text class="info">{{detail.mer_delivery_user}}</text></view>
  39. <view class="text">收货人联系方式:<text class="info">{{detail.phone}}</text></view>
  40. <view class="text">收货人地址:<text class="des">{{detail.mer_delivery_address}}</text></view>
  41. <view class="red-txt">
  42. <text class="iconfont icon-zhuyi-copy"></text>请按以上收货信息将商品退回
  43. </view>
  44. </view>
  45. </view>
  46. <!-- 待收货 -->
  47. <view class="info-box" v-if="type == 2">
  48. <view class="title" style="color:#E93323">商家收货并验货无误,将操作退款给您</view>
  49. <view class="store-info">
  50. <view class="text">收货人姓名:<text class="info">{{detail.mer_delivery_user}}</text></view>
  51. <view class="text">收货人联系方式:<text class="info">{{detail.phone}}</text></view>
  52. <view class="text">收货人地址:<text class="des">{{detail.mer_delivery_address}}</text></view>
  53. </view>
  54. </view>
  55. <view class="info-box">
  56. <view class="title">退款信息</view>
  57. <view class="product-box">
  58. <view class="product-item" v-for="(item,index) in detail.refundProduct" :key="index">
  59. <image class="img-box" :src="item.product.cart_info.productAttr.image" mode="" v-if="item.product.cart_info.productAttr.image"></image>
  60. <image class="img-box" :src="item.product.cart_info.product.image" mode="" v-else></image>
  61. <view class="msg">
  62. <view class="name line1"><text v-if="item.product.cart_info.product_type === 2" class="event_name event_bg">预售</text>{{item.product.cart_info.product.store_name}}</view>
  63. <view class="des">{{item.product.cart_info.productAttr.sku}}</view>
  64. <view class="price">¥{{item.product.cart_info.productAttr.price}}</view>
  65. <view class="num">x {{item.refund_num}}</view>
  66. </view>
  67. </view>
  68. </view>
  69. </view>
  70. <view class="content">
  71. <view class="item">
  72. <view class="label">订单编号:</view>
  73. <view class="txt flex">
  74. <text>{{detail.refund_order_sn}}</text>
  75. <!-- #ifdef H5 -->
  76. <text class='copy copy-data' :data-clipboard-text="detail.refund_order_sn">复制</text>
  77. <!-- #endif -->
  78. <!-- #ifdef MP -->
  79. <text class='copy' @tap='copy'>复制</text>
  80. <!-- #endif -->
  81. </view>
  82. </view>
  83. <view class="item">
  84. <view class="label">退款金额:</view>
  85. <view class="txt flex">
  86. <text>¥ {{detail.refund_price}}</text>
  87. </view>
  88. </view>
  89. <view class="item">
  90. <view class="label">申请件数:</view>
  91. <view class="txt flex">
  92. <text>{{detail.refund_num}}</text>
  93. </view>
  94. </view>
  95. <view class="item">
  96. <view class="label">申请时间:</view>
  97. <view class="txt flex">
  98. <text>{{detail.create_time}}</text>
  99. </view>
  100. </view>
  101. <view class="item">
  102. <view class="label">备注说明:</view>
  103. <view class="txt flex">
  104. <text>{{detail.mark ? detail.mark : ""}}</text>
  105. </view>
  106. </view>
  107. <view class="btn-wrapper">
  108. <block v-if="type==-1">
  109. <view class="btn gray" @click="goService">联系商家</view>
  110. <view class="btn" @click="applyAgain(detail)">再次申请</view>
  111. </block>
  112. <block v-else-if="type==1">
  113. <view class="btn gray" @click="goService">联系商家</view>
  114. <view class="btn" @click="goPage">退回商品</view>
  115. </block>
  116. <block v-else-if="type==2">
  117. <view class="btn gray" @click="goService">联系商家</view>
  118. <view class="btn" @click="go">查看物流</view>
  119. </block>
  120. <block v-else>
  121. <view class="btn" @click="goService">联系商家</view>
  122. </block>
  123. </view>
  124. </view>
  125. </view>
  126. </template>
  127. <script>
  128. import { refundDetail } from '@/api/order.js'
  129. import ClipboardJS from "@/plugin/clipboard/clipboard.js";
  130. import countDown from '@/components/countDown'
  131. export default{
  132. components: {
  133. countDown,
  134. },
  135. data(){
  136. return{
  137. type:0,
  138. refund_order_id:0,
  139. detail:'',
  140. // countDownHour: "00",
  141. // countDownMinute: "00",
  142. // countDownSecond: "00",
  143. datatime: 0
  144. }
  145. },
  146. onLoad(optios) {
  147. uni.setNavigationBarTitle({
  148.   title:'退款详情'
  149. })
  150. this.refund_order_id = optios.id
  151. this.getDetail()
  152. },
  153. onReady: function() {
  154. // #ifdef H5
  155. this.$nextTick(function() {
  156. const clipboard = new ClipboardJS(".copy-data");
  157. clipboard.on("success", () => {
  158. this.$util.Tips({
  159. title: '复制成功'
  160. });
  161. });
  162. });
  163. // #endif
  164. },
  165. methods:{
  166. getDetail(){
  167. refundDetail(this.refund_order_id).then(res=>{
  168. // status 0审核中 1待发货 2待收货 3已退款 -1已拒绝
  169. this.type = res.data.status
  170. this.detail = res.data
  171. this.datatime = res.data.auto_refund_time;
  172. })
  173. },
  174. goPage(){
  175. uni.navigateTo({
  176. url:'/pages/users/refund/goods/index?id='+this.detail.refund_order_id
  177. })
  178. },
  179. applyAgain(item){
  180. uni.navigateTo({
  181. url:`/pages/order_details/index?order_id=${item.refundProduct[0].product.order_id}`
  182. })
  183. },
  184. go(){
  185. uni.navigateTo({
  186. url:`/pages/users/refund/logistics?orderId=${this.detail.refund_order_id}`
  187. })
  188. },
  189. /**
  190. *
  191. * 剪切订单号
  192. */
  193. // #ifndef H5
  194. copy: function() {
  195. let that = this;
  196. uni.setClipboardData({
  197. data: this.detail.refund_order_sn
  198. });
  199. },
  200. // #endif
  201. // 客服
  202. goService(){
  203. uni.navigateTo({
  204. url:`/pages/chat/customer_list/chat?mer_id=${this.detail.mer_id}&uid=${this.detail.uid}&refund_order_id=${this.detail.refund_order_id}`
  205. })
  206. }
  207. }
  208. }
  209. </script>
  210. <style lang="scss">
  211. .refund-detail{
  212. .head{
  213. display: flex;
  214. flex-direction: column;
  215. justify-content: center;
  216. height: 150rpx;
  217. padding: 0 30rpx;
  218. color: #fff;
  219. background-color: #666666;
  220. font-size: 30rpx;
  221. .txt{
  222. font-weight: bold;
  223. }
  224. .time{
  225. margin-top: 10rpx;
  226. font-size: 24rpx;
  227. opacity: .8;
  228. .time{
  229. display: inline-block;
  230. width: 600rpx;
  231. /deep/ .red{
  232. color: #fff;
  233. }
  234. }
  235. }
  236. }
  237. .info-box{
  238. margin-top: 12rpx;
  239. background-color: #fff;
  240. .title{
  241. padding: 0 32rpx;
  242. line-height: 86rpx;
  243. border-bottom: 1px solid #F0F0F0;
  244. color: #282828;
  245. }
  246. .product-box{
  247. .product-item{
  248. display: flex;
  249. padding: 25rpx 30rpx;
  250. .img-box{
  251. width:130rpx;
  252. height:130rpx;
  253. border-radius:16rpx;
  254. }
  255. .msg{
  256. position: relative;
  257. display: flex;
  258. flex-direction: column;
  259. justify-content: space-between;
  260. width: 440rpx;
  261. margin-left: 26rpx;
  262. .name{
  263. font-size: 28rpx;
  264. color: #282828;
  265. }
  266. .des{
  267. font-size: 20rpx;
  268. color: #868686;
  269. }
  270. .price{
  271. font-size: 26rpx;
  272. color: $theme-color;
  273. }
  274. .num{
  275. position: absolute;
  276. right: -80rpx;
  277. top: 4rpx;
  278. color: #868686;
  279. font-size: 26rpx;
  280. }
  281. }
  282. }
  283. .event_name{
  284. display: inline-block;
  285. margin-right: 9rpx;
  286. color: #fff;
  287. font-size: 20rpx;
  288. padding: 0 8rpx;
  289. line-height: 30rpx;
  290. text-align: center;
  291. border-radius: 6rpx;
  292. }
  293. }
  294. .event_bg{
  295. background: #FF7F00;
  296. }
  297. .store-info{
  298. padding: 30rpx;
  299. .des{
  300. margin-top: 10rpx;
  301. font-size: 26rpx;
  302. color: #868686;
  303. }
  304. .red-txt{
  305. display: flex;
  306. align-items: center;
  307. margin-top: 10rpx;
  308. color: $theme-color;
  309. font-size: 24rpx;
  310. .iconfont{
  311. font-size: 30rpx;
  312. margin-right: 5rpx;
  313. margin-top: 6rpx;
  314. }
  315. }
  316. }
  317. }
  318. .content{
  319. margin-top: 12rpx;
  320. padding: 30rpx 30rpx 0;
  321. background-color: #FFFFFF;
  322. .item{
  323. display: flex;
  324. justify-content: space-between;
  325. margin-bottom: 30rpx;
  326. .txt{
  327. justify-content: flex-end;
  328. align-items: center;
  329. width: 420rpx;
  330. color: #868686;
  331. text-align: right;
  332. .copy{
  333. display: flex;
  334. align-items: center;
  335. justify-content: center;
  336. width:76rpx;
  337. height:34rpx;
  338. margin-left: 20rpx;
  339. border:1px solid #666666;
  340. border-radius:17rpx;
  341. font-size: 20rpx;
  342. color: #333;
  343. }
  344. }
  345. &:last-child{
  346. margin-bottom: 0;
  347. }
  348. }
  349. .btn-wrapper{
  350. position: relative;
  351. display: flex;
  352. justify-content: flex-end;
  353. align-items: center;
  354. height: 100rpx;
  355. button{
  356. font-size: 28rpx;
  357. }
  358. .btn{
  359. width:176rpx;
  360. height:60rpx;
  361. margin-left: 20rpx;
  362. line-height: 60rpx;
  363. background:$theme-color;
  364. border-radius:30rpx;
  365. text-align: center;
  366. color: #fff;
  367. }
  368. .gray{
  369. background: transparent;
  370. border: 1px solid #eee;
  371. color: #AAAAAA;
  372. }
  373. &:after{
  374. content:' ';
  375. position: absolute;
  376. top: 0;
  377. left: 50%;
  378. width: 690rpx;
  379. height:1px;
  380. margin-left: -345rpx;
  381. background-color: #f0f0f0;
  382. }
  383. }
  384. }
  385. .box{
  386. margin-top: 12rpx;
  387. padding:25rpx 30rpx;
  388. background-color: #fff;
  389. font-size: 30rpx;
  390. color: #282828;
  391. .des{
  392. margin-top: 5rpx;
  393. font-size: 26rpx;
  394. color: #868686;
  395. }
  396. }
  397. }
  398. </style>