feat(platform): polish customer time window controls

This commit is contained in:
lingniu
2026-07-05 20:54:04 +08:00
parent 2b246f414e
commit 68c1c7cef4
3 changed files with 90 additions and 24 deletions

View File

@@ -294,30 +294,46 @@ export function AppShell({
value={keyword}
onChange={setKeyword}
onEnterPress={search}
style={{ width: 320 }}
style={{ width: 280 }}
/>
<Button theme="solid" type="primary" loading={searching} onClick={search}></Button>
</Space>
<div className="vp-topbar-context">
<div className="vp-topbar-time-window" aria-label="客户时间窗">
<label>
<span></span>
<div className="vp-topbar-time-window-copy">
<strong></strong>
<span></span>
</div>
<label htmlFor="vp-customer-time-window-start">
<span></span>
<input
aria-label="顶部时间窗开始"
type="date"
id="vp-customer-time-window-start"
aria-label="客户时间窗开始日期"
type="text"
inputMode="numeric"
pattern="\d{4}-\d{2}-\d{2}"
placeholder="YYYY-MM-DD"
maxLength={10}
value={dateFrom}
onChange={(event) => onCustomerTimeWindowChange?.({ dateFrom: event.currentTarget.value, dateTo })}
/>
</label>
<label>
<span></span>
<label className="vp-sr-only" htmlFor="vp-customer-time-window-start"></label>
<label htmlFor="vp-customer-time-window-end">
<span></span>
<input
aria-label="顶部时间窗结束"
type="date"
id="vp-customer-time-window-end"
aria-label="客户时间窗结束日期"
type="text"
inputMode="numeric"
pattern="\d{4}-\d{2}-\d{2}"
placeholder="YYYY-MM-DD"
maxLength={10}
value={dateTo}
onChange={(event) => onCustomerTimeWindowChange?.({ dateFrom, dateTo: event.currentTarget.value })}
/>
</label>
<label className="vp-sr-only" htmlFor="vp-customer-time-window-end"></label>
<div className="vp-topbar-time-window-presets">
<button type="button" aria-label="顶部时间窗 今天" onClick={() => applyTimeWindowPreset(1)}></button>
<button type="button" aria-label="顶部时间窗 近7天" onClick={() => applyTimeWindowPreset(7)}>7</button>