Commit 18085114 by 张立顺

docs: 更新门店月待邀约初始化说明

1 parent 3aaf1453
# DEVLOG — packageDynamicForm # DEVLOG — packageDynamicForm
## 2026-08-14 — V2.3 本月待邀约数兼容初始化
- **问题**:门店 V2.3 将本月待邀约字段从 `F2-24` 调整为 `F2-102`,页面初始化逻辑仍写死旧 key,导致新模板不调用已有接口也不回填默认值。
- **修复**:运行时优先识别 `F2-102` 并回退 `F2-24`;仅当天、字段可见且无值时初始化,月首日直接写 `0`,非首日复用 `dailyReport.monthly.pending.get` 获取最近一次提交数值。
- **兼容**:已有详情值、历史日期不覆盖;异常模板同时包含新旧字段时使用 `F2-102`。
- **验证**:`IT-STORE-PENDING-V230-*` 覆盖字段解析与初始化动作,`IT-STORE-DAILY-PAGE-PENDING-*` 覆盖页面不请求首日接口及新字段写回。
## 2026-08-14 — 子表单模板驱动重复校验 ## 2026-08-14 — 子表单模板驱动重复校验
- **模板协议**:subform 新增 `validateDuplicates: string[]`;V2.3 门店日报 `F2-107` 配置 `['F2-107-2']`,daily / production 四份 JS/JSON 均由最新版 Excel 重新生成。 - **模板协议**:subform 新增 `validateDuplicates: string[]`;V2.3 门店日报 `F2-107` 配置 `['F2-107-2']`,daily / production 四份 JS/JSON 均由最新版 Excel 重新生成。
......
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
与驻店相同结构,使用 `loadStoreDailyForm` + `storeDailyReport.js`。 与驻店相同结构,使用 `loadStoreDailyForm` + `storeDailyReport.js`。
`buildFormRequestContext` 额外透传 `sceneType` 给字段选项接口。 `buildFormRequestContext` 额外透传 `sceneType` 给字段选项接口。
`loadFormData` 在 `engine.init` + `applyEngineView` 之后,若 **当天**(`isTodayReport`)、schema 可见 **`F2-24`**(本月待邀约)且该字段 **无值**,则调用 `fetchMonthlyPendingCount`(`dj.api.smartcarlife.dailyReport.monthly.pending.count` POST,`merchantId` 为 4S 店、`reportDate` 为选中日),将 `data.pendingCount` 写入 `F2-24`;历史日期或已有回显/填写不请求、不覆盖。开关:`STORE_DAILY_API_SWITCH.monthlyPendingCount`。 `loadFormData` 在 `engine.init` + `applyEngineView` 之后解析当前可见的本月待邀约字段(V2.3 **`F2-102`**,兼容旧模板 **`F2-24`**,异常共存时优先新字段)。仅当 **当天**(`isTodayReport`)且字段 **无值** 时初始化:每月首日直接写 `0`,不调用接口;非首日调用 `fetchMonthlyPendingCount`(`dj.api.smartcarlife.dailyReport.monthly.pending.get` POST,`merchantId` 为 4S 店、`reportDate` 为选中日),把最近一次提交数值写回当前字段。历史日期或已有回显/填写不请求、不覆盖。开关:`STORE_DAILY_API_SWITCH.monthlyPendingCount`。
若当天可编辑且 **`F2-1` 今日驻店人员**可见(如经营品牌含岚图),加载后及每次改选 F2-1 时,**`F2-2` 今日驻店人数**自动同步为选中人员数量(等价于 schema `completeFun.result: "(list.length)"`,不 eval 表达式);F2-1 不可见时不改动 F2-2。**F2-1 已选至少 1 人时 F2-2 只读**(未选人时可手动改人数)。见 [`store-staff-count.js`](../utils/store-staff-count.js)、[store-template-features.md](./store-template-features.md)。 若当天可编辑且 **`F2-1` 今日驻店人员**可见(如经营品牌含岚图),加载后及每次改选 F2-1 时,**`F2-2` 今日驻店人数**自动同步为选中人员数量(等价于 schema `completeFun.result: "(list.length)"`,不 eval 表达式);F2-1 不可见时不改动 F2-2。**F2-1 已选至少 1 人时 F2-2 只读**(未选人时可手动改人数)。见 [`store-staff-count.js`](../utils/store-staff-count.js)、[store-template-features.md](./store-template-features.md)。
...@@ -157,7 +157,7 @@ ...@@ -157,7 +157,7 @@
- `IT-STORE-APP-001` ~ `IT-STORE-APP-002` — 门店 App jsonContent save(childrenValue + 双 key) - `IT-STORE-APP-001` ~ `IT-STORE-APP-002` — 门店 App jsonContent save(childrenValue + 双 key)
- `IT-STORE-ECHO-*` — 门店 jsonContent 回显 - `IT-STORE-ECHO-*` — 门店 jsonContent 回显
- `IT-APP-ORDER-*` / `IT-APP-CV-*` / `IT-SUBFORM-MAX-*` — 提交顺序、childrenValue、20 行上限 - `IT-APP-ORDER-*` / `IT-APP-CV-*` / `IT-SUBFORM-MAX-*` — 提交顺序、childrenValue、20 行上限
- `IT-STORE-PENDING-*` — `storeMonthlyPendingCount.test.mjs`(F2-24 待邀约数 adapter/门面/shouldFetch) - `IT-STORE-PENDING-*` — `storeMonthlyPendingCount.test.mjs`(F2-102/F2-24 待邀约数 adapter、字段解析与首日/非首日初始化)
- `IT-STORE-TPL-001`~`009` — `store-template-schema.test.mjs`(V2.1.1) - `IT-STORE-TPL-001`~`009` — `store-template-schema.test.mjs`(V2.1.1)
- `IT-V211-STORE-007`~`013` — `v211-template-visibility.test.mjs`(岚图 or 其他品牌) - `IT-V211-STORE-007`~`013` — `v211-template-visibility.test.mjs`(岚图 or 其他品牌)
- `IT-V211-*` — `v211-template-visibility.test.mjs` - `IT-V211-*` — `v211-template-visibility.test.mjs`
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
| `optionsKey` 4sStaffList | 同上 | subform `F2-*-1`,4S `merchantId` | | `optionsKey` 4sStaffList | 同上 | subform `F2-*-1`,4S `merchantId` |
| F2-1 → F2-2 人数 | [`store-staff-count.js`](../utils/store-staff-count.js) + `storeDailyReport.applyStoreStaffCountIfNeeded` | 当天可编辑且 F2-1 可见时,`length` 写入 F2-2;**不读** schema `completeFun` 表达式 | | F2-1 → F2-2 人数 | [`store-staff-count.js`](../utils/store-staff-count.js) + `storeDailyReport.applyStoreStaffCountIfNeeded` | 当天可编辑且 F2-1 可见时,`length` 写入 F2-2;**不读** schema `completeFun` 表达式 |
| F2-2 有选人时只读 | `patchStoreStaffCountFieldInViewState` + `storeDailyReport.applyEngineView(refreshFixedFields)` + `dynamic-form` `item.disabled` | F2-1 选中 ≥1 人时 F2-2 字段级 disabled;未选人可手动改人数;改选 F2-1 时须刷新 fixedFields | | F2-2 有选人时只读 | `patchStoreStaffCountFieldInViewState` + `storeDailyReport.applyEngineView(refreshFixedFields)` + `dynamic-form` `item.disabled` | F2-1 选中 ≥1 人时 F2-2 字段级 disabled;未选人可手动改人数;改选 F2-1 时须刷新 fixedFields |
| F2-24 本月待邀约 | [`store-monthly-pending.js`](../utils/store-monthly-pending.js) + `fetchMonthlyPendingCount` | 当天、可见、无值时拉 `monthly.pending.count` | | F2-102 / F2-24 本月待邀约 | [`store-monthly-pending.js`](../utils/store-monthly-pending.js) + `fetchMonthlyPendingCount` | V2.3 优先 F2-102、兼容旧 F2-24;当天可见无值时,月首日写 0,非首日拉 `monthly.pending.get` 最近提交值 |
| subform 行内 `baseSceneCode`(F2-11-* 等) | 子字段自带 `baseSceneCode`,参与子字段显隐 | 延保/权益分行字段按场景码过滤 | | subform 行内 `baseSceneCode`(F2-11-* 等) | 子字段自带 `baseSceneCode`,参与子字段显隐 | 延保/权益分行字段按场景码过滤 |
| subform 最多 20 行 | `subform-limits.js` | `rules.maxLength` | | subform 最多 20 行 | `subform-limits.js` | `rules.maxLength` |
| 保存 jsonContent | `app-subform-json.js` | F2-1 双 key;subform `childrenValue` | | 保存 jsonContent | `app-subform-json.js` | F2-1 双 key;subform `childrenValue` |
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!