<template>
  <div>
    <el-descriptions class="margin-top" :column="2" border>
      <!-- <template #extra>
        <el-button type="primary">Operation</el-button>
      </template> -->
    <el-descriptions-item label="用户类型">{{ info.userType === '1' ? '管理员' : '普通用户' }}</el-descriptions-item>
    <el-descriptions-item label="创建时间">{{ formatDate(info.createTime) }}</el-descriptions-item>
    <el-descriptions-item label="账户余额">{{ info.balance }}</el-descriptions-item>
    <el-descriptions-item label="累计支出">{{ info.totalExpense }}</el-descriptions-item>
    <el-descriptions-item label="累计充值">{{ info.totalRecharge }}</el-descriptions-item>
    <el-descriptions-item label="冻结金额">{{ info.freezePrice }}</el-descriptions-item>
  </el-descriptions>
  </div>
</template>

<script setup>
/* 账户详情 */
defineOptions({ name: 'EnterpriseUserAccount'})
import { EnterpriseUserBindApi } from '@/api/menduner/system/enterprise/userBind'
import { formatDate } from '@/utils/formatTime'
import { DICT_TYPE } from '@/utils/dict'

const props = defineProps({
  userId: String,
  enterpriseId: String
})

const info = ref({})
const getInfo = async () => {
  const data = await EnterpriseUserBindApi.getEnterpriseUserAccount(props.userId, props.enterpriseId)
  info.value = data
}
getInfo()
</script>
