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
8f741685
Commit
8f741685
authored
Apr 25, 2022
by
Joey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(@gms/gms-plugin-billexpand): 校验子表重复公式
parent
a43a0d07
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
72 additions
and
0 deletions
+72
-0
emcon.js
develop/@gms/gms-plugin-billexpand/src/emcon.js
+35
-0
CheckUnDuplicateSubField.js
...plugin-billexpand/src/formula/CheckUnDuplicateSubField.js
+35
-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 @
8f741685
...
...
@@ -3196,6 +3196,41 @@ export default {
{
"isOmitable"
:
true
,
"dataType"
:
0
,
"name"
:
"field"
,
"title"
:
"要判断的字段"
},
{
"isOmitable"
:
true
,
"dataType"
:
0
,
"name"
:
"field"
,
"title"
:
"是否执行该公式的判断依据[是否需要]"
},
{
"isOmitable"
:
true
,
"dataType"
:
0
,
"name"
:
"string"
,
"title"
:
"需要判断的判断条件[是否需要]"
}
],
"name"
:
"CheckUnDuplicateSubField"
,
"description"
:
"判段子表字段值是否重复"
,
"title"
:
"判段子表字段值是否重复"
,
"return"
:
0
}
},
"description"
:
"判段子表字段值是否重复"
,
"title"
:
"判段子表字段值是否重复"
,
"value"
:
"CheckUnDuplicateSubField"
},
{
"discard"
:
false
,
"path"
:
"通用"
,
"extends"
:
{
"info"
:
{
"param"
:
[
{
"isOmitable"
:
true
,
"dataType"
:
0
,
"name"
:
"_name"
,
"title"
:
"子表在主表列表中的表名"
}
...
...
develop/@gms/gms-plugin-billexpand/src/formula/CheckUnDuplicateSubField.js
0 → 100644
View file @
8f741685
// 判断子表某个字段值相同则提示不然保存前端公式
export
default
{
execute
:
function
()
{
let
subTable
=
arguments
[
0
][
0
].
FieldTableCode
// 字段名
let
subFieldCode
=
arguments
[
0
][
0
].
FieldCode
// bill
let
context
=
arguments
[
1
]
// 表所有字段
let
tableObj
=
context
.
getTableType
(
subTable
)
let
dataFun
=
context
.
getSubData
(
tableObj
.
title
)
if
(
dataFun
.
length
>
1
)
{
for
(
let
i
=
0
;
i
<
dataFun
.
length
;
i
++
)
{
let
_data1
=
dataFun
[
i
].
getData
()
for
(
let
j
=
i
+
1
;
j
<
dataFun
.
length
;
j
++
)
{
let
_data2
=
dataFun
[
j
].
getData
()
if
(
_data1
[
subFieldCode
].
value
!==
_data2
[
subFieldCode
].
value
)
{
return
false
;
}
}
}
return
true
;
}
else
if
(
dataFun
.
length
<=
1
)
{
return
true
}
else
{
return
true
;
}
},
getResultType
:
function
(){
return
FMR
.
ConstDataTypes
.
Bool
;
}
}
\ No newline at end of file
develop/@gms/gms-plugin-billexpand/src/mcon.js
View file @
8f741685
...
...
@@ -112,6 +112,7 @@ import PhoneCheck from './formula/PhoneCheck'
import
IDCardCheck
from
'./formula/IDCardCheck'
import
LenFunction
from
'./formula/LenFunction'
import
CheckDuplicateSubField
from
'./formula/CheckDuplicateSubField'
import
CheckUnDuplicateSubField
from
'./formula/CheckUnDuplicateSubField'
import
ClearSubData
from
'./formula/ClearSubData'
import
DateOpera
from
'./formula/DateOpera'
import
GetSubStandard
from
'./formula/GetSubStandard'
...
...
@@ -287,6 +288,7 @@ export default {
IDCardCheck
,
LenFunction
,
CheckDuplicateSubField
,
CheckUnDuplicateSubField
,
DateOpera
,
ClearSubData
,
GetSubStandard
,
...
...
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