123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271 |
- <template><page-meta :root-font-size="fontSize+'px'"></page-meta>
- <member-base :show="false"><view style="position: absolute;top:0;right:0;left:0;bottom:0" class="scroll-view-wrapper div member-order-list">
- <view class="div common-header-wrap">
- <view class="status-holder"></view>
- <view :style="'height:'+navHeight+'px'"></view>
- <view class="common-header-holder"></view>
- <view class="common-header-fixed">
- <title-header />
- <uni-nav-bar title="退款列表" class="common-header" left-icon="back" @clickLeft="goBack()">
- </uni-nav-bar>
- </view>
- </view>
- <view class="scroll-view div" style="position:relative">
- <scroll-view style="position: absolute;top:0;right:0;left:0;bottom:0" class="div" @scrolltolower="loadMore" scroll-y="true">
- <view class="div order-body" v-if="refund_list && refund_list.length">
- <view class="div list" v-for="(item, index) in refund_list" v-bind:key="item.refund_id">
- <view class="div" @click="goNavigate('/pages/member/vrrefund/VrRefundView',{refund_id:item.refund_id})">
- <view class="div tips-body">
- <text class="span tips"> 退款编号: {{ item.refund_sn }} </text>
- <text class="span title tips statusTips" >{{ item.admin_state_text }}</text>
- </view>
- <view class="div order-image">
- <view class="div goods_info clearfix" >
- <view class="div img-wrapper">
- <image mode="aspectFit" class="img" v-bind:src="item.goods_image_url" />
- </view>
- <view class="p goods_name">{{item.goods_name}}</view>
- <view class="p goods_price">
- <view class="price">¥{{item.refund_amount}}</view>
- <view class="num">X{{item.goods_num}}</view>
- </view>
- </view>
- </view>
- <view class="div order_amount">
- 退款金额: <text class="order_amount_icon">¥</text><text class="i">{{ item.refund_amount }}</text>
- </view>
- </view>
- </view>
- </view>
- <empty-record v-else-if="refund_list && !refund_list.length"></empty-record>
- </scroll-view>
- </view>
- </view></member-base>
- </template>
- <script>
- import {getFontSize} from '@/util/common'
- import TitleHeader from '../../TitleHeader'
- import { urlencode } from '@/util/common'
- import MemberBase from '../MemberBase'
- import { getVrRefundList } from '../../../api/memberVrRefund'
- import EmptyRecord from '../../EmptyRecord'
- export default {
- components:{
- TitleHeader,
- MemberBase,
- EmptyRecord
- },
- name:'MemberVrRefundList',
- data(){
- return {
- navHeight: 0,
- params: { 'page': 0, 'per_page': 10 },
- loading: false, // 是否加载更多
- isMore: true, // 是否有更多
- order_id: 0,
- stateType: '',
- orderDetailVisible: false,
- wrapperHeight: 0,
- refund_list: false
- }
- },
- mounted(){
- // #ifdef MP-WEIXIN
- this.navHeight = uni.getMenuButtonBoundingClientRect().top
- // #endif
- this.wrapperHeight = uni.getSystemInfoSync().windowHeight - 130
- },
- computed:{
- fontSize(){
- return getFontSize()
- },
- },
- onShow: function () {
- this.reload()
- },
- methods:{
- goNavigate(path,query=false){
- uni.navigateTo({url:path+(query?('?'+urlencode(query)):'')})
- },
- goBack(){uni.navigateBack({delta:1})},
- loadMore () {
- this.loading = true
- this.params.page = ++this.params.page
- if (this.isMore) {
- this.loading = false
- this.getVrRefundList(false)
- }
- },
- reload () {
- // 重新加载数据
- this.params.page = 0
- this.isMore = true
- this.refund_list = false
- this.loadMore()
- },
- getVrRefundList (ifReplace) {
- uni.showLoading({ title: '加载中' })
- if (ifReplace) {
- this.loading = false
- this.params.page = 1
- this.isMore = true
- }
- getVrRefundList(this.params).then(res => {
- uni.hideLoading()
- if (res.result.hasmore) {
- this.isMore = true
- } else {
- this.isMore = false
- }
- let tVrRefundGroup = res.result.refund_list
- if (tVrRefundGroup) {
- if (ifReplace || !this.refund_list) {
- this.refund_list = tVrRefundGroup
- } else {
- this.refund_list = this.refund_list.concat(tVrRefundGroup)
- }
- }
- }).catch(function (error) {
- uni.hideLoading()
- uni.showToast({icon:'none',title: error.message})
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .scroll-view-wrapper{display: flex;flex-direction: column;}
- .scroll-view{flex:1}
- .member-order-list {
- .order-body {
- .list {
- width: 100%;
- margin-top: 0.5rem;
- .tips-body {
- height:2.2rem;
- background: rgba(255, 255, 255, 1);
- box-shadow: 0 0.5px 0 0 rgba(232, 234, 237, 1);
- display: flex;
- justify-content: space-between;
- padding: 0 0.75rem 0 0.5rem;
- .tips {
- font-size:$subFontSize;
- color: #333;
- line-height:2.2rem;
- }
- .statusTips {
- color: $primaryColor;
- }
- .img {
- width:3.8rem;
- height:3rem;
- }
- }
- .order-image {
- height: 4.55rem;
- background: rgba(250, 250, 250, 1);
- width: 100%;
- overflow:hidden;
- overflow-x: auto;
- white-space: nowrap;
- .goods_info{
- height:4rem;
- margin-bottom: .5rem;
- display: flex;
- align-items: center;
- padding-right: $pageSpace;
- .img-wrapper{
- width: 3rem;
- height: 3rem;
- margin: .85rem .6rem .5rem .3rem;
- .img{
- width: 3rem;
- height: 3rem;
- border-radius: 1px;
- }
- }
- .goods_name{
- white-space: normal;
- overflow: hidden;
- height: 2rem;
- width: 10rem;
- font-size: .7rem;
- }
- .goods_price{
- margin-left: auto;
- padding-right: .75rem;
- text-align: right;
- .price{
- font-size:$subFontSize;
- color: rgba(78, 84, 93, 1);
- }
- .num{
- font-size: .6rem;
- color: #999;
- padding-top: .3rem;
- }
- }
- }
- }
- .order_amount {
- font-size:$subFontSize;
- color: rgba(78, 84, 93, 1);
- line-height:2.2rem;
- height:2.2rem;
- background-color: #fff;
- padding: 0 0.75rem 0 0;
- border-bottom: 1px solid #e8eaed;
- box-sizing: border-box;
- text-align: right;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- .order_amount_icon{
- font-size:$subFontSize;
- color: $primaryColor;
- }
- .i {
- font-size:$h1;
- color: $primaryColor;
- padding-left:0.25rem;
- font-style: normal;
- &.freight {
- color: #333;
- font-size:$fontSize;
- }
- }
- }
- }
- .loading-wrapper {
- text-align: center;
- .p {
- color: #c3c3c3;
- font-size:$fontSize;
- font-weight: 'Regular';
- margin:0.5rem auto;
- }
- }
- }
- .mint-popup {
- width: 100%;
- height:12rem;
- }
- }
- </style>
|