feat(plan): 新增多阶段提取方案功能
- 新增产品:宏挚传承保障计划(多阶段) (savings-gs-multistage) - 年龄 < 12岁:固定显示 3 个阶段 - 年龄 ≥ 12岁:初始 1 个阶段,可添加至 4 个 - 提取期新增"一笔过"选项 - 递增百分比改为可选字段(不填传 null) - 提交数据格式:withdrawal_stages 数组 - 删除冗余的 mock 文件 (src/api/mock/hotProducts.js) - 文档归档到 docs/tasks/2026-02-25/archive/ Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Showing
7 changed files
with
349 additions
and
210 deletions
| ... | @@ -2,6 +2,29 @@ | ... | @@ -2,6 +2,29 @@ |
| 2 | 2 | ||
| 3 | 记录项目开发过程中的重要变更和完成任务。 | 3 | 记录项目开发过程中的重要变更和完成任务。 |
| 4 | 4 | ||
| 5 | +## 2026-02-25 | ||
| 6 | + | ||
| 7 | +### 21:00:00 - feat(plan): 新增多阶段提取方案功能 | ||
| 8 | + | ||
| 9 | +**影响文件**: | ||
| 10 | +- `src/config/plan-templates.js` - 新增多阶段产品配置和 `savings-gs-multistage` 产品 | ||
| 11 | +- `src/components/plan/PlanTemplates/SavingsTemplate.vue` - 实现多阶段提取渲染和交互逻辑 | ||
| 12 | +- `src/api/mock/mock/hotProducts.js` - 添加多阶段产品 mock 数据 | ||
| 13 | + | ||
| 14 | +**变更摘要**: | ||
| 15 | +- 新增产品:宏挚传承保障计划(多阶段) (`savings-gs-multistage`) | ||
| 16 | +- 多阶段功能: | ||
| 17 | + - 年龄 < 12岁:固定显示 3 个阶段 | ||
| 18 | + - 年龄 ≥ 12岁:初始 1 个阶段,可添加至 4 个 | ||
| 19 | + - 提取期新增"一笔过"选项 | ||
| 20 | + - 递增百分比改为可选字段(不填传 null) | ||
| 21 | +- 提交数据格式:`withdrawal_stages` 数组 | ||
| 22 | +- 样式优化:阶段卡片白色背景 | ||
| 23 | + | ||
| 24 | +**相关文档**: | ||
| 25 | +- `docs/tasks/2026-02-25/archive/多阶段提取方案设计.md` | ||
| 26 | +- `docs/tasks/2026-02-25/archive/客户新需求-2026-02-25.md` | ||
| 27 | + | ||
| 5 | ## 2026-02-24 | 28 | ## 2026-02-24 |
| 6 | 29 | ||
| 7 | ### 23:59:18 - 完成任务 | 30 | ### 23:59:18 - 完成任务 |
| ... | @@ -15,3 +38,48 @@ | ... | @@ -15,3 +38,48 @@ |
| 15 | 38 | ||
| 16 | **变更摘要**: | 39 | **变更摘要**: |
| 17 | - 无详细描述 | 40 | - 无详细描述 |
| 41 | +## 2026-02-25 | ||
| 42 | + | ||
| 43 | +### 20:09:02 - 完成任务 | ||
| 44 | + | ||
| 45 | +**影响文件**: | ||
| 46 | +- `src/components/plan/PlanTemplates/CriticalIllnessTemplate.vue` | ||
| 47 | +- `src/components/plan/PlanTemplates/LifeInsuranceTemplate.vue` | ||
| 48 | +- `src/components/plan/PlanTemplates/SavingsTemplate.vue` | ||
| 49 | +- `src/config/plan-templates.js` | ||
| 50 | + | ||
| 51 | +**变更摘要**: | ||
| 52 | +- 无详细描述 | ||
| 53 | + | ||
| 54 | +### 20:11:21 - 完成任务 | ||
| 55 | + | ||
| 56 | +**影响文件**: | ||
| 57 | +- `src/components/plan/PlanTemplates/CriticalIllnessTemplate.vue` | ||
| 58 | +- `src/components/plan/PlanTemplates/LifeInsuranceTemplate.vue` | ||
| 59 | +- `src/components/plan/PlanTemplates/SavingsTemplate.vue` | ||
| 60 | +- `src/config/plan-templates.js` | ||
| 61 | + | ||
| 62 | +**变更摘要**: | ||
| 63 | +- 无详细描述 | ||
| 64 | + | ||
| 65 | +### 20:12:04 - 完成任务 | ||
| 66 | + | ||
| 67 | +**影响文件**: | ||
| 68 | +- `src/components/plan/PlanTemplates/CriticalIllnessTemplate.vue` | ||
| 69 | +- `src/components/plan/PlanTemplates/LifeInsuranceTemplate.vue` | ||
| 70 | +- `src/components/plan/PlanTemplates/SavingsTemplate.vue` | ||
| 71 | +- `src/config/plan-templates.js` | ||
| 72 | + | ||
| 73 | +**变更摘要**: | ||
| 74 | +- 无详细描述 | ||
| 75 | + | ||
| 76 | +### 20:14:14 - 完成任务 | ||
| 77 | + | ||
| 78 | +**影响文件**: | ||
| 79 | +- `src/components/plan/PlanTemplates/CriticalIllnessTemplate.vue` | ||
| 80 | +- `src/components/plan/PlanTemplates/LifeInsuranceTemplate.vue` | ||
| 81 | +- `src/components/plan/PlanTemplates/SavingsTemplate.vue` | ||
| 82 | +- `src/config/plan-templates.js` | ||
| 83 | + | ||
| 84 | +**变更摘要**: | ||
| 85 | +- 无详细描述 | ... | ... |
This diff is collapsed. Click to expand it.
| 1 | +# 客户新需求记录(2026-02-25) | ||
| 2 | + | ||
| 3 | +> **创建时间**: 2026-02-25 | ||
| 4 | +> **状态**: ⏳ 待确认方案 | ||
| 5 | +> **优先级**: 中 | ||
| 6 | + | ||
| 7 | +--- | ||
| 8 | + | ||
| 9 | +## 📋 需求清单 | ||
| 10 | + | ||
| 11 | +### 需求 1:重疾类产品缴费年期新增选项 | ||
| 12 | + | ||
| 13 | +**描述**:重疾类产品申请时,模板内"缴费年期"增加"直至65岁"选项 | ||
| 14 | + | ||
| 15 | +**影响产品**: | ||
| 16 | +- ✅ MPC 守护无间重疾(已有产品) | ||
| 17 | +- ✅ MBC PRO 活跃人生重疾保 PRO(已有产品) | ||
| 18 | +- ✅ MBC2 活跃人生重疾保 2(已有产品) | ||
| 19 | + | ||
| 20 | +**当前状态**: | ||
| 21 | +- 现有缴费年期选项:10年、20年、25年 | ||
| 22 | +- 需要新增:直至65岁 | ||
| 23 | + | ||
| 24 | +**技术实现**: | ||
| 25 | +- 文件:`src/config/plan-templates.js` | ||
| 26 | +- 修改三款重疾产品的 `payment_periods` 配置 | ||
| 27 | + | ||
| 28 | +--- | ||
| 29 | + | ||
| 30 | +### 需求 2:年龄与出生年月日二选一填写 | ||
| 31 | + | ||
| 32 | +**描述**:所有产品申请时,年龄与出生年月日改为二选一进行填写 | ||
| 33 | + | ||
| 34 | +**影响范围**: | ||
| 35 | +- ✅ 所有产品类型(人寿、重疾、储蓄) | ||
| 36 | + | ||
| 37 | +**当前状态**: | ||
| 38 | +- 现有:必填出生年月日,年龄自动计算 | ||
| 39 | +- 需求:二选一填写(填年龄自动计算生日,或填生日自动计算年龄) | ||
| 40 | + | ||
| 41 | +**UI 交互设计**: | ||
| 42 | +``` | ||
| 43 | +┌─────────────────────────────────┐ | ||
| 44 | +│ 出生日期(二选一) │ | ||
| 45 | +├─────────────────────────────────┤ | ||
| 46 | +│ ○ 填写年龄 │ | ||
| 47 | +│ 年龄: [ 30 ] 岁 │ | ||
| 48 | +│ │ | ||
| 49 | +│ ○ 填写出生年月日 │ | ||
| 50 | +│ 生日: [ 1990-01-01 ] │ | ||
| 51 | +└─────────────────────────────────┘ | ||
| 52 | +``` | ||
| 53 | + | ||
| 54 | +**技术实现**: | ||
| 55 | +- 新增表单字段:`age_input_mode` | ||
| 56 | +- 修改 Schema:条件显示年龄或生日输入 | ||
| 57 | +- 添加自动计算逻辑 | ||
| 58 | + | ||
| 59 | +--- | ||
| 60 | + | ||
| 61 | +### 需求 3:储蓄类产品多阶段提取方案 | ||
| 62 | + | ||
| 63 | +**描述**:储蓄类产品的提取方案改为可设置多阶段 | ||
| 64 | + | ||
| 65 | +**客户确认**: | ||
| 66 | +- ✅ 一份计划书里只有一个提取方案,不会有多个 | ||
| 67 | +- ✅ 需要支持在一个方案中设置多个不同阶段的提取计划 | ||
| 68 | + | ||
| 69 | +**示例**(教育+创业+退休组合): | ||
| 70 | +``` | ||
| 71 | +┌──────────────────────────────────────────┐ | ||
| 72 | +│ 方案一:多阶段分时提取 │ | ||
| 73 | +├──────────────────────────────────────────┤ | ||
| 74 | +│ 阶段1: 教育基金 │ | ||
| 75 | +│ 18-21岁,每年提取 5万 │ | ||
| 76 | +│ │ | ||
| 77 | +│ 阶段2: 创业金/婚嫁金 │ | ||
| 78 | +│ 30岁,一笔过提取 40万 │ | ||
| 79 | +│ │ | ||
| 80 | +│ 阶段3: 退休养老年金 │ | ||
| 81 | +│ 50-100岁,每年提取 7万 │ | ||
| 82 | +└──────────────────────────────────────────┘ | ||
| 83 | +``` | ||
| 84 | + | ||
| 85 | +**设计文档**:参见本目录下的 `多阶段提取方案设计.md` | ||
| 86 | + | ||
| 87 | +--- | ||
| 88 | + | ||
| 89 | +## 📊 实施计划 | ||
| 90 | + | ||
| 91 | +### 优先级排序 | ||
| 92 | + | ||
| 93 | +| 优先级 | 需求 | 预估工时 | 依赖 | | ||
| 94 | +|--------|------|----------|------| | ||
| 95 | +| **P1** | 需求1:重疾缴费年期 | 30分钟 | 无 | | ||
| 96 | +| **P2** | 需求2:年龄生日二选一 | 2-3小时 | 无 | | ||
| 97 | +| **P3** | 需求3:多阶段提取 | 4-5小时 | 需求2 | | ||
| 98 | + | ||
| 99 | +### 实施步骤 | ||
| 100 | + | ||
| 101 | +#### 第 1 步:重疾缴费年期新增选项(30分钟) | ||
| 102 | + | ||
| 103 | +**文件**:`src/config/plan-templates.js` | ||
| 104 | + | ||
| 105 | +**修改内容**: | ||
| 106 | +```javascript | ||
| 107 | +// 为三款重疾产品的 payment_periods 添加 "直至65岁" 选项 | ||
| 108 | +payment_periods: [ | ||
| 109 | + '10 年(15 日 - 65 岁)', | ||
| 110 | + '20 年(15 日 - 65 岁)', | ||
| 111 | + '25 年(15 日 - 60 岁)', | ||
| 112 | + '直至65岁' // 新增 | ||
| 113 | +] | ||
| 114 | +``` | ||
| 115 | + | ||
| 116 | +--- | ||
| 117 | + | ||
| 118 | +#### 第 2 步:年龄与出生年月日二选一(2-3小时) | ||
| 119 | + | ||
| 120 | +**涉及文件**: | ||
| 121 | +1. `src/config/plan-templates.js` - Schema 配置 | ||
| 122 | +2. `src/components/plan/PlanFields/` - 新增组件 | ||
| 123 | +3. `src/components/plan/PlanTemplates/` - 模板组件逻辑 | ||
| 124 | + | ||
| 125 | +**Schema 扩展**: | ||
| 126 | +```javascript | ||
| 127 | +base_fields: [ | ||
| 128 | + // 新增:年龄输入模式选择 | ||
| 129 | + { | ||
| 130 | + id: 'age_input_mode', | ||
| 131 | + key: 'age_input_mode', | ||
| 132 | + type: 'radio', | ||
| 133 | + label: '请选择输入方式', | ||
| 134 | + options: ['填写年龄', '填写出生年月日'], | ||
| 135 | + required: true, | ||
| 136 | + default: '填写出生年月日' | ||
| 137 | + }, | ||
| 138 | + // 年龄输入(条件显示) | ||
| 139 | + { | ||
| 140 | + id: 'age', | ||
| 141 | + key: 'age', | ||
| 142 | + type: 'age', | ||
| 143 | + label: '年龄', | ||
| 144 | + placeholder: '请输入年龄', | ||
| 145 | + required: true, | ||
| 146 | + show_when: { field: 'age_input_mode', op: 'eq', value: '填写年龄' }, | ||
| 147 | + clear_when_hidden: true | ||
| 148 | + }, | ||
| 149 | + // 出生年月日输入(条件显示) | ||
| 150 | + { | ||
| 151 | + id: 'birthday', | ||
| 152 | + key: 'birthday', | ||
| 153 | + type: 'date', | ||
| 154 | + label: '出生年月日', | ||
| 155 | + placeholder: '请选择年月日', | ||
| 156 | + required: true, | ||
| 157 | + show_when: { field: 'age_input_mode', op: 'eq', value: '填写出生年月日' }, | ||
| 158 | + clear_when_hidden: true | ||
| 159 | + } | ||
| 160 | +] | ||
| 161 | +``` | ||
| 162 | + | ||
| 163 | +**自动计算逻辑**: | ||
| 164 | +- 填写年龄 → 自动计算出生年月日(默认当年生日) | ||
| 165 | +- 填写出生年月日 → 自动计算年龄(当前年份 - 出生年份) | ||
| 166 | + | ||
| 167 | +--- | ||
| 168 | + | ||
| 169 | +#### 第 3 步:多阶段提取方案(4-5小时) | ||
| 170 | + | ||
| 171 | +详见 `多阶段提取方案设计.md` | ||
| 172 | + | ||
| 173 | +--- | ||
| 174 | + | ||
| 175 | +## 📝 待确认事项 | ||
| 176 | + | ||
| 177 | +### 客户确认 | ||
| 178 | + | ||
| 179 | +- [ ] **需求1确认**: | ||
| 180 | + - [ ] 确认"直至65岁"选项文字表述 | ||
| 181 | + - [ ] 确认是否需要年龄限制(如:最大投保年龄) | ||
| 182 | + | ||
| 183 | +- [ ] **需求2确认**: | ||
| 184 | + - [ ] 确认默认选项(建议:填写出生年月日) | ||
| 185 | + - [ ] 确认填写年龄时的默认生日(建议:当年生日) | ||
| 186 | + | ||
| 187 | +- [ ] **需求3确认**: | ||
| 188 | + - [ ] 确认阶段数量上限(设计方案:1-5个) | ||
| 189 | + - [ ] 确认预设方案模板(教育+创业+退休、退休年金、财富传承) | ||
| 190 | + | ||
| 191 | +### 技术确认 | ||
| 192 | + | ||
| 193 | +- [ ] 后端能否接收新增字段: | ||
| 194 | + - `age_input_mode` | ||
| 195 | + - `withdrawal_stages_json` | ||
| 196 | +- [ ] 后端年龄计算逻辑是否与前端一致 | ||
| 197 | + | ||
| 198 | +--- | ||
| 199 | + | ||
| 200 | +## 🔗 相关文档 | ||
| 201 | + | ||
| 202 | +- [多阶段提取方案设计](./多阶段提取方案设计.md) | ||
| 203 | +- [计划书架构文档](../../plan/plan-entry-architecture.md) | ||
| 204 | +- [Schema 配置规范](../../plan/plan-config-schema-reference.md) | ||
| 205 | + | ||
| 206 | +--- | ||
| 207 | + | ||
| 208 | +**文档版本**: 1.0.0 | ||
| 209 | +**最后更新**: 2026-02-25 |
src/api/mock/hotProducts.js
deleted
100644 → 0
| 1 | -/** | ||
| 2 | - * 热卖产品 Mock 数据 | ||
| 3 | - * | ||
| 4 | - * @description 包含项目所有保险类型的产品 mock 数据,用于测试计划书模板显示 | ||
| 5 | - * 遵循项目 mock 数据规范,集成到 src/utils/mockData.js | ||
| 6 | - * @module api/mock/hotProducts | ||
| 7 | - * @author Claude Code | ||
| 8 | - * @created 2026-02-09 | ||
| 9 | - */ | ||
| 10 | - | ||
| 11 | -/** | ||
| 12 | - * 热卖产品 Mock 数据列表 | ||
| 13 | - * @description 包含 9 种产品,覆盖所有计划书模板类型 | ||
| 14 | - */ | ||
| 15 | -const HOT_PRODUCTS = [ | ||
| 16 | - // ====== 人寿保险 (LifeInsuranceTemplate) ====== | ||
| 17 | - | ||
| 18 | - { | ||
| 19 | - id: 1, | ||
| 20 | - product_name: 'WIOP3E 盈传创富保障计划 3 - 优选版', | ||
| 21 | - name: 'WIOP3E 盈传创富保障计划 3 - 优选版', | ||
| 22 | - recommend: 'hot', | ||
| 23 | - form_sn: 'life-insurance-wiop3e', // 对应 LifeInsuranceTemplate | ||
| 24 | - categories: [ | ||
| 25 | - { id: 'life', name: '人寿保险' } | ||
| 26 | - ], | ||
| 27 | - tags: [ | ||
| 28 | - { id: 't1', name: '终身寿险', bg_color: '#DBEAFE', text_color: '#1E40AF' }, | ||
| 29 | - { id: 't2', name: '美元产品', bg_color: '#DCFCE7', text_color: '#166534' } | ||
| 30 | - ], | ||
| 31 | - cover_image: 'https://picsum.photos/seed/wiop3e/400/300' | ||
| 32 | - }, | ||
| 33 | - | ||
| 34 | - { | ||
| 35 | - id: 2, | ||
| 36 | - product_name: 'WIOP3 盈传创富保障计划 3', | ||
| 37 | - name: 'WIOP3 盈传创富保障计划 3', | ||
| 38 | - recommend: 'hot', | ||
| 39 | - form_sn: 'life-insurance-wiop3', // 对应 LifeInsuranceTemplate | ||
| 40 | - categories: [ | ||
| 41 | - { id: 'life', name: '人寿保险' } | ||
| 42 | - ], | ||
| 43 | - tags: [ | ||
| 44 | - { id: 't1', name: '终身寿险', bg_color: '#DBEAFE', text_color: '#1E40AF' }, | ||
| 45 | - { id: 't2', name: '美元产品', bg_color: '#DCFCE7', text_color: '#166534' } | ||
| 46 | - ], | ||
| 47 | - cover_image: 'https://picsum.photos/seed/wiop3/400/300' | ||
| 48 | - }, | ||
| 49 | - | ||
| 50 | - // ====== 重疾保险 (CriticalIllnessTemplate) ====== | ||
| 51 | - | ||
| 52 | - { | ||
| 53 | - id: 3, | ||
| 54 | - product_name: 'MPC 守护无间重疾', | ||
| 55 | - name: 'MPC 守护无间重疾', | ||
| 56 | - recommend: 'hot', | ||
| 57 | - form_sn: 'critical-illness-mpc', // 对应 CriticalIllnessTemplate | ||
| 58 | - categories: [ | ||
| 59 | - { id: 'critical', name: '重疾保险' } | ||
| 60 | - ], | ||
| 61 | - tags: [ | ||
| 62 | - { id: 't1', name: '重疾保障', bg_color: '#FEF3C7', text_color: '#92400E' }, | ||
| 63 | - { id: 't2', name: '终身保障', bg_color: '#E0E7FF', text_color: '#3730A3' } | ||
| 64 | - ], | ||
| 65 | - cover_image: 'https://picsum.photos/seed/mpc/400/300' | ||
| 66 | - }, | ||
| 67 | - | ||
| 68 | - { | ||
| 69 | - id: 4, | ||
| 70 | - product_name: 'MBC PRO 活跃人生重疾保 PRO', | ||
| 71 | - name: 'MBC PRO 活跃人生重疾保 PRO', | ||
| 72 | - recommend: 'hot', | ||
| 73 | - form_sn: 'critical-illness-mbc-pro', // 对应 CriticalIllnessTemplate | ||
| 74 | - categories: [ | ||
| 75 | - { id: 'critical', name: '重疾保险' } | ||
| 76 | - ], | ||
| 77 | - tags: [ | ||
| 78 | - { id: 't1', name: '重疾保障', bg_color: '#FEF3C7', text_color: '#92400E' }, | ||
| 79 | - { id: 't2', name: 'PRO 版本', bg_color: '#FEE2E2', text_color: '#991B1B' } | ||
| 80 | - ], | ||
| 81 | - cover_image: 'https://picsum.photos/seed/mbc-pro/400/300' | ||
| 82 | - }, | ||
| 83 | - | ||
| 84 | - { | ||
| 85 | - id: 5, | ||
| 86 | - product_name: 'MBC2 活跃人生重疾保 2', | ||
| 87 | - name: 'MBC2 活跃人生重疾保 2', | ||
| 88 | - recommend: 'hot', | ||
| 89 | - form_sn: 'critical-illness-mbc2', // 对应 CriticalIllnessTemplate | ||
| 90 | - categories: [ | ||
| 91 | - { id: 'critical', name: '重疾保险' } | ||
| 92 | - ], | ||
| 93 | - tags: [ | ||
| 94 | - { id: 't1', name: '重疾保障', bg_color: '#FEF3C7', text_color: '#92400E' }, | ||
| 95 | - { id: 't2', name: '升级版', bg_color: '#DCFCE7', text_color: '#166534' } | ||
| 96 | - ], | ||
| 97 | - cover_image: 'https://picsum.photos/seed/mbc2/400/300' | ||
| 98 | - }, | ||
| 99 | - | ||
| 100 | - // ====== 储蓄型产品 (SavingsTemplate) ====== | ||
| 101 | - | ||
| 102 | - { | ||
| 103 | - id: 6, | ||
| 104 | - product_name: 'GS 宏挚传承保障计划', | ||
| 105 | - name: 'GS 宏挚传承保障计划', | ||
| 106 | - recommend: 'hot', | ||
| 107 | - form_sn: 'savings-gs', // 对应 SavingsTemplate | ||
| 108 | - categories: [ | ||
| 109 | - { id: 'savings', name: '储蓄保险' } | ||
| 110 | - ], | ||
| 111 | - tags: [ | ||
| 112 | - { id: 't1', name: '储蓄型', bg_color: '#E0E7FF', text_color: '#3730A3' }, | ||
| 113 | - { id: 't2', name: '传承规划', bg_color: '#F3E8FF', text_color: '#6B21A8' } | ||
| 114 | - ], | ||
| 115 | - cover_image: 'https://picsum.photos/seed/gs/400/300' | ||
| 116 | - }, | ||
| 117 | - | ||
| 118 | - { | ||
| 119 | - id: 7, | ||
| 120 | - product_name: 'GC 宏挚家传保险计划', | ||
| 121 | - name: 'GC 宏挚家传保险计划', | ||
| 122 | - recommend: 'hot', | ||
| 123 | - form_sn: 'savings-gc', // 对应 SavingsTemplate | ||
| 124 | - categories: [ | ||
| 125 | - { id: 'savings', name: '储蓄保险' } | ||
| 126 | - ], | ||
| 127 | - tags: [ | ||
| 128 | - { id: 't1', name: '储蓄型', bg_color: '#E0E7FF', text_color: '#3730A3' }, | ||
| 129 | - { id: 't2', name: '家庭保障', bg_color: '#FEE2E2', text_color: '#991B1B' } | ||
| 130 | - ], | ||
| 131 | - cover_image: 'https://picsum.photos/seed/gc/400/300' | ||
| 132 | - }, | ||
| 133 | - | ||
| 134 | - { | ||
| 135 | - id: 8, | ||
| 136 | - product_name: 'FA 宏浚传承保障计划', | ||
| 137 | - name: 'FA 宏浚传承保障计划', | ||
| 138 | - recommend: 'hot', | ||
| 139 | - form_sn: 'savings-fa', // 对应 SavingsTemplate | ||
| 140 | - categories: [ | ||
| 141 | - { id: 'savings', name: '储蓄保险' } | ||
| 142 | - ], | ||
| 143 | - tags: [ | ||
| 144 | - { id: 't1', name: '储蓄型', bg_color: '#E0E7FF', text_color: '#3730A3' }, | ||
| 145 | - { id: 't2', name: '财富传承', bg_color: '#FEF3C7', text_color: '#92400E' } | ||
| 146 | - ], | ||
| 147 | - cover_image: 'https://picsum.photos/seed/fa/400/300' | ||
| 148 | - }, | ||
| 149 | - | ||
| 150 | - { | ||
| 151 | - id: 9, | ||
| 152 | - product_name: 'LV2 赤霞珠终身寿险计划2', | ||
| 153 | - name: 'LV2 赤霞珠终身寿险计划2', | ||
| 154 | - recommend: 'hot', | ||
| 155 | - form_sn: 'savings-lv2', // 对应 SavingsTemplate | ||
| 156 | - categories: [ | ||
| 157 | - { id: 'savings', name: '储蓄保险' } | ||
| 158 | - ], | ||
| 159 | - tags: [ | ||
| 160 | - { id: 't1', name: '储蓄型', bg_color: '#E0E7FF', text_color: '#3730A3' }, | ||
| 161 | - { id: 't2', name: '终身寿险', bg_color: '#DBEAFE', text_color: '#1E40AF' } | ||
| 162 | - ], | ||
| 163 | - cover_image: 'https://picsum.photos/seed/lv2/400/300' | ||
| 164 | - } | ||
| 165 | -] | ||
| 166 | - | ||
| 167 | -/** | ||
| 168 | - * Mock: listAPI (热卖产品) | ||
| 169 | - * @description 专门用于首页热卖产品的 Mock API,支持 form_sn 字段 | ||
| 170 | - * @param {Object} params - 请求参数 | ||
| 171 | - * @param {string} params.recommend - 推荐位(必须为 'hot') | ||
| 172 | - * @returns {Promise<Object>} 模拟的 API 响应 | ||
| 173 | - */ | ||
| 174 | -export async function mockHotProductsListAPI(params) { | ||
| 175 | - const { recommend } = params | ||
| 176 | - | ||
| 177 | - // 只返回热卖产品 | ||
| 178 | - if (recommend !== 'hot') { | ||
| 179 | - return { code: 0, msg: '只支持热卖产品查询', data: { list: [], total: 0 } } | ||
| 180 | - } | ||
| 181 | - | ||
| 182 | - // 模拟网络延迟 | ||
| 183 | - await new Promise(resolve => setTimeout(resolve, 200)) | ||
| 184 | - | ||
| 185 | - console.log('[Mock] hotProductsListAPI - 返回热卖产品', HOT_PRODUCTS.length, '条') | ||
| 186 | - | ||
| 187 | - return { | ||
| 188 | - code: 1, | ||
| 189 | - msg: 'success', | ||
| 190 | - data: { | ||
| 191 | - list: HOT_PRODUCTS, | ||
| 192 | - total: HOT_PRODUCTS.length, | ||
| 193 | - categories: [ | ||
| 194 | - { id: 'life', name: '人寿保险' }, | ||
| 195 | - { id: 'critical', name: '重疾保险' }, | ||
| 196 | - { id: 'savings', name: '储蓄保险' } | ||
| 197 | - ] | ||
| 198 | - } | ||
| 199 | - } | ||
| 200 | -} | ||
| 201 | - | ||
| 202 | -/** | ||
| 203 | - * 导出 Mock API 函数供其他模块使用 | ||
| 204 | - */ | ||
| 205 | -export default { | ||
| 206 | - mockHotProductsListAPI | ||
| 207 | -} |
| ... | @@ -11,10 +11,10 @@ | ... | @@ -11,10 +11,10 @@ |
| 11 | /** | 11 | /** |
| 12 | * 热卖产品 Mock 数据列表 | 12 | * 热卖产品 Mock 数据列表 |
| 13 | * | 13 | * |
| 14 | - * @description 包含 9 种产品,覆盖所有计划书模板类型: | 14 | + * @description 包含 10 种产品,覆盖所有计划书模板类型: |
| 15 | * - 人寿保险 (2 种): WIOP3E、WIOP3 | 15 | * - 人寿保险 (2 种): WIOP3E、WIOP3 |
| 16 | * - 重疾保险 (3 种): MPC、MBC PRO、MBC2 | 16 | * - 重疾保险 (3 种): MPC、MBC PRO、MBC2 |
| 17 | - * - 储蓄型产品 (4 种): GS、GC、FA、LV2 | 17 | + * - 储蓄型产品 (5 种): GS、GC、FA、LV2、GS(多阶段) |
| 18 | */ | 18 | */ |
| 19 | export const hotProductsMockData = [ | 19 | export const hotProductsMockData = [ |
| 20 | // ====== 人寿保险 (LifeInsuranceTemplate) ====== | 20 | // ====== 人寿保险 (LifeInsuranceTemplate) ====== |
| ... | @@ -165,6 +165,25 @@ export const hotProductsMockData = [ | ... | @@ -165,6 +165,25 @@ export const hotProductsMockData = [ |
| 165 | ], | 165 | ], |
| 166 | cover_image: 'https://picsum.photos/seed/lv2/400/300', | 166 | cover_image: 'https://picsum.photos/seed/lv2/400/300', |
| 167 | created_time: '2026-01-09 00:00:00' | 167 | created_time: '2026-01-09 00:00:00' |
| 168 | + }, | ||
| 169 | + | ||
| 170 | + // ====== 储蓄型产品 - 多阶段提取(新增 2026-02-25) ====== | ||
| 171 | + | ||
| 172 | + { | ||
| 173 | + id: 10, | ||
| 174 | + product_name: 'GS 宏挚传承保障计划(多阶段)', | ||
| 175 | + recommend: 'hot', | ||
| 176 | + form_sn: 'savings-gs-multistage', // 对应 SavingsTemplate 多阶段模式 | ||
| 177 | + categories: [ | ||
| 178 | + { id: 'savings', name: '储蓄保险' } | ||
| 179 | + ], | ||
| 180 | + tags: [ | ||
| 181 | + { id: 't1', name: '多阶段提取', bg_color: '#F3E8FF', text_color: '#6B21A8' }, | ||
| 182 | + { id: 't2', name: '新品', bg_color: '#DCFCE7', text_color: '#166534' }, | ||
| 183 | + { id: 't3', name: '灵活规划', bg_color: '#FEF3C7', text_color: '#92400E' } | ||
| 184 | + ], | ||
| 185 | + cover_image: 'https://picsum.photos/seed/gs-multistage/400/300', | ||
| 186 | + created_time: '2026-02-25 00:00:00' | ||
| 168 | } | 187 | } |
| 169 | ] | 188 | ] |
| 170 | 189 | ||
| ... | @@ -288,6 +307,7 @@ export function getAllTemplateTypes() { | ... | @@ -288,6 +307,7 @@ export function getAllTemplateTypes() { |
| 288 | * - ✅ savings-gc - GC 宏挚家传保险计划 | 307 | * - ✅ savings-gc - GC 宏挚家传保险计划 |
| 289 | * - ✅ savings-fa - FA 宏浚传承保障计划 | 308 | * - ✅ savings-fa - FA 宏浚传承保障计划 |
| 290 | * - ✅ savings-lv2 - LV2 赤霞珠终身寿险计划2 | 309 | * - ✅ savings-lv2 - LV2 赤霞珠终身寿险计划2 |
| 310 | + * - ✅ savings-gs-multistage - GS 宏挚传承保障计划(多阶段) - 支持多阶段提取 | ||
| 291 | * | 311 | * |
| 292 | * ## 测试步骤 | 312 | * ## 测试步骤 |
| 293 | * | 313 | * | ... | ... |
This diff is collapsed. Click to expand it.
| ... | @@ -111,6 +111,23 @@ const savingsFormSchema = { | ... | @@ -111,6 +111,23 @@ const savingsFormSchema = { |
| 111 | // 当 withdrawal_mode 切换时,不可见的字段会自动清空 | 111 | // 当 withdrawal_mode 切换时,不可见的字段会自动清空 |
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | +/** | ||
| 115 | + * 多阶段提取计划配置 | ||
| 116 | + * @description 用于"宏挚传承保障计划(多阶段)"等支持多阶段提取的产品 | ||
| 117 | + * @updated 2026-02-25 - 新增多阶段提取功能 | ||
| 118 | + */ | ||
| 119 | +const multiStageWithdrawalConfig = { | ||
| 120 | + enabled: true, | ||
| 121 | + stage_limit: 4, // 阶段上限(预留修改空间) | ||
| 122 | + age_threshold: 12, // 年龄阈值(<12岁固定3组,≥12岁可添加) | ||
| 123 | + withdrawal_periods: [ | ||
| 124 | + '1年', '2年', '3年', '5年', | ||
| 125 | + '10年', '15年', '20年', '终身', | ||
| 126 | + '一笔过' // 新增:一次性提取选项 | ||
| 127 | + ], | ||
| 128 | + percentage_optional: true // 递增百分比可选 | ||
| 129 | +} | ||
| 130 | + | ||
| 114 | export const PLAN_TEMPLATES = { | 131 | export const PLAN_TEMPLATES = { |
| 115 | // 人寿保险产品 - WIOP3E | 132 | // 人寿保险产品 - WIOP3E |
| 116 | 'life-insurance-wiop3e': { | 133 | 'life-insurance-wiop3e': { |
| ... | @@ -208,7 +225,7 @@ export const PLAN_TEMPLATES = { | ... | @@ -208,7 +225,7 @@ export const PLAN_TEMPLATES = { |
| 208 | 225 | ||
| 209 | // ====== 储蓄型产品(统一逻辑) ====== | 226 | // ====== 储蓄型产品(统一逻辑) ====== |
| 210 | 227 | ||
| 211 | - // GS - 宏挚传承保障计划 | 228 | + // GS - 宏挚传承保障计划(普通模式) |
| 212 | 'savings-gs': { | 229 | 'savings-gs': { |
| 213 | name: '宏挚传承保障计划', | 230 | name: '宏挚传承保障计划', |
| 214 | component: 'SavingsTemplate', | 231 | component: 'SavingsTemplate', |
| ... | @@ -351,6 +368,38 @@ export const PLAN_TEMPLATES = { | ... | @@ -351,6 +368,38 @@ export const PLAN_TEMPLATES = { |
| 351 | submit_mapping: savingsSubmitMapping | 368 | submit_mapping: savingsSubmitMapping |
| 352 | } | 369 | } |
| 353 | }, | 370 | }, |
| 371 | + | ||
| 372 | + // GS - 宏挚传承保障计划(多阶段模式)⭐ 新增 | ||
| 373 | + // @description 支持多阶段提取计划,根据年龄控制阶段数量 | ||
| 374 | + // @updated 2026-02-25 - 新增多阶段提取功能 | ||
| 375 | + 'savings-gs-multistage': { | ||
| 376 | + name: '宏挚传承保障计划(多阶段)', | ||
| 377 | + component: 'SavingsTemplate', | ||
| 378 | + category: 'savings', | ||
| 379 | + config: { | ||
| 380 | + currency: 'USD', | ||
| 381 | + payment_periods: [ | ||
| 382 | + '整付', | ||
| 383 | + '3 年', | ||
| 384 | + '5 年', | ||
| 385 | + '10 年', | ||
| 386 | + '15 年', | ||
| 387 | + ], | ||
| 388 | + age_range: { min: 0, max: 100 }, | ||
| 389 | + insurance_period: '终身', | ||
| 390 | + // 多阶段提取计划配置 | ||
| 391 | + multi_stage_withdrawal: multiStageWithdrawalConfig, | ||
| 392 | + withdrawal_plan: { | ||
| 393 | + enabled: true, | ||
| 394 | + currencies: ['HKD', 'USD', 'CNY'], | ||
| 395 | + default_currency: 'USD', | ||
| 396 | + withdrawal_modes: ['指定提取金额'], // 多阶段模式只支持指定提取金额 | ||
| 397 | + withdrawal_periods: multiStageWithdrawalConfig.withdrawal_periods | ||
| 398 | + }, | ||
| 399 | + form_schema: savingsFormSchema, | ||
| 400 | + submit_mapping: savingsSubmitMapping | ||
| 401 | + } | ||
| 402 | + }, | ||
| 354 | } | 403 | } |
| 355 | 404 | ||
| 356 | /** | 405 | /** | ... | ... |
-
Please register or login to post a comment