<!--packageE/ConsumePacket/index/index.wxml-->
<view>

  <view class="content">
    <view class="background">
      <view class="user">
        <view class="user-head">
          <image src="{{base_data.avatar}}"/>
        </view>
        <view class="user-name">{{base_data.nickname}}</view>
      </view>
    </view>
    <view class="absolute-block">
      <view class="money-list" catchtap="toUrl" wx:if="{{receiveBonus.is_open_reserve === 1}}"> <text class="money-left">领取收益</text> <view class="money-right"><icon class="iconfont icon-advertise-next"></icon></view> </view>
      <view class="warp-box">
        <view class="left" style="border-right: 1px solid #ffd5cd">
          <view class="first span">
            <text class="b">{{language['money']}}{{sum_unsettled || 0}}</text>
          </view>
          <view class="second span">未结算金额</view>
        </view>
        <view class="left">
          <view class="first span">
            <text class="b">{{language['money']}}{{sum_settled || 0}}</text>
          </view>
          <view class="second span">已结算金额</view>
        </view>
      </view>
    </view>

    <view style="margin-top: -75rpx">
      <van-tabs active="{{ active }}" bind:change="onChange">
        <van-tab title="全部" name="">
          <view class="rationList1 ul">
            <view class="li" wx:for="{{list}}" wx:key="index">
              <view class="detail">
                <view class="info">
                  <view class="left ul">
                    <view class="li">订单号：{{item.order_sn}}</view>
                    <view class="time li">{{item.created_at}}</view>
                  </view>
                  <view class="right ul">
                    <view class="li" style="font-size: 16px">{{item.order_price}}</view>
                    <view class="state li" wx:if="{{item.settlement === -1}}">失效</view>
                    <view class="state li" wx:if="{{item.settlement === 0}}">未结算</view>
                    <view class="state li" wx:if="{{item.settlement === 1}}">待领取</view>
                    <view class="state li" wx:if="{{item.settlement === 2}}">已领取</view>
                  </view>
                </view>
              </view>
            </view>
          </view>
        </van-tab>
        <van-tab title="未结算" name="0">
          <view class="rationList1 ul">
            <view class="li" wx:for="{{list}}" wx:key="index">
              <view class="detail">
                <view class="info">
                  <view class="left ul">
                    <view class="li">订单号：{{item.order_sn}}</view>
                    <view class="time li">{{item.created_at}}</view>
                  </view>
                  <view class="right ul">
                    <view class="li" style="font-size: 16px">{{item.order_price}}</view>                  
                  </view>
                </view>
              </view>
            </view>
          </view>
        </van-tab>
        <van-tab title="已结算" name="1">
          <view class="rationList1 ul">
            <view class="li" wx:for="{{list}}" wx:key="index">
              <view class="detail">
                <view class="info">
                  <view class="left ul">
                    <view class="li">订单号：{{item.order_sn}}</view>
                    <view class="time li">{{item.created_at}}</view>
                  </view>
                  <view class="right ul">
                    <view class="li" style="font-size: 16px">{{item.order_price}}</view>
                  </view>
                </view>
              </view>
            </view>
          </view>
        </van-tab>
        <van-tab title="已失效" name="-1">
          <view class="rationList1 ul">
            <view class="li" wx:for="{{list}}" wx:key="index">
              <view class="detail">
                <view class="info">
                  <view class="left ul">
                    <view class="li">订单号：{{item.order_sn}}</view>
                    <view class="time li">{{item.created_at}}</view>
                  </view>
                  <view class="right ul">
                    <view class="li" style="font-size: 16px">{{item.order_price}}</view>
                  </view>
                </view>
              </view>
            </view>
          </view>
        </van-tab>
      </van-tabs>
    </view>
  </view>

</view>
