Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-boutique-work-wechat
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b5c20a66
authored
Jul 15, 2026
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat 模板单位添加
1 parent
6d6d5885
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
55 additions
and
0 deletions
packageDynamicForm/fixtures/schema-staff-daily-v2.1.1.js
packageDynamicForm/fixtures/schema-staff-daily-v2.1.1.json
packageDynamicForm/fixtures/schema-store-daily-v2.1.1.js
packageDynamicForm/fixtures/schema-store-daily-v2.1.1.json
packageDynamicForm/tests/staff-template-schema.test.mjs
packageDynamicForm/tests/store-template-schema.test.mjs
packageDynamicForm/fixtures/schema-staff-daily-v2.1.1.js
View file @
b5c20a6
...
...
@@ -119,6 +119,7 @@
brandId
:
[],
baseSceneCode
:
[
110201
,
110202
],
//[场景 包含 2.3.1 or 2.3.2] and [今日出勤=在岗] 则 [显示]
unit
:
'元'
,
value
:
0
,
rules
:
{
min
:
0
,
...
...
packageDynamicForm/fixtures/schema-staff-daily-v2.1.1.json
View file @
b5c20a6
This diff is collapsed.
Click to expand it.
packageDynamicForm/fixtures/schema-store-daily-v2.1.1.js
View file @
b5c20a6
...
...
@@ -477,6 +477,7 @@
brandId
:
[
3067
],
//[门店经营品牌 包含 岚图] and [场景 包含 2.3.1 or 2.3.2] 则 [显示]
baseSceneCode
:
[
110201
,
110202
],
unit
:
'%'
,
value
:
0
,
rules
:
{
min
:
0
,
...
...
@@ -494,6 +495,7 @@
brandId
:
[
3067
],
//[门店经营品牌 包含 岚图] and [场景 包含 2.3.1 or 2.3.2] 则 [显示]
baseSceneCode
:
[
110201
,
110202
],
unit
:
'%'
,
value
:
0
,
rules
:
{
min
:
0
,
...
...
@@ -982,6 +984,7 @@
sceneType
:
[
0
,
0
],
brandId
:
[],
baseSceneCode
:
[
110101
,
110102
,
110201
,
110202
],
unit
:
'元'
,
value
:
0
,
rules
:
{
min
:
0
,
...
...
@@ -1474,6 +1477,7 @@
sceneType
:
[
0
,
0
],
brandId
:
[],
baseSceneCode
:
[
110101
,
110102
,
110201
,
110202
],
unit
:
'元'
,
value
:
0
,
rules
:
{
min
:
0
,
...
...
@@ -1848,6 +1852,7 @@
sceneType
:
[
1
],
brandId
:
[
3454
,
3503
,
3458
,
3574
,
3502
],
baseSceneCode
:
[
100101
,
100102
,
100103
],
unit
:
'元'
,
value
:
0
,
rules
:
{
min
:
0
,
...
...
@@ -1949,6 +1954,7 @@
sceneType
:
[
1
],
brandId
:
[
3454
,
3503
,
3458
,
3574
,
3502
],
baseSceneCode
:
[
100101
,
100102
,
100103
],
unit
:
'元'
,
value
:
0
,
rules
:
{
min
:
0
,
...
...
@@ -2082,6 +2088,7 @@
sceneType
:
[
1
],
brandId
:
[
3454
,
3503
,
3458
,
3574
,
3502
],
baseSceneCode
:
[
100101
,
100102
,
100103
],
unit
:
'元'
,
value
:
0
,
rules
:
{
min
:
0
,
...
...
@@ -2207,6 +2214,7 @@
sceneType
:
[
1
],
brandId
:
[],
baseSceneCode
:
[
100101
,
100102
,
100103
],
unit
:
'元'
,
value
:
0
,
rules
:
{
min
:
0
,
...
...
@@ -2329,6 +2337,7 @@
sceneType
:
[
1
],
brandId
:
[],
baseSceneCode
:
[
100101
,
100102
,
100103
],
unit
:
'元'
,
value
:
0
,
rules
:
{
min
:
0
,
...
...
packageDynamicForm/fixtures/schema-store-daily-v2.1.1.json
View file @
b5c20a6
This diff could not be displayed because it is too large.
packageDynamicForm/tests/staff-template-schema.test.mjs
View file @
b5c20a6
...
...
@@ -133,4 +133,11 @@ describe('staff daily template V2.1.1 schema', () => {
assert.deepEqual(child?.filterBrandId, [3454, 3503, 3458, 3574, 3502])
assert.deepEqual(child?.baseSceneCode, [100101, 100102, 100103])
})
it('IT-STAFF-TPL-010: F1-3 refund amount has unit 元 from Excel rule', () => {
const field = findFieldByKey(staffSchema.list, 'F1-3')
assert.equal(field?.label, '延保退单金额')
assert.equal(field?.unit, '元')
assert.equal(field?.rules?.decimal, true)
})
})
packageDynamicForm/tests/store-template-schema.test.mjs
View file @
b5c20a6
...
...
@@ -8,6 +8,24 @@ function findFieldByKey(list, key) {
return list.find(item => item.key === key)
}
/** 递归按 key 查找字段(含 subform / group 子项) */
function findFieldByKeyDeep(list, key) {
for (const field of list || []) {
if (field?.key === key) return field
const children = field?.children
if (!Array.isArray(children)) continue
for (const child of children) {
if (Array.isArray(child)) {
const found = findFieldByKeyDeep(child, key)
if (found) return found
} else if (child?.key === key) {
return child
}
}
}
return null
}
function collectAllKeys(list = []) {
const keys = []
function walk(field) {
...
...
@@ -138,4 +156,24 @@ describe('store daily template V2.1.1 schema', () => {
assert.deepEqual(field?.filterBrandId, [3454, 3503, 3458, 3574, 3502])
assert.deepEqual(field?.baseSceneCode, [100101, 100102, 100103])
})
it('IT-STORE-TPL-010: Excel 后置显示文字元/% fields have unit', () => {
const yuanKeys = [
'F2-11-12',
'F2-14-11',
'F2-26-4',
'F2-27-6',
'F2-28-6',
'F2-57-6',
'F2-58-4'
]
for (const key of yuanKeys) {
const field = findFieldByKeyDeep(storeSchema.list, key)
assert.equal(field?.unit, '元', key)
}
for (const key of ['F2-34', 'F2-35']) {
const field = findFieldByKeyDeep(storeSchema.list, key)
assert.equal(field?.unit, '%', key)
}
})
})
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment