<view class="admission-record">
  <!-- 入院登记列表 -->
  <view class="admission-record-list" a:if="{{ hospitalizationRecordList && hospitalizationRecordList.length > 0 }}">
    <block a:for="{{ hospitalizationRecordList }}">
      <view class="admission-record-item" key="{{ item.patientId }}">
        <!-- 标题 -->
        <view class="admission-record-header">
          <view class="header-left">{{ item.inpatientName }}</view>
          <!-- 气泡 -->
          <popover className="popover-mask" position="{{ item.popover.position }}" show="{{ item.popover.show }}" showMask="{{ item.popover.showMask }}"
            onMaskClick="onMaskClick">
            <view class="header-right" data-index={{ index }} onTap="onEdit">编辑</view>
            <view class="admission-record-edit" slot="items">
              <view class="edit-item" data-item="{{ item }}" onTap="onEitPatientInfo">修改住院人信息</view>
              <view class="edit-item" data-item="{{ item }}" onTap="onDeletePatientInfo">删除住院记录</view>
            </view>
          </popover>
        </view>
        <!-- 入院登记内容 -->
        <admission-record-content item="{{ item }}" />

        <!-- 按钮 缴纳金额、日清单查询、押金记录 -->
        <view class="function-btns" a:if="{{showOtherButton}}">
          <view class="btn" data-item="{{item}}" onTap="onDepositPayment">押金缴纳</view>
          <view class="btn" data-item="{{item}}" onTap="onDailyListQuery">日清单查询</view>
          <view class="btn" data-item="{{item}}" onTap="onDepositRecord">押金记录</view>
        </view>
      </view>
    </block>
    <!-- 入院登记按钮 -->
    <view class="admission-registration">
      <button size="default" class="admission-registration-btn" onTap="onAdmissionRegistration">
        入院登记
      </button>
    </view>
  </view>
  <!-- 无入院记录 -->
  <view a:if="{{ !loading && hospitalizationRecordList.length === 0 }}" class="no-admission-record">
    <view class="no-admission-record-content">
      <image mode="scaleToFill" src="https://gw.alipayobjects.com/mdn/rms_e695cc/afts/img/A*53NkSYyUHVYAAAAAAAAAAAAAARQnAQ"
        class="nodata-img" />
      <view class="nodata-txt">入院登记后才可查询</view>
      <button size="default" type="primary" class="no-admission-record-btn" onTap="onAdmissionRegistration">
        入院登记
      </button>
    </view>
  </view>
  <!-- 选择就诊人弹出框 -->
  <choose-patient-modal classStyleName="{{ classStyleName }}" />
  <!-- 确认删除模态框 -->
  <delete-modal />
</view>
