pull/781/head
zy 2025-05-01 11:22:08 +08:00
parent c6cea2752c
commit 28154362b2
8 changed files with 21 additions and 20 deletions

View File

@ -15,7 +15,7 @@ export const DEFAULT_STATUSES = [
{ {
endStatus: 1, endStatus: 1,
key: '结束', key: '结束',
name: '赢单', name: '成交',
percent: 100 percent: 100
}, },
{ {

View File

@ -3,7 +3,7 @@ import request from '@/config/axios'
export interface CrmStatisticFunnelRespVO { export interface CrmStatisticFunnelRespVO {
customerCount: number // 客户数 customerCount: number // 客户数
businessCount: number // 商机数 businessCount: number // 商机数
businessWinCount: number // 赢单 businessWinCount: number // 成交
} }
export interface CrmStatisticsBusinessSummaryByDateRespVO { export interface CrmStatisticsBusinessSummaryByDateRespVO {
@ -15,7 +15,7 @@ export interface CrmStatisticsBusinessSummaryByDateRespVO {
export interface CrmStatisticsBusinessInversionRateSummaryByDateRespVO { export interface CrmStatisticsBusinessInversionRateSummaryByDateRespVO {
time: string // 时间 time: string // 时间
businessCount: number // 商机数量 businessCount: number // 商机数量
businessWinCount: number // 赢单商机数 businessWinCount: number // 成交商机数
} }
// 客户分析 API // 客户分析 API

View File

@ -279,7 +279,7 @@ const formData = ref({
creditMethod: undefined, creditMethod: undefined,
creditCalcCycle: undefined, creditCalcCycle: undefined,
creditLimit: undefined, creditLimit: undefined,
techSupport: 1, techSupport: false,
products: [] products: []
}); });
const formRules = reactive({ const formRules = reactive({
@ -413,6 +413,7 @@ const resetForm = () => {
totalPrice: 0, totalPrice: 0,
products: [], products: [],
contactId: undefined, contactId: undefined,
techSupport: 1,
customerDefault: false customerDefault: false
}; };
formRef.value?.resetFields(); formRef.value?.resetFields();
@ -421,7 +422,7 @@ const resetForm = () => {
const route = useRoute(); const route = useRoute();
onMounted(async () => { onMounted(async () => {
const customerId = route.query.customerId; const customerId = route.query.customerId;
console.log('%csrc/views/crm/business/BusinessForm.vue:422 useUserStore().getUser.id', 'color: #007acc;', useUserStore().getUser.id); console.log('%csrc/views/crm/business/BusinessForm.vue:425 formData.value', 'color: #007acc;', formData.value);
formData.value.ownerUserId = customerId ? '' : useUserStore().getUser.id; formData.value.ownerUserId = customerId ? '' : useUserStore().getUser.id;
formType.value = route.query.id; formType.value = route.query.id;
if (formType.value) open(formType.value, customerId) if (formType.value) open(formType.value, customerId)

View File

@ -12,13 +12,13 @@
<el-option <el-option
v-for="item in statusList" v-for="item in statusList"
:key="item.id" :key="item.id"
:label="item.name + '(赢单率:' + item.percent + '%)'" :label="item.name + '(成交率:' + item.percent + '%)'"
:value="item.id" :value="item.id"
/> />
<el-option <el-option
v-for="item in BusinessStatusApi.DEFAULT_STATUSES" v-for="item in BusinessStatusApi.DEFAULT_STATUSES"
:key="item.endStatus" :key="item.endStatus"
:label="item.name + '(赢单率:' + item.percent + '%)'" :label="item.name + '(成交率:' + item.percent + '%)'"
:value="-item.endStatus" :value="-item.endStatus"
/> />
</el-select> </el-select>

View File

@ -42,12 +42,12 @@
<el-text v-else>{{ row.name }}</el-text> <el-text v-else>{{ row.name }}</el-text>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="140" align="center" label="赢单率(%" prop="percent"> <el-table-column width="140" align="center" label="成交率(%" prop="percent">
<template #default="{ row }"> <template #default="{ row }">
<el-input-number <el-input-number
v-if="!row.endStatus" v-if="!row.endStatus"
v-model="row.percent" v-model="row.percent"
placeholder="请输入赢单率" placeholder="请输入成交率"
controls-position="right" controls-position="right"
:min="0" :min="0"
:max="100" :max="100"

View File

@ -113,7 +113,7 @@
<el-tab-pane label="下属负责的" name="3" /> <el-tab-pane label="下属负责的" name="3" />
</el-tabs> </el-tabs>
<el-table v-loading="loading" :data="list" :show-overflow-tooltip="true" :stripe="true"> <el-table v-loading="loading" :data="list" :show-overflow-tooltip="true" :stripe="true">
<el-table-column align="center" fixed="left" label="客户名称" prop="name" width="160"> <el-table-column align="center" fixed="left" label="客户名称" prop="name" width="250">
<template #default="scope"> <template #default="scope">
<el-link :underline="false" type="primary" @click="openDetail(scope.row.id)"> <el-link :underline="false" type="primary" @click="openDetail(scope.row.id)">
{{ scope.row.name }} {{ scope.row.name }}
@ -125,7 +125,7 @@
<dict-tag :type="DICT_TYPE.CRM_CUSTOMER_SOURCE" :value="scope.row.source" /> <dict-tag :type="DICT_TYPE.CRM_CUSTOMER_SOURCE" :value="scope.row.source" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="客户状态" prop="mobile" width="120" /> <el-table-column align="center" label="客户状态" prop="serviceStatus" width="120" />
<!-- <el-table-column align="center" label="电话" prop="telephone" width="130" /> <!-- <el-table-column align="center" label="电话" prop="telephone" width="130" />
<el-table-column align="center" label="邮箱" prop="email" width="180" /> --> <el-table-column align="center" label="邮箱" prop="email" width="180" /> -->
<el-table-column align="center" label="客户级别" prop="level" width="135"> <el-table-column align="center" label="客户级别" prop="level" width="135">
@ -158,7 +158,7 @@
{{scope.row.assistName || '暂无'}} {{scope.row.assistName || '暂无'}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="信用统一代码" prop="creditNo" width="120" /> <el-table-column align="center" label="信用统一代码" prop="creditNo" width="180" />
<el-table-column align="center" label="客户行业" prop="industryId" width="100"> <el-table-column align="center" label="客户行业" prop="industryId" width="100">
<template #default="scope"> <template #default="scope">

View File

@ -143,7 +143,7 @@ const echartsOption = reactive<EChartsOption>({
} }
}, },
legend: { legend: {
data: ['赢单转化率', '商机总数', '赢单商机数'], data: ['成交转化率', '商机总数', '成交商机数'],
bottom: '0px', bottom: '0px',
itemWidth: 14 itemWidth: 14
}, },
@ -178,7 +178,7 @@ const echartsOption = reactive<EChartsOption>({
yAxis: [ yAxis: [
{ {
type: 'value', type: 'value',
name: '赢单转化率', name: '成交转化率',
axisTick: { axisTick: {
alignWithLabel: true, alignWithLabel: true,
lineStyle: { width: 0 } lineStyle: { width: 0 }
@ -217,7 +217,7 @@ const echartsOption = reactive<EChartsOption>({
], ],
series: [ series: [
{ {
name: '赢单转化率', name: '成交转化率',
type: 'line', type: 'line',
yAxisIndex: 0, yAxisIndex: 0,
data: [] data: []
@ -230,7 +230,7 @@ const echartsOption = reactive<EChartsOption>({
data: [] data: []
}, },
{ {
name: '赢单商机数', name: '成交商机数',
type: 'bar', type: 'bar',
yAxisIndex: 1, yAxisIndex: 1,
barWidth: 15, barWidth: 15,

View File

@ -58,7 +58,7 @@ const echartsOption = reactive<EChartsOption>({
} }
}, },
legend: { legend: {
data: ['客户', '商机', '赢单'] data: ['客户', '商机', '成交']
}, },
series: [ series: [
{ {
@ -97,7 +97,7 @@ const echartsOption = reactive<EChartsOption>({
data: [ data: [
{ value: 60, name: '客户-0个' }, { value: 60, name: '客户-0个' },
{ value: 40, name: '商机-0个' }, { value: 40, name: '商机-0个' },
{ value: 20, name: '赢单-0个' } { value: 20, name: '成交-0个' }
] ]
} }
] ]
@ -127,11 +127,11 @@ const loadData = async () => {
if (active.value) { if (active.value) {
list.push({ value: 60, name: `客户-${data.customerCount || 0}` }) list.push({ value: 60, name: `客户-${data.customerCount || 0}` })
list.push({ value: 40, name: `商机-${data.businessCount || 0}` }) list.push({ value: 40, name: `商机-${data.businessCount || 0}` })
list.push({ value: 20, name: `赢单-${data.businessWinCount || 0}` }) list.push({ value: 20, name: `成交-${data.businessWinCount || 0}` })
} else { } else {
list.push({ value: data.customerCount || 0, name: `客户-${data.customerCount || 0}` }) list.push({ value: data.customerCount || 0, name: `客户-${data.customerCount || 0}` })
list.push({ value: data.businessCount || 0, name: `商机-${data.businessCount || 0}` }) list.push({ value: data.businessCount || 0, name: `商机-${data.businessCount || 0}` })
list.push({ value: data.businessWinCount || 0, name: `赢单-${data.businessWinCount || 0}` }) list.push({ value: data.businessWinCount || 0, name: `成交-${data.businessWinCount || 0}` })
} }
echartsOption.series[0]['data'] = list echartsOption.series[0]['data'] = list