Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
I
integrity_practice_management_new
Project
Project
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
David Yang
integrity_practice_management_new
Commits
174de5ea
Commit
174de5ea
authored
Sep 02, 2026
by
drigle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add editor submission withdrawal
parent
7b2ec68f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
2 deletions
+42
-2
manifest.json
public/manifest.json
+2
-2
index.jsx
src/pages/problem_rectification/form/index.jsx
+16
-0
problemRectificationFormService.js
.../problem_rectification/problemRectificationFormService.js
+24
-0
No files found.
public/manifest.json
View file @
174de5ea
{
{
"name"
:
"
problem_rectification
_new"
,
"name"
:
"
integrity_practice_management
_new"
,
"version"
:
"1.0.7"
,
"version"
:
"1.0.7"
,
"build"
:
"abc"
,
"build"
:
"abc"
,
"description"
:
"
merge master
"
,
"description"
:
"
廉洁从业管理
"
,
"date"
:
"2025-07-14 19:27:20"
,
"date"
:
"2025-07-14 19:27:20"
,
"author"
:
"yang"
"author"
:
"yang"
}
}
src/pages/problem_rectification/form/index.jsx
View file @
174de5ea
...
@@ -26,6 +26,7 @@ import {
...
@@ -26,6 +26,7 @@ import {
approveBySender
,
approveBySender
,
loadProblemRectificationFlow
,
loadProblemRectificationFlow
,
markEditorComplete
,
markEditorComplete
,
withdrawEditorSubmission
,
refreshRelatedProblemRecords
,
refreshRelatedProblemRecords
,
rejectByAuditor
,
rejectByAuditor
,
rejectBySender
,
rejectBySender
,
...
@@ -155,6 +156,7 @@ export default function ProblemRectificationFormPage() {
...
@@ -155,6 +156,7 @@ export default function ProblemRectificationFormPage() {
const
currentStep
=
flowData
?.
currentStep
||
'editor'
;
const
currentStep
=
flowData
?.
currentStep
||
'editor'
;
const
viewerRole
=
flowData
?.
viewerRole
||
'guest'
;
const
viewerRole
=
flowData
?.
viewerRole
||
'guest'
;
const
canEditRecords
=
Boolean
(
flowData
?.
canEditRecords
);
const
canEditRecords
=
Boolean
(
flowData
?.
canEditRecords
);
const
canWithdrawSubmission
=
viewerRole
===
'editor'
&&
currentStep
===
'auditor'
;
const
hasLockedRecords
=
relatedRecords
.
some
((
record
)
=>
record
.
isLocked
);
const
hasLockedRecords
=
relatedRecords
.
some
((
record
)
=>
record
.
isLocked
);
const
metadata
=
messageRecord
?.
metadata
||
{};
const
metadata
=
messageRecord
?.
metadata
||
{};
...
@@ -220,6 +222,15 @@ export default function ProblemRectificationFormPage() {
...
@@ -220,6 +222,15 @@ export default function ProblemRectificationFormPage() {
});
});
};
};
const
handleEditorWithdraw
=
async
()
=>
{
await
withSubmit
(
async
()
=>
{
await
withdrawEditorSubmission
({
messageRecord
,
currentUser
:
userInfo
,
});
});
};
const
handleAuditorApprove
=
async
()
=>
{
const
handleAuditorApprove
=
async
()
=>
{
await
withSubmit
(
async
()
=>
{
await
withSubmit
(
async
()
=>
{
await
approveByAuditor
({
await
approveByAuditor
({
...
@@ -424,6 +435,11 @@ export default function ProblemRectificationFormPage() {
...
@@ -424,6 +435,11 @@ export default function ProblemRectificationFormPage() {
页面根据当前步骤和你的身份自动开放可执行动作。
页面根据当前步骤和你的身份自动开放可执行动作。
</
div
>
</
div
>
<
div
className=
"mt-5 flex flex-wrap gap-3"
>
<
div
className=
"mt-5 flex flex-wrap gap-3"
>
{
canWithdrawSubmission
?
(
<
Button
color=
"zinc"
disabled=
{
submitting
}
onClick=
{
handleEditorWithdraw
}
>
{
submitting
?
'撤回中...'
:
'撤回提交'
}
</
Button
>
)
:
null
}
{
currentStep
===
'editor'
&&
viewerRole
===
'editor'
?
(
{
currentStep
===
'editor'
&&
viewerRole
===
'editor'
?
(
<
Button
color=
"blue"
disabled=
{
submitting
||
hasLockedRecords
||
relatedRecords
.
length
===
0
}
onClick=
{
handleEditorSubmit
}
>
<
Button
color=
"blue"
disabled=
{
submitting
||
hasLockedRecords
||
relatedRecords
.
length
===
0
}
onClick=
{
handleEditorSubmit
}
>
{
submitting
?
'送审中...'
:
'填写完成并送审'
}
{
submitting
?
'送审中...'
:
'填写完成并送审'
}
...
...
src/pages/problem_rectification/problemRectificationFormService.js
View file @
174de5ea
...
@@ -343,6 +343,30 @@ export async function markEditorComplete({
...
@@ -343,6 +343,30 @@ export async function markEditorComplete({
});
});
}
}
export
async
function
withdrawEditorSubmission
({
messageRecord
,
currentUser
})
{
const
messageName
=
messageRecord
?.
name
||
messageRecord
?.
_id
;
if
(
!
messageName
)
throw
new
Error
(
'流程主单不存在,无法撤回。'
);
const
latestRecord
=
await
loadRecord
(
messageName
);
const
metadata
=
latestRecord
?.
metadata
||
{};
const
currentUserId
=
toIdString
(
currentUser
?.
_id
);
if
(
!
normalizeUserIds
(
metadata
.
editor
).
includes
(
currentUserId
))
{
throw
new
Error
(
'仅填写人可以撤回提交。'
);
}
if
(
metadata
.
editor_status
!==
COMPLETED_STATUS
||
metadata
.
auditor_status
===
COMPLETED_STATUS
)
{
throw
new
Error
(
'当前流程不满足撤回条件,审核人可能已经处理。'
);
}
await
completeProgressTasks
(
metadata
.
progress_id_auditor
);
await
updateRecord
(
latestRecord
.
_id
||
latestRecord
.
name
,
{
metadata
:
{
editor_status
:
DEFAULT_STATUS
,
auditor_status
:
DEFAULT_STATUS
,
progress_id_auditor
:
[],
},
});
}
export
async
function
approveByAuditor
({
export
async
function
approveByAuditor
({
messageRecord
,
messageRecord
,
currentUser
,
currentUser
,
...
...
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