Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
7b06f35b
提交
7b06f35b
编写于
2月 14, 2022
作者:
Mosher
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:调整表格值规则
上级
11f2cee9
变更
3
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
35 行增加
和
10 行删除
+35
-10
derules.hbs
...in/resources/templ/r7/@macro/front-end/common/derules.hbs
+24
-0
verify.ts
...sources/templ/r7/app_{{apps}}/src/core/utils/ui/verify.ts
+8
-8
{{ctrls@GRID}}-grid-state.ts.hbs
...es}}/{{ctrls@GRID}}-grid/{{ctrls@GRID}}-grid-state.ts.hbs
+3
-2
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/common/derules.hbs
浏览文件 @
7b06f35b
...
...
@@ -5,6 +5,30 @@
"notMode":
{{
item
.
notMode
}}
,
"condType": "
{{
item
.
condType
}}
",
"ruleInfo": "
{{
item
.
ruleInfo
}}
",
"keyCond":
{{
item
.
keyCond
}}
,
{{#
eq
item
.
condType
'SIMPLE'
}}
"paramType": "
{{
item
.
paramType
}}
",
"paramValue": "
{{
item
.
paramValue
}}
",
{{/
eq
}}
{{#if
(
or
(
eq
item
.
condType
'VALUERANGE2'
)
(
eq
item
.
condType
'STRINGLENGTH'
))
}}
"includeMinValue":
{{
item
.
includeMinValue
}}
,
"minValue": "
{{
item
.
minValue
}}
",
"includeMaxValue":
{{
item
.
includeMaxValue
}}
,
"maxValue": "
{{
item
.
maxValue
}}
",
{{/if}}
{{#
eq
item
.
condType
'REGEX'
}}
"regExCode":
{{
item
.
regExCode
}}
,
{{/
eq
}}
{{#if
(
and
(
eq
item
.
condType
'SYSVALUERULE'
)
item
.
psSysValueRule
)
}}
{{#
with
item
.
psSysValueRule
as
|
sysRule
|
}}
"sysValueRule": {
"ruleType": "
{{
sysRule
.
ruleType
}}
",
"regExCode": "
{{
sysRule
.
regExCode
}}
",
"ruleInfo": "
{{
sysRule
.
ruleInfo
}}
",
"scriptCode": `
{{
sysRule
.
scriptCode
}}
`
}
{{/
with
}}
{{/if}}
{{#if
item
.
psDEFVRConditions
}}
"conditions": [
{{#
each
item
.
psDEFVRConditions
as
|
condition
|
}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/utils/ui/verify.ts
浏览文件 @
7b06f35b
...
...
@@ -614,24 +614,24 @@ export class Verify {
try
{
// 常规规则
if
(
condition
.
condType
==
'SIMPLE'
)
{
flag
.
isPast
=
!
Verify
.
checkFieldSimpleRule
(
data
[
name
],
condition
.
condOp
,
condition
.
paramValue
,
condition
.
ruleInfo
,
condition
.
paramType
,
data
,
condition
.
isK
eyCond
);
flag
.
isPast
=
!
Verify
.
checkFieldSimpleRule
(
data
[
name
],
condition
.
condOp
,
condition
.
paramValue
,
condition
.
ruleInfo
,
condition
.
paramType
,
data
,
condition
.
k
eyCond
);
// 数值范围
}
else
if
(
condition
.
condType
==
'VALUERANGE2'
)
{
flag
.
isPast
=
!
Verify
.
checkFieldValueRangeRule
(
data
[
name
],
condition
.
minValue
,
condition
.
includeMinValue
,
condition
.
maxValue
,
condition
.
includeMaxValue
,
condition
.
ruleInfo
,
condition
.
isK
eyCond
);
flag
.
isPast
=
!
Verify
.
checkFieldValueRangeRule
(
data
[
name
],
condition
.
minValue
,
condition
.
includeMinValue
,
condition
.
maxValue
,
condition
.
includeMaxValue
,
condition
.
ruleInfo
,
condition
.
k
eyCond
);
// 正则式
}
else
if
(
condition
.
condType
==
'REGEX'
)
{
flag
.
isPast
=
!
Verify
.
checkFieldRegExRule
(
data
[
name
],
condition
.
regExCode
,
condition
.
ruleInfo
,
condition
.
isK
eyCond
);
flag
.
isPast
=
!
Verify
.
checkFieldRegExRule
(
data
[
name
],
condition
.
regExCode
,
condition
.
ruleInfo
,
condition
.
k
eyCond
);
// 长度
}
else
if
(
condition
.
condType
==
'STRINGLENGTH'
)
{
flag
.
isPast
=
!
Verify
.
checkFieldStringLengthRule
(
data
[
name
],
condition
.
minValue
,
condition
.
includeMinValue
,
condition
.
maxValue
,
condition
.
includeMaxValue
,
condition
.
ruleInfo
,
condition
.
isK
eyCond
);
flag
.
isPast
=
!
Verify
.
checkFieldStringLengthRule
(
data
[
name
],
condition
.
minValue
,
condition
.
includeMinValue
,
condition
.
maxValue
,
condition
.
includeMaxValue
,
condition
.
ruleInfo
,
condition
.
k
eyCond
);
// 系统值规则
}
else
if
(
condition
.
condType
==
'SYSVALUERULE'
&&
condition
?.
getPSSysValueRule
?.()
)
{
const
{
ruleType
,
regExCode
,
scriptCode
,
ruleInfo
}
=
condition
.
getPSSysValueRule
()
;
}
else
if
(
condition
.
condType
==
'SYSVALUERULE'
&&
condition
.
sysValueRule
)
{
const
{
ruleType
,
regExCode
,
scriptCode
,
ruleInfo
}
=
condition
.
sysValueRule
;
flag
.
infoMessage
=
condition
.
ruleInfo
||
ruleInfo
;
if
(
ruleType
==
'REG'
)
{
flag
.
isPast
=
!
Verify
.
checkFieldRegExRule
(
data
[
name
],
regExCode
,
flag
.
infoMessage
,
condition
.
isK
eyCond
);
flag
.
isPast
=
!
Verify
.
checkFieldRegExRule
(
data
[
name
],
regExCode
,
flag
.
infoMessage
,
condition
.
k
eyCond
);
}
else
if
(
ruleType
==
'SCRIPT'
)
{
const
{
isPast
,
infoMessage
}
=
Verify
.
checkFieldScriptRule
(
data
[
name
],
data
,
scriptCode
,
flag
.
infoMessage
,
condition
.
isK
eyCond
);
const
{
isPast
,
infoMessage
}
=
Verify
.
checkFieldScriptRule
(
data
[
name
],
data
,
scriptCode
,
flag
.
infoMessage
,
condition
.
k
eyCond
);
flag
.
isPast
=
isPast
;
flag
.
infoMessage
=
infoMessage
||
flag
.
infoMessage
;
}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@GRID}}-grid/{{ctrls@GRID}}-grid-state.ts.hbs
浏览文件 @
7b06f35b
...
...
@@ -195,7 +195,7 @@ export const ctrlState = {
{{#
eq
editItem
.
codeName
ruleItem
.
psDEGridEditItemName
}}
{
validator: (rule: any, value: any, callback: any, source: any) => {
if (isEmpty(source['
{{#if
editItem
.
valueItemName
}}{{
editItem
.
valueItemName
}}{{else}}{{
ruleItem
.
psDEGridEditItemName
}}{{/if}}
'])) {
if (
!source ||
isEmpty(source['
{{#if
editItem
.
valueItemName
}}{{
editItem
.
valueItemName
}}{{else}}{{
ruleItem
.
psDEGridEditItemName
}}{{/if}}
'])) {
return true;
}
const { isPast, infoMessage } = Verify.verifyDeRules(
...
...
@@ -207,7 +207,8 @@ export const ctrlState = {
callback(new Error(infoMessage || '
{{
ruleItem
.
psDEFValueRule
.
ruleInfo
}}
'));
}
return true;
}
},
trigger: ['change', 'blur']
}
{{/
eq
}}
{{/
each
}}
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录