From 63901b6de18c689d6b0c8ee4004672f44949be43 Mon Sep 17 00:00:00 2001 From: luishou Date: Sun, 12 Jul 2026 20:11:57 +0800 Subject: [PATCH] =?UTF-8?q?feat(customer-form):=20=E6=96=B0=E5=A2=9E/?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E8=A1=A8=E5=8D=95=E5=88=86=E5=8C=BA=EF=BC=88?= =?UTF-8?q?=E5=9F=BA=E6=9C=AC/=E7=94=9F=E6=97=A5/=E5=85=B6=E5=AE=83?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 加 FormSection helper(灰色小标题,复用 --color-muted-foreground,不新增组件文件) - 字段拆成 基本(商户名称/联系人/结算人/业务员/联系电话/报单日期) / 生日(类型/归属/生日) / 其它(押金/买断/产品明细/备注) - 保留紧凑网格(sm:2/lg:3),生日三字段独立成块;录入密度不降 - 与查看弹窗分区心智一致;required/校验/提交行 不变 校验:tsc --noEmit 通过;next build 全路由编译通过。 Co-Authored-By: Claude --- .../(dashboard)/customers/customer-form.tsx | 127 +++++++++++------- 1 file changed, 76 insertions(+), 51 deletions(-) diff --git a/src/app/(dashboard)/customers/customer-form.tsx b/src/app/(dashboard)/customers/customer-form.tsx index dc1659a..86b09da 100644 --- a/src/app/(dashboard)/customers/customer-form.tsx +++ b/src/app/(dashboard)/customers/customer-form.tsx @@ -63,6 +63,24 @@ function Field({ ); } +// 表单分区:小标题 + 内容;块间靠外层 space-y-6 分隔,不加灰线(录入场景保持紧凑) +function FormSection({ + title, + children, +}: { + title: string; + children: React.ReactNode; +}) { + return ( +
+

+ {title} +

+ {children} +
+ ); +} + export function CustomerForm({ action, defaultValues, @@ -79,38 +97,40 @@ export function CustomerForm({ return (
-
- - - - - - - - - {/* 生日类型 + 生日归属,同行两个下拉框 */} -
+ +
+ + + + + + +
+
+ + +
+
- -
+ -
- -