<!--pages/myWelfare/myWelfare.wxml-->
<wxs src="../../filters/filter.wxs" module="moduleFilter"></wxs>
<nav navName="我的福利"></nav>
<view class="page">
  
    <van-tabs animated type="line" tab-class="tabdiv" wrap-class="tabwrap" custom-class="tabbox" line-width="50rpx" tab-active-class="tabactive" title-inactive-color="#1C2023;" line-height="height: 10rpx;" swipeable title-active-color="#3CC7C0" color="#3CC7C0" bind:change="onChange">
    <van-tab title="未使用" class="vantab">
      <scroll-view scroll-y class="scrollwraper" bindrefresherrefresh="handleRefresher" refresher-triggered="{{isTriggered}}"	refresher-threshold="100"	refresher-enabled="true" >
      <view class="listbox" wx:if="{{nouseList.length>0}}">
      
        <view class="fulibox" wx:for="{{nouseList}}" wx:key="user_coupon_id">
          <view class="left">
            <view class="name">
              <view class="tag" wx:if="{{item.application_scope==5}}">单品补贴</view>
             <view class="names">{{item.coupon_name}}</view></view>
            <view class="range" wx:if="{{item.application_scope==1}}">使用范围：全场通用</view>
            <view class="range" wx:elif="{{item.application_scope==2}}">使用范围：问诊适用</view>
            <view class="range" wx:elif="{{item.application_scope==3}}">使用范围：购药</view>
            <view class="range" wx:elif="{{item.application_scope==4}}">使用范围：购药</view>
            <view class="range" wx:elif="{{item.application_scope==5}}">使用范围：购药</view>
            <view class="date">有效期：{{item.valid_end_time}}</view>
          </view>
          <view class="right">
            <view class="price">¥ <text class="num">{{moduleFilter.formatMoney(item.coupon_price)}}</text></view>
            <view class="use" bindtap="goIndex">立即使用</view>
          </view>
        </view>
        
      </view>
      <view wx:else class="nonedata">
        暂无数据！
      </view>
    </scroll-view>
    </van-tab>
    <van-tab title="已使用" class="vantab">
      <scroll-view scroll-y class="scrollwraper" bindrefresherrefresh="handleRefresher" refresher-triggered="{{isTriggered}}"	refresher-threshold="100"	refresher-enabled="true" >
      <view class="listbox" wx:if="{{useList.length>0}}">
        <view class="fulibox outdate"  wx:for="{{useList}}" wx:key="user_coupon_id">
          <view class="left">
            <view class="name">
              <view class="tag" wx:if="{{item.application_scope==5}}">单品补贴</view>
             <view class="names">{{item.coupon_name}}</view></view>
             <view class="range" wx:if="{{item.application_scope==1}}">使用范围：全场通用</view>
            <view class="range" wx:elif="{{item.application_scope==2}}">使用范围：问诊适用</view>
            <view class="range" wx:elif="{{item.application_scope==3}}">使用范围：购药</view>
            <view class="range" wx:elif="{{item.application_scope==4}}">使用范围：购药</view>
            <view class="range" wx:elif="{{item.application_scope==5}}">使用范围：购药</view>
            <view class="date">有效期：{{item.valid_end_time}}</view>
          </view>
          <view class="right">
            <view class="price">¥ <text class="num">{{moduleFilter.formatMoney(item.coupon_price)}}</text></view>
            <view class="use">已使用</view>
          </view>
        </view>
      </view>
      <view wx:else class="nonedata">
        暂无数据！
      </view>
    </scroll-view>
    </van-tab>
    <van-tab title="已过期" class="vantab">
      <scroll-view scroll-y class="scrollwraper" bindrefresherrefresh="handleRefresher" refresher-triggered="{{isTriggered}}"	refresher-threshold="100"	refresher-enabled="true" >
      <view class="listbox" wx:if="{{expireList.length>0}}">
        <view class="fulibox outdate"  wx:for="{{expireList}}" wx:key="user_coupon_id">
          <view class="left">
            <view class="name">
              <view class="tag" wx:if="{{item.application_scope==5}}">单品补贴</view>
             <view class="names">{{item.coupon_name}}</view></view>
             <view class="range" wx:if="{{item.application_scope==1}}">使用范围：全场通用</view>
            <view class="range" wx:elif="{{item.application_scope==2}}">使用范围：问诊适用</view>
            <view class="range" wx:elif="{{item.application_scope==3}}">使用范围：购药</view>
            <view class="range" wx:elif="{{item.application_scope==4}}">使用范围：购药</view>
            <view class="range" wx:elif="{{item.application_scope==5}}">使用范围：购药</view>
            <view class="date">有效期：{{item.valid_end_time}}</view>
          </view>
          <view class="right">
            <view class="price">¥ <text class="num">{{moduleFilter.formatMoney(item.coupon_price)}}</text></view>
            <view class="use">已过期</view>
          </view>
        </view>
      </view>
      <view wx:else class="nonedata">
        暂无数据！
      </view>
    </scroll-view>
    </van-tab>
  </van-tabs>
 
  
</view>