<wrapper>
  <view class="hospital-edit-patient">
    <form-row title="关系">
      <select-relationship onChange="onRelationChange">
        <form-arrow value="{{ editForm.relationShip }}" placeholder="请选择关系"/>
      </select-relationship>
    </form-row>
    <form-row title="就诊人姓名" common="true">
      <view class="input-control">
        <input
          type="text"
          onInput="onNameInput"
          placeholder="请输入真实姓名"
          value="{{ editForm.name }}"
          placeholder-class="placeholder"
          disabled="{{ isAuthSuccess && !editForm.id }}"
        />
      </view>
    </form-row>
    <!-- <form-row title="就诊人性别">
      <view class="row-m">
        <radio-custom-group
          options="{{ genders }}"
          onChange="onSexChange"
          value="{{ editForm.sex }}"
        />
      </view>
    </form-row> -->
    <form-row title="证件类型" common="true">
      <picker
        range-key="name"
        range="{{ certTypes }}"
        onChange="onCertTypeChange"
      >
        <view><form-arrow value="{{ editForm.idCardType }}" /></view>
      </picker>
    </form-row>
    <form-row title="证件号码">
      <view class="input-control">
        <input
          type="text"
          onInput="onCardNoInput"
          placeholder="请输入证件号码"
          value="{{ editForm.idCardNo }}"
          placeholder-class="placeholder"
          disabled="{{ isAuthSuccess && !editForm.id }}"
        />
      </view>
    </form-row>
    <form-row title="手机号码">
      <view class="input-control">
        <input
          type="text"
          onInput="onPhoneInput"
          placeholder-class="placeholder"
          value="{{ editForm.phoneNumber }}"
          placeholder="请输入在医院预留的手机号"
          disabled="{{ isAuthSuccess && !editForm.id }}"
        />
      </view>
    </form-row>
    <form-row title="是否医保">
      <view class="input-control">
       <am-checkbox
        ctrlChecked="{{editForm.isInsu === '1'}}"
        onChange="checkedInsuChange"
        />
        <text class="isinsu-text" onTap="checkedTextInsuChange">是</text>
        <am-checkbox
          ctrlChecked="{{ editForm.isInsu === '0'}}"
          onChange="checkedNoInsuChange"
        />
        <text class="isinsu-text" onTap="checkedTextnoInsuChange">否</text>
      </view>
    </form-row>
    <view class="isinsu-alert">
      温馨提示：
      1、首次来院就诊者,请按上面“无诊疗卡”按钮建档,已有诊疗卡者可直接绑卡。
      2、无诊疗卡患者,预约挂号成功后,就诊前请务必到门诊大厅客服中心完善个人信息,否则会影响您的正常就诊。</view>
    <view class="footer">
      <button class="submit-button" onTap="patientSave">保存</button>
    </view>
  </view>
  <select-card
    show="{{ show }}"
    onClose="onClosePopup"
    onChange="onCardChange"
    defaultList="{{ medicCardsList }}"
  />
</wrapper>
