<view class="sles_content">
	<van-tabs active="{{ active }}" bind:change="onChange">
		<van-tab title="经销商团队查询">
			<view class="dealer_enquiry">
				<view class="dealer_enquiry_top">
					<view class="date_btn">
						<view class="left {{dateBol_2?'active':''}}" catchtap="dateBtn_2" data-datetype="month">按月</view>
						<view class="right {{!dateBol_2?'active':''}}" catchtap="dateBtn_2" data-datetype="year">按年</view>
					</view>
					<view class="date_select">
					<picker mode="date" value="{{date_2}}" fields="{{fieldsType_2}}" start="2010-09-01" end="2026-09-01" bindchange="bindDateChange_2">
						<view class="date">{{datestr_2?datestr_2:'请选择时间'}}</view>
					</picker>
						<van-icon name="arrow-down" size="13px" />
					</view>
				</view>
				<view class="dealer_enquiry_bottom">
					<block wx:if="{{time_types==1}}">
						<view class="li">
							<view class="top">{{month_sales}}</view>
							<view class="bottom">{{month}}月销量</view>
						</view>
						<view class="li">
							<view class="top">{{year_sales}}</view>
							<view class="bottom">{{year}}销量</view>
						</view>
					</block>
					<block wx:if="{{time_types==2}}">
						<view class="li">
							<view class="top">{{month_sales}}</view>
							<view class="bottom">01月销量</view>
						</view>
						<view class="li">
							<view class="top">{{year_sales}}</view>
							<view class="bottom">{{year}}销量</view>
						</view>
					</block>
				</view>
			</view>
		</van-tab>
		<van-tab title="下级经销商团队查询">
			<view class="subordinate_inquiries">
				<view class="subordinate_inquiries_top">
					<view class="date_btn">
						<view class="left {{dateBol?'active':''}}" catchtap="dateBtn" data-datetype="month">按月</view>
						<view class="right {{!dateBol?'active':''}}" catchtap="dateBtn" data-datetype="year">按年</view>
					</view>
					<view class="date_select">
						<picker mode="date" value="{{date}}" fields="{{fieldsType}}" start="2010-09-01" end="2026-09-01" bindchange="bindDateChange">
							<view class="date">{{datestr?datestr:'请选择时间'}}</view>
						</picker>
						<van-icon name="arrow-down" size="13px" />
					</view>
				</view>
				<view class="subordinate_inquiries_bottom">
					<block wx:if="{{datas.length>0}}">
						<view class="li" wx:for="{{datas}}" wx:key="index">
							<view class="left">
								<view class="pic_show">
									<image src="{{item.has_one_member.avatar}}"
									 mode='aspectFill' />
								</view>
								<view class="user_message">
									<view class="user_top">
										<view class="user_id">ID:{{item.uid}}</view>
										<view class="user_grade">{{item.has_one_level.level_name}}</view>
									</view>
									<view class="user_bottom">
										{{item.has_one_member.nickname}}
									</view>
								</view>
							</view>
							<block wx:if="{{time_types_2==1}}">
								<view class="center">
									<view class="top">{{month_2}}月销量</view>
									<view class="bottom">{{item.month_sales}}</view>
								</view>
								<view class="right">
									<view class="top">{{year_2}}年销量</view>
									<view class="bottom">{{item.year_sales}}</view>
								</view>
							</block>
							<block wx:if="{{time_types_2==2}}">
								<view class="center">
									<view class="top">1月销量</view>
									<view class="bottom">{{item.month_sales}}</view>
								</view>
								<view class="right">
									<view class="top">{{year_2}}年销量</view>
									<view class="bottom">{{item.year_sales}}</view>
								</view>
							</block>
						</view>
					</block>
					<block wx:else>
						<view style="text-align: center;padding-top: 50rpx;">
							暂无下级!
						</view>
					</block>
				</view>
			</view>
		</van-tab>
	</van-tabs>
</view>
