<!--pages/payee/index.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>
<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-radio-group value="{{ result }}" bind:change="onChange">
    <van-cell-group>
      <van-cell
        wx:for="{{ list }}"
        wx:key="index"
        value-class="value-class"
        clickable
        data-index="{{ item.id }}"
        bind:click="toggle"
        use-label-slot
      >
        <view slot="icon" style="margin-right: 10px;">
          <image src="/image/apply/{{iOf.indexOf(item.bankTypeText,'中国银行') > -1 ? 'icon_icbc':iOf.indexOf(item.bankTypeText,'农商行') > -1 ? 'icon_RCB':iOf.indexOf(item.bankTypeText,'农业银行') > -1 ? 'icon_ABC':iOf.indexOf(item.bankTypeText,'建设银行') > -1 ? 'icon_CCB':iOf.indexOf(item.bankTypeText,'邮储银行') > -1 ? 'icon_EMS':iOf.indexOf(item.bankTypeText,'工商银行') > -1 ? 'icon_BOC':iOf.indexOf(item.bankTypeText,'中原银行') > -1 ? 'icon_ZYB':'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-radio
          catch:tap="noop"
          checked-color="#2C8E68"
          class="checkboxes-{{ index }}"
          name="{{ item.id }}"
        />
      </van-cell>
    </van-cell-group>
  </van-radio-group>
  <view class="bottom">
    <view class="btn2" bindtap="goSubmit">确认</view>
  </view>

  <wxs module="iOf">
  var indexOf = function(name,value){
    return name.indexOf(value);
  }
  module.exports.indexOf = indexOf;
</wxs>