<!--pages/payee/list/list.wxml-->
<view class="ns" style="height:{{isIPX?'88px':'64px'}};">
  <image src="/image/apply/back.png" style="top:{{isIPX?'54px':'30px'}};" mode="widthFix" bindtap="back"></image>
  <text style="top:{{isIPX?'54px':'30px'}};">收款方</text>
</view>
<scroll-view scroll-y refresher-threshold="0" style="height:{{scrollHeight}}px" bindscrolltolower="paging" lower-threshold="100">
  <view class="search_box" style="margin-top:{{isIPX?'100px':'75px'}};">
    <van-search
      value="{{ value }}"
      shape="round"
      background="transparent"
      placeholder="请输入搜索关键词"
      clearable
      bind:change="goSearch"
    />
    <view class="add_btn" bindtap="goAdd"><text>新增</text></view>
  </view>

  <van-swipe-cell right-width="{{ 65 }}" class="workflow" wx:for="{{list}}" wx:key="index">
    <van-cell
      value-class="value-class"
      clickable
      use-label-slot
      data-index="{{ index }}" 
      data-id="{{item.id}}" 
      bindtap="goEdit"
    >
      <view slot="icon" style="margin-right: 10px;">
        <image wx:if="{{item.bankType == 1}}" src="/image/apply/icon_icbc.png" style="width: 20px;height: 20px;vertical-align: middle;"></image>
        <image wx:elif="{{item.bankType == 2}}" src="/image/apply/icon_RCB.png" style="width: 20px;height: 20px;vertical-align: middle;"></image>
        <image wx:elif="{{item.bankType == 3}}" src="/image/apply/icon_ABC.png" style="width: 20px;height: 20px;vertical-align: middle;"></image>
        <image wx:elif="{{item.bankType == 4}}" src="/image/apply/icon_CCB.png" style="width: 20px;height: 20px;vertical-align: middle;"></image>
        <image wx:elif="{{item.bankType == 5}}" src="/image/apply/icon_EMS.png" style="width: 20px;height: 20px;vertical-align: middle;"></image>
        <image wx:else src="/image/apply/icon_other.png" style="width: 20px;height: 20px;vertical-align: middle;"></image>
      </view>
      <view slot="title">
        {{item.payee}}
      </view>
      <view slot="label">
        <text decode = "{{true}}">{{item.payeeAccountText}}&emsp;&emsp;&emsp;&emsp;{{item.bankTypeText}}</text>
      </view>
    </van-cell>
    <view slot="right" class="deleteBox">
      <view style="flex: 1;height: 100%;display: flex;align-items: center;flex-direction: column;justify-content: center;background-color: rgb(255,0,0,0.2);" data-id="{{item.id}}" data-index="{{index}}" bindtap="delete">
      <view>
        <image src="../../../image/apply/icon_delete.png" style="width: 25px;height: 25px;margin: 0 auto;display: block;" ></image>
      </view>
      <view>
        <text style="color:red">删除</text>
      </view>
    </view>
    </view>
  </van-swipe-cell>
  <view class="ipXbtn"></view>

</scroll-view>
