diff --git a/src/views/components/category/PreviewForm.vue b/src/views/components/category/PreviewForm.vue index 4fe719d..8be29f0 100644 --- a/src/views/components/category/PreviewForm.vue +++ b/src/views/components/category/PreviewForm.vue @@ -871,7 +871,20 @@ export default { // 根据档号查询最大件号并赋值 async fetchAndSetMaxItemNo(archivesNo) { try { - const response = await FetchMaxItemNoByArchivesNo({ archivesNo }) + let categoryId + if (this.isDesFormType !== 'mergeFile' && this.isDesFormType !== 'arcives' && this.isDesFormType !== 'manageArcives') { + categoryId = this.selectedCategory.pid + } else { + categoryId = this.selectedCategory.id + } + let categoryLevel + if (this.isDesFormType === 'mergeFile') { + categoryLevel = 3 + } else { + categoryLevel = this.collectLevel + } + + const response = await FetchMaxItemNoByArchivesNo({ archivesNo, categoryId, categoryLevel }) console.log('查询最大件号响应:', response) // 记录最大件号(每次都更新) this.maxItemNo = response