CustomerDetailsHeader.vue 2.8 KB

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