修改客户详细卡片摘要

This commit is contained in:
WindowBird 2025-11-08 18:00:41 +08:00
parent 11c796a900
commit 14d42ffc0c

View File

@ -12,33 +12,50 @@
<!-- 客户摘要卡片 --> <!-- 客户摘要卡片 -->
<view class="customer-summary-card"> <view class="customer-summary-card">
<view class="summary-row"> <view class="summary-row">
<view class="summary-item">
<text class="summary-label">客户昵称</text>
<text class="summary-value">{{ customerDetail.contactName || customerDetail.name || '--' }}</text>
</view>
<view class="summary-item"> <view class="summary-item">
<text class="summary-label">客户状态</text> <text class="summary-label">客户状态</text>
<view class="status-badge" :class="getStatusClass(customerDetail.status)"> <view class="status-badge" :class="getStatusClass(customerDetail.status)">
<text>{{ getStatusText(customerDetail.status) }}</text> <text>{{ getStatusText(customerDetail.status) }}</text>
</view> </view>
</view> </view>
</view>
<view class="summary-row">
<view class="summary-item">
<text class="summary-label">客户意向</text>
<text class="summary-value">{{ formatIntents(customerDetail.intents) }}</text>
</view>
<view class="summary-item">
<text class="summary-label">意向强度</text>
<text class="summary-value">{{ getIntentStrengthText(customerDetail.intentLevel) }}</text>
</view>
</view> </view>
<view class="summary-row"> <view class="summary-row">
<view class="summary-item"> <view class="summary-item">
<text class="summary-label">客户归属</text> <text class="summary-label">客户归属</text>
<text class="summary-value">{{ customerDetail.followName || '未分配' }}</text> <text class="summary-value">{{ customerDetail.followName || '未分配' }}</text>
</view> </view>
<view class="summary-item">
<text class="summary-label">客户类型</text>
<text class="summary-value">{{ getCustomerTypeText(customerDetail.type) }}</text>
</view>
</view>
<view class="summary-row">
<view class="summary-item">
<text class="summary-label">联系人</text>
<text class="summary-value">{{ customerDetail.contactName || customerDetail.name || '--' }}</text>
</view>
<view class="summary-item"> <view class="summary-item">
<text class="summary-label">最近跟进</text> <text class="summary-label">最近跟进</text>
<text class="summary-value">{{ formatDateTime(customerDetail.lastFollowTime) }}</text> <text class="summary-value">{{ formatDateTime(customerDetail.lastFollowTime) }}</text>
</view> </view>
</view> </view>
<view class="summary-row">
<view class="summary-item">
<text class="summary-label">微信号</text>
<text class="summary-value">{{ customerDetail.wechat || '--' }}</text>
</view>
<view class="summary-item">
<text class="summary-label">微信好友</text>
<text class="summary-value">{{ customerDetail.wechatId || '--' }}</text>
</view>
</view>
</view> </view>
<!-- 标签页导航 --> <!-- 标签页导航 -->
@ -235,13 +252,28 @@ const formatDateTime = (dateTime) => {
}; };
// //
const getCustomerTypeText = (type) => { const formatIntents = (intents) => {
const typeMap = { if (!intents) return '--';
'1': '企业客户', // join
'2': '个人客户' if (Array.isArray(intents)) {
return intents.length > 0 ? intents.join('、') : '--';
}
//
if (typeof intents === 'string') {
return intents || '--';
}
return '--';
}; };
return typeMap[type] || '--';
//
const getIntentStrengthText = (intentLevel) => {
const levelMap = {
'1': '高',
'2': '中',
'3': '低'
};
return levelMap[intentLevel] || '--';
}; };
// //