feat(plan): 储蓄类计划书表单调整
- 移除吸烟字段(储蓄类产品不需要) - 切断年龄与出生日期的自动联动,客户要求独立填写 - 更新 savingsSubmitMapping 移除吸烟字段映射 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Showing
3 changed files
with
37 additions
and
31 deletions
| ... | @@ -149,7 +149,7 @@ | ... | @@ -149,7 +149,7 @@ |
| 149 | * 储蓄型保险计划书模板 | 149 | * 储蓄型保险计划书模板 |
| 150 | * | 150 | * |
| 151 | * @description GS/GC/FA/LV2 等储蓄型保险产品的计划书录入表单 | 151 | * @description GS/GC/FA/LV2 等储蓄型保险产品的计划书录入表单 |
| 152 | - * - 表单字段:性别、出生年月日、是否吸烟、保额、缴费年期 | 152 | + * - 表单字段:性别、出生年月日、年缴保费、缴费年期 |
| 153 | * - 提取计划:指定提取金额(按年岁/按保单年度)、最高固定提取金额 | 153 | * - 提取计划:指定提取金额(按年岁/按保单年度)、最高固定提取金额 |
| 154 | * @author Claude Code | 154 | * @author Claude Code |
| 155 | * @example | 155 | * @example |
| ... | @@ -592,32 +592,30 @@ watch( | ... | @@ -592,32 +592,30 @@ watch( |
| 592 | } | 592 | } |
| 593 | ) | 593 | ) |
| 594 | 594 | ||
| 595 | -/** | 595 | +// TODO(human): 年龄与出生年月日已取消联动,客户要求二者独立填写 |
| 596 | - * 年龄与出生年月日自动计算逻辑 | 596 | +// 如需恢复联动,可取消以下代码的注释 |
| 597 | - * - 填年龄 → 推算生日(默认当年1月1日) | 597 | +// |
| 598 | - * - 填生日 → 计算年龄 | 598 | +// watch( |
| 599 | - */ | 599 | +// () => form.age, |
| 600 | -watch( | 600 | +// (newAge) => { |
| 601 | - () => form.age, | 601 | +// if (!isEmptyValue(newAge) && isEmptyValue(form.birthday)) { |
| 602 | - (newAge) => { | 602 | +// const currentYear = new Date().getFullYear() |
| 603 | - if (!isEmptyValue(newAge) && isEmptyValue(form.birthday)) { | 603 | +// const birthYear = currentYear - parseInt(newAge) |
| 604 | - const currentYear = new Date().getFullYear() | 604 | +// form.birthday = `${birthYear}-01-01` |
| 605 | - const birthYear = currentYear - parseInt(newAge) | 605 | +// } |
| 606 | - form.birthday = `${birthYear}-01-01` | 606 | +// } |
| 607 | - } | 607 | +// ) |
| 608 | - } | 608 | +// |
| 609 | -) | 609 | +// watch( |
| 610 | - | 610 | +// () => form.birthday, |
| 611 | -watch( | 611 | +// (newBirthday) => { |
| 612 | - () => form.birthday, | 612 | +// if (!isEmptyValue(newBirthday)) { |
| 613 | - (newBirthday) => { | 613 | +// const birthYear = new Date(newBirthday).getFullYear() |
| 614 | - if (!isEmptyValue(newBirthday)) { | 614 | +// const currentYear = new Date().getFullYear() |
| 615 | - const birthYear = new Date(newBirthday).getFullYear() | 615 | +// form.age = currentYear - birthYear |
| 616 | - const currentYear = new Date().getFullYear() | 616 | +// } |
| 617 | - form.age = currentYear - birthYear | 617 | +// } |
| 618 | - } | 618 | +// ) |
| 619 | - } | ||
| 620 | -) | ||
| 621 | 619 | ||
| 622 | /** | 620 | /** |
| 623 | * 提取年期选项(从配置读取) | 621 | * 提取年期选项(从配置读取) | ... | ... |
| ... | @@ -61,8 +61,16 @@ const protectionFormSchema = { | ... | @@ -61,8 +61,16 @@ const protectionFormSchema = { |
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | // 储蓄类提交字段映射(在基础映射上追加提取计划字段) | 63 | // 储蓄类提交字段映射(在基础映射上追加提取计划字段) |
| 64 | +// @updated 2026-02-28 - 移除吸烟字段映射(储蓄类产品不需要) | ||
| 64 | const savingsSubmitMapping = { | 65 | const savingsSubmitMapping = { |
| 65 | - ...baseSubmitMapping, | 66 | + customer_name: { api_field: 'customer_name' }, |
| 67 | + gender: { api_field: 'customer_gender' }, | ||
| 68 | + age: { api_field: 'customer_age' }, | ||
| 69 | + birthday: { api_field: 'customer_birthday' }, | ||
| 70 | + // smoker: { api_field: 'smoking_status' }, // 储蓄类产品不需要吸烟字段 | ||
| 71 | + coverage: { api_field: 'annual_premium', transform: 'fen_to_yuan' }, | ||
| 72 | + payment_period: { api_field: 'payment_years' }, | ||
| 73 | + total_amount: { api_field: 'total_premium', transform: 'fen_to_yuan' }, | ||
| 66 | withdrawal_enabled: { api_field: 'allow_reduce_amount' }, | 74 | withdrawal_enabled: { api_field: 'allow_reduce_amount' }, |
| 67 | withdrawal_mode: { api_field: 'withdrawal_option' }, | 75 | withdrawal_mode: { api_field: 'withdrawal_option' }, |
| 68 | withdrawal_method: { api_field: 'withdrawal_method' }, | 76 | withdrawal_method: { api_field: 'withdrawal_method' }, |
| ... | @@ -77,6 +85,7 @@ const savingsSubmitMapping = { | ... | @@ -77,6 +85,7 @@ const savingsSubmitMapping = { |
| 77 | // 储蓄类表单 Schema(渲染 + 校验 + 联动的唯一入口) | 85 | // 储蓄类表单 Schema(渲染 + 校验 + 联动的唯一入口) |
| 78 | // @updated 2026-02-15 - 迁移到新的条件规则格式,使用 clear_when_hidden 替代 reset_map | 86 | // @updated 2026-02-15 - 迁移到新的条件规则格式,使用 clear_when_hidden 替代 reset_map |
| 79 | // @updated 2026-02-25 - 年龄与出生年月日二选一填写 | 87 | // @updated 2026-02-25 - 年龄与出生年月日二选一填写 |
| 88 | +// @updated 2026-02-28 - 移除吸烟字段(储蓄类产品不需要) | ||
| 80 | const savingsFormSchema = { | 89 | const savingsFormSchema = { |
| 81 | // 基础字段:非提取计划部分 | 90 | // 基础字段:非提取计划部分 |
| 82 | base_fields: [ | 91 | base_fields: [ |
| ... | @@ -85,7 +94,6 @@ const savingsFormSchema = { | ... | @@ -85,7 +94,6 @@ const savingsFormSchema = { |
| 85 | // 年龄与出生年月日二选一填写 | 94 | // 年龄与出生年月日二选一填写 |
| 86 | { id: 'age', key: 'age', type: 'age', label: '年龄', placeholder: '请输入年龄', input_label: '岁', required: false }, | 95 | { id: 'age', key: 'age', type: 'age', label: '年龄', placeholder: '请输入年龄', input_label: '岁', required: false }, |
| 87 | { id: 'birthday', key: 'birthday', type: 'date', label: '出生年月日', placeholder: '请选择年月日', required: false }, | 96 | { id: 'birthday', key: 'birthday', type: 'date', label: '出生年月日', placeholder: '请选择年月日', required: false }, |
| 88 | - { id: 'smoker', key: 'smoker', type: 'radio', label: '是否吸烟', options: ['是', '否'], required: true }, | ||
| 89 | { id: 'coverage', key: 'coverage', type: 'amount', label: '年缴保费', placeholder: '请输入年缴保费', input_label: '请输入年缴保费金额', required: true, currency_from: 'currency' }, | 97 | { id: 'coverage', key: 'coverage', type: 'amount', label: '年缴保费', placeholder: '请输入年缴保费', input_label: '请输入年缴保费金额', required: true, currency_from: 'currency' }, |
| 90 | { id: 'payment_period', key: 'payment_period', type: 'payment_period', label: '缴费年期', required: true, options_from: 'payment_periods' } | 98 | { id: 'payment_period', key: 'payment_period', type: 'payment_period', label: '缴费年期', required: true, options_from: 'payment_periods' } |
| 91 | ], | 99 | ], | ... | ... |
| ... | @@ -31,8 +31,8 @@ | ... | @@ -31,8 +31,8 @@ |
| 31 | 31 | ||
| 32 | <!-- 作者和日期 --> | 32 | <!-- 作者和日期 --> |
| 33 | <view class="article-meta"> | 33 | <view class="article-meta"> |
| 34 | - <text v-if="article.authorName" class="meta-item">{{ article.authorName }}</text> | 34 | + <!-- <text v-if="article.authorName" class="meta-item">{{ article.authorName }}</text> |
| 35 | - <text v-if="article.authorName && article.date" class="meta-separator">·</text> | 35 | + <text v-if="article.authorName && article.date" class="meta-separator">·</text> --> |
| 36 | <text v-if="article.date" class="meta-item">{{ formattedDate }}</text> | 36 | <text v-if="article.date" class="meta-item">{{ formattedDate }}</text> |
| 37 | </view> | 37 | </view> |
| 38 | </view> | 38 | </view> | ... | ... |
-
Please register or login to post a comment