@@ -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) {