RefundView.vue 6.5 KB

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