<template>
  <view class="card_container container_header">
    <view class="card_cell_title">
      <view>
        {{ useModel?.showData?.value?.full_name || '-' }}
      </view>
      <view
        :class="`type_text type_text_${useModel?.showData?.value?.total_pending_amount ? 'red' : 'green'}`"
      >
        {{ useModel?.showData?.value?.total_pending_amount ? '欠费' : '结清' }}
      </view>
    </view>

    <view class="total_fee" v-if="useModel?.showData?.value?.total_pending_amount">
      <view class="title"> 欠费：</view>
      <view class="fee"> {{ useModel?.showData?.value?.total_pending_amount || '-' }}元 </view>
    </view>
    <!-- <view class="card_container_footer">
      <view class="btn">
        <hs-button
          label="发起通知"
          icon="notification-filled"
          size="md"
          iconColor="#0082fa"
          type="ghost"
          @click="method?.handleNotice(useModel?.showData?.value)"
        />
      </view>
      <view class="btn">
        <MyContactPersonPopup />
      </view>
    </view> -->
  </view>
  <view class="card_container container_info">
    <view class="info_title"> 基本信息 </view>
    <view class="basic_item_info">
      <view class="item">
        建筑面积：{{ useModel?.showData?.value?.asset_house?.built_area || '-' }}㎡
      </view>
      <view class="item">
        户型：{{ useModel?.showData?.value?.asset_house?.room || '' }}房{{
          useModel?.showData?.value?.asset_house?.hall || ''
        }}厅{{ useModel?.showData?.value?.asset_house?.bathroom || '' }}卫{{
          useModel?.showData?.value?.asset_house?.kitchen || ''
        }}厨{{ useModel?.showData?.value?.asset_house?.balcony || '' }}阳台
      </view>
      <view class="item">
        产权年限：{{ useModel?.showData?.value?.asset_house?.ownership_term || '-' }}年
      </view>
      <view class="item">
        房屋状态：<hs-enum-tag
          :Enums="HouseRegistersHouseStatusEnum"
          :value="useModel?.showData?.value?.asset_house?.status"
          v-if="useModel?.showData?.value?.asset_house?.status"
        />
        <template v-else>-</template>
      </view>
      <view class="item">
        朝向：<hs-enum-tag
          :Enums="AssetHousesOrientationEnum"
          v-if="useModel?.showData?.value?.asset_house?.orientation"
          :value="useModel?.showData?.value?.asset_house?.orientation"
        />
        <template v-else>-</template>
      </view>
      <view class="item">
        产权类型：<hs-enum-tag
          :Enums="AssetHousesUsageEnum"
          v-if="useModel?.showData?.value?.asset_house?.usage"
          :value="useModel?.showData?.value?.asset_house?.usage"
        />
        <template v-else>-</template>
      </view>
    </view>
  </view>
  <!-- <view class="collection_info">
    邀请客户开通托收，无需对客户催缴
    <view class="btn"> 邀请托收 </view>
  </view> -->
</template>

<script lang="ts" setup>
import {
  AssetHousesOrientationEnum,
  AssetHousesUsageEnum,
  HouseRegistersHouseStatusEnum
} from '@/gen/Enums'
import { ShowLastTime } from '@/common/libraries/day'
import MyContactPersonPopup from './ContactPersonPopup.vue'
import useModel from '../model'
import method from '../method'
</script>
