RefundView.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. <template><page-meta :root-font-size="fontSize+'px'"></page-meta>
  2. <seller-base :show="false">
  3. <view class="div member-information">
  4. <view class="div common-header-wrap">
  5. <view :style="'height:'+navHeight+'px'"></view>
  6. <view class="common-header-holder"></view>
  7. <view class="common-header-fixed">
  8. <title-header />
  9. <uni-nav-bar title="退款详情" class="common-header" left-icon="back" @clickLeft="goBack()">
  10. </uni-nav-bar>
  11. </view>
  12. </view>
  13. <view class="div main-content">
  14. <flex-line :show-border="true"><text class="span line-name">退款编号</text><text class="span" slot="right">{{refund.refund_sn}}</text></flex-line>
  15. <flex-line :show-border="true"><text class="span line-name">退款原因</text><text class="span" slot="right">{{refund.reason_info}}</text></flex-line>
  16. <flex-line :show-border="true"><text class="span line-name">退款金额</text><text class="span" slot="right">{{refund.refund_amount}}</text></flex-line>
  17. <flex-line :show-border="true"><text class="span line-name">退款说明</text><text class="span" slot="right">{{refund.buyer_message}}</text></flex-line>
  18. <view class="div" @click="showPopup('isshow')"><flex-line :show-border="true"><text class="span line-name">退款凭证</text><text class="span" slot="right">{{pic_list.length>0?'查看':''}}</text></flex-line></view>
  19. <flex-line v-if="refund.seller_message" :show-border="true"><text class="span line-name">商家备注</text><text class="span" slot="right">{{refund.seller_message}}</text></flex-line>
  20. <flex-line v-if="refund.admin_message" :show-border="true"><text class="span line-name">平台备注</text><text class="span" slot="right">{{refund.admin_message}}</text></flex-line>
  21. </view>
  22. <uni-popup background-color="#fff" ref="isshow" v-if="pic_list.length>0">
  23. <view class="div preview-picture">
  24. <title-header />
  25. <view
  26. class="div picture-header"
  27. v-on:click="hidePopup('isshow')"
  28. >
  29. <text class="span">关闭</text
  30. ><text class="span" v-if="pic_list"
  31. >{{ defaultindex + 1 }} / {{ pic_list.length }}</text
  32. >
  33. </view>
  34. <view class="div picture-body">
  35. <swiper
  36. :autoplay="false"
  37. :indicator-dots="true"
  38. :current="defaultindex"
  39. class="ui-common-swiper"
  40. :prevent="false"
  41. :stop-propagation="true"
  42. @change="handleChange"
  43. >
  44. <swiper-item
  45. class="ui-common-swiper-item"
  46. v-for="(item, index) in pic_list"
  47. v-bind:key="index"
  48. >
  49. <image mode="aspectFit" class="img" v-bind:src="item" style="max-width: 100%;max-height: 100%" @click="setPopHeader()" />
  50. </swiper-item>
  51. </swiper>
  52. </view>
  53. </view>
  54. </uni-popup>
  55. </view>
  56. </seller-base>
  57. </template>
  58. <script>
  59. import {getFontSize} from '@/util/common'
  60. import TitleHeader from '../../TitleHeader'
  61. import SellerBase from '../SellerBase'
  62. import { getRefundInfo } from '../../../api/sellerRefund'
  63. import flexLine from '../../flexLine'
  64. export default {
  65. components:{
  66. TitleHeader,
  67. SellerBase,
  68. flexLine,
  69. },
  70. name: 'SellerRefundView',
  71. data(){
  72. return {
  73. navHeight: 0,
  74. refund_id: 0,
  75. refund: {},
  76. pic_list: [],
  77. defaultindex: 0
  78. }
  79. },
  80. mounted(){
  81. // #ifdef MP-WEIXIN
  82. this.navHeight = uni.getMenuButtonBoundingClientRect().height
  83. // #endif
  84. },
  85. computed:{
  86. fontSize(){
  87. return getFontSize()
  88. },
  89. },
  90. onLoad: function (option) {
  91. this.refund_id = option.refund_id
  92. getRefundInfo(this.refund_id).then(res => {
  93. this.refund = res.result.refund
  94. this.pic_list = res.result.pic_list
  95. }).catch(function (error) {
  96. uni.showToast({icon:'none',title: error.message})
  97. })
  98. },
  99. methods:{
  100. showPopup(id){
  101. this.$refs[id].open()
  102. },
  103. hidePopup(id){
  104. this.$refs[id].close()
  105. },
  106. goBack(){uni.navigateBack({delta:1})},
  107. /*
  108. handleChange: 轮播图改变时设置是否阻止事件冒泡
  109. @params: index 当前滑动的index
  110. */
  111. handleChange(e) {
  112. this.defaultindex = e.detail.current
  113. },
  114. }
  115. }
  116. </script>
  117. <style lang="scss" scoped>
  118. .main-content{background: #fff;padding:0 $pageSpace}
  119. .ui-common-swiper {
  120. width: 100%;
  121. }
  122. .ui-common-swiper-item{display: flex;align-content: center}
  123. .mint-popup {
  124. width: 100%;
  125. height: 100%;
  126. background-color: #000;
  127. }
  128. .mint-swipe,
  129. .mint-swipe-items-wrap {
  130. position: static;
  131. }
  132. .preview-picture {
  133. width: 100%;
  134. height: 100%;
  135. position: fixed;
  136. z-index: 10;
  137. top:0;
  138. bottom:0;
  139. left:0;
  140. right:0;
  141. background-color: #000;
  142. .picture-header {
  143. height: 2.2rem;
  144. color: #000;
  145. background-color: #fff;
  146. display: flex;
  147. justify-content: center;
  148. align-content: center;
  149. align-items: center;
  150. width: 100%;
  151. top:0;
  152. padding-top:var(--status-bar-height);
  153. .span {
  154. font-size:$subFontSize;
  155. font-weight: normal;
  156. &:first-child {
  157. cursor: pointer;
  158. position: absolute;
  159. left: 0.75rem;
  160. background-size: 1.2rem;
  161. display: inline-block;
  162. height: 2.2rem;
  163. line-height: 2.2rem;
  164. }
  165. }
  166. }
  167. .picture-body {
  168. position: absolute;
  169. top: 2.2rem;
  170. bottom:0;
  171. width: 100%;
  172. display: flex;
  173. justify-content: center;
  174. align-content: center;
  175. align-items: center;
  176. }
  177. }
  178. </style>