<!--packageI/public_welfare_fund/publicWelfare/publicWelfare.wxml-->
<view id="public-welfare-fund">
    <view class="header-swipe">
      <view wx:if="{{is_expend_member}}" class="link-expenditure" bindtap="toRecord">支出明细</view>
      <swiper class="my-swipe" 
        wx:if="{{hasSwipeImage}}"
        style='height:{{Height}}'
      	indicator-dots="{{true}}"
        indicator-color="white"
        interval="{{3000}}"
        autoplay="{{true}}"
        circular="{{true}}"
      >
      <block wx:for="{{swipers}}">
        <swiper-item class="my-swiper-item" wx:if="{{item.thumb}}"  wx:key="index" bindtap="jumpLink" data-link="{{item.small_link}}">
          <image class="swiper-img" src="{{item.thumb}}" mode="widthFix" bindload='imgHeight'></image>
        </swiper-item>
      </block>
      </swiper>
    </view>

    <view class="background-box">
      <!-- 收入明细 -->
      <view class="extension-money-box">
        <view class="extension-money-box-head">
          <view class="time-box">
            <text class="tab {{income.type===activeDate ? 'active': ''}}" catchtap="changeDate"
              data-index="{{income.type}}"
              wx:for="{{dateList}}" wx:for-item="income" wx:key="index">{{income.title}}
            </text>
          </view>
          <block wx:if="{{is_expend_member}}">
            <view class="asset-line"></view>
            <view class="asset-right-box" catchtap="toDonations">
              <icon class="iconfont icon-fontclass-shouru"></icon>
              <text>公益支出</text>
            </view>
          </block>
        </view>

        <view class="extension-money-box-body" wx:if="{{extension}}">
          <view class="body-head">
            <view class="head-line"></view>
            <view class="head-circle"></view>
            <view class="head-line head-line-right"></view>
          </view>
          <view class="body-money">
            <view class="body-money-item" wx:for="{{extension}}" wx:key="index"
                  catchtap="clickExtension" data-index="{{index}}">
              <text class="money-top">{{ item.value }}</text>
              <text>{{ item.name }}</text>
            </view>
          </view>
        </view>
        <view class="tips">本页收入统计仅包含已经结算部分，不含未结算部分~</view>
      </view>
    </view>

    <view class="eChats-box1">
      <van-tabs active="{{ charts_type }}" nav-class="tab-head" tab-active-class="tab-active" bind:change="tabChange">
        <van-tab title="公益收益" name="1"></van-tab>
        <van-tab title="公益支出" name="2"></van-tab>
      </van-tabs>
      <view style="height:220px;width: 680rpx;" wx:if="{{charts_type == 1}}">
        <ec-canvas id="echats-income" canvas-id="echats-income" ec="{{ecIncome}}" style="height:220px;width: 680rpx;"></ec-canvas>
      </view>
      <view style="height:220px;width: 680rpx;" wx:else>
        <ec-canvas id="echats-income-pie" canvas-id="echats-income-pie" ec="{{ecIncome}}" style="height:220px;width: 680rpx;"></ec-canvas>
      </view>
    </view>

    <view class="list-box">
      <van-tabs nav-class="tab-head" active="{{ listType }}" tab-active-class="tab-active" bindchange="setListType">
        <van-tab title="公益人员" name="0"></van-tab>
        <van-tab title="公益支出" name="2"></van-tab>
        <van-tab title="公益订单" name="1"></van-tab>
      </van-tabs>

      <view class="list">
        <personnel-list wx:if="{{listType == 0}}" personnelList="{{personnelList}}" language="{{language}}"
        bind:clickItem="clickMemberAvatar"
        ></personnel-list>
        <expenditure-list wx:if="{{listType == 2}}" expendList="{{expendList}}" language="{{language}}"></expenditure-list>
        <order-list wx:if="{{listType == 1}}" orderList="{{orderList}}" language="{{language}}"></order-list>
      </view>
    </view>
  </view>
