fix: 修正待入群和待联系阶段的百分比计算逻辑
This commit is contained in:
@@ -559,6 +559,20 @@ const getPercentage = (count, stageId, stageName) => {
|
||||
return Math.round((totalCustomers.value - count) / totalCustomers.value * 100);
|
||||
}
|
||||
|
||||
// 待入群阶段特殊计算:(总数-待加微人数-待入群人数)/总数
|
||||
if (stageName === '待入群') {
|
||||
const waitAddWechatCount = getStageCount('待加微');
|
||||
const waitJoinGroupCount = getStageCount('待入群');
|
||||
return Math.round((totalCustomers.value - waitAddWechatCount - waitJoinGroupCount) / totalCustomers.value * 100);
|
||||
}
|
||||
|
||||
// 待联系阶段特殊计算:(总数-待加微人数-待联系人数)/总数
|
||||
if (stageName === '待联系') {
|
||||
const waitAddWechatCount = getStageCount('待加微');
|
||||
const waitContactCount = getStageCount('待联系');
|
||||
return Math.round((totalCustomers.value - waitAddWechatCount - waitContactCount) / totalCustomers.value * 100);
|
||||
}
|
||||
|
||||
// 待到课阶段特殊计算:(总数-有到课数据人数)/总数
|
||||
if (stageName === '待到课') {
|
||||
return Math.round((totalCustomers.value - count) / totalCustomers.value * 100);
|
||||
|
||||
Reference in New Issue
Block a user