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
f26f1564
Commit
f26f1564
authored
Mar 15, 2022
by
袁成
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 同意驳回增加登陆人与审批人校验
parent
df951d37
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
agreeAction.js
...lop/@gms/gms-plugin-billexpand/src/actions/agreeAction.js
+11
-0
rejectAction.js
...op/@gms/gms-plugin-billexpand/src/actions/rejectAction.js
+11
-0
No files found.
develop/@gms/gms-plugin-billexpand/src/actions/agreeAction.js
View file @
f26f1564
...
@@ -8,6 +8,10 @@ export default {
...
@@ -8,6 +8,10 @@ export default {
GMS
.
$hideContainer
.
$Message
.
error
(
'请配置审批轨迹'
)
GMS
.
$hideContainer
.
$Message
.
error
(
'请配置审批轨迹'
)
return
return
}
}
if
(
!
this
.
isApproverEqulloginer
(
bill
,
param
))
{
GMS
.
$hideContainer
.
$Message
.
error
(
'当前用户不是当前审批人'
)
return
}
let
curTagId
=
window
.
nros
.
context
.
getCurrTag
();
let
curTagId
=
window
.
nros
.
context
.
getCurrTag
();
let
oldObj
=
curTagId
&&
GMS
.
oldBillDataMap
[
curTagId
]?
GMS
.
oldBillDataMap
[
curTagId
]:
GMS
.
oldBillData
;
let
oldObj
=
curTagId
&&
GMS
.
oldBillDataMap
[
curTagId
]?
GMS
.
oldBillDataMap
[
curTagId
]:
GMS
.
oldBillData
;
let
flag
=
compareData
(
oldObj
,
bill
.
getBuillData
())
||
bill
.
getGlobalParam
(
"noRunTimeFormula"
);
let
flag
=
compareData
(
oldObj
,
bill
.
getBuillData
())
||
bill
.
getGlobalParam
(
"noRunTimeFormula"
);
...
@@ -186,5 +190,11 @@ export default {
...
@@ -186,5 +190,11 @@ export default {
GMS
.
$hideContainer
.
$Message
.
error
(
'error'
)
GMS
.
$hideContainer
.
$Message
.
error
(
'error'
)
}.
bind
(
this
)
}.
bind
(
this
)
);
);
},
isApproverEqulloginer
:
async
function
(
bill
,
param
)
{
const
loginer
=
GMS
.
userContext
&&
GMS
.
userContext
.
id
const
res
=
await
GMS
.
$http
.
get
(
`/rbc/workflow/confirmApprover/getUserId/
${
bill
.
getGlobalParam
(
'reviewParam'
).
taskId
}
`
)
const
approver
=
res
.
data
.
ownerIds
[
0
]
return
loginer
===
approver
}
}
}
}
\ No newline at end of file
develop/@gms/gms-plugin-billexpand/src/actions/rejectAction.js
View file @
f26f1564
...
@@ -3,6 +3,10 @@ import { compareData } from "../components-control/util/dataChange"
...
@@ -3,6 +3,10 @@ import { compareData } from "../components-control/util/dataChange"
export
default
{
export
default
{
execute
:
function
(
bill
,
param
)
{
execute
:
function
(
bill
,
param
)
{
if
(
bill
){
if
(
bill
){
if
(
!
this
.
isApproverEqulloginer
(
bill
,
param
))
{
GMS
.
$hideContainer
.
$Message
.
error
(
'当前用户不是当前审批人'
)
return
}
let
curTagId
=
window
.
nros
.
context
.
getCurrTag
();
let
curTagId
=
window
.
nros
.
context
.
getCurrTag
();
let
oldObj
=
curTagId
&&
GMS
.
oldBillDataMap
[
curTagId
]?
GMS
.
oldBillDataMap
[
curTagId
]:
GMS
.
oldBillData
;
let
oldObj
=
curTagId
&&
GMS
.
oldBillDataMap
[
curTagId
]?
GMS
.
oldBillDataMap
[
curTagId
]:
GMS
.
oldBillData
;
let
flag
=
compareData
(
oldObj
,
bill
.
getBuillData
())
||
bill
.
getGlobalParam
(
"noRunTimeFormula"
);
let
flag
=
compareData
(
oldObj
,
bill
.
getBuillData
())
||
bill
.
getGlobalParam
(
"noRunTimeFormula"
);
...
@@ -99,5 +103,11 @@ export default {
...
@@ -99,5 +103,11 @@ export default {
GMS
.
$hideContainer
.
$Message
.
error
(
error
)
GMS
.
$hideContainer
.
$Message
.
error
(
error
)
}.
bind
(
this
)
}.
bind
(
this
)
);
);
},
isApproverEqulloginer
:
async
function
(
bill
,
param
)
{
const
loginer
=
GMS
.
userContext
&&
GMS
.
userContext
.
id
const
res
=
await
GMS
.
$http
.
get
(
`/rbc/workflow/confirmApprover/getUserId/
${
bill
.
getGlobalParam
(
'reviewParam'
).
taskId
}
`
)
const
approver
=
res
.
data
.
ownerIds
[
0
]
return
loginer
===
approver
}
}
}
}
\ No newline at end of file
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