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
77c59273
Commit
77c59273
authored
Mar 09, 2022
by
袁成
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:同意驳回增加保存
parent
519f5017
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
154 additions
and
75 deletions
+154
-75
agreeAction.js
...lop/@gms/gms-plugin-billexpand/src/actions/agreeAction.js
+95
-54
rejectAction.js
...op/@gms/gms-plugin-billexpand/src/actions/rejectAction.js
+55
-19
bill-form-runner.vue
develop/@rbc/runner-bill-form/src/views/bill-form-runner.vue
+4
-2
No files found.
develop/@gms/gms-plugin-billexpand/src/actions/agreeAction.js
View file @
77c59273
import
Bridge
from
'../components-control/util/bridge'
import
Bridge
from
'../components-control/util/bridge'
import
SelectApprovers
from
'../components-control/select-approvers.vue'
import
SelectApprovers
from
'../components-control/select-approvers.vue'
import
{
compareData
}
from
"../components-control/util/dataChange"
export
default
{
export
default
{
execute
:
function
(
bill
,
param
)
{
execute
:
function
(
bill
,
param
)
{
if
(
bill
)
{
if
(
bill
)
{
...
@@ -7,67 +8,107 @@ export default {
...
@@ -7,67 +8,107 @@ export default {
GMS
.
$hideContainer
.
$Message
.
error
(
'请配置审批轨迹'
)
GMS
.
$hideContainer
.
$Message
.
error
(
'请配置审批轨迹'
)
return
return
}
}
let
taskId
=
bill
.
getGlobalParam
(
'reviewParam'
).
taskId
;
if
(
compareData
(
GMS
.
oldBillData
,
bill
.
getBuillData
()))
{
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"enable"
,
false
)
this
.
approvalLogical
(
bill
,
param
,
this
)
let
selectedApprovers
=
[]
}
else
{
window
.
GMS
.
$http
.
get
(
`/bpm/bill/selectApprover/ApproverList/
${
taskId
}
`
).
then
((
res
)
=>
{
GMS
.
billDataChangeChecked
=
true
if
(
res
.
data
.
code
==
204
)
{
this
.
executeApproval
(
bill
,
param
)
return
}
else
if
(
res
.
data
.
code
!=
200
)
{
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"enable"
,
true
)
GMS
.
$hideContainer
.
$Message
.
error
(
res
.
data
.
msg
||
'提交失败,请联系系统管理员'
);
return
}
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"enable"
,
true
)
const
nodeData
=
res
.
data
.
ApproverVo
const
optionList
=
[...
nodeData
.
approvers
]
if
(
optionList
.
length
==
0
)
{
GMS
.
$hideContainer
.
$Message
.
error
(
'未找到下一节点的审批人'
)
return
}
GMS
.
$hideContainer
.
$Modal
.
confirm
({
GMS
.
$hideContainer
.
$Modal
.
confirm
({
width
:
700
,
title
:
"信息提示"
,
render
:
(
h
)
=>
{
content
:
"信息发生变化, 是否保存"
,
return
h
(
SelectApprovers
,
{
props
:
{
optionList
,
},
on
:
{
'on-change'
:
(
val
)
=>
{
selectedApprovers
=
val
}
}
}
)
},
onOk
:
()
=>
{
onOk
:
()
=>
{
window
.
GMS
.
$http
.
post
(
this
.
saveLogical
(
bill
,
param
,
{
data
:
bill
.
getBuillData
(),
detailData
:
[]},
this
)
'/bpm/bill/selectApprover/addApprovers'
,
{
...
nodeData
,
approvers
:
selectedApprovers
,
}
).
then
(()
=>
{
this
.
executeApproval
(
bill
,
param
)
}).
catch
(()
=>
{
GMS
.
$hideContainer
.
$Message
.
error
(
'选择审批人发生错误'
)
})
},
},
onCancel
:
()
=>
{
onCancel
:
()
=>
{
this
.
approvalLogical
(
bill
,
param
,
this
)
}
}
});
})
}).
catch
(()
=>
{
}
GMS
.
$hideContainer
.
$Message
.
error
(
'未找到下一节点的审批人'
);
})
}
else
{
}
else
{
GMS
.
$hideContainer
.
$Message
.
error
(
'缺少参数'
);
GMS
.
$hideContainer
.
$Message
.
error
(
'缺少参数'
);
}
}
},
},
executeApproval
:
function
(
bill
,
param
)
{
saveLogical
:
(
bill
,
param
,
postData
,
_this
)
=>
{
let
url
=
`/rbc/bill/action/executed/
${
param
.
define
}
/bill.Basic.save?transmission=total`
GMS
.
$http
.
post
(
url
,
JSON
.
stringify
(
postData
),
{
headers
:
{
post
:
{
"Content-Type"
:
"application/json"
,
},
},
})
.
then
((
response
)
=>
{
if
(
response
.
data
.
code
==
0
)
{
_this
.
approvalLogical
(
bill
,
param
,
_this
)
}
else
{
response
.
data
.
message
&&
GMS
.
vbus
.
$Message
.
error
({
content
:
response
.
data
.
message
,
duration
:
3
});
}
})
},
approvalLogical
:
(
bill
,
param
,
_this
)
=>
{
let
taskId
=
bill
.
getGlobalParam
(
'reviewParam'
).
taskId
;
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"enable"
,
false
)
let
selectedApprovers
=
[]
window
.
GMS
.
$http
.
get
(
`/bpm/bill/selectApprover/ApproverList/
${
taskId
}
`
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
204
)
{
_this
.
executeApproval
(
bill
,
param
,
_this
)
return
}
else
if
(
res
.
data
.
code
!=
200
)
{
delete
GMS
.
billDataChangeChecke
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"enable"
,
true
)
GMS
.
$hideContainer
.
$Message
.
error
(
res
.
data
.
msg
||
'提交失败,请联系系统管理员'
);
return
}
delete
GMS
.
billDataChangeChecke
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"enable"
,
true
)
const
nodeData
=
res
.
data
.
ApproverVo
const
optionList
=
[...
nodeData
.
approvers
]
if
(
optionList
.
length
==
0
)
{
GMS
.
$hideContainer
.
$Message
.
error
(
'未找到下一节点的审批人'
)
return
}
GMS
.
$hideContainer
.
$Modal
.
confirm
({
width
:
700
,
render
:
(
h
)
=>
{
return
h
(
SelectApprovers
,
{
props
:
{
optionList
,
},
on
:
{
'on-change'
:
(
val
)
=>
{
selectedApprovers
=
val
}
}
}
)
},
onOk
:
()
=>
{
window
.
GMS
.
$http
.
post
(
'/bpm/bill/selectApprover/addApprovers'
,
{
...
nodeData
,
approvers
:
selectedApprovers
,
}
).
then
(()
=>
{
_this
.
executeApproval
(
bill
,
param
)
}).
catch
(()
=>
{
GMS
.
$hideContainer
.
$Message
.
error
(
'选择审批人发生错误'
)
})
},
onCancel
:
()
=>
{
}
});
}).
catch
(()
=>
{
GMS
.
$hideContainer
.
$Message
.
error
(
'未找到下一节点的审批人'
);
})
},
executeApproval
:
function
(
bill
,
param
,
_this
)
{
if
(
param
.
param
.
actions
)
{
if
(
param
.
param
.
actions
)
{
let
saveParam
=
{
let
saveParam
=
{
actions
:
param
.
param
.
actions
,
actions
:
param
.
param
.
actions
,
...
@@ -80,7 +121,7 @@ export default {
...
@@ -80,7 +121,7 @@ export default {
}
}
bill
.
executeServerAction
(
saveParam
,
function
(
code
,
data
)
{
bill
.
executeServerAction
(
saveParam
,
function
(
code
,
data
)
{
if
(
code
===
200
)
{
if
(
code
===
200
)
{
this
.
approval
(
bill
,
param
);
_
this
.
approval
(
bill
,
param
);
// bill.setControlsSate(param["_control_name_"], "loading", false)
// bill.setControlsSate(param["_control_name_"], "loading", false)
}
else
{
}
else
{
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"enable"
,
true
)
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"enable"
,
true
)
...
@@ -89,7 +130,7 @@ export default {
...
@@ -89,7 +130,7 @@ export default {
}
}
}.
bind
(
this
));
}.
bind
(
this
));
}
else
{
}
else
{
this
.
approval
(
bill
,
param
);
_
this
.
approval
(
bill
,
param
);
}
}
},
},
approval
:
function
(
bill
,
param
)
{
approval
:
function
(
bill
,
param
)
{
...
...
develop/@gms/gms-plugin-billexpand/src/actions/rejectAction.js
View file @
77c59273
import
Bridge
from
'../components-control/util/bridge'
import
Bridge
from
'../components-control/util/bridge'
import
{
compareData
}
from
"../components-control/util/dataChange"
export
default
{
export
default
{
execute
:
function
(
bill
,
param
)
{
execute
:
function
(
bill
,
param
)
{
if
(
bill
){
if
(
bill
){
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"enable"
,
false
)
if
(
compareData
(
GMS
.
oldBillData
,
bill
.
getBuillData
()))
{
if
(
param
.
param
.
actions
){
this
.
approvalLogical
(
bill
,
param
,
this
)
let
saveParam
=
{
}
else
{
actions
:
param
.
param
.
actions
,
GMS
.
billDataChangeChecked
=
true
}
GMS
.
$hideContainer
.
$Modal
.
confirm
({
bill
.
executeServerAction
(
saveParam
,
function
(
code
,
data
){
title
:
"信息提示"
,
if
(
code
===
200
){
content
:
"信息发生变化, 是否保存"
,
this
.
approval
(
bill
,
param
);
onOk
:
()
=>
{
// bill.setControlsSate(param["_control_name_"],"loading",false)
this
.
saveLogical
(
bill
,
param
,
{
data
:
bill
.
getBuillData
(),
detailData
:
[]},
this
)
}
else
{
},
// bill.setControlsSate(param["_control_name_"],"loading",false)
onCancel
:
()
=>
{
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"enable"
,
true
)
this
.
approvalLogical
(
bill
,
param
,
this
)
GMS
.
$hideContainer
.
$message
.
error
(
"操作异常请联系管理员"
);
}
}
})
}.
bind
(
this
));
}
}
else
{
this
.
approval
(
bill
,
param
);
}
}
else
{
}
else
{
GMS
.
$hideContainer
.
$Message
.
error
(
'缺少参数'
);
GMS
.
$hideContainer
.
$Message
.
error
(
'缺少参数'
);
}
}
},
},
approvalLogical
:
(
bill
,
param
,
_this
)
=>
{
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"enable"
,
false
)
if
(
param
.
param
.
actions
){
let
saveParam
=
{
actions
:
param
.
param
.
actions
,
}
bill
.
executeServerAction
(
saveParam
,
function
(
code
,
data
){
if
(
code
===
200
){
_this
.
approval
(
bill
,
param
);
}
else
{
delete
GMS
.
billDataChangeChecke
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"enable"
,
true
)
GMS
.
$hideContainer
.
$message
.
error
(
"操作异常请联系管理员"
);
}
}.
bind
(
this
));
}
else
{
_this
.
approval
(
bill
,
param
);
}
},
saveLogical
:
(
bill
,
param
,
postData
,
_this
)
=>
{
let
url
=
`/rbc/bill/action/executed/
${
param
.
define
}
/bill.Basic.save?transmission=total`
GMS
.
$http
.
post
(
url
,
JSON
.
stringify
(
postData
),
{
headers
:
{
post
:
{
"Content-Type"
:
"application/json"
,
},
},
})
.
then
((
response
)
=>
{
if
(
response
.
data
.
code
==
0
)
{
_this
.
approvalLogical
(
bill
,
param
,
_this
)
}
else
{
response
.
data
.
message
&&
GMS
.
vbus
.
$Message
.
error
({
content
:
response
.
data
.
message
,
duration
:
3
});
}
})
},
approval
:
function
(
bill
,
param
){
approval
:
function
(
bill
,
param
){
if
(
!
bill
.
getGlobalParam
(
'reviewParam'
)
||
!
bill
.
getGlobalParam
(
'reviewParam'
).
taskId
)
{
if
(
!
bill
.
getGlobalParam
(
'reviewParam'
)
||
!
bill
.
getGlobalParam
(
'reviewParam'
).
taskId
)
{
GMS
.
$hideContainer
.
$Message
.
error
(
'请配置审批轨迹'
)
GMS
.
$hideContainer
.
$Message
.
error
(
'请配置审批轨迹'
)
...
@@ -34,7 +71,6 @@ export default {
...
@@ -34,7 +71,6 @@ export default {
GMS
.
$http
.
post
(
'/gms/workflow/task/completed/'
+
taskId
+
'?result=3&comments='
+
comments
).
then
(
GMS
.
$http
.
post
(
'/gms/workflow/task/completed/'
+
taskId
+
'?result=3&comments='
+
comments
).
then
(
function
(
response
)
{
function
(
response
)
{
if
(
response
.
status
==
200
||
response
.
statusText
==
'OK'
)
{
if
(
response
.
status
==
200
||
response
.
statusText
==
'OK'
)
{
// console.log('驳回成功');
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"enable"
,
true
)
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"enable"
,
true
)
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"loading"
,
false
)
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"loading"
,
false
)
GMS
.
$hideContainer
.
$Message
.
success
(
'驳回成功!'
)
GMS
.
$hideContainer
.
$Message
.
success
(
'驳回成功!'
)
...
...
develop/@rbc/runner-bill-form/src/views/bill-form-runner.vue
View file @
77c59273
...
@@ -78,8 +78,10 @@ export default {
...
@@ -78,8 +78,10 @@ export default {
return
return
}
}
const
tem
=
this
.
curBill
&&
this
.
curBill
.
getBuillData
()
||
{}
const
tem
=
this
.
curBill
&&
this
.
curBill
.
getBuillData
()
||
{}
if
(
compareData
(
GMS
.
oldBillDataMap
[
this
.
curTagId
],
tem
)
||
this
.
state
==
'readOnly'
)
cb
(
true
)
if
(
compareData
(
GMS
.
oldBillDataMap
[
this
.
curTagId
],
tem
)
||
this
.
state
==
'readOnly'
||
GMS
.
billDataChangeChecked
)
{
else
{
delete
GMS
.
billDataChangeChecke
cb
(
true
)
}
else
{
this
.
$Modal
.
confirm
({
this
.
$Modal
.
confirm
({
title
:
"信息提示"
,
title
:
"信息提示"
,
content
:
"信息发生变化,确认关闭?"
,
content
:
"信息发生变化,确认关闭?"
,
...
...
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