refactor: 统一客户→商户命名;字段一致;导入失败返回错误Excel

- 全局:客户→商户(表单/列表/查看/编辑/新增/导出/导航/品牌)
- 字段统一:详情→产品明细、电话→联系电话、报单时间→报单日期
- 新增商户导入模板下载(/customers/template)
- 导入失败时返回含错误列的 Excel,提示具体原因

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-12 00:30:17 +08:00
co-authored by Claude Opus 4.8
parent 2bb2945678
commit 90c4efb9ec
14 changed files with 182 additions and 68 deletions
@@ -25,11 +25,11 @@ export default async function EditCustomerPage({
href="/customers" href="/customers"
className="inline-flex items-center gap-1.5 text-sm text-[var(--color-muted-foreground)] hover:text-[var(--color-foreground)]" className="inline-flex items-center gap-1.5 text-sm text-[var(--color-muted-foreground)] hover:text-[var(--color-foreground)]"
> >
<ArrowLeft className="h-4 w-4" /> 返回客户列表 <ArrowLeft className="h-4 w-4" /> 返回商户列表
</Link> </Link>
<Card> <Card>
<CardHeader> <CardHeader>
<CardTitle>编辑客户 · {customer.customerName}</CardTitle> <CardTitle>编辑商户 · {customer.customerName}</CardTitle>
</CardHeader> </CardHeader>
<CardContent> <CardContent>
<CustomerForm action={action} defaultValues={customer} submitLabel="保存" /> <CustomerForm action={action} defaultValues={customer} submitLabel="保存" />
+55 -24
View File
@@ -8,20 +8,20 @@ import { Prisma } from "@prisma/client";
import { prisma } from "@/lib/prisma"; import { prisma } from "@/lib/prisma";
import { auth } from "@/lib/auth"; import { auth } from "@/lib/auth";
import { isSuperAdmin } from "@/lib/acl"; import { isSuperAdmin } from "@/lib/acl";
import { parseDate } from "@/lib/utils"; import { fmtDate, parseDate } from "@/lib/utils";
// 校验规则对齐老系统必填项(customer_name/contacts/balance_user/detail/salesman/report_date) // 校验规则对齐老系统必填项(customer_name/contacts/balance_user/detail/salesman/report_date)
const schema = z.object({ const schema = z.object({
customerName: z.string().trim().min(1, "客户名称必填").max(500), customerName: z.string().trim().min(1, "商户名称必填").max(500),
contacts: z.string().trim().min(1, "联系人必填").max(500), contacts: z.string().trim().min(1, "联系人必填").max(500),
balanceUser: z.string().trim().min(1, "结算人必填").max(500), balanceUser: z.string().trim().min(1, "结算人必填").max(500),
detail: z.string().trim().min(1, "详情必填"), detail: z.string().trim().min(1, "产品明细必填"),
salesman: z.string().trim().min(1, "业务员必填"), salesman: z.string().trim().min(1, "业务员必填"),
reportDate: z reportDate: z
.string() .string()
.trim() .trim()
.min(1, "报单时间必填") .min(1, "报单日期必填")
.refine((s) => parseDate(s) !== null, "报单时间格式应为 YYYY-MM-DD"), .refine((s) => parseDate(s) !== null, "报单日期格式应为 YYYY-MM-DD"),
phone: z.string().trim().optional().default(""), phone: z.string().trim().optional().default(""),
deposit: z.string().trim().optional().default(""), deposit: z.string().trim().optional().default(""),
buy: z.string().trim().optional().default(""), buy: z.string().trim().optional().default(""),
@@ -30,14 +30,14 @@ const schema = z.object({
remark: z.string().trim().optional().default(""), remark: z.string().trim().optional().default(""),
}); });
// 新增客户更严格:名称无空格、手机号必填 11 位、押金/买断/生日必填(仅用于创建,编辑仍用 schema) // 新增商户更严格:名称无空格、手机号必填 11 位、押金/买断/生日必填(仅用于创建,编辑仍用 schema)
const createSchema = schema.extend({ const createSchema = schema.extend({
customerName: z customerName: z
.string() .string()
.trim() .trim()
.min(1, "客户名称必填") .min(1, "商户名称必填")
.max(500) .max(500)
.refine((s) => !/\s/.test(s), "客户名称不能包含空格"), .refine((s) => !/\s/.test(s), "商户名称不能包含空格"),
phone: z.string().trim().regex(/^1\d{10}$/, "手机号必须为 11 位数字"), phone: z.string().trim().regex(/^1\d{10}$/, "手机号必须为 11 位数字"),
deposit: z.string().trim().min(1, "押金必填"), deposit: z.string().trim().min(1, "押金必填"),
buy: z.string().trim().min(1, "买断必填"), buy: z.string().trim().min(1, "买断必填"),
@@ -119,21 +119,23 @@ export async function deleteCustomer(id: number): Promise<void> {
// ============ Excel 导入 ============ // ============ Excel 导入 ============
const HEADER_MAP: Record<string, string> = { const HEADER_MAP: Record<string, string> = {
客户名称: "customerName", 商户名称: "customerName",
联系人: "contacts", 联系人: "contacts",
结算人: "balanceUser", 结算人: "balanceUser",
电话: "phone", 联系电话: "phone",
详情: "detail", 产品明细: "detail",
押金: "deposit", 押金: "deposit",
买断: "buy", 买断: "buy",
生日类型: "birthdayType", 生日类型: "birthdayType",
生日: "birthday", 生日: "birthday",
业务员: "salesman", 业务员: "salesman",
报单时间: "reportDate", 报单日期: "reportDate",
备注: "remark", 备注: "remark",
}; };
export type ImportResult = { ok: boolean; inserted?: number; skipped?: number; error?: string }; export type ImportResult =
| { ok: true; inserted: number }
| { ok: false; error?: string; errorFileBase64?: string; fileName?: string; totalRows?: number };
export async function importCustomers(formData: FormData): Promise<ImportResult> { export async function importCustomers(formData: FormData): Promise<ImportResult> {
if (!(await auth())) return { ok: false, error: "未登录" }; if (!(await auth())) return { ok: false, error: "未登录" };
@@ -146,21 +148,27 @@ export async function importCustomers(formData: FormData): Promise<ImportResult>
const sheet = wb.Sheets[wb.SheetNames[0]]; const sheet = wb.Sheets[wb.SheetNames[0]];
const raw = XLSX.utils.sheet_to_json<Record<string, unknown>>(sheet, { raw: false, defval: "" }); const raw = XLSX.utils.sheet_to_json<Record<string, unknown>>(sheet, { raw: false, defval: "" });
const data: Prisma.CustomerCreateManyInput[] = []; const headers = Object.keys(raw[0] ?? {});
let skipped = 0; const validData: Prisma.CustomerCreateManyInput[] = [];
const errorRows: (Record<string, unknown> & { _error: string })[] = [];
for (const row of raw) { for (const row of raw) {
const rec: Record<string, string> = {}; const rec: Record<string, string> = {};
for (const [header, val] of Object.entries(row)) { for (const [header, val] of Object.entries(row)) {
const key = HEADER_MAP[String(header).trim()]; const key = HEADER_MAP[String(header).trim()];
if (key) rec[key] = String(val ?? "").trim(); if (key) rec[key] = String(val ?? "").trim();
} }
// 报单时间为必填且需可解析,否则跳过
const errors: string[] = [];
if (!rec.customerName) errors.push("商户名称必填");
const reportDate = parseDate(rec.reportDate); const reportDate = parseDate(rec.reportDate);
if (!rec.customerName || !reportDate) { if (!rec.reportDate || !reportDate) errors.push("报单日期必填且格式为 YYYY-MM-DD");
skipped++; if (rec.birthday && !parseDate(rec.birthday)) errors.push("生日格式应为 YYYY-MM-DD");
continue;
} if (errors.length > 0) {
data.push({ errorRows.push({ ...row, _error: errors.join(";") });
} else {
validData.push({
customerName: rec.customerName, customerName: rec.customerName,
contacts: rec.contacts || null, contacts: rec.contacts || null,
balanceUser: rec.balanceUser || null, balanceUser: rec.balanceUser || null,
@@ -175,12 +183,35 @@ export async function importCustomers(formData: FormData): Promise<ImportResult>
reportDate, reportDate,
}); });
} }
}
if (data.length === 0) return { ok: false, error: `无有效数据(跳过 ${skipped} 行)` }; // 有任何无效行:返回带错误列的 Excel
if (errorRows.length > 0) {
const errorHeaders = [...headers, "导入失败原因"];
const aoa: (string | number)[][] = [errorHeaders];
for (const row of errorRows) {
const values = headers.map((h) => String(row[h] ?? ""));
values.push(row._error);
aoa.push(values);
}
const ws = XLSX.utils.aoa_to_sheet(aoa);
ws["!cols"] = errorHeaders.map(() => ({ wch: 18 }));
const errorWb = XLSX.utils.book_new();
XLSX.utils.book_append_sheet(errorWb, ws, "导入失败明细");
const errorBuf = XLSX.write(errorWb, { type: "buffer", bookType: "xlsx" }) as Buffer;
return {
ok: false,
errorFileBase64: errorBuf.toString("base64"),
fileName: `导入失败明细_${fmtDate(new Date())}.xlsx`,
totalRows: raw.length,
};
}
await prisma.customer.createMany({ data }); if (validData.length === 0) return { ok: false, error: "无有效数据" };
await prisma.customer.createMany({ data: validData });
revalidatePath("/customers"); revalidatePath("/customers");
return { ok: true, inserted: data.length, skipped }; return { ok: true, inserted: validData.length };
} catch (e) { } catch (e) {
return { ok: false, error: (e as Error).message }; return { ok: false, error: (e as Error).message };
} }
@@ -67,7 +67,7 @@ export default async function BirthdayPage({
<Card className="flex flex-wrap items-center justify-between gap-3 p-3"> <Card className="flex flex-wrap items-center justify-between gap-3 p-3">
<BirthdayControl mode={mode} date={dateStr} /> <BirthdayControl mode={mode} date={dateStr} />
<div className="pr-1 text-sm text-[var(--color-muted-foreground)]"> <div className="pr-1 text-sm text-[var(--color-muted-foreground)]">
命中 <span className="font-semibold text-[var(--color-foreground)]">{rows.length}</span> 位客户 命中 <span className="font-semibold text-[var(--color-foreground)]">{rows.length}</span> 位商户
</div> </div>
</Card> </Card>
@@ -75,9 +75,9 @@ export default async function BirthdayPage({
<Table> <Table>
<THead> <THead>
<tr> <tr>
<TH>客户名称</TH> <TH>商户名称</TH>
<TH>联系人</TH> <TH>联系人</TH>
<TH>电话</TH> <TH>联系电话</TH>
<TH>业务员</TH> <TH>业务员</TH>
<TH>生日</TH> <TH>生日</TH>
<TH>历法</TH> <TH>历法</TH>
@@ -87,7 +87,7 @@ export default async function BirthdayPage({
{rows.length === 0 && ( {rows.length === 0 && (
<tr> <tr>
<TD colSpan={6} className="py-14 text-center text-[var(--color-muted-foreground)]"> <TD colSpan={6} className="py-14 text-center text-[var(--color-muted-foreground)]">
该时段暂无生日客户 该时段暂无生日商户
</TD> </TD>
</tr> </tr>
)} )}
@@ -80,18 +80,18 @@ export function CustomerForm({
<form action={formAction} className="space-y-6"> <form action={formAction} className="space-y-6">
<div className="grid grid-cols-1 gap-x-5 gap-y-4 sm:grid-cols-2 lg:grid-cols-3"> <div className="grid grid-cols-1 gap-x-5 gap-y-4 sm:grid-cols-2 lg:grid-cols-3">
<Field <Field
label="客户名称" label="商户名称"
name="customerName" name="customerName"
defaultValue={v.customerName} defaultValue={v.customerName}
required required
pattern={requireAll ? "\\S+" : undefined} pattern={requireAll ? "\\S+" : undefined}
title={requireAll ? "客户名称不能包含空格" : undefined} title={requireAll ? "商户名称不能包含空格" : undefined}
/> />
<Field label="联系人" name="contacts" defaultValue={v.contacts} required /> <Field label="联系人" name="contacts" defaultValue={v.contacts} required />
<Field label="结算人" name="balanceUser" defaultValue={v.balanceUser} required /> <Field label="结算人" name="balanceUser" defaultValue={v.balanceUser} required />
<Field label="业务员" name="salesman" defaultValue={v.salesman} required /> <Field label="业务员" name="salesman" defaultValue={v.salesman} required />
<Field <Field
label="电话" label="联系电话"
name="phone" name="phone"
defaultValue={v.phone} defaultValue={v.phone}
required={requireAll} required={requireAll}
@@ -100,7 +100,7 @@ export function CustomerForm({
title={requireAll ? "请输入 11 位手机号" : undefined} title={requireAll ? "请输入 11 位手机号" : undefined}
/> />
<Field <Field
label="报单时间" label="报单日期"
name="reportDate" name="reportDate"
type="date" type="date"
defaultValue={fmtDate(v.reportDate)} defaultValue={fmtDate(v.reportDate)}
@@ -126,7 +126,7 @@ export function CustomerForm({
<div className="space-y-1.5"> <div className="space-y-1.5">
<Label htmlFor="detail"> <Label htmlFor="detail">
详情<span className="ml-0.5 text-[var(--color-danger)]">*</span> 产品明细<span className="ml-0.5 text-[var(--color-danger)]">*</span>
</Label> </Label>
<Textarea id="detail" name="detail" defaultValue={v.detail ?? ""} rows={3} /> <Textarea id="detail" name="detail" defaultValue={v.detail ?? ""} rows={3} />
</div> </div>
@@ -47,7 +47,25 @@ export function CustomerToolbar({
startImport(async () => { startImport(async () => {
const res = await importCustomers(fd); const res = await importCustomers(fd);
if (res.ok) { if (res.ok) {
toast.success(`导入成功:新增 ${res.inserted} 条${res.skipped ? `,跳过 ${res.skipped} 条` : ""}`); toast.success(`导入成功:新增 ${res.inserted} 条`);
router.refresh();
} else if (res.errorFileBase64) {
toast.error(`导入失败:${res.totalRows} 条无效,已下载明细`);
// 触发下载错误文件(base64 解码)
const binStr = atob(res.errorFileBase64);
const bytes = new Uint8Array(binStr.length);
for (let i = 0; i < binStr.length; i++) bytes[i] = binStr.charCodeAt(i);
const blob = new Blob([bytes], {
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
});
const url = URL.createObjectURL(blob);
const a = document.createElement("a");
a.href = url;
a.download = res.fileName ?? "导入失败明细.xlsx";
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
URL.revokeObjectURL(url);
router.refresh(); router.refresh();
} else { } else {
toast.error(res.error ?? "导入失败"); toast.error(res.error ?? "导入失败");
@@ -63,7 +81,7 @@ export function CustomerToolbar({
<Search className="pointer-events-none absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-[var(--color-muted-foreground)]" /> <Search className="pointer-events-none absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-[var(--color-muted-foreground)]" />
<Input <Input
name="keyword" name="keyword"
placeholder="客户 / 联系人 / 电话 / 业务员" placeholder="商户 / 联系人 / 联系电话 / 业务员"
defaultValue={defaultKeyword} defaultValue={defaultKeyword}
className="w-64 pl-8" className="w-64 pl-8"
/> />
@@ -85,6 +103,12 @@ export function CustomerToolbar({
<Upload className="h-4 w-4" /> <Upload className="h-4 w-4" />
{importing ? "导入中…" : "导入"} {importing ? "导入中…" : "导入"}
</Button> </Button>
<a href="/customers/template">
<Button variant="outline">
<Download className="h-4 w-4" />
下载模板
</Button>
</a>
<a href={exportHref}> <a href={exportHref}>
<Button variant="outline"> <Button variant="outline">
<Download className="h-4 w-4" /> <Download className="h-4 w-4" />
@@ -94,7 +118,7 @@ export function CustomerToolbar({
<Link href="/customers/new"> <Link href="/customers/new">
<Button> <Button>
<Plus className="h-4 w-4" /> <Plus className="h-4 w-4" />
新增客户 新增商户
</Button> </Button>
</Link> </Link>
</div> </div>
@@ -10,7 +10,7 @@ export function DeleteButton({ id, name }: { id: number; name: string }) {
const [pending, start] = useTransition(); const [pending, start] = useTransition();
function onDelete() { function onDelete() {
if (!confirm(`确认删除客户「${name}」?`)) return; if (!confirm(`确认删除商户「${name}」?`)) return;
start(async () => { start(async () => {
await deleteCustomer(id); await deleteCustomer(id);
toast.success("已删除"); toast.success("已删除");
@@ -43,10 +43,10 @@ export async function GET(req: NextRequest) {
const ws = XLSX.utils.aoa_to_sheet(aoa); const ws = XLSX.utils.aoa_to_sheet(aoa);
ws["!cols"] = EXCEL_COLUMNS.map(() => ({ wch: 16 })); ws["!cols"] = EXCEL_COLUMNS.map(() => ({ wch: 16 }));
const wb = XLSX.utils.book_new(); const wb = XLSX.utils.book_new();
XLSX.utils.book_append_sheet(wb, ws, "客户"); XLSX.utils.book_append_sheet(wb, ws, "商户");
const buf = XLSX.write(wb, { type: "buffer", bookType: "xlsx" }) as Buffer; const buf = XLSX.write(wb, { type: "buffer", bookType: "xlsx" }) as Buffer;
const filename = `客户导出_${fmtDate(new Date())}.xlsx`; const filename = `商户导出_${fmtDate(new Date())}.xlsx`;
return new NextResponse(new Uint8Array(buf), { return new NextResponse(new Uint8Array(buf), {
status: 200, status: 200,
headers: { headers: {
+2 -2
View File
@@ -11,11 +11,11 @@ export default function NewCustomerPage() {
href="/customers" href="/customers"
className="inline-flex items-center gap-1.5 text-sm text-[var(--color-muted-foreground)] hover:text-[var(--color-foreground)]" className="inline-flex items-center gap-1.5 text-sm text-[var(--color-muted-foreground)] hover:text-[var(--color-foreground)]"
> >
<ArrowLeft className="h-4 w-4" /> 返回客户列表 <ArrowLeft className="h-4 w-4" /> 返回商户列表
</Link> </Link>
<Card> <Card>
<CardHeader> <CardHeader>
<CardTitle>新增客户</CardTitle> <CardTitle>新增商户</CardTitle>
</CardHeader> </CardHeader>
<CardContent> <CardContent>
<CustomerForm action={createCustomer} submitLabel="创建" requireAll /> <CustomerForm action={createCustomer} submitLabel="创建" requireAll />
+5 -5
View File
@@ -7,7 +7,7 @@ export type CustomerSearch = {
end?: string; end?: string;
}; };
/** 客户列表 / 导出 共用的查询条件 */ /** 商户列表 / 导出 共用的查询条件 */
export function buildCustomerWhere(sp: CustomerSearch): Prisma.CustomerWhereInput { export function buildCustomerWhere(sp: CustomerSearch): Prisma.CustomerWhereInput {
const keyword = (sp.keyword ?? "").trim(); const keyword = (sp.keyword ?? "").trim();
const where: Prisma.CustomerWhereInput = { deletedAt: null }; const where: Prisma.CustomerWhereInput = { deletedAt: null };
@@ -29,16 +29,16 @@ export function buildCustomerWhere(sp: CustomerSearch): Prisma.CustomerWhereInpu
/** 导出/导入的列定义(表头 ↔ 字段) */ /** 导出/导入的列定义(表头 ↔ 字段) */
export const EXCEL_COLUMNS: { header: string; key: string }[] = [ export const EXCEL_COLUMNS: { header: string; key: string }[] = [
{ header: "客户名称", key: "customerName" }, { header: "商户名称", key: "customerName" },
{ header: "联系人", key: "contacts" }, { header: "联系人", key: "contacts" },
{ header: "结算人", key: "balanceUser" }, { header: "结算人", key: "balanceUser" },
{ header: "电话", key: "phone" }, { header: "联系电话", key: "phone" },
{ header: "详情", key: "detail" }, { header: "产品明细", key: "detail" },
{ header: "押金", key: "deposit" }, { header: "押金", key: "deposit" },
{ header: "买断", key: "buy" }, { header: "买断", key: "buy" },
{ header: "生日类型", key: "birthdayType" }, { header: "生日类型", key: "birthdayType" },
{ header: "生日", key: "birthday" }, { header: "生日", key: "birthday" },
{ header: "业务员", key: "salesman" }, { header: "业务员", key: "salesman" },
{ header: "报单时间", key: "reportDate" }, { header: "报单日期", key: "reportDate" },
{ header: "备注", key: "remark" }, { header: "备注", key: "remark" },
]; ];
@@ -0,0 +1,59 @@
import { NextResponse } from "next/server";
import * as XLSX from "xlsx";
import { auth } from "@/lib/auth";
/** 生成商户导入模板 Excel */
export async function GET() {
if (!(await auth())) {
return NextResponse.json({ error: "未登录" }, { status: 401 });
}
const headers = [
"商户名称",
"联系人",
"结算人",
"联系电话",
"产品明细",
"押金",
"买断",
"生日类型",
"生日",
"业务员",
"报单日期",
"备注",
];
// 示例行(用户导入前需删除此行)
const example = [
"模板名称_此行删除",
"侯磊",
"张三",
"13813855555",
"POS+CRM",
"100",
"100",
"阴历",
"生日格式要求:2022-06-21",
"A",
"报单日期格式要求:2022-06-21",
"导入备注",
];
const aoa: (string | number)[][] = [headers, example];
const ws = XLSX.utils.aoa_to_sheet(aoa);
ws["!cols"] = headers.map(() => ({ wch: 18 }));
const wb = XLSX.utils.book_new();
XLSX.utils.book_append_sheet(wb, ws, "商户导入模板");
const buf = XLSX.write(wb, { type: "buffer", bookType: "xlsx" }) as Buffer;
const filename = "商户导入模板.xlsx";
return new NextResponse(new Uint8Array(buf), {
status: 200,
headers: {
"Content-Type":
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"Content-Disposition": `attachment; filename*=UTF-8''${encodeURIComponent(filename)}`,
},
});
}
+4 -4
View File
@@ -58,7 +58,7 @@ export default async function DashboardPage() {
const last12Total = chartData.reduce((s, d) => s + d.count, 0); const last12Total = chartData.reduce((s, d) => s + d.count, 0);
const stats = [ const stats = [
{ label: "客户总数", value: total.toLocaleString(), icon: Users, tone: "primary" as const }, { label: "商户总数", value: total.toLocaleString(), icon: Users, tone: "primary" as const },
{ label: "本月新增", value: monthNew.toLocaleString(), icon: CalendarClock, tone: "info" as const }, { label: "本月新增", value: monthNew.toLocaleString(), icon: CalendarClock, tone: "info" as const },
{ label: "今日生日", value: birthdayCount.toLocaleString(), icon: Cake, tone: "warning" as const }, { label: "今日生日", value: birthdayCount.toLocaleString(), icon: Cake, tone: "warning" as const },
{ label: "后台账号", value: admins.toLocaleString(), icon: UserCheck, tone: "success" as const }, { label: "后台账号", value: admins.toLocaleString(), icon: UserCheck, tone: "success" as const },
@@ -115,10 +115,10 @@ export default async function DashboardPage() {
</CardContent> </CardContent>
</Card> </Card>
{/* 最近客户 */} {/* 最近商户 */}
<Card> <Card>
<CardHeader> <CardHeader>
<CardTitle>最近报单客户</CardTitle> <CardTitle>最近报单商户</CardTitle>
<Link <Link
href="/customers" href="/customers"
className="flex items-center gap-1 text-[13px] font-medium text-[var(--color-primary)] hover:underline" className="flex items-center gap-1 text-[13px] font-medium text-[var(--color-primary)] hover:underline"
@@ -129,7 +129,7 @@ export default async function DashboardPage() {
<Table> <Table>
<THead> <THead>
<tr> <tr>
<TH>客户名称</TH> <TH>商户名称</TH>
<TH>联系人</TH> <TH>联系人</TH>
<TH>业务员</TH> <TH>业务员</TH>
<TH>报单时间</TH> <TH>报单时间</TH>
@@ -30,7 +30,7 @@ export function PermissionForm({
<div className="grid grid-cols-2 gap-4"> <div className="grid grid-cols-2 gap-4">
<div className="space-y-1.5"> <div className="space-y-1.5">
<Label htmlFor="title">权限名称<span className="ml-0.5 text-[var(--color-danger)]">*</span></Label> <Label htmlFor="title">权限名称<span className="ml-0.5 text-[var(--color-danger)]">*</span></Label>
<Input id="title" name="title" defaultValue={v.title} placeholder="如:客户列表" /> <Input id="title" name="title" defaultValue={v.title} placeholder="如:商户列表" />
</div> </div>
<div className="space-y-1.5"> <div className="space-y-1.5">
<Label htmlFor="name">权限标识<span className="ml-0.5 text-[var(--color-danger)]">*</span></Label> <Label htmlFor="name">权限标识<span className="ml-0.5 text-[var(--color-danger)]">*</span></Label>
+1 -1
View File
@@ -26,7 +26,7 @@ export const navSections: NavSection[] = [
title: "主菜单", title: "主菜单",
items: [ items: [
{ href: "/", label: "控制台", icon: LayoutDashboard }, { href: "/", label: "控制台", icon: LayoutDashboard },
{ href: "/customers", label: "客户管理", icon: Users }, { href: "/customers", label: "商户管理", icon: Users },
{ href: "/customers/birthday", label: "生日提醒", icon: Cake }, { href: "/customers/birthday", label: "生日提醒", icon: Cake },
], ],
}, },
+2 -2
View File
@@ -2,8 +2,8 @@
export const brand = { export const brand = {
name: "联动支付", name: "联动支付",
nameEn: "Linkage Pay", nameEn: "Linkage Pay",
product: "CRM 客户管理系统", product: "CRM 商户管理系统",
tagline: "客户关系管理平台", tagline: "商户关系管理平台",
company: "联动支付", company: "联动支付",
}; };