Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
rbc-demo
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王衍超
rbc-demo
Commits
8d232f13
Commit
8d232f13
authored
Mar 02, 2022
by
fengjiansheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(@gms/gms-plugin-billexpand): 提交子表校验字段公式
parent
9ff2970e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
0 deletions
+63
-0
emcon.js
develop/@gms/gms-plugin-billexpand/src/emcon.js
+15
-0
SubTableHasContainField.js
...-plugin-billexpand/src/formula/SubTableHasContainField.js
+46
-0
mcon.js
develop/@gms/gms-plugin-billexpand/src/mcon.js
+2
-0
No files found.
develop/@gms/gms-plugin-billexpand/src/emcon.js
View file @
8d232f13
...
@@ -3768,6 +3768,21 @@ export default {
...
@@ -3768,6 +3768,21 @@ export default {
"extends"
:
{
"extends"
:
{
"info"
:
{
"info"
:
{
"param"
:
[],
"param"
:
[],
"name"
:
"SubTableHasContainField"
,
"description"
:
"前端公式:判断基础数据中是否加载拓展字段,以支撑校验公式正确应对多种情况下的校验校验公式:判断子表中是否包含某个字段值判断子表中是否包含某个字段值"
,
"return"
:
0
}
},
"description"
:
"校验公式:判断子表中是否包含某个字段值"
,
"title"
:
"校验公式:判断子表中是否包含某个字段值"
,
"value"
:
"SubTableHasContainField"
},
{
"discard"
:
false
,
"path"
:
"通用"
,
"extends"
:
{
"info"
:
{
"param"
:
[],
"name"
:
"SetFieldValue"
,
"name"
:
"SetFieldValue"
,
"description"
:
"赋值公式:用于给主子表单个字段赋值,仅支持静态入参"
,
"description"
:
"赋值公式:用于给主子表单个字段赋值,仅支持静态入参"
,
"title"
:
"赋值公式:用于给主子表单个字段赋值"
,
"title"
:
"赋值公式:用于给主子表单个字段赋值"
,
...
...
develop/@gms/gms-plugin-billexpand/src/formula/SubTableHasContainField.js
0 → 100644
View file @
8d232f13
import
_
from
"./FormulaConstants"
;
/**
* 校验公式 子表中是否包含某个字段
* @author fengjiansheng
* @date 2022-03-02
*/
export
default
{
formulaName
:
"SubTableHasContainField"
,
execute
:
function
()
{
if
(
arguments
&&
arguments
[
0
]
&&
arguments
[
0
].
length
===
2
)
{
let
context
=
arguments
[
1
]
let
field
=
arguments
[
0
][
0
]
let
checkValue
=
_
.
getFormulaParamValue
(
arguments
[
0
][
1
])
let
tempSubTableObject
=
context
.
getTableType
(
field
.
FieldTableCode
)
let
allSubData
=
context
.
getAllSubData
()
if
(
allSubData
)
{
let
flag
=
false
let
tempAllSubData
=
allSubData
[
tempSubTableObject
.
title
]
if
(
tempAllSubData
&&
tempAllSubData
instanceof
Array
)
{
// 同时处理基础数据类型和普通字段类型的比较
let
subFieldPath1
=
field
.
FieldCode
.
split
(
'.'
)[
0
]
let
subFieldPath2
=
field
.
FieldCode
.
split
(
'.'
).
length
>
1
?
field
.
FieldCode
.
split
(
'.'
)[
1
]
:
subFieldPath1
for
(
let
i
=
0
;
i
<
tempAllSubData
.
length
;
i
++
)
{
if
(
subFieldPath1
===
subFieldPath2
)
{
if
(
tempAllSubData
[
i
].
getValue
(
subFieldPath1
)
===
checkValue
)
{
flag
=
true
;
break
;
}
}
else
{
if
(
tempAllSubData
[
i
].
getValue
(
subFieldPath1
)[
subFieldPath2
]
===
checkValue
)
{
flag
=
true
;
break
;
}
}
}
}
return
flag
}
return
true
}
else
{
return
false
;
}
},
getResultType
:
function
()
{
return
_
.
resultType
.
boolean
;
}
}
develop/@gms/gms-plugin-billexpand/src/mcon.js
View file @
8d232f13
...
@@ -178,6 +178,7 @@ import SubTableSetBaseData from "@/formula/SubTableSetBaseData"
...
@@ -178,6 +178,7 @@ import SubTableSetBaseData from "@/formula/SubTableSetBaseData"
import
UpdateBillReferenceRelationshipFunction
from
"./formula/UpdateBillReferenceRelationshipFunction"
;
import
UpdateBillReferenceRelationshipFunction
from
"./formula/UpdateBillReferenceRelationshipFunction"
;
import
AmountComp
from
"./formula/AmountComp"
;
import
AmountComp
from
"./formula/AmountComp"
;
import
EqualsMasterAndSubField
from
"./formula/EqualsMasterAndSubField"
;
import
EqualsMasterAndSubField
from
"./formula/EqualsMasterAndSubField"
;
import
SubTableHasContainField
from
"./formula/SubTableHasContainField"
;
export
default
{
export
default
{
actions
:
{
actions
:
{
updateFieldAction
,
updateFieldAction
,
...
@@ -360,6 +361,7 @@ export default {
...
@@ -360,6 +361,7 @@ export default {
CheckReferenceRelation
,
CheckReferenceRelation
,
AmountComp
,
AmountComp
,
EqualsMasterAndSubField
,
EqualsMasterAndSubField
,
SubTableHasContainField
,
},
},
routes
:
{
routes
:
{
showPrint
:
{
showPrint
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment