hookehuyr

chore(config): 忽略文档解析生成的临时文件

- 添加 docs/parse-audit/ 到 .gitignore
- 添加 docs/parsed-backup/ 到 .gitignore
- 从版本控制中移除已跟踪的临时文件

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
......@@ -24,3 +24,7 @@ CLAUDE.md
*.pptx
.swc/
# Document parsing generated files
docs/parse-audit/
docs/parsed-backup/
......
# 产品配置审核 - 计划书模版2.docx
**解析时间**: 2026/2/15 11:18:47
**原始文件**: 计划书模版2.docx
**数据来源**: docs/to-parse/计划书模版2.docx
---
## 📋 产品基本信息
| 字段 | 提取值 | 需要确认 |
|------|--------|---------|
| 产品名称 | 宏摯傳承保障計劃 - 性別, 年齡, 出生年月日 | ✅ 请核对产品名称 |
| 产品类型 | savings | ✅ 请确认产品类型 |
| 币种 | USD | ✅ 请确认币种 |
| form_sn | `savings-product-ef3dd50b` | ✅ 请确认 form_sn 唯一性 |
| 缴费年期 | ["整付","3年","5年","10年","15年"] | ✅ 请确认缴费年期选项 |
| 年龄范围 | 0-75岁 | ✅ 请确认年龄范围 |
| 保险期间 | 终身 | ✅ 请确认保险期间 |
### 💰 储蓄类产品特有字段
| 字段 | 提取值 | 需要确认 |
|------|--------|---------|
| 提取方式 | ["最高固定提取金额"] | ✅ 请确认提取方式 |
| 提取期 | ["1年","3年","5年","10年"] | ✅ 请确认提取期选项 |
---
## 🤖 智能字段提取报告
### 匹配统计
- ✅ 成功匹配: 4 字段
- ⚠️ 使用默认值: 3 字段
- ❌ 未匹配(需人工补充): 0 字段
### ✅ 已成功匹配的字段
- product_name
- product_type
- payment_periods
- withdrawal_modes
### ⚠️ 使用默认值的字段
- **currency**: 未找到字段 "currency",使用默认值: "USD"
- **age_range**: 未找到字段 "age_range",使用默认值: {"min":0,"max":75}
- **insurance_period**: 未找到字段 "insurance_period",使用默认值: "终身"
---
## 🧾 配置预览
```javascript
{
"product_name": "宏摯傳承保障計劃 - 性別, 年齡, 出生年月日",
"product_type": "savings",
"currency": "USD",
"form_sn": "savings-product-ef3dd50b",
"payment_periods": [
"整付",
"3年",
"5年",
"10年",
"15年"
],
"age_range": {
"min": 0,
"max": 75
},
"insurance_period": "终身",
"is_savings": true,
"withdrawal_modes": [
"最高固定提取金额"
],
"withdrawal_periods": [
"1年",
"3年",
"5年",
"10年"
]
}
```
---
## 📝 表单字段 (form_schema)
```javascript
{
"base_fields": [],
"withdrawal_fields": [],
"reset_map": {}
}
```
---
## 🔄 提交字段映射 (submit_mapping)
```javascript
{}
```
---
## 🧩 生成配置片段
```javascript
/**
* 宏摯傳承保障計劃 - 性別, 年齡, 出生年月日
* @added 2026-02-15T03:18:47.616Z
* @source docs/to-parse/计划书模版2.docx
*/
'savings-product-ef3dd50b': {
name: '宏摯傳承保障計劃 - 性別, 年齡, 出生年月日',
component: 'SavingsTemplate',
category: 'savings',
config: {
currency: 'USD',
payment_periods: ["整付","3年","5年","10年","15年"],
age_range: { min: 0, max: 75 },
insurance_period: '终身',
withdrawal_plan: {
enabled: true,
currencies: ['HKD', 'USD', 'CNY'],
default_currency: 'USD',
withdrawal_modes: ["最高固定提取金额"],
withdrawal_periods: ["1年","3年","5年","10年"]
},
form_schema: savingsFormSchema,
submit_mapping: savingsSubmitMapping
}
}
```
---
## ✅ 审核检查清单
### 基础信息
- [ ] 产品名称正确
- [ ] 产品类型正确(savings/critical-illness/life-insurance)
- [ ] 币种正确(USD/CNY/HKD/EUR)
- [ ] form_sn 唯一且符合命名规范
### 缴费与年龄
- [ ] 缴费年期选项完整且正确
- [ ] 年龄范围合理
- [ ] 保险期间正确
### 储蓄类特有(如适用)
- [ ] 提取方式正确
- [ ] 提取期选项完整
- [ ] 表单字段定义完整
- [ ] 提交字段映射正确
---
## 📋 审核后操作
### 确认无误
```bash
# 1. 移动到 approved 目录
mv docs/parse-audit/pending/计划书模版2/2026-02-15-计划书模版2-宏摯傳承保障計劃-性別-年齡-出生年月日.md \
docs/parse-audit/approved/
# 2. 合并到正式配置
# 手动复制或使用工具合并到 src/config/plan-templates.js
# 3. 删除待审核文件(可选)
rm docs/parse-audit/pending/计划书模版2/2026-02-15-计划书模版2-宏摯傳承保障計劃-性別-年齡-出生年月日.md
```
### 需要修改
1. 编辑本文件修正内容
2. 重新提交审核
### 放弃本次解析
```bash
rm docs/parse-audit/pending/计划书模版2/2026-02-15-计划书模版2-宏摯傳承保障計劃-性別-年齡-出生年月日.md
```
---
## 审核状态
- [ ] 待审核
- [ ] 已通过
- [ ] 已拒绝
## 审核意见
```text
```
# 产品配置审核 - 计划书模版2.docx
**解析时间**: 2026/2/15 11:18:47
**原始文件**: 计划书模版2.docx
**数据来源**: docs/to-parse/计划书模版2.docx
---
## 📋 产品基本信息
| 字段 | 提取值 | 需要确认 |
|------|--------|---------|
| 产品名称 | 宏摯家傳承保險計劃- 性別, 年齡, 出生年月日 | ✅ 请核对产品名称 |
| 产品类型 | savings | ✅ 请确认产品类型 |
| 币种 | USD | ✅ 请确认币种 |
| form_sn | `savings-product-aaaa60f8` | ✅ 请确认 form_sn 唯一性 |
| 缴费年期 | ["整付","3年","5年"] | ✅ 请确认缴费年期选项 |
| 年龄范围 | 0-75岁 | ✅ 请确认年龄范围 |
| 保险期间 | 终身 | ✅ 请确认保险期间 |
### 💰 储蓄类产品特有字段
| 字段 | 提取值 | 需要确认 |
|------|--------|---------|
| 提取方式 | ["年龄指定金额","最高固定金额"] | ✅ 请确认提取方式 |
| 提取期 | ["1年","3年","5年","10年"] | ✅ 请确认提取期选项 |
---
## 🤖 智能字段提取报告
### 匹配统计
- ✅ 成功匹配: 2 字段
- ⚠️ 使用默认值: 4 字段
- ❌ 未匹配(需人工补充): 0 字段
### ✅ 已成功匹配的字段
- product_name
- payment_periods
### ⚠️ 使用默认值的字段
- **product_type**: 未找到字段 "product_type",使用默认值: "savings"
- **currency**: 未找到字段 "currency",使用默认值: "USD"
- **age_range**: 未找到字段 "age_range",使用默认值: {"min":0,"max":75}
- **insurance_period**: 未找到字段 "insurance_period",使用默认值: "终身"
---
## 🧾 配置预览
```javascript
{
"product_name": "宏摯家傳承保險計劃- 性別, 年齡, 出生年月日",
"product_type": "savings",
"currency": "USD",
"form_sn": "savings-product-aaaa60f8",
"payment_periods": [
"整付",
"3年",
"5年"
],
"age_range": {
"min": 0,
"max": 75
},
"insurance_period": "终身",
"is_savings": true,
"withdrawal_modes": [
"年龄指定金额",
"最高固定金额"
],
"withdrawal_periods": [
"1年",
"3年",
"5年",
"10年"
]
}
```
---
## 📝 表单字段 (form_schema)
```javascript
{
"base_fields": [],
"withdrawal_fields": [],
"reset_map": {}
}
```
---
## 🔄 提交字段映射 (submit_mapping)
```javascript
{}
```
---
## 🧩 生成配置片段
```javascript
/**
* 宏摯家傳承保險計劃- 性別, 年齡, 出生年月日
* @added 2026-02-15T03:18:47.644Z
* @source docs/to-parse/计划书模版2.docx
*/
'savings-product-aaaa60f8': {
name: '宏摯家傳承保險計劃- 性別, 年齡, 出生年月日',
component: 'SavingsTemplate',
category: 'savings',
config: {
currency: 'USD',
payment_periods: ["整付","3年","5年"],
age_range: { min: 0, max: 75 },
insurance_period: '终身',
withdrawal_plan: {
enabled: true,
currencies: ['HKD', 'USD', 'CNY'],
default_currency: 'USD',
withdrawal_modes: ["年龄指定金额","最高固定金额"],
withdrawal_periods: ["1年","3年","5年","10年"]
},
form_schema: savingsFormSchema,
submit_mapping: savingsSubmitMapping
}
}
```
---
## ✅ 审核检查清单
### 基础信息
- [ ] 产品名称正确
- [ ] 产品类型正确(savings/critical-illness/life-insurance)
- [ ] 币种正确(USD/CNY/HKD/EUR)
- [ ] form_sn 唯一且符合命名规范
### 缴费与年龄
- [ ] 缴费年期选项完整且正确
- [ ] 年龄范围合理
- [ ] 保险期间正确
### 储蓄类特有(如适用)
- [ ] 提取方式正确
- [ ] 提取期选项完整
- [ ] 表单字段定义完整
- [ ] 提交字段映射正确
---
## 📋 审核后操作
### 确认无误
```bash
# 1. 移动到 approved 目录
mv docs/parse-audit/pending/计划书模版2/2026-02-15-计划书模版2-宏摯家傳承保險計劃-性別-年齡-出生年月日.md \
docs/parse-audit/approved/
# 2. 合并到正式配置
# 手动复制或使用工具合并到 src/config/plan-templates.js
# 3. 删除待审核文件(可选)
rm docs/parse-audit/pending/计划书模版2/2026-02-15-计划书模版2-宏摯家傳承保險計劃-性別-年齡-出生年月日.md
```
### 需要修改
1. 编辑本文件修正内容
2. 重新提交审核
### 放弃本次解析
```bash
rm docs/parse-audit/pending/计划书模版2/2026-02-15-计划书模版2-宏摯家傳承保險計劃-性別-年齡-出生年月日.md
```
---
## 审核状态
- [ ] 待审核
- [ ] 已通过
- [ ] 已拒绝
## 审核意见
```text
```
# 产品配置审核 - 计划书模版2.docx
**解析时间**: 2026/2/15 11:18:47
**原始文件**: 计划书模版2.docx
**数据来源**: docs/to-parse/计划书模版2.docx
---
## 📋 产品基本信息
| 字段 | 提取值 | 需要确认 |
|------|--------|---------|
| 产品名称 | 宏浚傳承保障計劃 | ✅ 请核对产品名称 |
| 产品类型 | savings | ✅ 请确认产品类型 |
| 币种 | USD | ✅ 请确认币种 |
| form_sn | `savings-product-d1581522` | ✅ 请确认 form_sn 唯一性 |
| 缴费年期 | ["整付","2年","5年"] | ✅ 请确认缴费年期选项 |
| 年龄范围 | 0-75岁 | ✅ 请确认年龄范围 |
| 保险期间 | 终身 | ✅ 请确认保险期间 |
### 💰 储蓄类产品特有字段
| 字段 | 提取值 | 需要确认 |
|------|--------|---------|
| 提取方式 | ["年龄指定金额","最高固定金额"] | ✅ 请确认提取方式 |
| 提取期 | ["1年","3年","5年","10年"] | ✅ 请确认提取期选项 |
---
## 🤖 智能字段提取报告
### 匹配统计
- ✅ 成功匹配: 2 字段
- ⚠️ 使用默认值: 4 字段
- ❌ 未匹配(需人工补充): 0 字段
### ✅ 已成功匹配的字段
- product_name
- payment_periods
### ⚠️ 使用默认值的字段
- **product_type**: 未找到字段 "product_type",使用默认值: "savings"
- **currency**: 未找到字段 "currency",使用默认值: "USD"
- **age_range**: 未找到字段 "age_range",使用默认值: {"min":0,"max":75}
- **insurance_period**: 未找到字段 "insurance_period",使用默认值: "终身"
---
## 🧾 配置预览
```javascript
{
"product_name": "宏浚傳承保障計劃",
"product_type": "savings",
"currency": "USD",
"form_sn": "savings-product-d1581522",
"payment_periods": [
"整付",
"2年",
"5年"
],
"age_range": {
"min": 0,
"max": 75
},
"insurance_period": "终身",
"is_savings": true,
"withdrawal_modes": [
"年龄指定金额",
"最高固定金额"
],
"withdrawal_periods": [
"1年",
"3年",
"5年",
"10年"
]
}
```
---
## 📝 表单字段 (form_schema)
```javascript
{
"base_fields": [],
"withdrawal_fields": [],
"reset_map": {}
}
```
---
## 🔄 提交字段映射 (submit_mapping)
```javascript
{}
```
---
## 🧩 生成配置片段
```javascript
/**
* 宏浚傳承保障計劃
* @added 2026-02-15T03:18:47.644Z
* @source docs/to-parse/计划书模版2.docx
*/
'savings-product-d1581522': {
name: '宏浚傳承保障計劃',
component: 'SavingsTemplate',
category: 'savings',
config: {
currency: 'USD',
payment_periods: ["整付","2年","5年"],
age_range: { min: 0, max: 75 },
insurance_period: '终身',
withdrawal_plan: {
enabled: true,
currencies: ['HKD', 'USD', 'CNY'],
default_currency: 'USD',
withdrawal_modes: ["年龄指定金额","最高固定金额"],
withdrawal_periods: ["1年","3年","5年","10年"]
},
form_schema: savingsFormSchema,
submit_mapping: savingsSubmitMapping
}
}
```
---
## ✅ 审核检查清单
### 基础信息
- [ ] 产品名称正确
- [ ] 产品类型正确(savings/critical-illness/life-insurance)
- [ ] 币种正确(USD/CNY/HKD/EUR)
- [ ] form_sn 唯一且符合命名规范
### 缴费与年龄
- [ ] 缴费年期选项完整且正确
- [ ] 年龄范围合理
- [ ] 保险期间正确
### 储蓄类特有(如适用)
- [ ] 提取方式正确
- [ ] 提取期选项完整
- [ ] 表单字段定义完整
- [ ] 提交字段映射正确
---
## 📋 审核后操作
### 确认无误
```bash
# 1. 移动到 approved 目录
mv docs/parse-audit/pending/计划书模版2/2026-02-15-计划书模版2-宏浚傳承保障計劃.md \
docs/parse-audit/approved/
# 2. 合并到正式配置
# 手动复制或使用工具合并到 src/config/plan-templates.js
# 3. 删除待审核文件(可选)
rm docs/parse-audit/pending/计划书模版2/2026-02-15-计划书模版2-宏浚傳承保障計劃.md
```
### 需要修改
1. 编辑本文件修正内容
2. 重新提交审核
### 放弃本次解析
```bash
rm docs/parse-audit/pending/计划书模版2/2026-02-15-计划书模版2-宏浚傳承保障計劃.md
```
---
## 审核状态
- [ ] 待审核
- [ ] 已通过
- [ ] 已拒绝
## 审核意见
```text
```
# 产品配置审核 - 计划书模版2.docx
**解析时间**: 2026/2/15 11:18:47
**原始文件**: 计划书模版2.docx
**数据来源**: docs/to-parse/计划书模版2.docx
---
## 📋 产品基本信息
| 字段 | 提取值 | 需要确认 |
|------|--------|---------|
| 产品名称 | 赤霞珠終身壽險計劃2基本人壽保障選項 | ✅ 请核对产品名称 |
| 产品类型 | savings | ✅ 请确认产品类型 |
| 币种 | USD | ✅ 请确认币种 |
| form_sn | `savings-2-031c1237` | ✅ 请确认 form_sn 唯一性 |
| 缴费年期 | ["5年","8年","12年","15年"] | ✅ 请确认缴费年期选项 |
| 年龄范围 | 0-75岁 | ✅ 请确认年龄范围 |
| 保险期间 | 终身 | ✅ 请确认保险期间 |
### 💰 储蓄类产品特有字段
| 字段 | 提取值 | 需要确认 |
|------|--------|---------|
| 提取方式 | ["年龄指定金额","最高固定金额"] | ✅ 请确认提取方式 |
| 提取期 | ["1年","3年","5年","10年"] | ✅ 请确认提取期选项 |
---
## 🤖 智能字段提取报告
### 匹配统计
- ✅ 成功匹配: 2 字段
- ⚠️ 使用默认值: 4 字段
- ❌ 未匹配(需人工补充): 0 字段
### ✅ 已成功匹配的字段
- product_name
- payment_periods
### ⚠️ 使用默认值的字段
- **product_type**: 未找到字段 "product_type",使用默认值: "savings"
- **currency**: 未找到字段 "currency",使用默认值: "USD"
- **age_range**: 未找到字段 "age_range",使用默认值: {"min":0,"max":75}
- **insurance_period**: 未找到字段 "insurance_period",使用默认值: "终身"
---
## 🧾 配置预览
```javascript
{
"product_name": "赤霞珠終身壽險計劃2基本人壽保障選項",
"product_type": "savings",
"currency": "USD",
"form_sn": "savings-2-031c1237",
"payment_periods": [
"5年",
"8年",
"12年",
"15年"
],
"age_range": {
"min": 0,
"max": 75
},
"insurance_period": "终身",
"is_savings": true,
"withdrawal_modes": [
"年龄指定金额",
"最高固定金额"
],
"withdrawal_periods": [
"1年",
"3年",
"5年",
"10年"
]
}
```
---
## 📝 表单字段 (form_schema)
```javascript
{
"base_fields": [],
"withdrawal_fields": [],
"reset_map": {}
}
```
---
## 🔄 提交字段映射 (submit_mapping)
```javascript
{}
```
---
## 🧩 生成配置片段
```javascript
/**
* 赤霞珠終身壽險計劃2基本人壽保障選項
* @added 2026-02-15T03:18:47.645Z
* @source docs/to-parse/计划书模版2.docx
*/
'savings-2-031c1237': {
name: '赤霞珠終身壽險計劃2基本人壽保障選項',
component: 'SavingsTemplate',
category: 'savings',
config: {
currency: 'USD',
payment_periods: ["5年","8年","12年","15年"],
age_range: { min: 0, max: 75 },
insurance_period: '终身',
withdrawal_plan: {
enabled: true,
currencies: ['HKD', 'USD', 'CNY'],
default_currency: 'USD',
withdrawal_modes: ["年龄指定金额","最高固定金额"],
withdrawal_periods: ["1年","3年","5年","10年"]
},
form_schema: savingsFormSchema,
submit_mapping: savingsSubmitMapping
}
}
```
---
## ✅ 审核检查清单
### 基础信息
- [ ] 产品名称正确
- [ ] 产品类型正确(savings/critical-illness/life-insurance)
- [ ] 币种正确(USD/CNY/HKD/EUR)
- [ ] form_sn 唯一且符合命名规范
### 缴费与年龄
- [ ] 缴费年期选项完整且正确
- [ ] 年龄范围合理
- [ ] 保险期间正确
### 储蓄类特有(如适用)
- [ ] 提取方式正确
- [ ] 提取期选项完整
- [ ] 表单字段定义完整
- [ ] 提交字段映射正确
---
## 📋 审核后操作
### 确认无误
```bash
# 1. 移动到 approved 目录
mv docs/parse-audit/pending/计划书模版2/2026-02-15-计划书模版2-赤霞珠終身壽險計劃2基本人壽保障選項.md \
docs/parse-audit/approved/
# 2. 合并到正式配置
# 手动复制或使用工具合并到 src/config/plan-templates.js
# 3. 删除待审核文件(可选)
rm docs/parse-audit/pending/计划书模版2/2026-02-15-计划书模版2-赤霞珠終身壽險計劃2基本人壽保障選項.md
```
### 需要修改
1. 编辑本文件修正内容
2. 重新提交审核
### 放弃本次解析
```bash
rm docs/parse-audit/pending/计划书模版2/2026-02-15-计划书模版2-赤霞珠終身壽險計劃2基本人壽保障選項.md
```
---
## 审核状态
- [ ] 待审核
- [ ] 已通过
- [ ] 已拒绝
## 审核意见
```text
```
{"action":"update","backup_file":"/Users/huyirui/program/itomix/git/manulife-weapp/docs/parsed-backup/plan-templates.backup.1771074633927.js","target_file":"/Users/huyirui/program/itomix/git/manulife-weapp/src/config/plan-templates.js","form_sn_list":["savings-product-30b41aae"],"at":"2026-02-14T13:10:33.928Z"}
{"action":"update","backup_file":"/Users/huyirui/program/itomix/git/manulife-weapp/docs/parsed-backup/plan-templates.backup.1771077530778.js","target_file":"/Users/huyirui/program/itomix/git/manulife-weapp/src/config/plan-templates.js","form_sn_list":["savings-2-148b3acd"],"at":"2026-02-14T13:58:50.779Z"}
{"action":"update","backup_file":"/Users/huyirui/program/itomix/git/manulife-weapp/docs/parsed-backup/plan-templates.backup.1771077569110.js","target_file":"/Users/huyirui/program/itomix/git/manulife-weapp/src/config/plan-templates.js","form_sn_list":["savings-readme-a4296d1f"],"at":"2026-02-14T13:59:29.110Z"}
{"action":"update","backup_file":"/Users/huyirui/program/itomix/git/manulife-weapp/docs/parsed-backup/plan-templates.backup.1771077989896.js","target_file":"/Users/huyirui/program/itomix/git/manulife-weapp/src/config/plan-templates.js","form_sn_list":["savings-readme-a4296d1f"],"at":"2026-02-14T14:06:29.896Z"}
{"action":"update","backup_file":"/Users/huyirui/program/itomix/git/manulife-weapp/docs/parsed-backup/plan-templates.backup.1771078080604.js","target_file":"/Users/huyirui/program/itomix/git/manulife-weapp/src/config/plan-templates.js","form_sn_list":["savings-readme-a4296d1f"],"at":"2026-02-14T14:08:00.605Z"}
{"action":"update","backup_file":"/Users/huyirui/program/itomix/git/manulife-weapp/docs/parsed-backup/plan-templates.backup.1771078351660.js","target_file":"/Users/huyirui/program/itomix/git/manulife-weapp/src/config/plan-templates.js","form_sn_list":["savings-2-148b3acd"],"at":"2026-02-14T14:12:31.660Z"}
{"action":"update","backup_file":"/Users/huyirui/program/itomix/git/manulife-weapp/docs/parsed-backup/plan-templates.backup.1771080130974.js","target_file":"/Users/huyirui/program/itomix/git/manulife-weapp/src/config/plan-templates.js","form_sn_list":["savings-2-55bcffc2"],"at":"2026-02-14T14:42:10.974Z"}
{"action":"update","backup_file":"/Users/huyirui/program/itomix/git/manulife-weapp/docs/parsed-backup/plan-templates.backup.1771137003708.js","target_file":"/Users/huyirui/program/itomix/git/manulife-weapp/src/config/plan-templates.js","form_sn_list":["life-insurance-3-d8fde07d"],"at":"2026-02-15T06:30:03.709Z"}
This diff is collapsed. Click to expand it.
/**
* 计划书模版配置
*
* @description 定义产品 form_sn 到模版组件和配置的映射关系
* @module config/plan-templates
* @author Claude Code
* @created 2026-02-06
* @updated 2026-02-13 - 新增文档解析工具入口
*
* --- 快速添加新产品(开发工具) ---
* 开发环境可使用以下工具快速添加新产品配置:
* 1. 文档解析工具:/admin/document-parser/index (上传 PDF/Word,AI 自动解析)
* 2. API 配置工具:/admin/document-parser/config (配置 AI 服务)
*
* 使用方式:
* - 上传产品文档 → AI 自动提取配置 → 生成配置代码 → 复制到此文件
*
* --- 手动添加步骤 ---
* 1. 找到对应的产品分类(人寿/重疾/储蓄)
* 2. 复制现有配置作为模板
* 3. 修改 name, currency, payment_periods, age_range 等字段
* 4. 确保 form_sn 唯一(建议使用产品英文标识 + 版本号)
*/
/**
* 计划书模版配置映射
* @description form_sn 为产品 API 返回的字段,用于标识该产品使用的计划书模版
*
* @example
* // 产品 API 返回
* {
* id: 1,
* product_name: "WIOP3E 盈传创富保障计划 3 - 优选版",
* form_sn: "life-insurance-wiop3e" // 对应下面的配置 key
* }
*/
export const PLAN_TEMPLATES = {
// 人寿保险产品 - WIOP3E
'life-insurance-wiop3e': {
name: 'WIOP3E 盈传创富保障计划 3 - 优选版',
component: 'LifeInsuranceTemplate',
config: {
currency: 'USD', // 币种:USD/CNY/HKD/EUR
payment_periods: [
// 缴费年期选项
'整付(0-75 岁)',
'5 年(0-70 岁)',
'10 年(0-70 岁)'
],
age_range: { min: 0, max: 75 }, // 年龄范围
insurance_period: '终身' // 保险期间
}
},
// 人寿保险产品 - WIOP3
'life-insurance-wiop3': {
name: 'WIOP3 - 盈传创富保障计划 3',
component: 'LifeInsuranceTemplate',
config: {
currency: 'USD',
payment_periods: [
'整付(0-75 岁)',
'5 年(0-70 岁)',
'10 年(0-70 岁)'
],
age_range: { min: 0, max: 75 },
insurance_period: '终身'
}
},
// 重疾保险产品 - MPC
'critical-illness-mpc': {
name: 'MPC 守护无间重疾',
component: 'CriticalIllnessTemplate',
config: {
currency: 'USD',
payment_periods: [
'10 年(15 日 - 65 岁)',
'20 年(15 日 - 65 岁)',
'25 年(15 日 - 60 岁)'
],
age_range: { min: 0, max: 65 },
insurance_period: '终身'
}
},
// 重疾保险产品 - MBC PRO
'critical-illness-mbc-pro': {
name: 'MBC PRO 活跃人生重疾保 PRO',
component: 'CriticalIllnessTemplate',
config: {
currency: 'USD',
payment_periods: [
'10 年(15 日 - 65 岁)',
'20 年(15 日 - 65 岁)',
'25 年(15 日 - 60 岁)'
],
age_range: { min: 0, max: 65 },
insurance_period: '终身'
}
},
// 重疾保险产品 - MBC2
'critical-illness-mbc2': {
name: 'MBC2 活跃人生重疾保 2',
component: 'CriticalIllnessTemplate',
config: {
currency: 'USD',
payment_periods: [
'10 年(15 日 - 65 岁)',
'20 年(15 日 - 65 岁)',
'25 年(15 日 - 60 岁)'
],
age_range: { min: 0, max: 65 },
insurance_period: '终身'
}
},
// ====== 储蓄型产品(统一逻辑) ======
// GS - 宏挚传承保障计划
'savings-gs': {
name: '宏挚传承保障计划',
component: 'SavingsTemplate',
category: 'savings', // 储蓄型产品
config: {
currency: 'USD', // 默认美元
payment_periods: [
'整付',
'3 年',
'5 年',
'10 年',
'15 年',
],
age_range: { min: 0, max: 100 },
insurance_period: '终身',
// 提取计划配置
withdrawal_plan: {
enabled: true,
currencies: ['HKD', 'USD', 'CNY'], // 支持的币种
default_currency: 'USD', // 统一为美元
withdrawal_modes: [
'年龄指定金额', // 方式1
'最高固定金额' // 方式2
],
withdrawal_periods: [
'1年',
'2年',
'3年',
'5年',
'10年',
'15年',
'20年',
'终身'
]
}
}
},
// GC - 宏挚家传保险计划
'savings-gc': {
name: '宏挚家传保险计划',
component: 'SavingsTemplate',
category: 'savings',
config: {
currency: 'USD',
payment_periods: [
'整付',
'3 年',
'5 年',
],
age_range: { min: 0, max: 100 },
insurance_period: '终身',
withdrawal_plan: {
enabled: true,
currencies: ['HKD', 'USD', 'CNY'],
default_currency: 'USD', // 统一为美元
withdrawal_modes: ['年龄指定金额', '最高固定金额'],
withdrawal_periods: [
'1年',
'2年',
'3年',
'5年',
'10年',
'15年',
'20年',
'终身'
]
}
}
},
// FA - 宏浚传承保障计划
'savings-fa': {
name: '宏浚传承保障计划',
component: 'SavingsTemplate',
category: 'savings',
config: {
currency: 'USD',
payment_periods: [
'整付',
'2 年',
'5 年',
],
age_range: { min: 0, max: 100 },
insurance_period: '终身',
withdrawal_plan: {
enabled: true,
currencies: ['HKD', 'USD', 'CNY'],
default_currency: 'USD', // 统一为美元
withdrawal_modes: ['年龄指定金额', '最高固定金额'],
withdrawal_periods: [
'1年',
'2年',
'3年',
'5年',
'10年',
'15年',
'20年',
'终身'
]
}
}
},
// LV2 - 赤霞珠终身寿险计划2(储蓄型终身寿险)
'savings-lv2': {
name: '赤霞珠终身寿险计划2',
component: 'SavingsTemplate',
category: 'savings',
config: {
currency: 'USD',
payment_periods: [
'5 年',
'8 年',
'12 年',
'15 年',
],
age_range: { min: 0, max: 100 },
insurance_period: '终身',
withdrawal_plan: {
enabled: true,
currencies: ['HKD', 'USD', 'CNY'],
default_currency: 'USD', // 统一为美元
withdrawal_modes: ['年龄指定金额', '最高固定金额'],
withdrawal_periods: [
'1年',
'2年',
'3年',
'5年',
'10年',
'15年',
'20年',
'终身'
]
}
}
}
}
/**
* 全局功能开关
* @description 用于控制实验性功能或未来扩展功能的开关
*
* @example 开启多币种功能:设置 MULTI_CURRENCY_ENABLED = true
*/
export const FEATURE_FLAGS = {
/**
* 多币种切换功能
* @description false: 方案 1 - 固定币种(当前实现)
* true: 方案 2 - 支持多币种切换(未来扩展)
* @type {boolean}
*/
MULTI_CURRENCY_ENABLED: false
}
/**
* 币种符号映射
* @description 币种代码到符号的映射关系
*/
export const CURRENCY_SYMBOLS = {
CNY: '¥', // 人民币
USD: '$', // 美元
HKD: 'HK$', // 港币
EUR: '€' // 欧元
}
/**
* 币种完整信息映射
* @description 币种代码到完整信息的映射(用于多币种模式)
*/
export const CURRENCY_MAP = {
CNY: { label: '人民币', symbol: '¥', value: 'CNY' },
USD: { label: '美元', symbol: '$', value: 'USD' },
HKD: { label: '港币', symbol: 'HK$', value: 'HKD' },
EUR: { label: '欧元', symbol: '€', value: 'EUR' }
}
/**
* 根据 form_sn 获取模版配置
* @param {string} formSn - 产品 API 返回的 form_sn 字段
* @returns {Object|null} 模版配置对象,未找到返回 null
*
* @example
* const config = getTemplateConfig('life-insurance-wiop3e')
* // 返回: { name: 'WIOP3E...', component: 'LifeInsuranceTemplate', config: {...} }
*/
export function getTemplateConfig(formSn) {
if (!formSn) {
console.warn('[plan-templates] form_sn 为空')
return null
}
const config = PLAN_TEMPLATES[formSn]
if (!config) {
console.error(`[plan-templates] 未找到模版配置: ${formSn}`)
return null
}
return config
}
/**
* 获取币种符号
* @param {string} currencyCode - 币种代码(CNY/USD/HKD/EUR)
* @returns {string} 币种符号
*
* @example
* const symbol = getCurrencySymbol('USD') // 返回: '$'
*/
export function getCurrencySymbol(currencyCode) {
return CURRENCY_SYMBOLS[currencyCode] || '¥'
}
/**
* 计划书模版配置
*
* @description 定义产品 form_sn 到模版组件和配置的映射关系
* @module config/plan-templates
* @author Claude Code
* @created 2026-02-06
* @updated 2026-02-13 - 新增文档解析工具入口
*
* --- 快速添加新产品(开发工具) ---
* 开发环境可使用以下工具快速添加新产品配置:
* 1. 文档解析工具:/admin/document-parser/index (上传 PDF/Word,AI 自动解析)
* 2. API 配置工具:/admin/document-parser/config (配置 AI 服务)
*
* 使用方式:
* - 上传产品文档 → AI 自动提取配置 → 生成配置代码 → 复制到此文件
*
* --- 手动添加步骤 ---
* 1. 找到对应的产品分类(人寿/重疾/储蓄)
* 2. 复制现有配置作为模板
* 3. 修改 name, currency, payment_periods, age_range 等字段
* 4. 确保 form_sn 唯一(建议使用产品英文标识 + 版本号)
*/
/**
* 计划书模版配置映射
* @description form_sn 为产品 API 返回的字段,用于标识该产品使用的计划书模版
*
* @example
* // 产品 API 返回
* {
* id: 1,
* product_name: "WIOP3E 盈传创富保障计划 3 - 优选版",
* form_sn: "life-insurance-wiop3e" // 对应下面的配置 key
* }
*/
export const PLAN_TEMPLATES = {
// 人寿保险产品 - WIOP3E
'life-insurance-wiop3e': {
name: 'WIOP3E 盈传创富保障计划 3 - 优选版',
component: 'LifeInsuranceTemplate',
config: {
currency: 'USD', // 币种:USD/CNY/HKD/EUR
payment_periods: [
// 缴费年期选项
'整付(0-75 岁)',
'5 年(0-70 岁)',
'10 年(0-70 岁)'
],
age_range: { min: 0, max: 75 }, // 年龄范围
insurance_period: '终身' // 保险期间
}
},
// 人寿保险产品 - WIOP3
'life-insurance-wiop3': {
name: 'WIOP3 - 盈传创富保障计划 3',
component: 'LifeInsuranceTemplate',
config: {
currency: 'USD',
payment_periods: [
'整付(0-75 岁)',
'5 年(0-70 岁)',
'10 年(0-70 岁)'
],
age_range: { min: 0, max: 75 },
insurance_period: '终身'
}
},
// 重疾保险产品 - MPC
'critical-illness-mpc': {
name: 'MPC 守护无间重疾',
component: 'CriticalIllnessTemplate',
config: {
currency: 'USD',
payment_periods: [
'10 年(15 日 - 65 岁)',
'20 年(15 日 - 65 岁)',
'25 年(15 日 - 60 岁)'
],
age_range: { min: 0, max: 65 },
insurance_period: '终身'
}
},
// 重疾保险产品 - MBC PRO
'critical-illness-mbc-pro': {
name: 'MBC PRO 活跃人生重疾保 PRO',
component: 'CriticalIllnessTemplate',
config: {
currency: 'USD',
payment_periods: [
'10 年(15 日 - 65 岁)',
'20 年(15 日 - 65 岁)',
'25 年(15 日 - 60 岁)'
],
age_range: { min: 0, max: 65 },
insurance_period: '终身'
}
},
// 重疾保险产品 - MBC2
'critical-illness-mbc2': {
name: 'MBC2 活跃人生重疾保 2',
component: 'CriticalIllnessTemplate',
config: {
currency: 'USD',
payment_periods: [
'10 年(15 日 - 65 岁)',
'20 年(15 日 - 65 岁)',
'25 年(15 日 - 60 岁)'
],
age_range: { min: 0, max: 65 },
insurance_period: '终身'
}
},
// ====== 储蓄型产品(统一逻辑) ======
// GS - 宏挚传承保障计划
'savings-gs': {
name: '宏挚传承保障计划',
component: 'SavingsTemplate',
category: 'savings', // 储蓄型产品
config: {
currency: 'USD', // 默认美元
payment_periods: [
'整付',
'3 年',
'5 年',
'10 年',
'15 年',
],
age_range: { min: 0, max: 100 },
insurance_period: '终身',
// 提取计划配置
withdrawal_plan: {
enabled: true,
currencies: ['HKD', 'USD', 'CNY'], // 支持的币种
default_currency: 'USD', // 统一为美元
withdrawal_modes: [
'年龄指定金额', // 方式1
'最高固定金额' // 方式2
],
withdrawal_periods: [
'1年',
'2年',
'3年',
'5年',
'10年',
'15年',
'20年',
'终身'
]
}
}
},
// GC - 宏挚家传保险计划
'savings-gc': {
name: '宏挚家传保险计划',
component: 'SavingsTemplate',
category: 'savings',
config: {
currency: 'USD',
payment_periods: [
'整付',
'3 年',
'5 年',
],
age_range: { min: 0, max: 100 },
insurance_period: '终身',
withdrawal_plan: {
enabled: true,
currencies: ['HKD', 'USD', 'CNY'],
default_currency: 'USD', // 统一为美元
withdrawal_modes: ['年龄指定金额', '最高固定金额'],
withdrawal_periods: [
'1年',
'2年',
'3年',
'5年',
'10年',
'15年',
'20年',
'终身'
]
}
}
},
// FA - 宏浚传承保障计划
'savings-fa': {
name: '宏浚传承保障计划',
component: 'SavingsTemplate',
category: 'savings',
config: {
currency: 'USD',
payment_periods: [
'整付',
'2 年',
'5 年',
],
age_range: { min: 0, max: 100 },
insurance_period: '终身',
withdrawal_plan: {
enabled: true,
currencies: ['HKD', 'USD', 'CNY'],
default_currency: 'USD', // 统一为美元
withdrawal_modes: ['年龄指定金额', '最高固定金额'],
withdrawal_periods: [
'1年',
'2年',
'3年',
'5年',
'10年',
'15年',
'20年',
'终身'
]
}
}
},
// LV2 - 赤霞珠终身寿险计划2(储蓄型终身寿险)
'savings-lv2': {
name: '赤霞珠终身寿险计划2',
component: 'SavingsTemplate',
category: 'savings',
config: {
currency: 'USD',
payment_periods: [
'5 年',
'8 年',
'12 年',
'15 年',
],
age_range: { min: 0, max: 100 },
insurance_period: '终身',
withdrawal_plan: {
enabled: true,
currencies: ['HKD', 'USD', 'CNY'],
default_currency: 'USD', // 统一为美元
withdrawal_modes: ['年龄指定金额', '最高固定金额'],
withdrawal_periods: [
'1年',
'2年',
'3年',
'5年',
'10年',
'15年',
'20年',
'终身'
]
}
}
}
}
/**
* 全局功能开关
* @description 用于控制实验性功能或未来扩展功能的开关
*
* @example 开启多币种功能:设置 MULTI_CURRENCY_ENABLED = true
*/
export const FEATURE_FLAGS = {
/**
* 多币种切换功能
* @description false: 方案 1 - 固定币种(当前实现)
* true: 方案 2 - 支持多币种切换(未来扩展)
* @type {boolean}
*/
MULTI_CURRENCY_ENABLED: false
}
/**
* 币种符号映射
* @description 币种代码到符号的映射关系
*/
export const CURRENCY_SYMBOLS = {
CNY: '¥', // 人民币
USD: '$', // 美元
HKD: 'HK$', // 港币
EUR: '€' // 欧元
}
/**
* 币种完整信息映射
* @description 币种代码到完整信息的映射(用于多币种模式)
*/
export const CURRENCY_MAP = {
CNY: { label: '人民币', symbol: '¥', value: 'CNY' },
USD: { label: '美元', symbol: '$', value: 'USD' },
HKD: { label: '港币', symbol: 'HK$', value: 'HKD' },
EUR: { label: '欧元', symbol: '€', value: 'EUR' }
}
/**
* 根据 form_sn 获取模版配置
* @param {string} formSn - 产品 API 返回的 form_sn 字段
* @returns {Object|null} 模版配置对象,未找到返回 null
*
* @example
* const config = getTemplateConfig('life-insurance-wiop3e')
* // 返回: { name: 'WIOP3E...', component: 'LifeInsuranceTemplate', config: {...} }
*/
export function getTemplateConfig(formSn) {
if (!formSn) {
console.warn('[plan-templates] form_sn 为空')
return null
}
const config = PLAN_TEMPLATES[formSn]
if (!config) {
console.error(`[plan-templates] 未找到模版配置: ${formSn}`)
return null
}
return config
}
/**
* 获取币种符号
* @param {string} currencyCode - 币种代码(CNY/USD/HKD/EUR)
* @returns {string} 币种符号
*
* @example
* const symbol = getCurrencySymbol('USD') // 返回: '$'
*/
export function getCurrencySymbol(currencyCode) {
return CURRENCY_SYMBOLS[currencyCode] || '¥'
}