From 628081986fc36352980993f1d75d7d588718fc20 Mon Sep 17 00:00:00 2001 From: yml Date: Tue, 24 Nov 2026 22:22:56 +0800 Subject: [PATCH] =?UTF-8?q?feat(fulfillment):=20=E8=AE=B0=E4=BD=8F?= =?UTF-8?q?=E4=B8=8A=E6=AC=A1=E9=80=89=E6=8B=A9=E7=9A=84=E7=9B=B4=E6=8E=A5?= =?UTF-8?q?=E5=85=91=E6=8D=A2/=E9=A2=84=E5=94=AE=20Tab?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - sale mode tab 写入 localStorage - 刷新页面/重新进入沿用上次选择 --- web/frontend/src/pages/PlatformFulfillmentPage.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/web/frontend/src/pages/PlatformFulfillmentPage.tsx b/web/frontend/src/pages/PlatformFulfillmentPage.tsx index aff7b67..7bc3a19 100644 --- a/web/frontend/src/pages/PlatformFulfillmentPage.tsx +++ b/web/frontend/src/pages/PlatformFulfillmentPage.tsx @@ -120,6 +120,8 @@ const MANUAL_REASON_LABELS: Record = { other_manual: '其他人工', }; +const SALE_MODE_TAB_STORAGE_KEY = 'platform_fulfillment_sale_mode_tab'; + const QUEUE_BUCKET_OPTIONS = [ { value: 'current', label: '当前待办' }, { value: 'pending_mapping', label: '待映射' }, @@ -463,7 +465,13 @@ export default function PlatformFulfillmentPage() { const navigate = useNavigate(); const { can } = usePermissions(user); const [queueBucket, setQueueBucket] = useState('current'); - const [saleModeTab, setSaleModeTab] = useState<'direct' | 'presale'>('direct'); + const [saleModeTab, setSaleModeTab] = useState<'direct' | 'presale'>(() => ( + localStorage.getItem(SALE_MODE_TAB_STORAGE_KEY) === 'presale' ? 'presale' : 'direct' + )); + + useEffect(() => { + localStorage.setItem(SALE_MODE_TAB_STORAGE_KEY, saleModeTab); + }, [saleModeTab]); const [keyword, setKeyword] = useState(''); const [page, setPage] = useState(1); const [pageSize, setPageSize] = useState(20);