Commit 86eaeb13 by 张立顺

feat 模板更新字段

1 parent 402bc423
# DEVLOG — packageDynamicForm # DEVLOG — packageDynamicForm
## 2026-07-09 — 门店日报 V2.1.1 新增 F2-14-12
- **模版**:`schema-store-daily-v2.1.1.js/json` 在 F2-14 子表单新增 `F2-14-12`「今日厂家权益有效转介绍」(延保 2.3.1/2.3.2,integer ≥0,与售前 `F2-11-9` 对称)。
- **单测**:`IT-STORE-TPL-007`、`IT-V211-STORE-006`。
- **文档**:`store-template-features`、`daily-report-template-config-summary`。
## 2026-07-09 — V2.1.1 模板测试与文档同步 ## 2026-07-09 — V2.1.1 模板测试与文档同步
- **单测**:`staff-template-schema.test.mjs`、`store-template-schema.test.mjs` 切换至 `loadSchemaFixtureV211`;移除 form-engine `require`(修复 ESM 加载失败);`v211-template-visibility.test.mjs` 补充 IT-V211-STAFF-004/005 权益场景。 - **单测**:`staff-template-schema.test.mjs`、`store-template-schema.test.mjs` 切换至 `loadSchemaFixtureV211`;移除 form-engine `require`(修复 ESM 加载失败);`v211-template-visibility.test.mjs` 补充 IT-V211-STAFF-004/005 权益场景。
......
...@@ -176,7 +176,7 @@ flowchart TD ...@@ -176,7 +176,7 @@ flowchart TD
| F2-11 | subform | 其他品牌售前(延保/权益) | filterBrandId | | F2-11 | subform | 其他品牌售前(延保/权益) | filterBrandId |
| F2-12 | subform | 问界鸿蒙售后(延保) | 五界 brandId | | F2-12 | subform | 问界鸿蒙售后(延保) | 五界 brandId |
| F2-13 | subform | 岚图售后(延保) | brandId 3067 | | F2-13 | subform | 岚图售后(延保) | brandId 3067 |
| F2-14 | subform | 其他品牌售后(延保/权益) | filterBrandId | | F2-14 | subform | 其他品牌售后(延保/权益) | filterBrandId;子字段 `F2-14-12` 今日厂家权益有效转介绍(延保 110201/110202) |
| F2-93 | divider | 轻改 | qgCode | | F2-93 | divider | 轻改 | qgCode |
| F2-16/17 | numberInput | 鸿蒙店总售后指标 | 五界 + 轻改 | | F2-16/17 | numberInput | 鸿蒙店总售后指标 | 五界 + 轻改 |
| F2-18~22 | numberInput | 各界店总交付数 | 单品牌 brandId + 轻改 | | F2-18~22 | numberInput | 各界店总交付数 | 单品牌 brandId + 轻改 |
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
| 延保/权益标题 | F2-94 / F2-91 / F2-92 | divider | `isYB` / `isQY` / 双场景 → 仅 F2-94 | | 延保/权益标题 | F2-94 / F2-91 / F2-92 | divider | `isYB` / `isQY` / 双场景 → 仅 F2-94 |
| 店端指标 | F2-3~F2-8、F2-34~F2-35、F2-38~F2-51 | numberInput | V2.1.1 移除 F2-30/F2-36;新增品牌拆分交付/售后指标(F2-38/F2-44 等) | | 店端指标 | F2-3~F2-8、F2-34~F2-35、F2-38~F2-51 | numberInput | V2.1.1 移除 F2-30/F2-36;新增品牌拆分交付/售后指标(F2-38/F2-44 等) |
| 售前 subform | F2-9、F2-10、F2-11 | subform | 鸿蒙 / 岚图 / 其他品牌 | | 售前 subform | F2-9、F2-10、F2-11 | subform | 鸿蒙 / 岚图 / 其他品牌 |
| 售后 subform | F2-12、F2-13、F2-14 | subform | 同上 | | 售后 subform | F2-12、F2-13、F2-14 | subform | 同上;F2-14 含 `F2-14-12` 今日厂家权益有效转介绍(延保 2.3.1/2.3.2,与售前 `F2-11-9` 对称) |
| 轻改标题 | F2-93 | divider | `qgCode` | | 轻改标题 | F2-93 | divider | `qgCode` |
| 轻改指标 | F2-16~F2-25 | numberInput | 五界交付数分品牌;F2-23~25 `filterBrandId` | | 轻改指标 | F2-16~F2-25 | numberInput | 五界交付数分品牌;F2-23~25 `filterBrandId` |
| 轻改 subform | F2-26、F2-27、F2-28 | subform | 销售 / 交付 / 售后 | | 轻改 subform | F2-26、F2-27、F2-28 | subform | 销售 / 交付 / 售后 |
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
|---------|------| |---------|------|
| IT-STORE-DIV-001~007 | `form-engine.test.mjs` | | IT-STORE-DIV-001~007 | `form-engine.test.mjs` |
| IT-STORE-ENG-003/005 | `form-engine.test.mjs` | | IT-STORE-ENG-003/005 | `form-engine.test.mjs` |
| IT-STORE-TPL-001~006 | `store-template-schema.test.mjs`(V2.1.1 fixture) | | IT-STORE-TPL-001~007 | `store-template-schema.test.mjs`(V2.1.1 fixture) |
| IT-V211-* | `v211-template-visibility.test.mjs` | | IT-V211-* | `v211-template-visibility.test.mjs` |
| IT-STORE-STAFF-COUNT-001~005 | `store-staff-count.test.mjs` | | IT-STORE-STAFF-COUNT-001~005 | `store-staff-count.test.mjs` |
| IT-STORE-PENDING-* | `storeMonthlyPendingCount.test.mjs` | | IT-STORE-PENDING-* | `storeMonthlyPendingCount.test.mjs` |
......
...@@ -109,4 +109,16 @@ describe('store daily template V2.1.1 schema', () => { ...@@ -109,4 +109,16 @@ describe('store daily template V2.1.1 schema', () => {
assert.deepEqual(child?.baseSceneCode, [110101, 110102], key) assert.deepEqual(child?.baseSceneCode, [110101, 110102], key)
} }
}) })
it('IT-STORE-TPL-007: F2-14-12 manufacturer warranty referral metric', () => {
const subform = findFieldByKey(storeSchema.list, 'F2-14')
const row = subform?.children?.[0] || []
const child = row.find(item => item.key === 'F2-14-12')
assert.equal(child?.label, '今日厂家权益有效转介绍')
assert.deepEqual(child?.baseSceneCode, [110201, 110202])
assert.deepEqual(subform?.childrenRules?.['F2-14-12'], {
min: 0,
integer: true
})
})
}) })
...@@ -121,6 +121,11 @@ describe('V2.1.1 visibility contract under boutique-only scene', () => { ...@@ -121,6 +121,11 @@ describe('V2.1.1 visibility contract under boutique-only scene', () => {
brandIds: [9999], brandIds: [9999],
sceneList: [{ baseSceneCode: 110101 }] sceneList: [{ baseSceneCode: 110101 }]
} }
const warrantyCtx = {
baseSceneCode: 110201,
brandIds: [9999],
sceneList: [{ baseSceneCode: 110201 }]
}
const otherBrandCtx = { const otherBrandCtx = {
baseSceneCode: 100101, baseSceneCode: 100101,
brandIds: [9999], brandIds: [9999],
...@@ -155,6 +160,15 @@ describe('V2.1.1 visibility contract under boutique-only scene', () => { ...@@ -155,6 +160,15 @@ describe('V2.1.1 visibility contract under boutique-only scene', () => {
} }
}) })
it('IT-V211-STORE-006: F2-14-12 matches warranty scene only', () => {
const subform = findFieldByKey(storeSchema.list, 'F2-14')
const rowTemplate = subform?.children?.[0] || []
const cell = rowTemplate.find(item => item.key === 'F2-14-12')
assert.equal(matchesBaseSceneCode(cell, warrantyCtx), true)
assert.equal(matchesBaseSceneCode(cell, equityCtx), false)
assert.equal(matchesBaseSceneCode(cell, boutiqueCtx), false)
})
it('IT-V211-STAFF-004: equity scene matches F1-11广联权益 children only', () => { it('IT-V211-STAFF-004: equity scene matches F1-11广联权益 children only', () => {
const f111 = findFieldByKey(staffSchema.list, 'F1-11') const f111 = findFieldByKey(staffSchema.list, 'F1-11')
for (const key of ['F1-11-5', 'F1-11-6', 'F1-11-8']) { for (const key of ['F1-11-5', 'F1-11-6', 'F1-11-8']) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!