diff --git a/App.jsx b/App.jsx
index a965a7c..e315383 100644
--- a/App.jsx
+++ b/App.jsx
@@ -258,7 +258,7 @@ const STORAGE_KEYS = { customers: 'crm:customers', products: 'crm:products', quo
const blankCustomer = () => ({
id: 'c_' + Date.now() + '_' + Math.random().toString(36).slice(2, 7),
- company: '', contact: '', country: '', region: 'middle_east', email: '', phone: '',
+ company: '', contact: '', country: '', region: 'middle_east', email: '', phone: '', wechat: '',
isVip: false,
hasOrdered: false,
preferredContacts: [],
@@ -1523,6 +1523,7 @@ function contactDisplayFlags(c) {
return {
showEmail: (none || preferred.includes('email')) && !!c.email,
showPhone: (none || preferred.includes('phone')) && !!c.phone,
+ showWechat: (none || preferred.includes('wechat')) && !!c.wechat,
};
}
// 标题统一规则:意向型号(+数量)优先,没有就退回公司名,再没有就显示未命名
@@ -2461,7 +2462,7 @@ function CustomerMonitorGrid({ list, vipFlag, dragCustomerIdx, dragCustomerVip,
const modelQty = [c.intendedModel, c.intendedQty ? `× ${c.intendedQty}` : ''].filter(Boolean).join(' ');
const cardTitle = customerTitle(c);
const showCompanyLine = !!(modelQty && c.company);
- const { showEmail, showPhone } = contactDisplayFlags(c);
+ const { showEmail, showPhone, showWechat } = contactDisplayFlags(c);
const isDragging = dragCustomerIdx === idx && dragCustomerVip === vipFlag;
return (
{c.contact}
}
{showEmail && {c.email}
}
{showPhone && }
+ {showWechat && 微信 {c.wechat}
}
{lt && 当地时间 {lt.time}
}
@@ -2922,6 +2924,8 @@ function MainApp({ username, onLogout }) {
(c.company || '').toLowerCase().includes(q) ||
(c.contact || '').toLowerCase().includes(q) ||
(c.email || '').toLowerCase().includes(q) ||
+ (c.phone || '').toLowerCase().includes(q) ||
+ (c.wechat || '').toLowerCase().includes(q) ||
(c.country || '').toLowerCase().includes(q)
);
}
@@ -6137,6 +6141,7 @@ function CustomerForm({ draft, setDraft, onSave, onCancel }) {
电话 / WhatsApp{COUNTRY_BY_NAME[draft.country] ? `(${COUNTRY_BY_NAME[draft.country].dial})` : ''}
set({ phone: e.target.value })} />
+ 微信 WeChat set({ wechat: e.target.value })} placeholder="微信号 / 手机号" />
网站 set({ website: e.target.value })} />
客户来源
@@ -6594,6 +6599,7 @@ function CustomerDetail({
} label="地区 / 国家" value={`${regionLabel(c.region)} · ${c.country || '—'}`} />
} label="邮箱" value={c.email || '—'} active={preferred.includes('email')} onToggle={() => onTogglePreferred('email')} />
} label="电话" value={c.phone || '—'} active={preferred.includes('phone')} onToggle={() => onTogglePreferred('phone')} />
+
} label="微信" value={c.wechat || '—'} active={preferred.includes('wechat')} onToggle={() => onTogglePreferred('wechat')} />
} label="当地时间" value={lt ? `${lt.time}(${lt.en})` : '—'} />
} label="网站" value={c.website ?
{c.website} : '—'} />