feat: 生日归属字段贯通全部界面(查看/列表/提醒/导入/导出/模板)

补全 birthdayOwner(1=结算人 2=联系人)在 schema 写入链路之外的所有流转环节:
- 查看弹窗 customer-view:新增"生日归属"行
- 商户列表 page:生日单元格追加归属 badge
- 生日提醒页 birthday:新增"归属"列(Row 类型 / SQL / 表头 / colSpan 6→7 / 单元格)
- 导入 actions.importCustomers:validData 写入 birthdayOwner(结算人或"1"→1,否则→2)
- 导出 export/route + query.EXCEL_COLUMNS:新增"生日归属"列与对应行值
- 导入模板 template/route:表头与示例行同步插入"生日归属"/"联系人"
- 表单 customer-form:CustomerValues 类型补 birthdayOwner(消除 v.birthdayOwner 的 TS 报错,编辑页正确回填)

前置条件:MySQL customers 表需新增 birthday_owner 列(见 PR 说明),否则写入与生日页 SQL 会报 Unknown column。

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-07-12 16:58:52 +08:00
co-authored by Claude
parent 90c4efb9ec
commit b43f375c86
9 changed files with 39 additions and 7 deletions
@@ -16,6 +16,7 @@ type Row = {
reportDate: Date | null;
birthday: Date | null;
birthdayType: number | null;
birthdayOwner: number | null;
remark: string | null;
};
@@ -52,6 +53,7 @@ export default async function BirthdayPage({
report_date AS reportDate,
birthday,
birthday_type AS birthdayType,
birthday_owner AS birthdayOwner,
remark
FROM customers
WHERE deleted_at IS NULL AND (
@@ -81,12 +83,13 @@ export default async function BirthdayPage({
<TH>业务员</TH>
<TH>生日</TH>
<TH>历法</TH>
<TH>归属</TH>
</tr>
</THead>
<tbody>
{rows.length === 0 && (
<tr>
<TD colSpan={6} className="py-14 text-center text-[var(--color-muted-foreground)]">
<TD colSpan={7} className="py-14 text-center text-[var(--color-muted-foreground)]">
该时段暂无生日商户
</TD>
</tr>
@@ -103,6 +106,7 @@ export default async function BirthdayPage({
{c.birthdayType === 2 ? "农历" : "阳历"}
</Badge>
</TD>
<TD>{c.birthdayOwner === 1 ? "结算人" : "联系人"}</TD>
</TR>
))}
</tbody>