feat: 分配客户

This commit is contained in:
xingyu4j
2025-06-05 19:00:34 +08:00
parent cccd9ae856
commit af4f7f9630
2 changed files with 113 additions and 5 deletions

View File

@@ -17,6 +17,10 @@ import { useDescription } from '#/components/description';
import { useDetailSchema } from '../data';
const BusinessList = defineAsyncComponent(
() => import('#/views/crm/business/modules/detail-list.vue'),
);
const CustomerDetailsInfo = defineAsyncComponent(
() => import('./detail-info.vue'),
);
@@ -33,8 +37,8 @@ const CustomerForm = defineAsyncComponent(
() => import('#/views/crm/customer/modules/form.vue'),
);
const BusinessList = defineAsyncComponent(
() => import('#/views/crm/business/modules/detail-list.vue'),
const DistributeForm = defineAsyncComponent(
() => import('#/views/crm/customer/poolConfig/distribute-form.vue'),
);
const FollowUp = defineAsyncComponent(
@@ -84,6 +88,11 @@ const [TransferModal, transferModalApi] = useVbenModal({
destroyOnClose: true,
});
const [DistributeModal, distributeModalApi] = useVbenModal({
connectedComponent: DistributeForm,
destroyOnClose: true,
});
/** 加载详情 */
async function loadCustomerDetail() {
loading.value = true;
@@ -131,7 +140,7 @@ function handleReceive() {
/** 分配客户 */
function handleDistributeForm() {
transferModalApi.setData({ id: customerId.value }).open();
distributeModalApi.setData({ id: customerId.value }).open();
}
/** 客户放入公海 */
@@ -175,6 +184,7 @@ onMounted(async () => {
<Page auto-content-height :title="customer?.name" :loading="loading">
<FormModal @success="loadCustomerDetail" />
<TransferModal @success="loadCustomerDetail" />
<DistributeModal @success="loadCustomerDetail" />
<template #extra>
<div class="flex items-center gap-2">
<Button
@@ -210,10 +220,18 @@ onMounted(async () => {
>
锁定
</Button>
<Button v-if="!customer.ownerUserId" @click="handleReceive">
<Button
v-if="!customer.ownerUserId"
type="primary"
@click="handleReceive"
>
领取
</Button>
<Button v-if="!customer.ownerUserId" @click="handleDistributeForm">
<Button
v-if="!customer.ownerUserId"
type="primary"
@click="handleDistributeForm"
>
分配
</Button>
<Button