From 74ae64310bc24472c7213ba0c6e42097aa119290 Mon Sep 17 00:00:00 2001 From: weizong song Date: Thu, 30 Jul 2026 11:22:48 +0800 Subject: [PATCH] feat: improve department submission list interactions --- .../collection/departmentSubmission.vue | 200 +++++++++++++++--- 1 file changed, 165 insertions(+), 35 deletions(-) diff --git a/src/views/budget/collection/departmentSubmission.vue b/src/views/budget/collection/departmentSubmission.vue index f05cfa6..01e7415 100644 --- a/src/views/budget/collection/departmentSubmission.vue +++ b/src/views/budget/collection/departmentSubmission.vue @@ -94,10 +94,12 @@
- 退回意见:{{ scope.row.submission.approval_notes }} + 退回意见:{{ scope.row.submission.approval_notes }} + + 查看完整 +
@@ -108,36 +110,44 @@ - + @@ -162,6 +172,37 @@ /> + +
+ + {{ currentHistoryPackage.parent_name || '-' }} + {{ currentHistoryPackage.department ? currentHistoryPackage.department.name : '-' }} + {{ getStatusText(currentHistoryPackage.submission_status) }} + {{ currentHistoryPackage.submission_date ? formatDate(currentHistoryPackage.submission_date) : '-' }} + + + +
+
{{ getHistoryActionText(history) }}
+
{{ history.operator ? history.operator.name : '-' }} · {{ getHistoryStatusFlow(history) }}
+
{{ history.notes }}
+
+
+
+ +
+
+ @@ -195,6 +236,8 @@ export default { yearOptions: [], submissionDialogVisible: false, currentPackage: null, + currentHistoryPackage: null, + historyDialogVisible: false, submissionMode: 'create' // create, edit, view } }, @@ -297,6 +340,11 @@ export default { await this.openSubmissionDialog(packageItem, 'view') }, + openReviewHistory(packageItem) { + this.currentHistoryPackage = packageItem + this.historyDialogVisible = true + }, + async openSubmissionDialog(packageItem, mode) { try { const packageDetail = await getPackageDecomposition(packageItem.id) @@ -380,21 +428,61 @@ export default { rejected: '已拒绝' } return textMap[status] || '未知' + }, + + showApprovalNotes(notes) { + this.$alert(notes || '无退回意见', '完整退回意见', { + confirmButtonText: '关闭' + }) + }, + + reviewHistories(packageItem) { + const histories = packageItem && packageItem.submission && packageItem.submission.review_histories + ? packageItem.submission.review_histories + : [] + return histories.slice().sort((a, b) => new Date(b.operated_at || 0).getTime() - new Date(a.operated_at || 0).getTime()) + }, + + getHistoryActionText(history) { + const actionMap = { + submit: '提交审核', + resubmit: '重新提交', + approve: '审核通过', + return: '退回修改' + } + return actionMap[history.action] || history.action || '未知操作' + }, + + getHistoryStatusFlow(history) { + return `${this.getStatusText(history.from_status)} -> ${this.getStatusText(history.to_status)}` } } }