fix(ui): 员工微信号用owner_account_id+添加类型/好友类型加标签映射

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
浅念
2026-08-15 11:22:20 +08:00
parent 1d2cf965e2
commit 81f4e7168f
+21 -7
View File
@@ -96,11 +96,25 @@ function fromTypeText(row: Customer): string {
/** 添加类型列:addType 数值代码→文案(未知值原样透出)。 */
function addTypeText(row: Customer): string {
const v = cell(row, 'addType')
if (v === 1 || v === '1') return '搜索添加'
if (v === 2 || v === '2') return '群聊添加'
if (v === 3 || v === '3') return '手机号添加'
const n = Number(v)
if (n === 1) return '搜索添加'
if (n === 2) return '群聊添加'
if (n === 3) return '手机号添加'
if (n === 4) return '二维码添加'
if (n === 5) return '名片分享添加'
const s = String(v ?? '').trim()
return s && s !== 'null' && s !== 'undefined' ? s : '--'
return s && s !== 'null' && s !== 'undefined' && s !== '0' ? s : '--'
}
/** 好友类型列:friendType 数值代码→文案。 */
function friendTypeText(row: Customer): string {
const v = cell(row, 'friendType')
const n = Number(v)
if (n === 1) return '微信好友'
if (n === 2) return '企业微信好友'
if (n === 3) return '群好友'
const s = String(v ?? '').trim()
return s && s !== 'null' && s !== 'undefined' && s !== '0' ? s : '--'
}
/** 好友标签列:contactLabelValues 可能是字符串数组/对象数组/单值,统一成顿号分隔文本。 */
function contactLabelsText(row: Customer): string {
@@ -440,8 +454,8 @@ onMounted(() => {
<div class="yk-staffinfo__nick" :title="cellText(row, 'saleName')">
{{ cellText(row, 'saleName') !== '--' ? cellText(row, 'saleName') : cellText(row, 'ownerName') }}
</div>
<div class="yk-staffinfo__muted" :title="cellText(row, 'ownerWchatId')">
微信号:{{ cellText(row, 'ownerWchatId') }}
<div class="yk-staffinfo__muted" :title="row.owner_account_id ?? ''">
微信号:{{ row.owner_account_id ?? '--' }}
</div>
<div class="yk-staffinfo__muted">
手机:{{ cellText(row, 'phone') }}
@@ -473,7 +487,7 @@ onMounted(() => {
<template #default="{ row }">{{ fromTypeText(row) }}</template>
</el-table-column>
<el-table-column label="好友类型" width="100">
<template #default="{ row }">{{ cellText(row, 'friendType') }}</template>
<template #default="{ row }">{{ friendTypeText(row) }}</template>
</el-table-column>
<el-table-column label="操作" width="220" fixed="right" align="center">
<template #default="{ row }">