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
90eee2bc
Commit
90eee2bc
authored
Feb 16, 2022
by
fengjiansheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(@gms/gms-plugin-billexpend): 增加主子表数据比较公式
parent
cba4ad8a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
68 additions
and
0 deletions
+68
-0
emcon.js
develop/@gms/gms-plugin-billexpand/src/emcon.js
+16
-0
EqualsMasterAndSubField.js
...-plugin-billexpand/src/formula/EqualsMasterAndSubField.js
+50
-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 @
90eee2bc
...
...
@@ -3910,6 +3910,22 @@ export default {
"extends"
:
{
"info"
:
{
"param"
:
[],
"name"
:
"EqualsMasterAndSubField"
,
"description"
:
"主子表字段比较公式 e.g. EqualsMasterAndSubField(BXD_H.BXJEXX,BXD_I1.BXJEX1)"
,
"title"
:
"主子表字段比较公式"
,
"return"
:
1
}
},
"description"
:
""
,
"title"
:
"主子表字段比较公式"
,
"value"
:
"EqualsMasterAndSubField"
},
{
"discard"
:
false
,
"path"
:
"通用"
,
"extends"
:
{
"info"
:
{
"param"
:
[],
"name"
:
"CheckReferenceRelation"
,
"description"
:
"校验单据是否被引用 e.g. CheckReferenceRelation('REF_FLAG','1','当前单据已被引用,暂时无法删除。')"
,
"title"
:
"校验单据是否被引用"
,
...
...
develop/@gms/gms-plugin-billexpand/src/formula/EqualsMasterAndSubField.js
0 → 100644
View file @
90eee2bc
import
_
from
'lodash'
import
util
from
'./FormulaConstants'
/**
* 主子表字段比较公式
* 暂时仅实现 主表基础数据子表基础数据的比较
* @author fengjiansheng
* @date 2022-02-16
*/
export
default
{
formulaName
:
"EqualsMasterAndSubField"
,
execute
:
function
()
{
if
(
arguments
&&
arguments
[
0
]
&&
arguments
[
0
].
length
===
3
)
{
let
context
=
arguments
[
1
]
let
compType
=
util
.
getFormulaParamValue
(
arguments
[
0
][
0
])
let
masterField
=
arguments
[
0
][
1
]
if
(
compType
!==
1
)
{
return
true
}
masterField
=
util
.
getFormulaParamValue
(
masterField
).
id
let
tempSubTableObject
=
context
.
getTableType
(
arguments
[
0
][
2
].
FieldTableCode
);
if
(
!
_
.
isEqual
(
tempSubTableObject
.
type
,
"sub"
))
{
return
false
}
let
allSubData
=
context
.
getAllSubData
();
if
(
!
allSubData
||
_
.
isEmpty
(
allSubData
))
{
return
true
}
let
tempAllSubData
=
context
.
getAllSubData
()[
tempSubTableObject
.
title
];
if
(
!
tempAllSubData
||
_
.
isEmpty
(
tempAllSubData
))
{
return
true
}
if
(
tempAllSubData
instanceof
Array
)
{
for
(
const
tempSubData
of
tempAllSubData
)
{
let
tempData
=
tempSubData
.
getValue
(
arguments
[
0
][
2
].
FieldCode
).
id
if
(
masterField
!==
tempData
)
{
return
false
}
}
}
return
true
}
else
{
console
.
error
(
this
.
formulaName
+
_
.
ERROR_MSG
.
PARAM_NUM
)
return
false
}
},
getResultType
:
function
()
{
return
util
.
resultType
.
boolean
}
}
develop/@gms/gms-plugin-billexpand/src/mcon.js
View file @
90eee2bc
...
...
@@ -174,6 +174,7 @@ import LoginUserIsContianRole from "@/formula/SubTableJointString"
import
SubTableSetBaseData
from
"@/formula/SubTableSetBaseData"
import
UpdateBillReferenceRelationshipFunction
from
"./formula/UpdateBillReferenceRelationshipFunction"
;
import
AmountComp
from
"./formula/AmountComp"
;
import
EqualsMasterAndSubField
from
"./formula/EqualsMasterAndSubField"
;
export
default
{
actions
:
{
updateFieldAction
,
...
...
@@ -352,6 +353,7 @@ export default {
ClearImageInfoRefState
,
CheckReferenceRelation
,
AmountComp
,
EqualsMasterAndSubField
,
},
routes
:
{
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