<!--pages/member/distributionOrder/distributionOrder.wxml-->
<view class="distributionOrder">
	<van-tabs active="{{selected}}" bind:change="swichTab">
		<van-tab title="全部">
			<block wx:if="{{statusData0.length>0}}">
				<view class="order" wx:for="{{statusData0}}"  wx:key="index">
					<view class="font" catchtap="toggle" data-idx="{{index}}" class="or">
						<view class="tbs" wx:if="{{item.order}}">
							<view class="ul item2">
								<view class="li">{{item.order.order_sn}}({{item.hierarchy}}级)</view>
								<view class="li">{{item.order.create_time}}</view>
							</view>
							<view class="ul item3">
								<view class="li">+{{item.commission}}</view>
								<view class="li red">{{item.order.status_name}}</view>
							</view>
						</view>
					</view>
					<view class="order_detail {{item.display?'opens' :''}}" wx:if="{{open_order_detail==1||open_order_buyer==1 || open_order_buyer_info==1}}">
						<view class="team_list" wx:if="{{open_order_buyer==1}}">
							<view class="img" wx:if="{{item.member}}">
								<image src="{{item.member.avatar}}" mode='widthFix' />
							</view>
							<view class="info" wx:if="{{item.member}}">
								<view class="top">
									{{item.member.nickname}}
								</view>
								<view class="bottom">
									<text class="span">微信号:</text>
								</view>
							</view>
						</view>
						<view class="team_goods distribution-goods" wx:for-item="goods"  wx:key="index" wx:for="{{item.order_goods}}" wx:if="{{open_order_detail==1}}">
							<view class="img">
								<image src="{{goods.thumb}}" mode='widthFix' />
							</view>
							<view class="inner">
								<view class="name">{{goods.title}}</view>
							</view>
							<view class="price">
								<view class="b">
									<view class="top">{{language['money']}}{{(goods.goods_price/goods.total)}}</view>
									<view class="bottom">×{{goods.total}}</view>
								</view>
								<view class="Total">{{language['money']}}{{goods.goods_price}}</view>
							</view>
						</view>
						<view class="paid_in">实付: {{language['money']}}{{item.order.price}}</view>
            <view class="order_list" wx:if="{{open_order_buyer_info==1}}">
              <view class="person" wx:if="{{item.order&& item.order.address}}"> <text>收货人:{{item.order.address.realname?item.order.address.realname: '无'}}</text> </view>
              <view class="mobile" wx:if="{{item.order&& item.order.address}}"> <text>手机:{{item.order.address.mobile?item.order.address.mobile:"暂无手机"}}</text> </view>
            </view>
					</view>
				</view>
			</block>
			<block wx:else>
				<view class="nomessage">
					没有更多了
				</view>
			</block>
		</van-tab>
		<van-tab title="待付款">
			<block wx:if="{{statusData1.length>0}}">
				<view class="order" wx:for="{{statusData1}}"  wx:key="index">
					<view class="font" catchtap="toggle" data-idx="{{index}}">
						<view class="tbs" wx:if="{{item.order}}">
							<view class="ul item2">
								<view class="li">{{item.order.order_sn}}({{item.hierarchy}}级)</view>
								<view class="li">{{item.order.create_time}}</view>
							</view>
							<view class="ul item3">
								<view class="li">+{{item.commission}}</view>
								<view class="li red">{{item.order.status_name}}</view>
							</view>
						</view>
					</view>
					<view class="order_detail {{item.display?'opens':''}}" wx:if="{{open_order_detail==1||open_order_buyer==1 || open_order_buyer_info==1}}">
						<view class="team_list" wx:if="{{open_order_buyer==1}}">
							<view class="img" wx:if="{{item.member}}">
								<image src="{{item.member.avatar}}" mode='widthFix' />
							</view>
							<view class="info" wx:if="{{item.member}}">
								<view class="top">
									{{item.member.nickname}}
								</view>
								<view class="bottom">
									<text class="span">微信号:</text>
								</view>
							</view>
						</view>
						<view class="team_goods distribution-goods" wx:for-item="goods"  wx:key="index" wx:for="{{item.order_goods}}" wx:if="{{open_order_detail==1}}">
							<view class="img">
								<image src="{{goods.thumb}}" mode='widthFix' />
							</view>
							<view class="inner">
								<view class="name">{{goods.title}}</view>
							</view>
							<view class="price">
								<view class="b">
									<view class="top">{{language['money']}}{{(goods.goods_price/goods.total)}}</view>
									<view class="bottom">×{{goods.total}}</view>
								</view>
								<view class="Total">{{language['money']}}{{goods.goods_price}}</view>
							</view>
						</view>
						<view class="paid_in">实付: {{language['money']}}{{item.order.price}}</view>
            <view class="order_list" wx:if="{{open_order_buyer_info==1}}">
              <view class="person" wx:if="{{item.order&& item.order.address}}"> <text>收货人:{{item.order.address.realname?item.order.address.realname: '无'}}</text> </view>
              <view class="mobile" wx:if="{{item.order&& item.order.address}}"> <text>手机:{{item.order.address.mobile?item.order.address.mobile:"暂无手机"}}</text> </view>
            </view>
					</view>
				</view>
			</block>
			<block wx:else>
				<view class="nomessage">
					没有更多了
				</view>
			</block>
		</van-tab>
		<van-tab title="已付款">
			<block wx:if="{{statusData2.length>0}}">
				<view class="order" wx:for="{{statusData2}}"  wx:key="index">
					<view class="font" catchtap="toggle" data-idx="{{index}}">
						<view class="tbs" wx:if="{{item.order}}">
							<view class="ul item2">
								<view class="li">{{item.order.order_sn}}({{item.hierarchy}}级)</view>
								<view class="li">{{item.order.create_time}}</view>
							</view>
							<view class="ul item3">
								<view class="li">+{{item.commission}}</view>
								<view class="li red">{{item.order.status_name}}</view>
							</view>
						</view>
					</view>
					<view class="order_detail {{item.display?'opens':''}}" wx:if="{{open_order_detail==1||open_order_buyer==1 || open_order_buyer_info==1}}">
						<view class="team_list" wx:if="{{open_order_buyer==1}}">
							<view class="img" wx:if="{{item.member}}">
								<image src="{{item.member.avatar}}" mode='widthFix' />
							</view>
							<view class="info" wx:if="{{item.member}}">
								<view class="top">
									{{item.member.nickname}}
								</view>
								<view class="bottom">
									<text class="span">微信号:</text>
								</view>
							</view>
						</view>
						<view class="team_goods distribution-goods" wx:for-item="goods"  wx:key="index" wx:for="{{item.order_goods}}" wx:if="{{open_order_detail==1}}">
							<view class="img">
								<image src="{{goods.thumb}}" mode='widthFix' />
							</view>
							<view class="inner">
								<view class="name">{{goods.title}}</view>
							</view>
							<view class="price">
								<view class="b">
									<view class="top">{{language['money']}}{{(goods.goods_price/goods.total)}}</view>
									<view class="bottom">×{{goods.total}}</view>
								</view>
								<view class="Total">{{language['money']}}{{goods.goods_price}}</view>
							</view>
						</view>
						<view class="paid_in">实付: {{language['money']}}{{item.order.price}}</view>
            <view class="order_list" wx:if="{{open_order_buyer_info==1}}">
              <view class="person" wx:if="{{item.order&& item.order.address}}"> <text>收货人:{{item.order.address.realname?item.order.address.realname: '无'}}</text> </view>
              <view class="mobile" wx:if="{{item.order&& item.order.address}}"> <text>手机:{{item.order.address.mobile?item.order.address.mobile:"暂无手机"}}</text> </view>
            </view>
					</view>
				</view>
			</block>
			<block wx:else>
				<view class="nomessage">
					没有更多了
				</view>
			</block>
		</van-tab>
		<van-tab title="已完成">
			<block wx:if="{{statusData3.length>0}}">
				<view class="order" wx:for="{{statusData3}}"  wx:key="index">
					<view class="font" catchtap="toggle" data-idx="{{index}}">
						<view class="tbs" wx:if="{{item.order}}">
							<view class="ul item2">
								<view class="li">{{item.order.order_sn}}({{item.hierarchy}}级)</view>
								<view class="li">{{item.order.create_time}}</view>
							</view>
							<view class="ul item3">
								<view class="li">+{{item.commission}}</view>
								<view class="li red">{{item.order.status_name}}</view>
							</view>
						</view>
					</view>
					<view class="order_detail {{item.display?'opens':''}}" wx:if="{{open_order_detail==1||open_order_buyer==1 || open_order_buyer_info==1}}">
						<view class="team_list" wx:if="{{open_order_buyer==1}}">
							<view class="img" wx:if="{{item.member}}">
								<image src="{{item.member.avatar}}" mode='widthFix' />
							</view>
							<view class="info" wx:if="{{item.member}}">
								<view class="top">
									{{item.member.nickname}}
								</view>
								<view class="bottom">
									<text class="span">微信号:</text>
								</view>
							</view>
						</view>
						<view class="team_goods distribution-goods" wx:for-item="goods"  wx:key="index" wx:for="{{item.order_goods}}" wx:if="{{open_order_detail==1}}">
							<view class="img">
								<image src="{{goods.thumb}}" mode='widthFix' />
							</view>
							<view class="inner">
								<view class="name">{{goods.title}}</view>
							</view>
							<view class="price">
								<view class="b">
									<view class="top">{{language['money']}}{{(goods.goods_price/goods.total)}}</view>
									<view class="bottom">×{{goods.total}}</view>
								</view>
								<view class="Total">{{language['money']}}{{goods.goods_price}}</view>
							</view>
						</view>
						<view class="paid_in">实付: {{language['money']}}{{item.order.price}}</view>
            <view class="order_list" wx:if="{{open_order_buyer_info==1}}">
              <view class="person" wx:if="{{item.order&& item.order.address}}"> <text>收货人:{{item.order.address.realname?item.order.address.realname: '无'}}</text> </view>
              <view class="mobile" wx:if="{{item.order&& item.order.address}}"> <text>手机:{{item.order.address.mobile?item.order.address.mobile:"暂无手机"}}</text> </view>
            </view>
					</view>
				</view>
			</block>
			<block wx:else>
				<view class="nomessage">
					没有更多了
				</view>
			</block>
		</van-tab>
	</van-tabs>
</view>
