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
50506d7d
Commit
50506d7d
authored
Sep 16, 2022
by
qiaoyanqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
确定按钮,报错提示
parent
915d722a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
cacheSaveAction.js
...@gms/gms-plugin-billexpand/src/actions/cacheSaveAction.js
+6
-0
index.js
develop/@gms/gms-plugin-billexpand/src/actions/util/index.js
+19
-0
No files found.
develop/@gms/gms-plugin-billexpand/src/actions/cacheSaveAction.js
View file @
50506d7d
import
{
getErrorMessage
}
from
'./util'
export
default
{
bill
:
null
,
param
:
null
,
...
...
@@ -55,6 +56,11 @@ export default {
if
(
data
.
code
==
0
)
{
GMS
.
vbus
.
$emit
(
'cacheEcho'
,
buidData
);
//正常情况回去给子表赋值
}
else
if
(
data
.
code
==
-
1
&&
data
.
message
){
if
(
data
.
message
.
includes
(
'validation'
)){
GAMS
.
Common
.
messagePrompt
(
getErrorMessage
(
response
.
data
));
this
.
bill
.
setControlsSate
(
param
[
"_control_name_"
],
'enable'
,
true
)
return
}
let
stringOne
=
data
.
message
.
split
(
':'
)[
1
];
let
stringResult
=
stringOne
.
split
(
';'
)[
0
]
let
msg
=
stringResult
.
split
(
'@'
);
...
...
develop/@gms/gms-plugin-billexpand/src/actions/util/index.js
View file @
50506d7d
...
...
@@ -194,3 +194,22 @@ export const verifyBill = (bill) => {
}
return
true
}
export
const
getErrorMessage
=
(
data
)
=>
{
const
errMsg
=
data
.
message
.
split
(
'nested exception is'
)
if
(
errMsg
[
1
])
return
errMsg
[
1
]
const
{
content
=
{}
}
=
data
if
(
content
){
const
{
validationResults
=
[]
}
=
content
if
(
validationResults
.
length
)
{
const
currentResult
=
validationResults
[
0
]
const
{
validations
=
[]
}
=
currentResult
if
(
validations
.
length
)
{
return
validations
[
0
].
message
}
}
}
if
(
errMsg
.
length
==
1
&&
errMsg
[
0
].
length
>
0
){
//处理普通信息提示格式
return
errMsg
[
0
]
}
return
'操作异常请联系管理员'
};
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