<!--packageI/warehouseFarm/warehouseFarmGiftLog/warehouseFarmGiftLog.wxml-->
<van-tabs active="{{ activeName }}" bind:click="handleClick" sticky ellipsis="{{false}}" swipeable>
  <van-tab title="{{titleArr[0].name}}">
    <view class="list" wx:if="{{dataList[0] && dataList[0].list.length>0}}">
      <view class="list-child" wx:for="{{dataList[0].list}}" wx:for-index="index" wx:for-item="item" catchtap="toUrl" data-url="/packageI/warehouseFarm/warehouseFarmGiftDetail/warehouseFarmGiftDetail" data-mode="receiving" data-records_id="{{item.id}}">
        <view class="top-box">
          <view class="time">创建时间：{{ item.created_at }}</view>
          <view class="status">{{ item.status_name }}</view>
        </view>
        <view class="list-item" wx:if="{{item.has_one_goods}}">
          <image class="good-img" src="{{item.has_one_goods.thumb}}" alt="" />
          <view class="item-right">
            <view class="title">{{ item.has_one_goods.title }}</view>
            <view class="good-info">
              <view class="stock"></view>
              <view class="button" wx:if="{{item.status == 0}}"><i class="iconfont icon-zb_all_share"></i></view>
            </view>
          </view>
        </view>
        <view wx:if="{{activeName == 0}}">
          <view class="receive-member">已领取数量：{{ item.already_nums }}/{{ item.goods_num }}</view>
          <view class="receive-member">已领取人数：{{ item.person_num }}/{{ item.share_num }}</view>
        </view>
      </view>
    </view>
    <view wx:else style="padding: 50px 0;text-align: center;">暂无数据 ~</view>
  </van-tab>
  <van-tab title="{{titleArr[1].name}}">
    <view class="list" wx:if="{{dataList[1] && dataList[1].list.length>0}}">
      <view class="list-child" wx:for="{{dataList[1].list}}" wx:for-index="index" wx:for-item="item" catchtap="toUrl" data-url="/packageI/warehouseFarm/warehouseFarmGiftDetail/warehouseFarmGiftDetail" data-mode="getgift" data-records_id="{{item.id}}">
        <view class="top-box">
          <view class="time">创建时间：{{ item.created_at }}</view>
          <view class="status">{{ item.status_name }}</view>
        </view>
        <view class="list-item" wx:if="{{item.belongs_to_gift.has_one_goods}}">
          <image class="good-img" src="{{item.belongs_to_gift.has_one_goods.thumb}}" alt="" />
          <view class="item-right">
            <view class="title">{{ item.belongs_to_gift.has_one_goods.title }}</view>
            <view class="good-info">
              <view class="stock" wx:if="{{activeName == 1}}">领取数量：{{item.nums}}</view>
              <view class="button" wx:if="{{item.belongs_to_gift.status == 0}}"><i class="iconfont icon-zb_all_share"></i></view>
            </view>
          </view>
        </view>
        <view class="receive-member" wx:if="{{item.belongs_to_gift.has_one_give}}">
          领取会员：
          <image class="avatar" src="{{item.belongs_to_gift.has_one_give.avatar_image}}" alt="" />
          <view style="color: #3d3d3d;">{{ item.belongs_to_gift.has_one_give.nickname }}</view>
        </view>
      </view>
    </view>
    <view wx:else style="padding: 50px 0;text-align: center;">暂无数据 ~</view>
  </van-tab>
</van-tabs>