feat(customers): 增加商户编号并补齐生日提醒信息
录入、列表和导入导出带上商户编号。生日提醒展示与录入一致的商户资料,旧阴历生日仍按农历提醒。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -6,7 +6,6 @@ import { birthdayMatchLists } from "@/lib/lunar";
|
||||
import { fmtDate } from "@/lib/utils";
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
import { Table, THead, TR, TH, TD } from "@/components/ui/table";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { MonthlyReportChart, type MonthPoint } from "./report-chart";
|
||||
|
||||
export default async function DashboardPage() {
|
||||
@@ -131,6 +130,7 @@ export default async function DashboardPage() {
|
||||
<THead>
|
||||
<tr>
|
||||
<TH>商户名称</TH>
|
||||
<TH>商户编号</TH>
|
||||
<TH>联系人</TH>
|
||||
<TH>业务员</TH>
|
||||
<TH>报单时间</TH>
|
||||
@@ -141,17 +141,11 @@ export default async function DashboardPage() {
|
||||
{recent.map((c) => (
|
||||
<TR key={c.id}>
|
||||
<TD className="font-medium">{c.customerName}</TD>
|
||||
<TD className="break-all">{c.customerNo || "—"}</TD>
|
||||
<TD>{c.contacts}</TD>
|
||||
<TD>{c.salesman}</TD>
|
||||
<TD className="tabular-nums">{fmtDate(c.reportDate)}</TD>
|
||||
<TD>
|
||||
<span className="tabular-nums">{fmtDate(c.birthday)}</span>
|
||||
{c.birthday && (
|
||||
<Badge tone={c.birthdayType === 2 ? "warning" : "info"} className="ml-2">
|
||||
{c.birthdayType === 2 ? "农历" : "阳历"}
|
||||
</Badge>
|
||||
)}
|
||||
</TD>
|
||||
<TD className="tabular-nums">{fmtDate(c.birthday)}</TD>
|
||||
</TR>
|
||||
))}
|
||||
</tbody>
|
||||
@@ -167,6 +161,11 @@ export default async function DashboardPage() {
|
||||
<div key={c.id} className="flex items-start justify-between gap-3 px-4 py-3">
|
||||
<div className="min-w-0">
|
||||
<div className="truncate font-medium">{c.customerName}</div>
|
||||
{c.customerNo ? (
|
||||
<div className="mt-0.5 break-all text-xs text-[var(--color-muted-foreground)]">
|
||||
编号 {c.customerNo}
|
||||
</div>
|
||||
) : null}
|
||||
<div className="mt-1 text-xs text-[var(--color-muted-foreground)]">
|
||||
{c.contacts || "—"}
|
||||
{c.salesman ? ` · ${c.salesman}` : ""}
|
||||
@@ -176,11 +175,11 @@ export default async function DashboardPage() {
|
||||
<div className="text-xs tabular-nums text-[var(--color-muted-foreground)]">
|
||||
{fmtDate(c.reportDate)}
|
||||
</div>
|
||||
{c.birthday && (
|
||||
<Badge tone={c.birthdayType === 2 ? "warning" : "info"} className="mt-1">
|
||||
{c.birthdayType === 2 ? "农历" : "阳历"} {fmtDate(c.birthday)}
|
||||
</Badge>
|
||||
)}
|
||||
{c.birthday ? (
|
||||
<div className="mt-1 text-xs tabular-nums text-[var(--color-muted-foreground)]">
|
||||
{fmtDate(c.birthday)}
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user