<template>
  <div class="enterprise-detail">
    <a-card :bordered="false">
      <template #title>
        <a-space>
          <a-button type="text" @click="navigateTo('/admin/enterprises')">
            <LeftOutlined /> 返回
          </a-button>
          <span>企业详情</span>
        </a-space>
      </template>

      <a-descriptions bordered :column="2">
        <a-descriptions-item label="企业名称">深圳市腾云科技有限公司</a-descriptions-item>
        <a-descriptions-item label="企业ID">ENT-20260408-001</a-descriptions-item>
        <a-descriptions-item label="联系人">李明</a-descriptions-item>
        <a-descriptions-item label="联系电话">138****8001</a-descriptions-item>
        <a-descriptions-item label="企业邮箱">liming@tengyun.com</a-descriptions-item>
        <a-descriptions-item label="套餐等级">
          <a-tag color="purple">企业版</a-tag>
        </a-descriptions-item>
        <a-descriptions-item label="认证状态">
          <a-badge status="success" text="已认证" />
        </a-descriptions-item>
        <a-descriptions-item label="注册时间">2026-04-08 10:30</a-descriptions-item>
        <a-descriptions-item label="营业执照">
          <a-image :width="120" src="https://via.placeholder.com/120x80?text=执照" />
        </a-descriptions-item>
        <a-descriptions-item label="备注">-</a-descriptions-item>
      </a-descriptions>
    </a-card>

    <a-row :gutter="[16, 16]" class="mt-4">
      <a-col :xs="24" :xl="12">
        <a-card title="成员信息" :bordered="false">
          <a-list :data-source="members">
            <template #renderItem="{ item }">
              <a-list-item>
                <a-list-item-meta>
                  <template #title>{{ item.name }}</template>
                  <template #description>{{ item.role }} · {{ item.email }}</template>
                  <template #avatar>
                    <a-avatar>{{ item.name[0] }}</a-avatar>
                  </template>
                </a-list-item-meta>
              </a-list-item>
            </template>
          </a-list>
        </a-card>
      </a-col>
      <a-col :xs="24" :xl="12">
        <a-card title="账单信息" :bordered="false">
          <a-descriptions :column="1" size="small">
            <a-descriptions-item label="账户余额">¥ 15,680.00</a-descriptions-item>
            <a-descriptions-item label="本月消费">¥ 12,800.00</a-descriptions-item>
            <a-descriptions-item label="累计充值">¥ 100,000.00</a-descriptions-item>
          </a-descriptions>
        </a-card>
      </a-col>
    </a-row>
  </div>
</template>

<script setup lang="ts">
import { LeftOutlined } from '@ant-design/icons-vue'

definePageMeta({ layout: 'admin' })

const members = [
  { name: '李明', role: '管理员', email: 'liming@tengyun.com' },
  { name: '王芳', role: '财务', email: 'wangfang@tengyun.com' },
  { name: '张伟', role: '开发', email: 'zhangwei@tengyun.com' },
]
</script>

<style scoped>
.mt-4 { margin-top: 16px; }
</style>
