CRM:完成客户的分配接入

This commit is contained in:
YunaiV
2024-02-20 20:19:11 +08:00
parent 4362251b59
commit a401fff74c
13 changed files with 229 additions and 100 deletions

View File

@@ -31,32 +31,31 @@
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list" :show-overflow-tooltip="true" :stripe="true">
<el-table-column align="center" label="编号" prop="id" />
<el-table-column align="center" label="客户名称" prop="name" width="160">
<el-table-column align="center" label="客户名称" fixed="left" prop="name" width="160">
<template #default="scope">
<el-link :underline="false" type="primary" @click="openDetail(scope.row.id)">
{{ scope.row.name }}
</el-link>
</template>
</el-table-column>
<el-table-column align="center" label="手机" prop="mobile" width="120" />
<el-table-column align="center" label="电话" prop="telephone" width="120" />
<el-table-column align="center" label="客户来源" prop="source" width="100">
<template #default="scope">
<dict-tag :type="DICT_TYPE.CRM_CUSTOMER_SOURCE" :value="scope.row.source" />
</template>
</el-table-column>
<el-table-column align="center" label="所属行业" prop="industryId" width="120">
<template #default="scope">
<dict-tag :type="DICT_TYPE.CRM_CUSTOMER_INDUSTRY" :value="scope.row.industryId" />
</template>
</el-table-column>
<el-table-column align="center" label="客户级别" prop="level" width="120">
<el-table-column label="手机" align="center" prop="mobile" width="120" />
<el-table-column label="电话" align="center" prop="telephone" width="130" />
<el-table-column label="邮箱" align="center" prop="email" width="180" />
<el-table-column align="center" label="客户级别" prop="level" width="135">
<template #default="scope">
<dict-tag :type="DICT_TYPE.CRM_CUSTOMER_LEVEL" :value="scope.row.level" />
</template>
</el-table-column>
<el-table-column align="center" label="网址" prop="website" width="200" />
<el-table-column align="center" label="客户行业" prop="industryId" width="100">
<template #default="scope">
<dict-tag :type="DICT_TYPE.CRM_CUSTOMER_INDUSTRY" :value="scope.row.industryId" />
</template>
</el-table-column>
<el-table-column
:formatter="dateFormatter"
align="center"
@@ -65,14 +64,16 @@
width="180px"
/>
<el-table-column align="center" label="备注" prop="remark" width="200" />
<el-table-column align="center" label="锁定状态" prop="lockStatus">
<template #default="scope">
<dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="scope.row.lockStatus" />
</template>
</el-table-column>
<el-table-column align="center" label="成交状态" prop="dealStatus">
<template #default="scope">
<dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="scope.row.dealStatus" />
</template>
</el-table-column>
<el-table-column align="center" label="距离进入公海" prop="poolDay">
<template #default="scope"> {{ scope.row.poolDay }} </template>
</el-table-column>
<el-table-column
:formatter="dateFormatter"
align="center"
@@ -80,10 +81,17 @@
prop="contactLastTime"
width="180px"
/>
<el-table-column align="center" label="最后跟进记录" prop="contactLastContent" width="200" />
<el-table-column label="地址" align="center" prop="detailAddress" width="180" />
<el-table-column align="center" label="距离进入公海天数" prop="poolDay" width="140">
<template #default="scope"> {{ scope.row.poolDay }} </template>
</el-table-column>
<el-table-column align="center" label="负责人" prop="ownerUserName" width="100px" />
<el-table-column align="center" label="所属部门" prop="ownerUserDeptName" width="100px" />
<el-table-column
:formatter="dateFormatter"
align="center"
label="创建时间"
label="更新时间"
prop="updateTime"
width="180px"
/>
@@ -94,8 +102,6 @@
prop="createTime"
width="180px"
/>
<el-table-column align="center" label="负责人" prop="ownerUserName" width="100px" />
<el-table-column align="center" label="所属部门" prop="ownerUserDeptName" width="100px" />
<el-table-column align="center" label="创建人" prop="creatorName" width="100px" />
</el-table>
<!-- 分页 -->
@@ -108,12 +114,14 @@
</ContentWrap>
</template>
<script setup lang="ts" name="FollowCustomer">
<script setup lang="ts">
import * as CustomerApi from '@/api/crm/customer'
import { DICT_TYPE } from '@/utils/dict'
import { dateFormatter } from '@/utils/formatTime'
import { FOLLOWUP_STATUS } from './common'
defineOptions({ name: 'CrmCustomerFollowList' })
const { push } = useRouter()
const loading = ref(true) //

View File

@@ -104,13 +104,13 @@
</ContentWrap>
</template>
<script lang="ts" setup name="PutInPoolRemind">
<script lang="ts" setup>
import * as CustomerApi from '@/api/crm/customer'
import { DICT_TYPE } from '@/utils/dict'
import { dateFormatter } from '@/utils/formatTime'
import { SCENE_TYPES } from './common'
const { push } = useRouter()
defineOptions({ name: 'CrmCustomerPutPoolRemindList' })
const loading = ref(true) //
const total = ref(0) //
@@ -127,7 +127,7 @@ const queryFormRef = ref() // 搜索的表单
const getList = async () => {
loading.value = true
try {
const data = await CustomerApi.getPutInPoolRemindCustomerPage(queryParams.value)
const data = await CustomerApi.getPutPoolRemindCustomerPage(queryParams.value)
list.value = data.list
total.value = data.total
} finally {
@@ -142,10 +142,16 @@ const handleQuery = () => {
}
/** 打开客户详情 */
const { push } = useRouter()
const openDetail = (id: number) => {
push({ name: 'CrmCustomerDetail', params: { id } })
}
/** 激活时 */
onActivated(async () => {
await getList()
})
/** 初始化 **/
onMounted(() => {
getList()

View File

@@ -43,7 +43,6 @@
</ContentWrap>
<ContentWrap>
<el-table v-loading="loading" :data="list" :show-overflow-tooltip="true" :stripe="true">
<el-table-column align="center" label="编号" fixed="left" prop="id" />
<el-table-column align="center" label="客户名称" fixed="left" prop="name" width="160">
<template #default="scope">
<el-link :underline="false" type="primary" @click="openDetail(scope.row.id)">
@@ -51,24 +50,24 @@
</el-link>
</template>
</el-table-column>
<el-table-column align="center" label="手机" prop="mobile" width="120" />
<el-table-column align="center" label="电话" prop="telephone" width="120" />
<el-table-column align="center" label="客户来源" prop="source" width="100">
<template #default="scope">
<dict-tag :type="DICT_TYPE.CRM_CUSTOMER_SOURCE" :value="scope.row.source" />
</template>
</el-table-column>
<el-table-column align="center" label="所属行业" prop="industryId" width="120">
<template #default="scope">
<dict-tag :type="DICT_TYPE.CRM_CUSTOMER_INDUSTRY" :value="scope.row.industryId" />
</template>
</el-table-column>
<el-table-column align="center" label="客户级别" prop="level" width="120">
<el-table-column label="手机" align="center" prop="mobile" width="120" />
<el-table-column label="电话" align="center" prop="telephone" width="130" />
<el-table-column label="邮箱" align="center" prop="email" width="180" />
<el-table-column align="center" label="客户级别" prop="level" width="135">
<template #default="scope">
<dict-tag :type="DICT_TYPE.CRM_CUSTOMER_LEVEL" :value="scope.row.level" />
</template>
</el-table-column>
<el-table-column align="center" label="网址" prop="website" width="200" />
<el-table-column align="center" label="客户行业" prop="industryId" width="100">
<template #default="scope">
<dict-tag :type="DICT_TYPE.CRM_CUSTOMER_INDUSTRY" :value="scope.row.industryId" />
</template>
</el-table-column>
<el-table-column
:formatter="dateFormatter"
align="center"
@@ -77,12 +76,16 @@
width="180px"
/>
<el-table-column align="center" label="备注" prop="remark" width="200" />
<el-table-column align="center" label="锁定状态" prop="lockStatus">
<template #default="scope">
<dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="scope.row.lockStatus" />
</template>
</el-table-column>
<el-table-column align="center" label="成交状态" prop="dealStatus">
<template #default="scope">
<dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="scope.row.dealStatus" />
</template>
</el-table-column>
<el-table-column align="center" label="距进入公海天数" prop="poolDay" width="130" />
<el-table-column
:formatter="dateFormatter"
align="center"
@@ -90,10 +93,17 @@
prop="contactLastTime"
width="180px"
/>
<el-table-column align="center" label="最后跟进记录" prop="contactLastContent" width="200" />
<el-table-column label="地址" align="center" prop="detailAddress" width="180" />
<el-table-column align="center" label="距离进入公海天数" prop="poolDay" width="140">
<template #default="scope"> {{ scope.row.poolDay }} </template>
</el-table-column>
<el-table-column align="center" label="负责人" prop="ownerUserName" width="100px" />
<el-table-column align="center" label="所属部门" prop="ownerUserDeptName" width="100px" />
<el-table-column
:formatter="dateFormatter"
align="center"
label="创建时间"
label="更新时间"
prop="updateTime"
width="180px"
/>
@@ -104,8 +114,6 @@
prop="createTime"
width="180px"
/>
<el-table-column align="center" label="负责人" prop="ownerUserName" width="100px" />
<el-table-column align="center" label="所属部门" prop="ownerUserDeptName" width="100px" />
<el-table-column align="center" label="创建人" prop="creatorName" width="100px" />
</el-table>
<!-- 分页 -->
@@ -118,13 +126,13 @@
</ContentWrap>
</template>
<script lang="ts" setup name="TodayCustomer">
<script lang="ts" setup>
import * as CustomerApi from '@/api/crm/customer'
import { DICT_TYPE } from '@/utils/dict'
import { dateFormatter } from '@/utils/formatTime'
import { CONTACT_STATUS, SCENE_TYPES } from './common'
// defineOptions({ name: 'TodayCustomer' }) TODO @dhb5212 CustomerTodayTable ++ tables components
defineOptions({ name: 'CrmCustomerTodayContactList' })
const { push } = useRouter()

View File

@@ -15,13 +15,13 @@
</div>
</el-col>
<el-col :span="20" :xs="24">
<TodayCustomer v-if="leftMenu === 'todayCustomer'" />
<CustomerTodayContactList v-if="leftMenu === 'customerTodayContact'" />
<ClueFollowList v-if="leftMenu === 'clueFollow'" />
<CheckContract v-if="leftMenu === 'checkContract'" />
<CheckReceivables v-if="leftMenu === 'checkReceivables'" />
<EndContract v-if="leftMenu === 'endContract'" />
<FollowCustomer v-if="leftMenu === 'followCustomer'" />
<PutInPoolRemind v-if="leftMenu === 'putInPoolRemind'" />
<CustomerFollowList v-if="leftMenu === 'customerFollow'" />
<CustomerPutPoolRemindList v-if="leftMenu === 'customerPutPoolRemind'" />
<RemindReceivables v-if="leftMenu === 'remindReceivables'" />
</el-col>
</el-row>
@@ -29,34 +29,35 @@
<script lang="ts" setup>
import * as BacklogApi from '@/api/crm/backlog'
import CustomerFollowList from './components/CustomerFollowList.vue'
import CustomerTodayContactList from './components/CustomerTodayContactList.vue'
import CustomerPutPoolRemindList from './components/CustomerPutPoolRemindList.vue'
import ClueFollowList from './components/ClueFollowList.vue'
import CheckContract from './tables/CheckContract.vue'
import CheckReceivables from './tables/CheckReceivables.vue'
import EndContract from './tables/EndContract.vue'
import FollowCustomer from './tables/FollowCustomer.vue'
import ClueFollowList from './components/ClueFollowList.vue'
import PutInPoolRemind from './tables/PutInPoolRemind.vue'
import RemindReceivables from './tables/RemindReceivables.vue'
import TodayCustomer from './tables/TodayCustomer.vue'
import * as CustomerApi from '@/api/crm/customer'
import * as ClueApi from '@/api/crm/clue'
defineOptions({ name: 'CrmBacklog' })
const leftMenu = ref('todayCustomer')
const leftMenu = ref('customerTodayContact')
const todayCustomerCountRef = ref(0)
const customerTodayContactCount = ref(0)
const clueFollowCount = ref(0)
const followCustomerCountRef = ref(0)
const putInPoolCustomerRemindCountRef = ref(0)
const checkContractCountRef = ref(0)
const checkReceivablesCountRef = ref(0)
const remindReceivablesCountRef = ref(0)
const endContractCountRef = ref(0)
const customerFollowCount = ref(0)
const customerPutPoolRemindCount = ref(0)
const checkContractCount = ref(0)
const checkReceivablesCount = ref(0)
const remindReceivablesCount = ref(0)
const endContractCount = ref(0)
const leftSides = ref([
{
name: '今日需联系客户',
menu: 'todayCustomer',
count: todayCustomerCountRef
menu: 'customerTodayContact',
count: customerTodayContactCount
},
{
name: '分配给我的线索',
@@ -65,33 +66,33 @@ const leftSides = ref([
},
{
name: '分配给我的客户',
menu: 'followCustomer',
count: followCustomerCountRef
menu: 'customerFollow',
count: customerFollowCount
},
{
name: '待进入公海的客户',
menu: 'putInPoolRemind',
count: putInPoolCustomerRemindCountRef
menu: 'customerPutPoolRemind',
count: customerPutPoolRemindCount
},
{
name: '待审核合同',
menu: 'checkContract',
count: checkContractCountRef
count: checkContractCount
},
{
name: '待审核回款',
menu: 'checkReceivables',
count: checkReceivablesCountRef
count: checkReceivablesCount
},
{
name: '待回款提醒',
menu: 'remindReceivables',
count: remindReceivablesCountRef
count: remindReceivablesCount
},
{
name: '即将到期的合同',
menu: 'endContract',
count: endContractCountRef
count: endContractCount
}
])
@@ -101,19 +102,18 @@ const sideClick = (item: any) => {
}
const getCount = () => {
BacklogApi.getTodayCustomerCount().then((count) => (todayCustomerCountRef.value = count))
CustomerApi.getTodayContactCustomerCount().then(
(count) => (customerTodayContactCount.value = count)
)
CustomerApi.getPutPoolRemindCustomerCount().then(
(count) => (customerPutPoolRemindCount.value = count)
)
CustomerApi.getFollowCustomerCount().then((count) => (customerFollowCount.value = count))
ClueApi.getFollowClueCount().then((count) => (clueFollowCount.value = count))
BacklogApi.getClueFollowListCount().then((count) => (clueFollowCount.value = count))
BacklogApi.getFollowCustomerCount().then((count) => (followCustomerCountRef.value = count))
BacklogApi.getPutInPoolCustomerRemindCount().then(
(count) => (putInPoolCustomerRemindCountRef.value = count)
)
BacklogApi.getCheckContractCount().then((count) => (checkContractCountRef.value = count))
BacklogApi.getCheckReceivablesCount().then((count) => (checkReceivablesCountRef.value = count))
BacklogApi.getRemindReceivablePlanCount().then(
(count) => (remindReceivablesCountRef.value = count)
)
BacklogApi.getEndContractCount().then((count) => (endContractCountRef.value = count))
BacklogApi.getCheckContractCount().then((count) => (checkContractCount.value = count))
BacklogApi.getCheckReceivablesCount().then((count) => (checkReceivablesCount.value = count))
BacklogApi.getRemindReceivablePlanCount().then((count) => (remindReceivablesCount.value = count))
BacklogApi.getEndContractCount().then((count) => (endContractCount.value = count))
}
/** 激活时 */