From 9cab80eeb8474e9ff5fc56b4c8f853745a1c804f Mon Sep 17 00:00:00 2001 From: xuhuajiao <13476289682@163.com> Date: Wed, 16 Sep 2026 16:59:46 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E5=BD=92=E6=A1=A3=E5=90=88=E5=B9=B6?= =?UTF-8?q?=E6=88=90=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../prearchiveLibrary/prearchiveLibrary.js | 19 +- src/views/components/category/PreviewForm.vue | 80 +++++-- src/views/prearchiveLibrary/index.vue | 4 +- src/views/prearchiveLibrary/module/detail.vue | 12 +- .../module/mergeIntoDocument.vue | 211 ++++++++++++++++++ .../module/businessDetails/index.vue | 67 +++--- src/views/system/user/processCenter/index.vue | 12 + .../system/user/processCenter/module/form.vue | 45 +++- 8 files changed, 394 insertions(+), 56 deletions(-) create mode 100644 src/views/prearchiveLibrary/module/mergeIntoDocument.vue diff --git a/src/api/prearchiveLibrary/prearchiveLibrary.js b/src/api/prearchiveLibrary/prearchiveLibrary.js index 8492621..c247f73 100644 --- a/src/api/prearchiveLibrary/prearchiveLibrary.js +++ b/src/api/prearchiveLibrary/prearchiveLibrary.js @@ -133,4 +133,21 @@ export function FetchDeleteDocumentFile(data) { }) } -export default { add, prearchEdit, del, FetchInitPreDocument, FetchInitDocumentsViewTable, FetchDoeditDocument, FetchBatchToFile, FetchMergeToFile, FetchMove, FetchArchivesDetails, FetchFileListByDocumentId, FetchArchivesMetadata, FetchReDocumentBase64ByFileId, FetchMinioReDocumentBase64ByFileId, FetchDeleteDocumentFile } +// 预归档 +export function FetchReIntoFlowBusiness(data) { + return request({ + url: 'api/re-document/intoFlowBusiness', + method: 'post', + data + }) +} +// 合并成件流程确认 +export function FetchMergeToFileConfirm(data) { + return request({ + url: 'api/re-document/mergeToFileConfirm', + method: 'post', + data + }) +} + +export default { add, prearchEdit, del, FetchInitPreDocument, FetchInitDocumentsViewTable, FetchDoeditDocument, FetchBatchToFile, FetchMergeToFile, FetchMove, FetchArchivesDetails, FetchFileListByDocumentId, FetchArchivesMetadata, FetchReDocumentBase64ByFileId, FetchMinioReDocumentBase64ByFileId, FetchDeleteDocumentFile, FetchReIntoFlowBusiness, FetchMergeToFileConfirm } diff --git a/src/views/components/category/PreviewForm.vue b/src/views/components/category/PreviewForm.vue index 7217f97..536de4d 100644 --- a/src/views/components/category/PreviewForm.vue +++ b/src/views/components/category/PreviewForm.vue @@ -200,6 +200,14 @@ + @@ -207,6 +215,7 @@ import { crud } from '@crud/crud' import { collectAdd, collectEdit, FetchIsRepeatByArchivesNo, FetchIsRepeatAllByArchivesNo, FetchMaxItemNoByArchivesNo, FetchIsRepeatByField } from '@/api/collect/collect' import { prearchEdit, FetchMergeToFile, FetchReDoeditIsRepeat } from '@/api/prearchiveLibrary/prearchiveLibrary' +import { FetchReDocumentInitFlowByCategoryId } from '@/api/system/category/process' import { getNoFormatField } from '@/api/system/category/fileNoFormat' import draggable from 'vuedraggable' import Treeselect from '@riophae/vue-treeselect' @@ -218,12 +227,13 @@ import { FetchArchivesClassTree, FetchSonArchivesClass } from '@/api/system/arch // import { getCurrentTime } from '@/utils/index' // import { reDocumentUpload } from '@/utils/upload' import PreUpload from './preUpload' +import MergeIntoDocument from '@/views/prearchiveLibrary/module/mergeIntoDocument.vue' import { mapGetters } from 'vuex' import Vue from 'vue' export default { name: 'PreviewForm', - components: { draggable, Treeselect, PreUpload }, + components: { draggable, Treeselect, PreUpload, MergeIntoDocument }, mixins: [crud()], inject: ['parentsData'], props: { @@ -317,6 +327,9 @@ export default { fileJsonString: null, mergeFileArcIds: null, mergeFileCategory: null, + mergeFileRows: [], // 合并成件选中的档案行 + mergeFileFields: [], // 合并成件列表列配置 + mergeFlowParams: {}, // 合并成件流程附加参数 archivesType: null, activeIndex: null, entityIndex: null, @@ -831,6 +844,11 @@ export default { return string }, + // 合并成件审批流程提交成功回调 + handleMergeFlowSuccess() { + this.$emit('close-dialog') + this.crud.refresh() + }, // 根据档号查询最大件号并赋值 async fetchAndSetMaxItemNo(archivesNo) { try { @@ -1825,25 +1843,51 @@ export default { this.$emit('formLoadingShow', false, arcAddType) }) } else if (this.isDesFormType === 'mergeFile') { - // 合并成件 - const params = { - 'fondsAffiliation': this.selectedCategory.fondsId, - 'archivesId': null, - 'archivesIds': this.mergeFileArcIds, - 'documentId': categoryId, - 'categoryId': this.mergeFileCategory, - 'archivesNo': this.addOrUpdateForm.archive_no, - 'jsonString': JSON.stringify(this.addOrUpdateForm) - } - console.log('params', params) - FetchMergeToFile(params).then(res => { - if (res.code !== 500) { - this.$message({ message: res, type: 'success', offset: 8 }) + // 合并成件 + + FetchReDocumentInitFlowByCategoryId({ 'documentId': null }).then((res) => { + const flowItem = res && res.length > 0 ? res[0] : null + if (flowItem && flowItem.status === 1) { + // 审批流程开启,打开合并成件审批弹窗,参数交由弹窗内提交 + const mergeParams = { + 'sourceDocumentId': categoryId, // 来源预归档门类 + 'purposeCategoryId': this.mergeFileCategory, // 目的门类 + 'archivalCategoryCode': this.selectedCategory.code, // 目的门类code + 'archivesIds': this.mergeFileArcIds, // 预归档档案id集合 + 'estimatedArchiveNo': this.addOrUpdateForm.archive_no, // 预计档号 + 'dataJson': JSON.stringify(this.addOrUpdateForm) // 保存json 流程通过添加到档案 + } + console.log('mergeParams', mergeParams) + this.mergeFlowParams = mergeParams + this.$emit('formLoadingShow', false, arcAddType) + this.$nextTick(() => { + this.$refs.mergeIntoDocument.archivesFillingVisible = true + }) } else { - this.$message({ message: res.message, type: 'error', offset: 8 }) + // 审批流程未开启,直接合并 + const params = { + 'fondsAffiliation': this.selectedCategory.fondsId, + 'archivesId': null, + 'archivesIds': this.mergeFileArcIds, + 'documentId': categoryId, + 'categoryId': this.mergeFileCategory, + 'archivesNo': this.addOrUpdateForm.archive_no, + 'jsonString': JSON.stringify(this.addOrUpdateForm) + } + console.log('params', params) + FetchMergeToFile(params).then(res => { + if (res.code !== 500) { + this.$message({ message: res, type: 'success', offset: 8 }) + } else { + this.$message({ message: res.message, type: 'error', offset: 8 }) + } + this.$emit('close-dialog') + this.crud.refresh() + this.$emit('formLoadingShow', false, arcAddType) + }) } - this.$emit('close-dialog') - this.crud.refresh() + }).catch(err => { + console.log(err) this.$emit('formLoadingShow', false, arcAddType) }) } else { diff --git a/src/views/prearchiveLibrary/index.vue b/src/views/prearchiveLibrary/index.vue index 21de5c7..9d0e32d 100644 --- a/src/views/prearchiveLibrary/index.vue +++ b/src/views/prearchiveLibrary/index.vue @@ -435,7 +435,7 @@ export default { this.selectedCategory.fondsId = this.selectedDocument.fondsId this.selectedCategory.fondsNo = this.selectedDocument.fondsNo this.selectedCategory.fondName = this.selectedDocument.fondsName - console.log('this.selectedCategory', this.selectedCategory) + console.log('this.selectedCategory合并成件', this.selectedCategory) // let categoryLevel // if (this.selectedCategoryMerge.arrangeType === 1) { // categoryLevel = 3 @@ -469,6 +469,8 @@ export default { this.$refs.previewForm.archivesType = 'add' this.$refs.previewForm.mergeFileArcIds = this.crud.selections.map(item => item.id) this.$refs.previewForm.mergeFileCategory = this.selectedCategoryMerge.id + this.$refs.previewForm.mergeFileRows = this.crud.selections + this.$refs.previewForm.mergeFileFields = this.tableDisplayFields }) }) }) diff --git a/src/views/prearchiveLibrary/module/detail.vue b/src/views/prearchiveLibrary/module/detail.vue index 140333b..9aaafb8 100644 --- a/src/views/prearchiveLibrary/module/detail.vue +++ b/src/views/prearchiveLibrary/module/detail.vue @@ -82,7 +82,6 @@ + + diff --git a/src/views/system/processManage/runningProcess/module/businessDetails/index.vue b/src/views/system/processManage/runningProcess/module/businessDetails/index.vue index 92450ed..79c2069 100644 --- a/src/views/system/processManage/runningProcess/module/businessDetails/index.vue +++ b/src/views/system/processManage/runningProcess/module/businessDetails/index.vue @@ -3,14 +3,16 @@ - - + + + - + +