VrRefundList.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. <template><page-meta :root-font-size="fontSize+'px'"></page-meta>
  2. <member-base :show="false"><view style="position: absolute;top:0;right:0;left:0;bottom:0" class="scroll-view-wrapper div member-order-list">
  3. <view class="div common-header-wrap">
  4. <view class="status-holder"></view>
  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="scroll-view div" style="position:relative">
  14. <scroll-view style="position: absolute;top:0;right:0;left:0;bottom:0" class="div" @scrolltolower="loadMore" scroll-y="true">
  15. <view class="div order-body" v-if="refund_list && refund_list.length">
  16. <view class="div list" v-for="(item, index) in refund_list" v-bind:key="item.refund_id">
  17. <view class="div" @click="goNavigate('/pages/member/vrrefund/VrRefundView',{refund_id:item.refund_id})">
  18. <view class="div tips-body">
  19. <text class="span tips"> 退款编号: {{ item.refund_sn }} </text>
  20. <text class="span title tips statusTips" >{{ item.admin_state_text }}</text>
  21. </view>
  22. <view class="div order-image">
  23. <view class="div goods_info clearfix" >
  24. <view class="div img-wrapper">
  25. <image mode="aspectFit" class="img" v-bind:src="item.goods_image_url" />
  26. </view>
  27. <view class="p goods_name">{{item.goods_name}}</view>
  28. <view class="p goods_price">
  29. <view class="price">¥{{item.refund_amount}}</view>
  30. <view class="num">X{{item.goods_num}}</view>
  31. </view>
  32. </view>
  33. </view>
  34. <view class="div order_amount">
  35. 退款金额: <text class="order_amount_icon">¥</text><text class="i">{{ item.refund_amount }}</text>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. <empty-record v-else-if="refund_list && !refund_list.length"></empty-record>
  41. </scroll-view>
  42. </view>
  43. </view></member-base>
  44. </template>
  45. <script>
  46. import {getFontSize} from '@/util/common'
  47. import TitleHeader from '../../TitleHeader'
  48. import { urlencode } from '@/util/common'
  49. import MemberBase from '../MemberBase'
  50. import { getVrRefundList } from '../../../api/memberVrRefund'
  51. import EmptyRecord from '../../EmptyRecord'
  52. export default {
  53. components:{
  54. TitleHeader,
  55. MemberBase,
  56. EmptyRecord
  57. },
  58. name:'MemberVrRefundList',
  59. data(){
  60. return {
  61. navHeight: 0,
  62. params: { 'page': 0, 'per_page': 10 },
  63. loading: false, // 是否加载更多
  64. isMore: true, // 是否有更多
  65. order_id: 0,
  66. stateType: '',
  67. orderDetailVisible: false,
  68. wrapperHeight: 0,
  69. refund_list: false
  70. }
  71. },
  72. mounted(){
  73. // #ifdef MP-WEIXIN
  74. this.navHeight = uni.getMenuButtonBoundingClientRect().top
  75. // #endif
  76. this.wrapperHeight = uni.getSystemInfoSync().windowHeight - 130
  77. },
  78. computed:{
  79. fontSize(){
  80. return getFontSize()
  81. },
  82. },
  83. onShow: function () {
  84. this.reload()
  85. },
  86. methods:{
  87. goNavigate(path,query=false){
  88. uni.navigateTo({url:path+(query?('?'+urlencode(query)):'')})
  89. },
  90. goBack(){uni.navigateBack({delta:1})},
  91. loadMore () {
  92. this.loading = true
  93. this.params.page = ++this.params.page
  94. if (this.isMore) {
  95. this.loading = false
  96. this.getVrRefundList(false)
  97. }
  98. },
  99. reload () {
  100. // 重新加载数据
  101. this.params.page = 0
  102. this.isMore = true
  103. this.refund_list = false
  104. this.loadMore()
  105. },
  106. getVrRefundList (ifReplace) {
  107. uni.showLoading({ title: '加载中' })
  108. if (ifReplace) {
  109. this.loading = false
  110. this.params.page = 1
  111. this.isMore = true
  112. }
  113. getVrRefundList(this.params).then(res => {
  114. uni.hideLoading()
  115. if (res.result.hasmore) {
  116. this.isMore = true
  117. } else {
  118. this.isMore = false
  119. }
  120. let tVrRefundGroup = res.result.refund_list
  121. if (tVrRefundGroup) {
  122. if (ifReplace || !this.refund_list) {
  123. this.refund_list = tVrRefundGroup
  124. } else {
  125. this.refund_list = this.refund_list.concat(tVrRefundGroup)
  126. }
  127. }
  128. }).catch(function (error) {
  129. uni.hideLoading()
  130. uni.showToast({icon:'none',title: error.message})
  131. })
  132. }
  133. }
  134. }
  135. </script>
  136. <style lang="scss" scoped>
  137. .scroll-view-wrapper{display: flex;flex-direction: column;}
  138. .scroll-view{flex:1}
  139. .member-order-list {
  140. .order-body {
  141. .list {
  142. width: 100%;
  143. margin-top: 0.5rem;
  144. .tips-body {
  145. height:2.2rem;
  146. background: rgba(255, 255, 255, 1);
  147. box-shadow: 0 0.5px 0 0 rgba(232, 234, 237, 1);
  148. display: flex;
  149. justify-content: space-between;
  150. padding: 0 0.75rem 0 0.5rem;
  151. .tips {
  152. font-size:$subFontSize;
  153. color: #333;
  154. line-height:2.2rem;
  155. }
  156. .statusTips {
  157. color: $primaryColor;
  158. }
  159. .img {
  160. width:3.8rem;
  161. height:3rem;
  162. }
  163. }
  164. .order-image {
  165. height: 4.55rem;
  166. background: rgba(250, 250, 250, 1);
  167. width: 100%;
  168. overflow:hidden;
  169. overflow-x: auto;
  170. white-space: nowrap;
  171. .goods_info{
  172. height:4rem;
  173. margin-bottom: .5rem;
  174. display: flex;
  175. align-items: center;
  176. padding-right: $pageSpace;
  177. .img-wrapper{
  178. width: 3rem;
  179. height: 3rem;
  180. margin: .85rem .6rem .5rem .3rem;
  181. .img{
  182. width: 3rem;
  183. height: 3rem;
  184. border-radius: 1px;
  185. }
  186. }
  187. .goods_name{
  188. white-space: normal;
  189. overflow: hidden;
  190. height: 2rem;
  191. width: 10rem;
  192. font-size: .7rem;
  193. }
  194. .goods_price{
  195. margin-left: auto;
  196. padding-right: .75rem;
  197. text-align: right;
  198. .price{
  199. font-size:$subFontSize;
  200. color: rgba(78, 84, 93, 1);
  201. }
  202. .num{
  203. font-size: .6rem;
  204. color: #999;
  205. padding-top: .3rem;
  206. }
  207. }
  208. }
  209. }
  210. .order_amount {
  211. font-size:$subFontSize;
  212. color: rgba(78, 84, 93, 1);
  213. line-height:2.2rem;
  214. height:2.2rem;
  215. background-color: #fff;
  216. padding: 0 0.75rem 0 0;
  217. border-bottom: 1px solid #e8eaed;
  218. box-sizing: border-box;
  219. text-align: right;
  220. overflow: hidden;
  221. text-overflow: ellipsis;
  222. white-space: nowrap;
  223. .order_amount_icon{
  224. font-size:$subFontSize;
  225. color: $primaryColor;
  226. }
  227. .i {
  228. font-size:$h1;
  229. color: $primaryColor;
  230. padding-left:0.25rem;
  231. font-style: normal;
  232. &.freight {
  233. color: #333;
  234. font-size:$fontSize;
  235. }
  236. }
  237. }
  238. }
  239. .loading-wrapper {
  240. text-align: center;
  241. .p {
  242. color: #c3c3c3;
  243. font-size:$fontSize;
  244. font-weight: 'Regular';
  245. margin:0.5rem auto;
  246. }
  247. }
  248. }
  249. .mint-popup {
  250. width: 100%;
  251. height:12rem;
  252. }
  253. }
  254. </style>