初始化询价智能体新仓:同步本地工程并排除密钥与 .env。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,142 @@
|
||||
/**
|
||||
* 演示数据:对齐原型 `询价机器人原型图/后台/admin-quote-templates.html` 列表行。
|
||||
* 关键词 / 默认模板字段对齐旧仓 quoteTemplate(keywordItems + defaultTemplate)。
|
||||
*/
|
||||
|
||||
export type TemplateRow = {
|
||||
id: string;
|
||||
name: string;
|
||||
bizType: "空运" | "海运" | "陆运";
|
||||
category: string;
|
||||
/** 列表「模板文件」列展示名(原型常与模板名一致,不含扩展名) */
|
||||
fileLabel: string;
|
||||
/** 预览/上传用完整文件名 */
|
||||
fileName: string;
|
||||
format: "excel" | "pdf";
|
||||
parseStatus: "已解析" | "解析中" | "失败";
|
||||
placeholderCount: number;
|
||||
/** 匹配用关键词;每项可含逗号,整体不去拆 */
|
||||
keywords: string[];
|
||||
/** 同业务下默认模板(Mock 保存时互斥) */
|
||||
isDefault: boolean;
|
||||
status: "enabled" | "disabled";
|
||||
useCount: number;
|
||||
createdAt: string;
|
||||
operator: string;
|
||||
};
|
||||
|
||||
/** 业务 → 分类(与原型 CATEGORY_BY_BUSINESS 一致) */
|
||||
export const CATEGORY_BY_BIZ: Record<TemplateRow["bizType"], string[]> = {
|
||||
海运: ["海运报价单模板"],
|
||||
空运: ["空运到港报价单模板", "空运到门报价单模板"],
|
||||
陆运: [
|
||||
"双清或中越",
|
||||
"国内整车",
|
||||
"国内拼车",
|
||||
"跨境整车",
|
||||
"跨境集拼",
|
||||
"中港",
|
||||
"凭祥保税仓&普仓仓储",
|
||||
],
|
||||
};
|
||||
|
||||
export const ALL_CATEGORIES = [
|
||||
"空运到港报价单模板",
|
||||
"空运到门报价单模板",
|
||||
"海运报价单模板",
|
||||
"双清或中越",
|
||||
"国内整车",
|
||||
"国内拼车",
|
||||
"跨境整车",
|
||||
"跨境集拼",
|
||||
"中港",
|
||||
"凭祥保税仓&普仓仓储",
|
||||
];
|
||||
|
||||
export const mockTemplates: TemplateRow[] = [
|
||||
{
|
||||
id: "t1",
|
||||
name: "海运整柜报价单模板",
|
||||
bizType: "海运",
|
||||
category: "海运报价单模板",
|
||||
fileLabel: "海运整柜报价单模板",
|
||||
fileName: "海运整柜报价单模板.xlsx",
|
||||
format: "excel",
|
||||
parseStatus: "已解析",
|
||||
placeholderCount: 14,
|
||||
keywords: ["整柜", "FCL"],
|
||||
isDefault: true,
|
||||
status: "enabled",
|
||||
useCount: 62,
|
||||
createdAt: "2024-06-15",
|
||||
operator: "王磊",
|
||||
},
|
||||
{
|
||||
id: "t2",
|
||||
name: "海运拼柜报价单模板",
|
||||
bizType: "海运",
|
||||
category: "海运报价单模板",
|
||||
fileLabel: "海运拼柜报价单模板",
|
||||
fileName: "海运拼柜报价单模板.xlsx",
|
||||
format: "excel",
|
||||
parseStatus: "已解析",
|
||||
placeholderCount: 12,
|
||||
keywords: ["拼柜", "LCL"],
|
||||
isDefault: false,
|
||||
status: "enabled",
|
||||
useCount: 34,
|
||||
createdAt: "2024-08-20",
|
||||
operator: "林雯",
|
||||
},
|
||||
{
|
||||
id: "t3",
|
||||
name: "空运到港报价单模板",
|
||||
bizType: "空运",
|
||||
category: "空运到港报价单模板",
|
||||
fileLabel: "空运到港报价单模板",
|
||||
fileName: "空运到港报价单模板.xlsx",
|
||||
format: "excel",
|
||||
parseStatus: "已解析",
|
||||
placeholderCount: 14,
|
||||
keywords: ["到港"],
|
||||
isDefault: true,
|
||||
status: "enabled",
|
||||
useCount: 52,
|
||||
createdAt: "2024-03-08",
|
||||
operator: "林雯",
|
||||
},
|
||||
{
|
||||
id: "t4",
|
||||
name: "空运到门报价单模板",
|
||||
bizType: "空运",
|
||||
category: "空运到门报价单模板",
|
||||
fileLabel: "空运到门报价单模板",
|
||||
fileName: "空运到门报价单模板.xlsx",
|
||||
format: "excel",
|
||||
parseStatus: "已解析",
|
||||
placeholderCount: 14,
|
||||
keywords: ["到门"],
|
||||
isDefault: false,
|
||||
status: "enabled",
|
||||
useCount: 34,
|
||||
createdAt: "2024-03-08",
|
||||
operator: "林雯",
|
||||
},
|
||||
{
|
||||
id: "t5",
|
||||
name: "陆运干线报价单模板",
|
||||
bizType: "陆运",
|
||||
category: "国内整车",
|
||||
fileLabel: "陆运干线报价单模板",
|
||||
fileName: "陆运干线报价单模板.pdf",
|
||||
format: "pdf",
|
||||
parseStatus: "已解析",
|
||||
placeholderCount: 9,
|
||||
keywords: ["干线", "整车"],
|
||||
isDefault: false,
|
||||
status: "disabled",
|
||||
useCount: 18,
|
||||
createdAt: "2025-11-01",
|
||||
operator: "张敏",
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user