feat(staff): 微信员工沟通数 3 数字 → 明细 modal(补 Plan1 误判漏做的操作)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
浅念
2026-08-06 17:37:08 +08:00
parent 1368e3a471
commit c00522fc07
+18 -3
View File
@@ -271,6 +271,21 @@ function openTalkedModal(row: Account) {
detailOpen.value = true
}
/** 微信员工「沟通数」3 数字 → 明细 modal(数据源:该员工客户列表,度量精确区分见 plan 数据源说明)。 */
function openWechatCommModal(row: Account, title: string, withMsgCols: boolean): void {
detailTitle.value = `${title} · ${row.user_name ?? row.account_id}`
detailCols.value = withMsgCols
? [
{ prop: 'friend_nickname', label: '客户微信', minWidth: 160 },
{ prop: 'send_num', label: '发送消息数', width: 110, align: 'center' },
{ prop: 'receive_num', label: '接收消息数', width: 110, align: 'center' },
]
: [{ prop: 'friend_nickname', label: '客户微信', minWidth: 160 }]
detailFetcher.value = async (page: number, page_size: number) =>
getCustomers({ channel: 'wechat', owner_account_id: row.account_id, page, page_size })
detailOpen.value = true
}
// ---------------------------------------------------------------------------
// Per-tab loading
// ---------------------------------------------------------------------------
@@ -490,15 +505,15 @@ onMounted(() => {
<template #default="{ row }">
<div class="yk-pair">
<span class="yk-pair__k">沟通人数</span>
<span class="yk-pair__v">{{ cellNum(row, 'chatCount') }}</span>
<el-button link type="primary" size="small" class="yk-pair__v" @click.stop="openWechatCommModal(row, '沟通人数(已去重)', false)">{{ cellNum(row, 'chatCount') }}</el-button>
</div>
<div class="yk-pair">
<span class="yk-pair__k">有效沟通数</span>
<span class="yk-pair__v">{{ cellNum(row, 'contactCount') }}</span>
<el-button link type="primary" size="small" class="yk-pair__v" @click.stop="openWechatCommModal(row, '有效沟通数(已去重)', true)">{{ cellNum(row, 'contactCount') }}</el-button>
</div>
<div class="yk-pair">
<span class="yk-pair__k">跟进客户数</span>
<span class="yk-pair__v">{{ cellNum(row, 'followCount') }}</span>
<el-button link type="primary" size="small" class="yk-pair__v" @click.stop="openWechatCommModal(row, '跟进客户数', false)">{{ cellNum(row, 'followCount') }}</el-button>
</div>
</template>
</el-table-column>