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
13baccc0
Commit
13baccc0
authored
Mar 15, 2022
by
袁成
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
ssh://nvwa.jiuqi.com.cn:2222/GFP/RBC/rbc-frontend
into develop-yuancheng
parents
a769d436
629849b7
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
144 additions
and
6 deletions
+144
-6
errorMessageUtil.js
...ms-plugin-billexpand/src/actions/util/errorMessageUtil.js
+22
-4
approval-user-control.vue
...c/control/approval-user-control/approval-user-control.vue
+2
-2
emcon.js
develop/@gms/gms-plugin-billexpand/src/emcon.js
+16
-0
ApplyTemplateString.js
.../gms-plugin-billexpand/src/formula/ApplyTemplateString.js
+102
-0
mcon.js
develop/@gms/gms-plugin-billexpand/src/mcon.js
+2
-0
No files found.
develop/@gms/gms-plugin-billexpand/src/actions/util/errorMessageUtil.js
View file @
13baccc0
...
...
@@ -60,18 +60,36 @@ export default {
},
tempSaveAction
:
{
commonMessage
:
"暂存失败,请联系系统管理员。"
,
customMessageList
:
[
{
preMessage
:
"More than one row with the given identifier was found"
,
convertMessage
:
"multiBaseDataError"
},
{
preMessage
:
"formulaError:"
,
convertMessage
:
"backFormulaError"
,
}
],
getErrorBaseDataName
(
a
)
{
if
(
!
a
||
!
_
.
isString
(
a
))
{
return
""
;
}
let
reg
=
/
(?<
=datamodel
\.)
.*
?(?=
;
)
/
;
let
targetString
=
a
.
match
(
reg
);
return
targetString
?
targetString
[
0
]
:
""
;
},
getErrorMessage
(
a
)
{
if
(
!
a
||
!
_
.
isString
(
a
))
{
return
this
.
commonMessage
;
}
let
errorPreMessage
=
""
;
for
(
let
i
=
0
;
i
<
this
.
saveAction
.
customMessageList
.
length
;
i
++
)
{
if
(
a
.
indexOf
(
this
.
saveAction
.
customMessageList
[
i
].
preMessage
)
>
-
1
)
{
errorPreMessage
=
this
.
saveAction
.
customMessageList
[
i
].
convertMessage
;
for
(
let
i
=
0
;
i
<
this
.
customMessageList
.
length
;
i
++
)
{
if
(
a
.
indexOf
(
this
.
customMessageList
[
i
].
preMessage
)
>
-
1
)
{
errorPreMessage
=
this
.
customMessageList
[
i
].
convertMessage
;
break
;
}
}
return
errorPreMessage
===
""
?
(
a
?
a
:
this
.
commonMessage
)
:
errorPreMessage
+
this
.
saveAction
.
getErrorBaseDataName
(
a
);
return
errorPreMessage
===
""
?
(
a
?
a
:
this
.
commonMessage
)
:
errorPreMessage
+
this
.
getErrorBaseDataName
(
a
);
},
getCommonMessage
(){
return
this
.
commonMessage
;
...
...
develop/@gms/gms-plugin-billexpand/src/control/approval-user-control/approval-user-control.vue
View file @
13baccc0
...
...
@@ -3,7 +3,7 @@
<div
class=
"suggestion-wrapper"
>
<div
class=
"label"
>
{{
this
.
define
.
title
}}
</div>
<div
class=
"input-wrapper"
>
<Input
v-model=
"value"
type=
"textarea"
:placeholder=
"define.config.placeholder"
:maxlength=
"
12
0"
/>
<Input
v-model=
"value"
type=
"textarea"
:placeholder=
"define.config.placeholder"
:maxlength=
"
24
0"
/>
<div
class=
"suggestion-button-wrapper"
>
<ConfirmPopover
v-for=
"suggestion in suggestionOption"
...
...
@@ -84,7 +84,7 @@
:ref=
"'input-' + row.code"
@
on-blur=
"handleInputBlur(row)"
type=
"textarea"
:maxlength=
"
12
0"
:maxlength=
"
24
0"
/>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"action"
>
...
...
develop/@gms/gms-plugin-billexpand/src/emcon.js
View file @
13baccc0
...
...
@@ -4305,6 +4305,22 @@ export default {
"discard"
:
false
,
"path"
:
"通用"
,
"extends"
:
{
"info"
:
{
"param"
:
[],
"name"
:
"ApplyTemplateString"
,
"description"
:
"1.基础数据字段,2.赋值的字段,3.模板字符串4.field+对应基础数据table5.分隔符"
,
"title"
:
"基础数据赋值模板字符串"
,
"return"
:
0
}
},
"description"
:
"1.基础数据字段,2.赋值的字段,3.模板字符串4.field+对应基础数据table5.分隔符"
,
"title"
:
"基础数据赋值模板字符串"
,
"value"
:
"ApplyTemplateString"
},
{
"discard"
:
false
,
"path"
:
"通用"
,
"extends"
:
{
"info"
:
{
"param"
:
[
...
...
develop/@gms/gms-plugin-billexpand/src/formula/ApplyTemplateString.js
0 → 100644
View file @
13baccc0
// 子表根据基础数据带出基础数据
export
default
{
execute
:
function
()
{
if
(
arguments
&&
arguments
[
0
]
&&
arguments
[
1
])
{
const
context
=
arguments
[
1
]
const
originField
=
arguments
[
0
][
0
]
const
targetField
=
arguments
[
0
][
1
]
let
templateString
=
arguments
[
0
][
2
].
StaticValue
let
args
=
arguments
[
0
][
3
].
StaticValue
const
sep
=
arguments
[
0
][
4
]
&&
arguments
[
0
][
4
].
StaticValue
||
''
args
=
args
.
replace
(
/ /g
,
''
)
const
argList
=
args
.
split
(
','
)
const
originTableType
=
context
.
getTableType
(
originField
.
FieldTableCode
)
const
originTableObject
=
context
.
getSubData
(
originTableType
.
title
)
const
requestParam
=
{
pagination
:
false
,
searchKey
:
""
,
queryDataStructure
:
"ALL_WITH_REF"
,
stopflag
:
-
1
,
authType
:
"NONE"
}
const
replaceMap
=
new
Map
()
const
replaceTemplatePart
=
templateString
.
match
(
/{{.+
?
}}/g
)
replaceTemplatePart
.
forEach
((
part
)
=>
{
replaceMap
.
set
(
part
,
[])
})
const
getBaseDataList
=
(
originFieldValue
)
=>
{
const
promistList
=
[]
for
(
let
i
=
0
;
i
<
argList
.
length
;
i
+=
2
)
{
promistList
.
push
(
this
.
getMDObject
({
...
requestParam
,
tableName
:
argList
[
i
+
1
],
objectcode
:
originFieldValue
[
argList
[
i
]],
}))
}
return
Promise
.
all
(
promistList
)
}
const
getFormattedString
=
(
originFieldValue
,
basedataObjectList
,
templateString
)
=>
{
const
matchList
=
templateString
.
match
(
/`.+
?
`/g
)
matchList
.
forEach
((
str
)
=>
{
let
value
=
str
.
substring
(
1
,
str
.
length
-
1
)
value
=
value
.
split
(
'.'
)
let
pos
=
value
[
0
].
substring
(
1
)
pos
=
Number
(
pos
)
let
ans
if
(
pos
==
0
)
{
ans
=
originFieldValue
}
else
{
;
--
pos
if
(
pos
>=
basedataObjectList
.
length
)
{
console
.
error
(
`
${
str
}
下标大于参数列表长度`
)
return
}
ans
=
basedataObjectList
[
pos
]
}
for
(
let
i
=
1
;
i
<
value
.
length
;
++
i
)
{
ans
=
ans
[
value
[
i
]]
}
templateString
=
templateString
.
replace
(
str
,
ans
)
})
return
templateString
}
if
(
originTableObject
instanceof
Array
)
{
const
getBasedataPromiseList
=
[]
let
count
=
0
for
(
let
i
=
0
;
i
<
originTableObject
.
length
;
++
i
)
{
const
originObject
=
originTableObject
[
i
]
const
curOriginFieldValue
=
originObject
.
getValue
(
originField
.
FieldCode
)
if
(
!
curOriginFieldValue
||
!
curOriginFieldValue
.
objectcode
)
{
continue
}
getBasedataPromiseList
.
push
(
getBaseDataList
(
curOriginFieldValue
).
then
((
basedataObjectList
)
=>
{
replaceTemplatePart
.
forEach
((
templatePart
)
=>
{
const
formattedString
=
getFormattedString
(
curOriginFieldValue
,
basedataObjectList
,
templatePart
.
substring
(
2
,
templatePart
.
length
-
2
))
replaceMap
.
get
(
templatePart
)[
i
]
=
formattedString
})
}))
}
Promise
.
all
(
getBasedataPromiseList
).
then
(()
=>
{
for
(
let
key
of
replaceMap
.
keys
())
{
templateString
=
templateString
.
replace
(
key
,
replaceMap
.
get
(
key
).
filter
(
o
=>
!!
o
).
join
(
sep
))
}
context
.
getMasterData
().
setValue
(
targetField
.
FieldTableCode
+
'.'
+
targetField
.
FieldCode
,
templateString
,
null
,
'none'
)
})
}
else
{
context
.
getMasterData
().
setValue
(
targetField
.
FieldTableCode
+
'.'
+
targetField
.
FieldCode
,
''
,
null
,
'none'
)
}
}
},
getMDObject
(
param
)
{
return
GMS
.
$http
.
post
(
"/baseData/data/list"
,
param
).
then
(
data
=>
{
return
data
.
data
&&
data
.
data
.
rows
&&
data
.
data
.
rows
[
0
]
||
{}
}).
catch
((
resp
)
=>
{
});
},
getResultType
:
function
()
{
return
FMR
.
ConstDataTypes
.
General
;
}
}
\ No newline at end of file
develop/@gms/gms-plugin-billexpand/src/mcon.js
View file @
13baccc0
...
...
@@ -176,6 +176,7 @@ import GetSubTableRows from "@/formula/GetSubTableRows"
import
SubTableJointString
from
"@/formula/SubTableJointString"
import
LoginUserIsContianRole
from
"@/formula/SubTableJointString"
import
SubTableSetBaseData
from
"@/formula/SubTableSetBaseData"
import
ApplyTemplateString
from
"@/formula/ApplyTemplateString"
import
UpdateBillReferenceRelationshipFunction
from
"./formula/UpdateBillReferenceRelationshipFunction"
;
import
AmountComp
from
"./formula/AmountComp"
;
import
EqualsMasterAndSubField
from
"./formula/EqualsMasterAndSubField"
;
...
...
@@ -368,6 +369,7 @@ export default {
EqualsMasterAndSubField
,
SubTableHasContainField
,
GetUserStaffInfo
,
ApplyTemplateString
,
},
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