CustomerDetailsHeader.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <template>
  2. <div v-loading="loading">
  3. <div class="flex items-start justify-between">
  4. <div>
  5. <!-- 左上:客户基本信息 -->
  6. <el-col>
  7. <el-row>
  8. <span class="text-xl font-bold">{{ customer.name }}</span>
  9. </el-row>
  10. </el-col>
  11. </div>
  12. <div>
  13. <!-- 右上:按钮 -->
  14. <slot></slot>
  15. </div>
  16. </div>
  17. </div>
  18. <ContentWrap class="mt-10px">
  19. <el-descriptions :column="5" direction="vertical">
  20. <el-descriptions-item label="客户级别">
  21. <dict-tag :type="DICT_TYPE.CRM_CUSTOMER_LEVEL" :value="customer.level" />
  22. </el-descriptions-item>
  23. <el-descriptions-item label="成交状态">
  24. {{ customer.dealStatus ? '已成交' : '未成交' }}
  25. </el-descriptions-item>
  26. <el-descriptions-item label="负责人">{{ customer.ownerUserName }}</el-descriptions-item>
  27. <el-descriptions-item label="创建时间">
  28. {{ formatDate(customer.createTime) }}
  29. </el-descriptions-item>
  30. </el-descriptions>
  31. </ContentWrap>
  32. </template>
  33. <script lang="ts" setup>
  34. import { DICT_TYPE } from '@/utils/dict'
  35. import * as CustomerApi from '@/api/crm/customer'
  36. import { formatDate } from '@/utils/formatTime'
  37. defineOptions({ name: 'CrmCustomerDetailsHeader' })
  38. defineProps<{
  39. customer: CustomerApi.CustomerVO // 客户信息
  40. loading: boolean // 加载中
  41. }>()
  42. </script>