<patient-tabs-pro
  showAll="{{ false }}"
  hasFilter="{{ false }}"
  patientId="{{ patientId }}"
  onAutoFilter="onChange"
>
  <view class="recharge">
    <view class="recharge-block flex">
      <view a:if="{{ cardList.length > 0 }}">
        <view class="recharge-balance">￥{{ clinicCard.balance }}</view>
        <view>就诊卡：{{ clinicCard.cardNum }}</view>
      </view>
      <view class="theme" a:if="{{ cardList.length > 1 }}" onTap="changePatient">切换就诊卡</view>
    </view>

    <view class="recharge-block">
      <view class="recharge-t">充值金额</view>

      <view class="recharge-amount">
        <view a:for="{{ amountItem }}" key="{{ item }}"
              class="recharge-amount-item {{ amountItemChecked === index ? 'checked' : '' }}" onTap="changeAmount"
              data-val="{{ item }}" data-idx="{{ index }}">
          ￥{{ item }}
          <view class="recharge-amount-icon">
            <icon type="success_no_circle" class="icon-s" size="12" color="#fff"/>
          </view>
        </view>
      </view>

      <view class="recharge-input">
        <view>¥</view>
        <input type="digit" controlled="{{ true }}" class="input" onInput="bindKeyInput" placeholder="点击输入充值金额" value="{{ amount }}" placeholder-class="input-placeholder"/>
      </view>
    </view>

    <view class="recharge-block-tip">如需退款请去医院人工窗口咨询</view>

    <view class="recharge-fixed">
      <button type="primary" disabled="{{ !amount }}" class="recharge-button" loading="{{ loading }}" onTap="onRecharge">充值
      </button>
    </view>
  </view>

  <select-card show="{{ modalOpened }}" onClose="onClose" onChange="chooseCard" balance="{{ true }}"
               defaultList="{{ cardList }}"/>
</patient-tabs-pro>
