<!--packageI/public_welfare_fund/record/record.wxml-->
<view class="welfare-record-list">
      <!-- 支出记录 -->
      <view wx:if="{{type == 1}}">
        <view class="expenditure-item" wx:for="{{expendList}}" wx:key="index">
          <view class="row" style="margin-bottom: 0.625rem">
            <text class="remarks van-ellipsis">{{ item.remark }}</text>
            <view class="amount">{{ item.amount }}</view>
          </view>
          <view class="row">
            <text class="remarks-type">公益支出</text>
            <text class="time">{{ item.created_at }}</text>
          </view>
        </view>
        <van-empty wx:if="{{expendList.length == 0}}" description="空空如也" />
      </view>
      
      <!-- 明细记录 -->
      <view wx:else>
        <view class="person-item"  wx:for="{{fundList}}" wx:key="index">
          <image class="avatar" src="{{item.member.avatar_image}}"></image>
          <view class="user-nick">
            <view style="display: flex;">
              <text class="name van-ellipsis">{{ item.member.username }}</text>
              <text class="user-id">ID：{{ item.member_id }}</text>
            </view>
            <view class="time">{{ item.created_at }}</view>
          </view>
          <view class="amount-statistics">
            <view class="amount" style="color: {{item.change_type == 1 ? '#ff5a5a' : '#5AB79C'}}">{{ item.change_type == 1 ? "+" : "-" }}{{ item.amount }}</view>
            <view class="balance">公益可用：{{ item.surplus_amount_total }}</view>
          </view>
        </view>
        <van-empty wx:if="{{fundList.length == 0}}" description="空空如也" />
      </view>
    </view>
