CustomerDetailsHeader.vue 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. <el-button v-hasPermi="['crm:customer:update']" @click="openForm(customer.id)">
  15. 编辑
  16. </el-button>
  17. <el-button>更改成交状态</el-button>
  18. </div>
  19. </div>
  20. <!-- TODO 芋艿: -->
  21. <el-row class="mt-10px">
  22. <el-button> <Icon class="mr-5px" icon="ph:calendar-fill" /> 创建任务 </el-button>
  23. <el-button> <Icon class="mr-5px" icon="carbon:email" /> 发送邮件 </el-button>
  24. <el-button> <Icon class="mr-5px" icon="ep:opportunity" /> 创建商机 </el-button>
  25. <el-button> <Icon class="mr-5px" icon="clarity:contract-line" />创建合同 </el-button>
  26. <el-button> <Icon class="mr-5px" icon="icon-park:income-one" />创建回款 </el-button>
  27. <el-button>
  28. <Icon class="mr-5px" icon="fluent:people-team-add-20-filled" /> 添加团队成员
  29. </el-button>
  30. </el-row>
  31. </div>
  32. <ContentWrap class="mt-10px">
  33. <el-descriptions :column="5" direction="vertical">
  34. <el-descriptions-item label="客户级别">
  35. <dict-tag :type="DICT_TYPE.CRM_CUSTOMER_LEVEL" :value="customer.level" />
  36. </el-descriptions-item>
  37. <el-descriptions-item label="成交状态">
  38. {{ customer.dealStatus ? '已成交' : '未成交' }}
  39. </el-descriptions-item>
  40. <el-descriptions-item label="负责人">{{ customer.ownerUserName }} </el-descriptions-item>
  41. <!-- TODO wanwan 首要联系人? -->
  42. <el-descriptions-item label="首要联系人" />
  43. <!-- TODO wanwan 首要联系人电话? -->
  44. <el-descriptions-item label="首要联系人电话">{{ customer.mobile }} </el-descriptions-item>
  45. </el-descriptions>
  46. </ContentWrap>
  47. <!-- 表单弹窗:添加/修改 -->
  48. <CustomerForm ref="formRef" @success="emit('refresh')" />
  49. </template>
  50. <script setup lang="ts">
  51. import { DICT_TYPE } from '@/utils/dict'
  52. import * as CustomerApi from '@/api/crm/customer'
  53. import CustomerForm from '../CustomerForm.vue'
  54. const { customer, loading } = defineProps<{
  55. customer: CustomerApi.CustomerVO // 客户信息
  56. loading: boolean // 加载中
  57. }>()
  58. /** 修改操作 */
  59. const formRef = ref()
  60. const openForm = (id?: number) => {
  61. formRef.value.open('update', id)
  62. }
  63. const emit = defineEmits(['refresh']) // 定义 success 事件,用于操作成功后的回调
  64. </script>