From ab2f626dfe851c46afcb3ec693d58d69039b0893 Mon Sep 17 00:00:00 2001 From: xuhuajiao <13476289682@163.com> Date: Wed, 27 May 2026 19:43:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B6=E9=9B=86=E5=BA=93=E8=BF=BD=E5=8A=A0?= =?UTF-8?q?=E6=9D=A1=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/collectHeader.vue | 66 +++++++++++++++++-- src/views/components/category/PreviewForm.vue | 6 +- 2 files changed, 65 insertions(+), 7 deletions(-) diff --git a/src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue b/src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue index c523aac..3a306b5 100644 --- a/src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue +++ b/src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue @@ -70,11 +70,12 @@ 编辑 删除 移出 + 追加条目 - 文件上传 + 文件上传 @@ -141,7 +142,7 @@ - +
@@ -167,7 +168,7 @@ /> 1) { + this.$message({ message: '追加复制操作只可勾选唯一目标条目,请先确认!', offset: 8 }) + return false + } + this.arcId = this.selections[0].id + this.formTitle = '追加复制' + this.collectTitle } // this.form.dictionaryConfigId = {} // this.formPreviewData = [] @@ -793,6 +805,52 @@ export default { }) }) }) + } else if (type === 'copy') { + const params = { + 'categoryId': this.selectedCategory.id, + 'categoryLevel': this.collectLevel, + 'id': this.arcId + } + FetchDetailsById(params).then(data => { + const showFiledAll = data.showFiled + this.$nextTick(() => { + this.formPreviewData = showFiledAll + this.isDesFormType = 'arcives' + this.$nextTick(() => { + this.$refs.previewForm.archivesType = 'add' + this.$refs.previewForm.addOrUpdateForm = data.echo + + if (data.echo.fonds_name === '' || data.echo.fonds_name === null) { + this.$set(this.$refs.previewForm.addOrUpdateForm, 'fonds_name', this.selectedCategory.fondName) + } + console.log('data.echo', data.echo) + const archivesNo = data.echo.archive_no + if (archivesNo) { + let categoryId + if (this.isDesFormType !== 'mergeFile' && this.isDesFormType !== 'arcives' && this.isDesFormType !== 'manageArcives') { + categoryId = this.selectedCategory.pid + } else { + categoryId = this.selectedCategory.id + } + this.$refs.previewForm.FetchNoFormatField(categoryId).then(() => { + FetchMaxItemNoByArchivesNo({ archivesNo, categoryId, categoryLevel: this.collectLevel }).then(res => { + if (res) { + const newItemNo = (parseInt(res) + 1).toString() + const field = this.formPreviewData.find(item => item.fieldName === 'item_no') + if (field && field.isFilling) { + const fillingDigit = field.fillingDigit + this.$set(this.$refs.previewForm.addOrUpdateForm, 'item_no', newItemNo.padStart(fillingDigit, '0')) + } else { + this.$set(this.$refs.previewForm.addOrUpdateForm, 'item_no', newItemNo) + } + this.$refs.previewForm.handleAuto() + } + }) + }) + } + }) + }) + }) } else { const params = { 'categoryId': this.selectedCategory.id, diff --git a/src/views/components/category/PreviewForm.vue b/src/views/components/category/PreviewForm.vue index 8be29f0..0d34985 100644 --- a/src/views/components/category/PreviewForm.vue +++ b/src/views/components/category/PreviewForm.vue @@ -1577,7 +1577,7 @@ export default { // } // } // }) - if (this.archivesType === 'add') { + if (this.archivesType === 'add' || this.archivesType === 'copy') { this.addOrUpdateForm.fonds_affiliation = this.selectedCategory.fondsId } const originalArchiveNo = this.addOrUpdateForm.archive_no @@ -1673,7 +1673,7 @@ export default { 'categoryLevel': 2, 'jsonString': JSON.stringify(this.addOrUpdateForm) } - } else if (this.selectedCategory.arrangeType === 3 && this.activeIndex === 1 && this.archivesType === 'add') { + } else if (this.selectedCategory.arrangeType === 3 && this.activeIndex === 1 && (this.archivesType === 'add' || this.archivesType === 'copy')) { // 在项目下,未整理的文件只属于门类下,不属于任何项目或案卷,所以parentsId === null const fileIds = [] console.log('this.uploadedFileData', this.uploadedFileData) @@ -1721,7 +1721,7 @@ export default { } } console.log(params) - if (this.archivesType === 'add') { + if (this.archivesType === 'add' || this.archivesType === 'copy') { collectAdd(params).then(res => { console.log('res', res) if (res.code !== 500) {