diff --git a/src/api/crm/customer/index.ts b/src/api/crm/customer/index.ts index 5ef43950..bedb61f5 100644 --- a/src/api/crm/customer/index.ts +++ b/src/api/crm/customer/index.ts @@ -67,3 +67,8 @@ export const exportCustomer = async (params) => { export const queryAllList = async () => { return await request.get({ url: `/crm/customer/query-all-list` }) } + +// 查询客户操作日志 +export const getOperateLog = async (id: number) => { + return await request.get({ url: `/crm/customer/operate-log?id=` + id }) +} diff --git a/src/views/crm/customer/CustomerForm.vue b/src/views/crm/customer/CustomerForm.vue index 99f7e858..1730ef45 100644 --- a/src/views/crm/customer/CustomerForm.vue +++ b/src/views/crm/customer/CustomerForm.vue @@ -1,11 +1,11 @@ - - + diff --git a/src/views/crm/customer/detail/index.vue b/src/views/crm/customer/detail/index.vue index f21a6ac3..626d30ae 100644 --- a/src/views/crm/customer/detail/index.vue +++ b/src/views/crm/customer/detail/index.vue @@ -5,7 +5,9 @@ - TODO 待开发 + + + @@ -38,24 +40,34 @@ import ReceivableList from '@/views/crm/receivable/components/ReceivableList.vue import ReceivablePlanList from '@/views/crm/receivable/plan/components/ReceivablePlanList.vue' // 回款计划列表 import PermissionList from '@/views/crm/permission/components/PermissionList.vue' // 团队成员列表(权限) import { BizTypeEnum } from '@/api/crm/permission' +import { OperateLogV2VO } from '@/api/system/operatelog' defineOptions({ name: 'CrmCustomerDetail' }) const route = useRoute() const id = Number(route.params.id) // 客户编号 const loading = ref(true) // 加载中 - /** 获取详情 */ const customer = ref({} as CustomerApi.CustomerVO) // 客户详情 const getCustomer = async (id: number) => { loading.value = true try { customer.value = await CustomerApi.getCustomer(id) + await getOperateLog(id) } finally { loading.value = false } } - +const logList = ref([]) // 操作日志列表 +/** + * 获取操作日志 + */ +const getOperateLog = async (customerId: number) => { + if (!customerId) { + return + } + logList.value = await CustomerApi.getOperateLog(customerId) +} /** 初始化 */ const { delView } = useTagsViewStore() // 视图操作 const { currentRoute } = useRouter() // 路由