feat: 客户筛选部门和业务负责人联动
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
- 选择部门后,业务负责人下拉只显示该部门的人 - 切换部门时自动清空已选的业务负责人 - 未选部门时显示所有部门的负责人 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2289,7 +2289,10 @@ export default function App() {
|
||||
<label className="text-[10px] font-bold text-gray-400 uppercase tracking-wider">业务负责人</label>
|
||||
<select className="w-full bg-white border border-gray-200 rounded-lg py-2 px-2 text-xs focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-500 outline-none transition-all cursor-pointer shadow-sm" value={draftCustomerFilters.manager} onChange={(e) => setDraftCustomerFilters(prev => ({ ...prev, manager: e.target.value }))}>
|
||||
<option value="">所有负责人</option>
|
||||
{customerManagersGroupedByDept.filter(g => g.department !== '公务车').map(g => (
|
||||
{customerManagersGroupedByDept
|
||||
.filter(g => g.department !== '公务车')
|
||||
.filter(g => !draftCustomerFilters.department || g.department === draftCustomerFilters.department)
|
||||
.map(g => (
|
||||
<optgroup key={g.department} label={g.department}>
|
||||
{g.managers.map(m => <option key={m} value={m}>{m}</option>)}
|
||||
</optgroup>
|
||||
@@ -2307,7 +2310,7 @@ export default function App() {
|
||||
</div>
|
||||
<div className="space-y-1.5">
|
||||
<label className="text-[10px] font-bold text-gray-400 uppercase tracking-wider">部门</label>
|
||||
<select className="w-full bg-white border border-gray-200 rounded-lg py-2 px-2 text-xs focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-500 outline-none transition-all cursor-pointer shadow-sm" value={draftCustomerFilters.department} onChange={(e) => setDraftCustomerFilters(prev => ({ ...prev, department: e.target.value }))}>
|
||||
<select className="w-full bg-white border border-gray-200 rounded-lg py-2 px-2 text-xs focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-500 outline-none transition-all cursor-pointer shadow-sm" value={draftCustomerFilters.department} onChange={(e) => setDraftCustomerFilters(prev => ({ ...prev, department: e.target.value, manager: '' }))}>
|
||||
<option value="">所有部门</option>
|
||||
{uniqueDepts.map(d => <option key={d} value={d}>{d}</option>)}
|
||||
</select>
|
||||
|
||||
Reference in New Issue
Block a user