<!--pages/payee/add/add.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'}};">{{projectId?"修改":"新增"}}收款方</text>
</view>
<view class="main-box table-box" style="margin-top:{{isIPX?'100px':'75px'}};">
  <van-popup show="{{showBankType}}" round position="bottom"  bind:close="closeBox" data-name="showBankType">
    <van-picker
      columns="{{bankTypeOptions}}"
      show-toolbar
      value-key="dictLabel"
      bind:cancel="closeBox"
      bind:confirm="onConfirm"
      data-name="showBankType"
      data-value="form.bankType"
    />
  </van-popup>
  
  <van-field label="收款方" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee"/>
  <van-field label="收款账号" value="{{ form.payeeAccount }}" placeholder="请输入收款账号" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payeeAccount"/>

  <van-popup show="{{showPayeeType}}" round position="bottom"  bind:close="closeBox" data-name="showPayeeType">
    <van-picker
      columns="{{payeeTypeOptions}}"
      show-toolbar
      value-key="dictLabel"
      bind:cancel="closeBox"
      bind:confirm="onConfirm"
      data-name="showPayeeType"
      data-value="form.payeeType"
    />
  </van-popup>
  <van-field readonly label="收款方类型" value="{{ form.payeeTypeText }}" placeholder="请选择" border="{{ false }}" bind:change="onChange" input-align="right" required is-link arrow-direction	="down"  bindtap="openBox" data-name="showPayeeType" />

  <van-popup show="{{showAccountType}}" round position="bottom"  bind:close="closeBox" data-name="showAccountType">
    <van-picker
      columns="{{accountTypeOptions}}"
      show-toolbar
      value-key="dictLabel"
      bind:cancel="closeBox"
      bind:confirm="onConfirm"
      data-name="showAccountType"
      data-value="form.accountType"
    />
  </van-popup>

  <van-field readonly label="账户类型" value="{{ form.accountType }}" border="{{ false }}" input-align="right" required>
    <view slot="input">
      <van-radio-group
        value="{{ form.accountType }}"
        bind:change="onChange"
        direction="horizontal"
        data-value="form.accountType"
      >
        <van-radio name="1" checked-color="#2C8E68">公户</van-radio>
        <van-radio name="2" checked-color="#2C8E68">私户</van-radio>
      </van-radio-group>
    </view>
  </van-field>


  <!-- <van-field readonly label="账户类型" value="{{ form.accountTypeText }}" placeholder="请选择" border="{{ false }}" bind:change="onChange" input-align="right" required is-link arrow-direction	="down"  bindtap="openBox" data-name="showAccountType"/> -->

  <van-field readonly label="所属银行" value="{{ form.bankTypeText }}" placeholder="请选择" border="{{ false }}" bind:change="onChange" input-align="right" required is-link arrow-direction	="down" bindtap="openBox" data-name="showBankType"/>
  <van-popup show="{{showDeposit}}" round position="bottom"  bind:close="closeBox" data-name="showDeposit">
    <van-picker
      columns="{{depositOptions}}"
      show-toolbar
      value-key="bankDeposit"
      bind:cancel="closeBox"
      bind:confirm="onConfirmDeposit"
      data-name="showDeposit"
      data-value="form.bankDeposit"
    />
  </van-popup>
  <!-- openBox  -->
  <van-field readonly label="开户行" value="{{ form.bankDeposit }}" placeholder="请选择" border="{{ false }}" bind:change="onChange" input-align="right" required is-link arrow-direction	="down"  bindtap="goBank" data-name="showDeposit" />
  <van-field label="联行号" value="{{ form.payeePaymentLines }}" placeholder="请输入" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payeePaymentLines"/>
</view>
<view class="main-box table-box" style="margin-top:15px;">
  <input class="weui-input" bindinput="bindKeyInput" placeholder="粘贴信息，自动拆分收款方、收款账号"/>
</view>
  <view class="bottom">
    <view class="btn2" bindtap="goSubmit">保存</view>
  </view>