CustomerDetailsHeader.vue 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. <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. // TODO @wanwan:是不是把 CustomerBasicInfo 也放进来。
  73. import CustomerBasicInfo from '@/views/crm/customer/detail/CustomerBasicInfo.vue'
  74. import CustomerForm from '@/views/crm/customer/CustomerForm.vue'
  75. const { customer, loading } = defineProps<{
  76. customer: CustomerApi.CustomerVO
  77. loading: boolean
  78. }>()
  79. /** 修改操作 */
  80. const formRef = ref()
  81. const openForm = (id?: number) => {
  82. formRef.value.open('update', id)
  83. }
  84. const emit = defineEmits(['refresh']) // 定义 success 事件,用于操作成功后的回调
  85. </script>