<view class="profigHead">
    <view class="profigHead-user">
        <image src="{{profitUser.avatar}}" mode="aspectFill"></image>{{profitUser.nickname}}的收益
    </view>
    <image class="profigHead-img" src="/static/img/profigLabel_back.png" mode="widthFix"></image>
</view>

<view class="profigCont">
    <view class="profigLabel">
        <view class="profigLabel-top">
            我在本时生活总收益！
        </view>
        <view class="profigLabel-balance">
            <view class="profigLabel-balance-left">
                <view class="profigLabel-balance-name">余额</view>
                <view class="profigLabel-balance-price">￥<text>{{profitUser.account.balance}}</text></view>
            </view>
            <navigator hover-class="none" url="/pages/withdrawal_form/withdrawal_form" class="profigLabel-balance-withdrawal">提现</navigator>
        </view>
        <view class="profigLabel-list">
            <view class="profigLabel-list-label">
                <navigator hover-class="none" url="/pages/myProfit_list/myProfit_list?name=share_product" class="profigLabel-list-name">
                    分享产品收益<image src="/static/img/profigLabel_row.png" mode="aspectFill"></image>
                </navigator>
                <view class="profigLabel-list-price">
                    {{profitFinance.share_product}}
                </view>
            </view>
            <view class="profigLabel-list-label">
                <navigator hover-class="none" url="/pages/myProfit_list/myProfit_list?name=team_product" class="profigLabel-list-name">
                    团队产品消费收益<image src="/static/img/profigLabel_row.png" mode="aspectFill"></image>
                </navigator>
                <view class="profigLabel-list-price">
                    {{profitFinance.team_product}}
                </view>
            </view>
            <view class="profigLabel-list-label">
                <navigator hover-class="none" url="/pages/myProfit_list/myProfit_list?name=share_Recharge" class="profigLabel-list-name">
                    分享储值收益<image src="/static/img/profigLabel_row.png" mode="aspectFill"></image>
                </navigator>
                <view class="profigLabel-list-price">
                    {{profitFinance.share_Recharge}}
                </view>
            </view>
            <view class="profigLabel-list-label">
                <navigator hover-class="none" url="/pages/myProfit_list/myProfit_list?name=team_recharge" class="profigLabel-list-name">
                    团队储值收益<image src="/static/img/profigLabel_row.png" mode="aspectFill"></image>
                </navigator>
                <view class="profigLabel-list-price">
                    {{profitFinance.team_recharge}}
                </view>
            </view>
            <view class="profigLabel-list-label">
                <view class="profigLabel-list-name">
                    达人总数
                </view>
                <view class="profigLabel-list-price">
                    {{profitCount.leader}}
                </view>
            </view>
            <view class="profigLabel-list-label">
                <view class="profigLabel-list-name">
                    用户总数
                </view>
                <view class="profigLabel-list-price">
                    {{profitCount.users}}
                </view>
            </view>
        </view>
        <view class="profigLabel-cash">
            <view class="profigLabel-cash-label">
                <view class="profigLabel-cash-name">
                    总收益
                </view>
                <view class="profigLabel-cash-price">
                    {{profitFinance.all_profit}}
                </view>
            </view>
            <view class="profigLabel-cash-label">
                <navigator hover-class="none" url="/pages/withdrawal_record/withdrawal_record?status=end&idx=2" class="profigLabel-cash-name profigLabel-cash-active">
                    已提现
                </navigator>
                <view class="profigLabel-cash-price">
                    {{profitFinance.withdrawed}}
                </view>
            </view>
            <view class="profigLabel-cash-label">
                <navigator hover-class="none" url="/pages/withdrawal_record/withdrawal_record?status=init&idx=1" class="profigLabel-cash-name profigLabel-cash-active">
                    提现中
                </navigator>
                <view class="profigLabel-cash-price">
                    {{profitFinance.withdrawing}}
                </view>
            </view>
        </view>
    </view>

    <view class="profigTab">
        <view class="profigTab-nav">
            <view class="profigTab-nav-name {{changeStyle == 'report' ? 'active' : ''}}" data-style="report"
                bindtap="changeTabbar">收益报表</view>
            <view class="profigTab-nav-name {{changeStyle == 'order' ? 'active' : ''}}" data-style="order"
                bindtap="changeTabbar">收益订单</view>
            <view class="profigTab-nav-name {{changeStyle == 'team' ? 'active' : ''}}" data-style="team"
                bindtap="changeTabbar">我的团队</view>
        </view>
        <view class="profigTab-list">
            <!-- 本月收益统计 -->
            <view class="profigReport {{changeStyle == 'report' ? 'show' : ''}}">
                <view class="profigReport-module">
                    <view class="profigReport-module-title">
                        <view class="profigReport-module-name">
                            本月收益统计
                        </view>
                        <view class="profigReport-module-picker">
                            <picker bindchange="screenBind" value="{{monthsIndex}}" range-key="name"
                                range="{{incometMonths}}">
                                {{incometMonths[monthsIndex].name}}
                            </picker>
                            <image class="profigReport-module-icon" src="/static/icon/arrow_down.png"></image>
                        </view>
                    </view>
                    <view class="profigReport-list">
                        <view class="profigReport-list-label">
                            <view class="profigReport-label-name">
                                分享产品收益
                            </view>
                            <view class="profigLabel-label-price">
                                {{incometFfinance.share_product.this_month}}
                            </view>
                            <view class="profigLabel-label-billie {{incometFfinance.share_product.this_month >= 0 ? '':'active'}}">
                                <image
                                    src="{{incometFfinance.share_product.this_month >= 0 ? '/static/img/profig_billie_icon.png' : '/static/img/profig_billie_icon_active.png'}}"
                                    mode="aspectFill"></image>
                                {{incometFfinance.share_product.text}}
                            </view>
                        </view>
                        <view class="profigReport-list-label">
                            <view class="profigReport-label-name">
                                团队产品消费收益
                            </view>
                            <view class="profigLabel-label-price">
                                {{incometFfinance.team_product.this_month}}
                            </view>
                            <view class="profigLabel-label-billie {{incometFfinance.team_product.this_month >= 0 ? '':'active'}}">
                                <image
                                    src="{{incometFfinance.team_product.this_month >= 0 ? '/static/img/profig_billie_icon.png' : '/static/img/profig_billie_icon_active.png'}}"
                                    mode="aspectFill"></image>
                                {{incometFfinance.team_product.text}}
                            </view>
                        </view>
                        <view class="profigReport-list-label">
                            <view class="profigReport-label-name">
                                分享储值收益
                            </view>
                            <view class="profigLabel-label-price">
                                {{incometFfinance.share_recharge.this_month}}
                            </view>
                            <view class="profigLabel-label-billie {{incometFfinance.share_recharge.this_month >= 0 ? '':'active'}}">
                                <image
                                    src="{{incometFfinance.share_recharge.this_month >= 0 ? '/static/img/profig_billie_icon.png' : '/static/img/profig_billie_icon_active.png'}}"
                                    mode="aspectFill"></image>
                                {{incometFfinance.share_recharge.text}}
                            </view>
                        </view>
                        <view class="profigReport-list-label">
                            <view class="profigReport-label-name">
                                团队储值收益
                            </view>
                            <view class="profigLabel-label-price">
                                {{incometFfinance.team_recharge.this_month}}
                            </view>
                            <view class="profigLabel-label-billie {{incometFfinance.team_recharge.this_month >= 0 ? '':'active'}}">
                                <image
                                    src="{{incometFfinance.team_recharge.this_month >= 0 ? '/static/img/profig_billie_icon.png' : '/static/img/profig_billie_icon_active.png'}}"
                                    mode="aspectFill"></image>
                                {{incometFfinance.team_recharge.text}}
                            </view>
                        </view>
                    </view>
                </view>
                <view class="profigReport-module profigReport-module-subset">
                    <view class="profigReport-subset-name">
                        新增团队统计
                    </view>
                    <view class="profigReport-list">
                        <view class="profigReport-subset-label">
                            <view class="profigReport-label-name">
                                新增达人数
                            </view>
                            <view class="profigLabel-label-price">
                                {{incometCount.leader}}
                            </view>
                        </view>
                        <view class="profigReport-subset-label">
                            <view class="profigReport-label-name">
                                新增用户数
                            </view>
                            <view class="profigLabel-label-price">
                                {{incometCount.users}}
                            </view>
                        </view>
                    </view>
                </view>
                <view class="profigReport-module profigReport-module-subset">
                    <view class="profigReport-subset-name">
                        消费订单统计
                    </view>
                    <view class="profigReport-list">
                        <view class="profigReport-subset-label">
                            <view class="profigReport-label-name">
                                产品消费
                            </view>
                            <view class="profigLabel-label-price">
                                {{incometOrder.product}}
                            </view>
                        </view>
                        <view class="profigReport-subset-label">
                            <view class="profigReport-label-name">
                                储值消费
                            </view>
                            <view class="profigLabel-label-price">
                                {{incometOrder.recharge}}
                            </view>
                        </view>
                    </view>
                </view>
            </view>

            <!-- 收益订单 -->
            <view class="profigOrder {{changeStyle == 'order' ? 'show' : ''}}">
                <view class="profigOrder-module-title">
                    <view class="profigOrder-module-name">
                        共<text>{{publicData.length}}</text>条订单
                    </view>
                    <view class="profigReport-module-picker">
                        <picker bindchange="screenOrders" value="{{ordersIndex}}" range-key="name"
                            range="{{ordersWay}}">
                            {{ordersWay[ordersIndex].name}}
                        </picker>
                        <image class="profigReport-module-icon" src="/static/icon/arrow_down.png"></image>
                    </view>
                </view>
                <block wx:if="{{publicData.length > 0}}">
                    <view class="profigOrder-list" wx:for="{{publicData}}" wx:key="publicData">
                        <view class="profigOrder-no">
                            <view class="profigOrder-no-name">
                                <text
                                    class="profigOrder-no-tips {{item.type == 'recharge' ? '' : 'active'}}">{{item.type
                                    ==
                                    'recharge' ? '储值' : '产品'}}</text>订单号：{{item.order.orderid}}
                                <image src="/static/img/frozen_time.png" mode="aspectFill"></image>
                            </view>
                            <view class="profigOrder-no-text">
                                {{item.name}}
                            </view>
                        </view>
                        <view class="profigOrder-info">
                            <view class="profigOrder-label">
                                姓名：{{item.user.nickname}}
                            </view>
                            <view class="profigOrder-label">
                                联系电话：{{item.user.username}}
                            </view>
                            <view class="profigOrder-label profigOrder-label-color">
                                佣金：￥{{item.bonus}}
                            </view>
                            <view class="profigOrder-label">
                                当前状态：{{item.order.status}}
                            </view>
                        </view>
                    </view>
                    <view class="pagesLoding" wx:if="{{lodingStats}}">
                        <block wx:if="{{page.has_more}}">
                            <image class="pagesLoding-icon" src="/static/icon/refresh_loding.gif" mode="widthFix">
                            </image>
                            加载中...
                        </block>
                        <block wx:else>
                            没有更多了~
                        </block>
                    </view>
                </block>
                <!-- 暂无内容 -->
                <view class="public-hint" wx:else>
                    <image src="/static/img/legal_tips.png"></image>
                    <view>抱歉，目前暂无数据~</view>
                </view>
            </view>

            <!-- 我的团队 -->
            <view class="profigTeam {{changeStyle == 'team' ? 'show' : ''}}">
                <view class="profigTeam-module-title">
                    <view class="profigOrder-module-title">
                        <view class="profigOrder-module-name">
                            共<text>{{publicData.length}}</text>人
                        </view>
                        <view class="profigReport-module-picker">
                            <picker bindchange="screenTeam" value="{{teamIndex}}" range-key="name" range="{{teamWay}}">
                                {{teamWay[teamIndex].name}}
                            </picker>
                            <image class="profigReport-module-icon" src="/static/icon/arrow_down.png"></image>
                        </view>
                    </view>
                    <view class="profigTeam-ranking {{teamSort == 'asc' ? 'ascactive' : 'descactive'}}" bindtap="teamTap">
                        创收排行
                    </view>
                </view>
                <block wx:if="{{publicData.length > 0}}">
                    <view class="profigTeam-list">
                        <view class="profigTeam-nav">
                            <view class="profigTeam-name">达人姓名</view>
                            <view class="profigTeam-name">联系电话</view>
                            <view class="profigTeam-name">身份</view>
                            <view class="profigTeam-name">创收额</view>
                        </view>
                        <view class="profigTeam-label">
                            <view class="profigTeam-label-list" wx:for="{{publicData}}" wx:key="publicData">
                                <view class="profigTeam-label-cont profigTeam-label-head">
                                    <image src="{{item.user.avatar}}" mode="aspectFill"></image>
                                    <view class="nowrap profigTeam-label-name">{{item.user.nickname}}</view>
                                </view>
                                <view class="nowrap profigTeam-label-cont">
                                    {{item.user.username}}
                                </view>
                                <view class="nowrap profigTeam-label-cont">
                                    {{item.user.identity.identity_name}}
                                </view>
                                <view class="nowrap profigTeam-label-cont profigTeam-label-color">
                                    {{item.balance}}
                                </view>
                            </view>
                            <view class="pagesLoding" wx:if="{{lodingStats}}">
                                <block wx:if="{{page.has_more}}">
                                    <image class="pagesLoding-icon" src="/static/icon/refresh_loding.gif"
                                        mode="widthFix">
                                    </image>
                                    加载中...
                                </block>
                                <block wx:else>
                                    没有更多了~
                                </block>
                            </view>
                        </view>
                    </view>
                </block>
                <!-- 暂无内容 -->
                <view class="public-hint" wx:else>
                    <image src="/static/img/legal_tips.png"></image>
                    <view>抱歉，目前暂无数据~</view>
                </view>
            </view>
        </view>
    </view>
</view>