<!--packageF/storeManagement/withdrawalList/withdrawalList.wxml-->
<view>

  <view class="stkcky">
    <view class="header-search">
      <van-search value="{{keyword}}" bindsearch="handSearch" clearable shape="round" style="flex: 1;"
        placeholder="搜索会员">
      </van-search>
    </view>
    <van-tabs active="{{status}}" wx:if="{{types.length>0}}" bindchange="changeTabs" class="status-tab" ellipsis="{{true}}">
      <van-tab wx:for="{{types}}" title="{{item.title}}" name="{{item.name}}"></van-tab>
    </van-tabs>
  </view>


  <view class="list" wx:if="{{networkLoading && listData.length>0}}">
    <view class="item" wx:for="{{listData}}" wx:key="id" data-id="{{item.id}}" data-name="withdrawalDetail"
    bindtap="gotoPage">
      <view class="top-order">
        <i class="iconfont {{item.pay_way_icon}}"></i>
        <view class="order">
          <view class="p order-number">{{item.withdraw_sn}}</view>
          <view class="p time">{{item.created_at}}</view>
        </view>
        <view class="status {{tool.colorClass(item.status)}}">{{item.status_name}}</view>
      </view>
      <view class="bottom-member">
        <view class="avatar">
          <image src="{{item.has_one_member ? item.has_one_member.avatar : 'https://dev3.yunzmall.com/addons/yun_shop/static/images/photo-mr.jpg'}}" />
        </view>
        <view class="name-box">
          <view class="p nickname text-overHide">{{item.has_one_member ? item.has_one_member.nickname : ''}}</view>
          <view class="p describe">{{item.type_name}}</view>
        </view>
        <view class="cost">
          <view class="p amounts">申请金额：{{item.amounts}}</view>
          <view class="p poundage">手续费：{{item.poundage}}</view>
          <wxs module="filters" src="../../../utils/filters.wxs"></wxs>
          <view class="p payment">应打款：<text class="red-text">{{filters.toFix2((item.amounts - item.poundage))}}</text></view>
        </view>
      </view>
    </view>
  </view>


  <view wx:if="{{ networkLoading && listData.length==0}}" class="blank">
  <image src='https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/blank.png' mode='widthFix' />
</view>


</view>



<wxs module="tool">

  function colorClass(status){
    switch (parseInt(status)) {
        case -1:
          return 'grey';
        case 0:
          return 'red';
        case 1:
          return 'yellow';
        case 2:
          return 'green';
        case 3:
          return 'orange ';
        case 4:
          return 'blue';
        }
  }

  module.exports.colorClass=colorClass

</wxs>