CustomerDetailsTop.vue 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <template>
  2. <div v-loading="loading">
  3. <div class="flex items-start justify-between">
  4. <div>
  5. <!-- 左上:客户基本信息 -->
  6. <CustomerBasicInfo :customer="customer" />
  7. </div>
  8. <div>
  9. <!-- 右上:按钮 -->
  10. <el-button v-hasPermi="['crm:customer:update']" @click="openForm('update', customer.id)">
  11. 编辑
  12. </el-button>
  13. <el-button>更改成交状态</el-button>
  14. </div>
  15. </div>
  16. <el-row class="mt-10px">
  17. <el-button>
  18. <Icon class="mr-5px" icon="ph:calendar-fill" />
  19. 创建任务
  20. </el-button>
  21. <el-button>
  22. <Icon class="mr-5px" icon="carbon:email" />
  23. 发送邮件
  24. </el-button>
  25. <el-button>
  26. <Icon class="mr-5px" icon="system-uicons:contacts" />
  27. 创建联系人
  28. </el-button>
  29. <el-button>
  30. <Icon class="mr-5px" icon="ep:opportunity" />
  31. 创建商机
  32. </el-button>
  33. <el-button>
  34. <Icon class="mr-5px" icon="clarity:contract-line" />
  35. 创建合同
  36. </el-button>
  37. <el-button>
  38. <Icon class="mr-5px" icon="icon-park:income-one" />
  39. 创建回款
  40. </el-button>
  41. <el-button>
  42. <Icon class="mr-5px" icon="fluent:people-team-add-20-filled" />
  43. 添加团队成员
  44. </el-button>
  45. </el-row>
  46. </div>
  47. <ContentWrap class="mt-10px">
  48. <el-descriptions :column="5" direction="vertical">
  49. <el-descriptions-item label="客户级别">
  50. <dict-tag :type="DICT_TYPE.CRM_CUSTOMER_LEVEL" :value="customer.level" />
  51. </el-descriptions-item>
  52. <el-descriptions-item label="成交状态">
  53. {{ customer.dealStatus ? '已成交' : '未成交' }}
  54. </el-descriptions-item>
  55. <el-descriptions-item label="负责人">
  56. {{ customer.ownerUserName }}
  57. </el-descriptions-item>
  58. <!-- TODO wanwan 首要联系人? -->
  59. <el-descriptions-item label="首要联系人" />
  60. <!-- TODO wanwan 首要联系人电话? -->
  61. <el-descriptions-item label="首要联系人电话">
  62. {{ customer.mobile }}
  63. </el-descriptions-item>
  64. </el-descriptions>
  65. </ContentWrap>
  66. <!-- 表单弹窗:添加/修改 -->
  67. <CustomerForm ref="formRef" @success="emit('refresh')" />
  68. </template>
  69. <script setup lang="ts">
  70. import * as CustomerApi from '@/api/crm/customer'
  71. import { DICT_TYPE } from '@/utils/dict'
  72. import CustomerBasicInfo from '@/views/crm/customer/detail/CustomerBasicInfo.vue'
  73. import CustomerForm from '@/views/crm/customer/CustomerForm.vue'
  74. const { customer, loading } = defineProps<{ customer: CustomerApi.CustomerVO; loading: boolean }>()
  75. const openForm = (type: string, id?: number) => {
  76. formRef.value.open(type, id)
  77. }
  78. const formRef = ref()
  79. const emit = defineEmits(['refresh']) // 定义 success 事件,用于操作成功后的回调
  80. </script>