deploy: 2026-07-15 14:04 部署更新

This commit is contained in:
selfrelease
2026-07-15 14:04:58 +08:00
parent fc2537f9c9
commit 81c6212da9
+42 -25
View File
@@ -620,6 +620,18 @@ async function loadCustomers() {
}
// --- 客户详情 ---
/** 切换 AI 沟通摘要的折叠/展开状态 */
function toggleSummary() {
const body = document.getElementById('summary-body');
const arrow = document.getElementById('summary-arrow');
if (!body || !arrow) return;
const collapsed = body.style.display === 'none';
body.style.display = collapsed ? '' : 'none';
arrow.classList.toggle('rotate-90', collapsed);
arrow.classList.toggle('rotate-0', !collapsed);
}
async function showCustomerDetail(id) {
currentCustomerId = id;
currentMsgPage = 1;
@@ -643,34 +655,39 @@ async function showCustomerDetail(id) {
const summary = document.getElementById('detail-summary');
summary.innerHTML = `
<div class="flex items-center justify-between mb-3">
<h3 class="font-semibold">AI 沟通摘要</h3>
<div class="flex items-center justify-between mb-3 cursor-pointer select-none" onclick="toggleSummary()">
<div class="flex items-center gap-2">
<svg id="summary-arrow" class="w-4 h-4 text-gray-400 transition-transform rotate-90" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"/></svg>
<h3 class="font-semibold">AI 沟通摘要</h3>
</div>
<span class="text-xs text-gray-400">分析时间: ${customer.last_analysis ? new Date(customer.last_analysis).toLocaleString('zh-CN') : '-'}</span>
</div>
<div class="bg-gray-50 border border-gray-100 rounded-lg p-4 mb-4">
<p class="text-sm text-gray-700 leading-relaxed">${customer.summary || '暂无摘要'}</p>
</div>
${(customer.key_points || []).length > 0 ? `
<div class="mb-4">
<h4 class="text-sm font-semibold mb-2 ${customer.stage === '成交' ? 'text-green-700' : 'text-orange-700'}">${customer.stage === '成交' ? '关键成交点' : '需要突破的问题点'}</h4>
<ul class="space-y-1.5">
${(customer.key_points || []).map(p => `
<li class="flex gap-2 items-start text-sm">
<span class="${customer.stage === '成交' ? 'text-green-500' : 'text-orange-500'} shrink-0">▸</span>
<span class="text-gray-700">${p}</span>
</li>
`).join('')}
</ul>
</div>
` : ''}
<div class="space-y-3 text-sm border-t pt-3">
<div class="flex gap-2 items-start">
<span class="text-gray-500 shrink-0 w-14">异议:</span>
<span class="text-gray-700">${(customer.objections || []).join('、') || '无'}</span>
<div id="summary-body" class="transition-all duration-200 overflow-hidden">
<div class="bg-gray-50 border border-gray-100 rounded-lg p-4 mb-4">
<p class="text-sm text-gray-700 leading-relaxed">${customer.summary || '暂无摘要'}</p>
</div>
<div class="flex gap-2 items-start">
<span class="text-gray-500 shrink-0 w-14">下一步:</span>
<span class="text-gray-700">${customer.next_action || '-'}</span>
${(customer.key_points || []).length > 0 ? `
<div class="mb-4">
<h4 class="text-sm font-semibold mb-2 ${customer.stage === '成交' ? 'text-green-700' : 'text-orange-700'}">${customer.stage === '成交' ? '关键成交点' : '需要突破的问题点'}</h4>
<ul class="space-y-1.5">
${(customer.key_points || []).map(p => `
<li class="flex gap-2 items-start text-sm">
<span class="${customer.stage === '成交' ? 'text-green-500' : 'text-orange-500'} shrink-0">▸</span>
<span class="text-gray-700">${p}</span>
</li>
`).join('')}
</ul>
</div>
` : ''}
<div class="space-y-3 text-sm border-t pt-3">
<div class="flex gap-2 items-start">
<span class="text-gray-500 shrink-0 w-14">异议:</span>
<span class="text-gray-700">${(customer.objections || []).join('、') || '无'}</span>
</div>
<div class="flex gap-2 items-start">
<span class="text-gray-500 shrink-0 w-14">下一步:</span>
<span class="text-gray-700">${customer.next_action || '-'}</span>
</div>
</div>
</div>
`;