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
0f44c1a1
Commit
0f44c1a1
authored
Feb 28, 2022
by
qiaoyanqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
公式报错
parent
bb4e4cf9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
48 deletions
+50
-48
SetSubFieldNull.js
...@gms/gms-plugin-billexpand/src/formula/SetSubFieldNull.js
+2
-2
SetSubFieldValue.js
...gms/gms-plugin-billexpand/src/formula/SetSubFieldValue.js
+48
-46
No files found.
develop/@gms/gms-plugin-billexpand/src/formula/SetSubFieldNull.js
View file @
0f44c1a1
...
@@ -14,8 +14,8 @@ export default {
...
@@ -14,8 +14,8 @@ export default {
let
tmpField
=
subField
.
FieldCode
;
let
tmpField
=
subField
.
FieldCode
;
let
subTableObject
=
context
.
getTableType
(
subField
.
FieldTableCode
)
let
subTableObject
=
context
.
getTableType
(
subField
.
FieldTableCode
)
let
oldIndex
=
context
.
getSubFocus
()
let
oldIndex
=
context
.
getSubFocus
()
let
focusData
=
context
.
getAllSubData
()[
subTableObject
.
title
][
oldIndex
].
getData
()
let
focusData
=
oldIndex
&&
context
.
getAllSubData
()[
subTableObject
.
title
][
oldIndex
].
getData
()
if
(
!
_
.
isEqual
(
focusData
[
tmpField
].
_field_old_value_
,
focusData
[
tmpField
].
value
)
||
!
_
.
isEmpty
(
focusData
[
tmpField
].
value
))
{
if
(
focusData
&&
(
!
_
.
isEqual
(
focusData
[
tmpField
].
_field_old_value_
,
focusData
[
tmpField
].
value
)
||
!
_
.
isEmpty
(
focusData
[
tmpField
].
value
)
))
{
focusData
[
tmpField
].
_field_old_value_
=
focusData
[
tmpField
].
value
=
null
focusData
[
tmpField
].
_field_old_value_
=
focusData
[
tmpField
].
value
=
null
context
.
refreshSubDataRow
(
subTableObject
.
title
);
context
.
refreshSubDataRow
(
subTableObject
.
title
);
}
}
...
...
develop/@gms/gms-plugin-billexpand/src/formula/SetSubFieldValue.js
View file @
0f44c1a1
...
@@ -25,64 +25,66 @@ export default {
...
@@ -25,64 +25,66 @@ export default {
}
}
if
(
targetObject
.
type
===
"sub"
)
{
if
(
targetObject
.
type
===
"sub"
)
{
let
subTableFocusOldIndex
=
context
.
getSubFocus
()
let
subTableFocusOldIndex
=
context
.
getSubFocus
()
let
subTableFocusData
=
context
.
getAllSubData
()[
targetObject
.
title
][
subTableFocusOldIndex
].
getData
()
let
subTableFocusData
=
subTableFocusOldIndex
&&
context
.
getAllSubData
()[
targetObject
.
title
][
subTableFocusOldIndex
].
getData
()
let
oldIndex
=
context
.
getSubFocus
()
let
oldIndex
=
context
.
getSubFocus
()
switch
(
valueType
)
{
if
(
subTableFocusData
){
case
FormulaConstants
.
billFiled
.
BMJJFL
:
{
switch
(
valueType
)
{
let
comp1
=
arguments
[
0
][
2
].
getResult
().
Value
;
case
FormulaConstants
.
billFiled
.
BMJJFL
:
{
let
comp2
=
arguments
[
0
][
3
].
getResult
().
Value
;
let
comp1
=
arguments
[
0
][
2
].
getResult
().
Value
;
let
comp3
=
arguments
[
0
][
4
].
getResult
().
Value
;
let
comp2
=
arguments
[
0
][
3
].
getResult
().
Value
;
let
comp4
=
arguments
[
0
][
5
].
getResult
().
Value
;
let
comp3
=
arguments
[
0
][
4
].
getResult
().
Value
;
if
((
!
_
.
isEmpty
(
comp1
)
||
_
.
isNumber
(
comp1
))
&&
(
!
_
.
isEmpty
(
comp2
)
||
_
.
isNumber
(
comp2
))
&&
(
!
_
.
isEmpty
(
comp3
)
||
(
_
.
isNumber
(
comp3
))
&&
(
!
_
.
isEmpty
(
comp4
)
||
(
_
.
isNumber
(
comp4
)))))
{
let
comp4
=
arguments
[
0
][
5
].
getResult
().
Value
;
if
(
!
_
.
isEmpty
(
comp3
)
&&
!
(
_
.
isEqual
(
subTableFocusData
[
arguments
[
0
][
4
].
FieldCode
.
split
(
"."
)[
0
]].
_field_old_value_
,
subTableFocusData
[
arguments
[
0
][
4
].
FieldCode
.
split
(
"."
)[
0
]].
value
)))
{
if
((
!
_
.
isEmpty
(
comp1
)
||
_
.
isNumber
(
comp1
))
&&
(
!
_
.
isEmpty
(
comp2
)
||
_
.
isNumber
(
comp2
))
&&
(
!
_
.
isEmpty
(
comp3
)
||
(
_
.
isNumber
(
comp3
))
&&
(
!
_
.
isEmpty
(
comp4
)
||
(
_
.
isNumber
(
comp4
)))))
{
console
.
log
(
"s2 SetSubField api"
)
if
(
!
_
.
isEmpty
(
comp3
)
&&
!
(
_
.
isEqual
(
subTableFocusData
[
arguments
[
0
][
4
].
FieldCode
.
split
(
"."
)[
0
]].
_field_old_value_
,
subTableFocusData
[
arguments
[
0
][
4
].
FieldCode
.
split
(
"."
)[
0
]].
value
)))
{
this
.
getMDObject
({
console
.
log
(
"s2 SetSubField api"
)
"limit"
:
1
,
this
.
getMDObject
({
"offset"
:
0
,
"pagination"
:
true
,
"tableName"
:
comp2
,
"code"
:
comp3
,
"queryDataStructure"
:
"ALL"
},
data
=>
{
let
param
=
{
"limit"
:
1
,
"limit"
:
1
,
"offset"
:
0
,
"offset"
:
0
,
"pagination"
:
true
,
"pagination"
:
true
,
"tableName"
:
comp
1
,
"tableName"
:
comp
2
,
"code"
:
data
.
rows
[
0
][
comp4
].
split
(
"||"
)[
0
]
,
"code"
:
comp3
,
"queryDataStructure"
:
"ALL"
"queryDataStructure"
:
"ALL"
};
},
data
=>
{
this
.
getMDObject
(
param
,
data
=>
{
let
param
=
{
let
newIndex
=
context
.
getSubFocus
();
"limit"
:
1
,
if
(
oldIndex
!==
newIndex
)
{
"offset"
:
0
,
context
.
setSubFocus
(
oldIndex
)
"pagination"
:
true
,
}
"tableName"
:
comp1
,
console
.
log
(
"s3 setValue"
)
"code"
:
data
.
rows
[
0
][
comp4
].
split
(
"||"
)[
0
],
subTableFocusData
[
targetField
.
FieldCode
].
_field_old_value_
=
subTableFocusData
[
targetField
.
FieldCode
].
value
=
data
.
rows
[
0
]
"queryDataStructure"
:
"ALL"
if
(
oldIndex
!==
newIndex
)
{
};
context
.
setSubFocus
(
newIndex
)
this
.
getMDObject
(
param
,
data
=>
{
}
let
newIndex
=
context
.
getSubFocus
();
context
.
refreshSubDataRow
(
targetObject
.
title
)
if
(
oldIndex
!==
newIndex
)
{
context
.
setSubFocus
(
oldIndex
)
}
console
.
log
(
"s3 setValue"
)
subTableFocusData
[
targetField
.
FieldCode
].
_field_old_value_
=
subTableFocusData
[
targetField
.
FieldCode
].
value
=
data
.
rows
[
0
]
if
(
oldIndex
!==
newIndex
)
{
context
.
setSubFocus
(
newIndex
)
}
context
.
refreshSubDataRow
(
targetObject
.
title
)
},
resp
=>
{
console
.
error
(
"子表赋值:SetSubFieldValue执行失败 resp:"
+
resp
)
});
},
resp
=>
{
},
resp
=>
{
console
.
error
(
"子表赋值:SetSubFieldValue执行失败 resp:"
+
resp
)
console
.
error
(
"子表赋值:SetSubFieldValue执行失败 resp:"
+
resp
)
});
});
},
resp
=>
{
}
console
.
error
(
"子表赋值:SetSubFieldValue执行失败 resp:"
+
resp
)
}
else
{
});
subTableFocusData
[
targetField
.
FieldCode
].
_field_old_value_
=
subTableFocusData
[
targetField
.
FieldCode
].
value
=
null
;
context
.
refreshSubDataRow
(
targetObject
.
title
);
}
}
}
else
{
break
}
case
FormulaConstants
.
billFiled
.
NULL
:
{
subTableFocusData
[
targetField
.
FieldCode
].
_field_old_value_
=
subTableFocusData
[
targetField
.
FieldCode
].
value
=
null
;
subTableFocusData
[
targetField
.
FieldCode
].
_field_old_value_
=
subTableFocusData
[
targetField
.
FieldCode
].
value
=
null
;
context
.
refreshSubDataRow
(
targetObject
.
title
);
context
.
refreshSubDataRow
(
targetObject
.
title
);
break
}
default
:
{
console
.
log
(
""
)
}
}
break
}
case
FormulaConstants
.
billFiled
.
NULL
:
{
subTableFocusData
[
targetField
.
FieldCode
].
_field_old_value_
=
subTableFocusData
[
targetField
.
FieldCode
].
value
=
null
;
context
.
refreshSubDataRow
(
targetObject
.
title
);
break
}
default
:
{
console
.
log
(
""
)
}
}
}
}
}
else
{
}
else
{
...
...
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