diff --git a/src/views/gh/improvementProposal/components/ImprovementProposalBPMForm.vue b/src/views/gh/improvementProposal/components/ImprovementProposalBPMForm.vue
index d52df23..6aaae70 100644
--- a/src/views/gh/improvementProposal/components/ImprovementProposalBPMForm.vue
+++ b/src/views/gh/improvementProposal/components/ImprovementProposalBPMForm.vue
@@ -88,8 +88,8 @@
- 投票通过
- 投票反对
+ 投票通过
+ 投票反对
{{ voteResultLabel(currentVote) }}
当前用户不在所级评议投票名单中。
@@ -109,7 +109,9 @@
+
Number(item.value) >= Number(leaderAwardBase.value));
});
const currentVote = computed(() => voteRows.value.find((item) => String(item.voterId) === currentUserId.value));
- const voteLocked = computed(() => currentVote.value?.voteStatus === 'voted');
watch(
() => [processInfo.value.mainId, processInfo.value.processInstanceId, processInfo.value.taskId, processInfo.value.taskDefKey],
@@ -351,13 +351,6 @@
}
await saveInstituteVoteMembers(actionPayload({ voterIds: selectedInstituteVoterIds.value }));
}
- if (isTask('Task_improve005')) {
- if (!currentVote.value?.voteResult) {
- createMessage.warning('请先选择投票通过或投票反对');
- return false;
- }
- await submitInstituteVote(actionPayload());
- }
if (isTask('Task_improve006')) {
if (!finalAward.value) {
createMessage.warning('请选择最终奖项');
@@ -372,14 +365,27 @@
}
}
- async function saveVoteDraft(voteResult: string) {
+ function confirmInstituteVote(voteResult: 'agree' | 'disagree') {
+ const voteLabel = voteResult === 'agree' ? '通过' : '反对';
+ createConfirm({
+ iconType: 'warning',
+ title: '确认投票',
+ content: `确认提交投票${voteLabel}吗?`,
+ okText: '确认提交',
+ cancelText: '取消',
+ onOk: () => submitInstituteVoteAndComplete(voteResult),
+ });
+ }
+
+ async function submitInstituteVoteAndComplete(voteResult: 'agree' | 'disagree') {
savingVote.value = true;
try {
- await castInstituteVote(actionPayload({ voteResult }));
- createMessage.success('投票已保存,提交办理前可修改');
- await loadProposal();
+ // 后端在锁定投票后复用通用流程办理服务完成当前 Task5 任务。
+ await submitInstituteVote(actionPayload({ voteResult }));
+ createMessage.success('投票提交成功');
+ emit('success');
} catch (error: any) {
- createMessage.warning(error?.message || '投票失败');
+ createMessage.warning(error?.message || '投票提交失败');
} finally {
savingVote.value = false;
}
@@ -444,8 +450,6 @@
function voteResultLabel(vote: Recordable) {
if (vote.voteStatus !== 'voted') {
- if (vote.voteResult === 'agree') return '已选择投票通过,待提交办理';
- if (vote.voteResult === 'disagree') return '已选择投票反对,待提交办理';
return '待投票';
}
return vote.voteResult === 'agree' ? '已投同意票' : '已投不同意票';