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
058f4fe7
Commit
058f4fe7
authored
Jan 19, 2022
by
Joey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(@gms/gms-plugin-billexpand): 支持驳回的单据重新保存
parent
c4254cf2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
2 deletions
+27
-2
saveAction.js
develop/@gms/gms-plugin-billexpand/src/actions/saveAction.js
+27
-2
No files found.
develop/@gms/gms-plugin-billexpand/src/actions/saveAction.js
View file @
058f4fe7
import
{
getUUID
}
from
"../query-actions/util/lib"
;
export
default
{
execute
:
function
(
bill
,
param
)
{
if
(
bill
)
{
const
masterData
=
bill
.
getMasterData
()
// 驳回状态
// 此时保存创建一张新单据
if
(
masterData
.
getValue
(
'billState'
)
==
91
)
{
;[
'billCode'
,
'billState'
,
'flowFinishTime'
,
'flowProcessId'
,
'flowState'
,
'flowSubmitTime'
,
'orgCode'
,
'createTime'
,
'modifyTime'
,
].
forEach
((
key
)
=>
{
if
(
masterData
.
getValue
(
key
))
masterData
.
setValue
(
key
,
''
)
bill
.
billdata
.
masterFiled
[
key
]
=
''
})
masterData
.
setValue
(
'orgId'
,
'00000000-0000-0000-000000000000'
)
masterData
.
setValue
(
'recver'
,
0
)
masterData
.
setValue
(
'id'
,
getUUID
())
}
bill
.
runFormulaCheckData
(
param
,
function
(
msg
)
{
if
(
msg
.
length
==
0
)
{
let
postData
=
{
actions
:
"bill.Basic.save"
}
bill
.
setControlsSate
(
param
[
"_control_name_"
],
'enable'
,
false
)
bill
.
executeServerAction
(
postData
,
function
(
code
,
data
)
{
bill
.
setControlsSate
(
param
[
"_control_name_"
],
'enable'
,
true
)
if
(
code
===
200
)
{
const
id
=
data
.
content
.
billData
.
id
GMS
.
vbus
.
$emit
(
'change-form-state'
,
{
state
:
'readOnly'
,
billId
:
id
})
GMS
.
vbus
.
$emit
(
'change-form-state'
,
{
state
:
'readOnly'
,
billId
:
id
})
GMS
.
vbus
.
$Message
.
success
(
"保存成功"
);
}
else
if
(
code
===
201
)
{
GMS
.
vbus
.
$Message
.
error
(
data
.
message
);
...
...
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