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
894cb298
Commit
894cb298
authored
Mar 22, 2022
by
Joey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(@gms/gms-plugin-billexpand): 字符串拼接赋值公式修改
- 首先判断选定基础数据是否完整,避免查字段时查错 - 调批量查基础数据的接口,减少接口调用次数
parent
226b2509
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
7 deletions
+27
-7
ApplyTemplateString.js
.../gms-plugin-billexpand/src/formula/ApplyTemplateString.js
+27
-7
No files found.
develop/@gms/gms-plugin-billexpand/src/formula/ApplyTemplateString.js
View file @
894cb298
...
...
@@ -38,15 +38,29 @@ export default {
}
const
getBaseDataList
=
(
originFieldValue
)
=>
{
const
promistList
=
[]
for
(
let
i
=
0
;
i
<
argList
.
length
;
i
+=
2
)
{
promistList
.
push
(
this
.
getMDObject
({
const
getList
=
(
originFieldValue
)
=>
{
const
paramList
=
[]
for
(
let
i
=
0
;
i
<
argList
.
length
;
i
+=
2
)
{
paramList
.
push
({
...
requestParam
,
tableName
:
argList
[
i
+
1
],
objectcode
:
originFieldValue
[
argList
[
i
]],
})
}
return
this
.
getCombBaseDataList
(
paramList
)
}
if
(
originFieldValue
.
_type
)
{
return
this
.
getMDObject
({
...
requestParam
,
tableName
:
argList
[
i
+
1
],
objectcode
:
originFieldValue
[
argList
[
i
]],
}))
tableName
:
originFieldValue
.
_type
.
split
(
'.'
)[
1
],
code
:
originFieldValue
.
code
,
}).
then
((
res
)
=>
{
return
getList
(
res
)
})
}
else
{
return
getList
(
originFieldValue
)
}
return
Promise
.
all
(
promistList
)
}
const
getFormattedString
=
(
originFieldValue
,
basedataObjectList
,
templateString
)
=>
{
const
matchList
=
templateString
.
match
(
/`.+
?
`/g
)
...
...
@@ -114,6 +128,12 @@ export default {
}).
catch
((
resp
)
=>
{
});
},
getCombBaseDataList
(
param
)
{
return
GMS
.
$http
.
post
(
"/rbcfunc/getCombBaseDataList"
,
param
).
then
(
res
=>
{
return
(
res
&&
res
.
data
&&
res
.
data
.
data
||
[]).
map
((
o
)
=>
o
&&
o
[
0
]
||
{})
}).
catch
((
res
)
=>
{
});
},
getResultType
:
function
()
{
return
FMR
.
ConstDataTypes
.
General
;
}
...
...
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