<view class="content">
    <!-- tabs -->
    <view class="screen-flex">
        <view class="screen-picker">
            <picker range="{{statusArr}}" range-key="title" value="{{statusIndex}}" bindchange="onPickerChange">
                <view class="screen-text">
                    {{ statusArr[statusIndex].title }}<image class="screen-icon" src="/static/icons/empowerArrow.png"></image>
                </view>
            </picker>
        </view>
        <view class="screen-picker">
            <picker range="{{empowerArr}}" range-key="title" value="{{empowerIndex}}" bindchange="onPickerClass">
                <view class="screen-text">
                    {{ empowerArr[empowerIndex].title }}<image class="screen-icon" src="/static/icons/empowerArrow.png"></image>
                </view>
            </picker>
        </view>
    </view>
    <!-- 订单管理列表 -->
    <view class="orders" wx:if="{{orders.length > 0}}">
        <view class="orders-item" wx:for="{{orders}}" wx:key="orders">
            <view class="orders-flex">
                <view class="no nowrap" bindtap="copyNo" data-no="item.order_no">
                    <text class="orders-tag" wx:if="{{!item.is_my}}">客户</text>
                    <text class="orders-tag order-tag-my" wx:else>个人</text>
                    {{item.order_no}}
                </view>
                <view class="state">{{item.status_text}}</view>
            </view>
            <view class="orders-content">
                <view class="orders-content-item">
                    <label>课程名称</label>
                    <view class="nowrap orders-content-type">{{item.empower.title}}</view>
                </view>
                <view class="orders-content-item orders-content-bottom" bindtap="typeTap" data-index="{{index}}" data-type="{{item.is_show_type}}">
                    <label>课程数量</label>
                    <view class="nowrap orders-content-type">
                        ×{{item.items.count}}<image class="orders-content-icon {{item.is_show_type ? 'active' : ''}}" src="/static/icons/arrow_more.png"></image>
                    </view>
                </view>
                <view class="orders-content-block" wx:if="{{item.is_show_type}}">
                    <view class="item-flex" wx:for="{{item.items.lists}}" wx:key="lists" wx:for-item="citem">
                        <view class="item-flex-title">{{citem.semester.subtitle}}({{citem.name}})</view>
                        <view class="item-flex-value">￥{{citem.price}}</view>
                    </view>
                </view>
                <view class="orders-content-item">
                    <label>支付金额</label>
                    <view class="nowrap">￥{{item.price}}</view>
                </view>
                <view class="orders-content-item">
                    <label>下单时间</label>
                    <view class="nowrap">{{item.created_at}}</view>
                </view>
                <view class="orders-content-item" wx:if="{{item.paid_at != ''}}">
                    <label>支付时间</label>
                    <view class="nowrap">{{item.paid_at}}</view>
                </view>
            </view>
            <view class="orders-flex">
                <view class="btns">
                    <view class="btns-item btns-border" wx:if="{{item.status == 0}}" bindtap="onCancel" data-id="{{item.order_id}}">取消</view>
                    <view class="btns-item btns-border" wx:if="{{item.status == 0}}" bindtap="onPay" data-item="{{item}}">支付</view>
                    <view class="btns-item" bindtap="onShowUsers" data-items="{{item.items}}">报名信息</view>
                </view>
            </view>
        </view>

        <view class="pagesLoding" wx:if="{{lodingStats}}">
            <block wx:if="{{page.has_more}}">
                <image class="pagesLoding-icon" src="/static/icons/refresh_loding.gif" mode="widthFix"></image>加载中...
            </block>
            <block wx:else>
                没有更多了~
            </block>
        </view>
    </view>

    <view class="pack-center pages-hint" wx:else>
        <image src="/static/imgs/text_null.png"></image>
        <view>暂无数据</view>
    </view>
   
    <!-- 弹出报名人信息 -->
    <view class="users-back {{usersShow ? 'active' : ''}}"></view>
    <view class="users-content {{usersShow ? 'active' : ''}}">
        <view class="users-title">报名信息<image class="users-content-icon" bindtap="usersHide" src="/static/icons/close.png"></image></view>
        <view class="users-lists">
            <view class="users-lists-item" wx:for="{{users}}" wx:key="index">
                <view class="users-item nowrap"><label>报名姓名</label>{{item.name}}</view>
                <view class="users-item nowrap"><label>报名手机</label>{{item.mobile}}</view>
                <view class="users-item nowrap"><label>课程名称</label>{{item.semester.subtitle}}</view>
                <view class="users-item nowrap"><label>签到状态</label><text class="bold">{{item.status_text}}</text></view>
                <view class="users-item"><label>课程地址</label>{{item.semester.address}}</view>
            </view>
        </view>
    </view>
</view>