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
@@ -17,6 +17,7 @@ type CustomerValues = {
deposit?: string | null;
buy?: string | null;
birthdayType?: number | null;
birthdayOwner?: number | null;
birthday?: Date | null;
salesman?: string | null;
reportDate?: Date | null;
@@ -108,12 +109,22 @@ export function CustomerForm({
/>
<Field label="押金" name="deposit" defaultValue={v.deposit} required={requireAll} />
<Field label="买断" name="buy" defaultValue={v.buy} required={requireAll} />
<div className="space-y-1.5">
<Label htmlFor="birthdayType">生日类型</Label>
<Select id="birthdayType" name="birthdayType" defaultValue={String(v.birthdayType ?? 1)}>
<option value="1">阳历</option>
<option value="2">阴历</option>
</Select>
{/* 生日类型 + 生日归属,同行两个下拉框 */}
<div className="grid grid-cols-2 gap-3">
<div className="space-y-1.5">
<Label htmlFor="birthdayType">生日类型</Label>
<Select id="birthdayType" name="birthdayType" defaultValue={String(v.birthdayType ?? 1)}>
<option value="1">阳历</option>
<option value="2">阴历</option>
</Select>
</div>
<div className="space-y-1.5">
<Label htmlFor="birthdayOwner">生日归属</Label>
<Select id="birthdayOwner" name="birthdayOwner" defaultValue={String(v.birthdayOwner ?? 2)}>
<option value="1">结算人</option>
<option value="2">联系人</option>
</Select>
</div>
</div>
<Field
label="生日"