diff --git a/src/api/prearchiveLibrary/prearchiveLibrary.js b/src/api/prearchiveLibrary/prearchiveLibrary.js
index c247f73..1250a21 100644
--- a/src/api/prearchiveLibrary/prearchiveLibrary.js
+++ b/src/api/prearchiveLibrary/prearchiveLibrary.js
@@ -150,4 +150,13 @@ export function FetchMergeToFileConfirm(data) {
})
}
-export default { add, prearchEdit, del, FetchInitPreDocument, FetchInitDocumentsViewTable, FetchDoeditDocument, FetchBatchToFile, FetchMergeToFile, FetchMove, FetchArchivesDetails, FetchFileListByDocumentId, FetchArchivesMetadata, FetchReDocumentBase64ByFileId, FetchMinioReDocumentBase64ByFileId, FetchDeleteDocumentFile, FetchReIntoFlowBusiness, FetchMergeToFileConfirm }
+// 批量成件流程确认
+export function FetchBatchToFileConfirm(data) {
+ return request({
+ url: 'api/re-document/batchToFileConfirm',
+ method: 'post',
+ data
+ })
+}
+
+export default { add, prearchEdit, del, FetchInitPreDocument, FetchInitDocumentsViewTable, FetchDoeditDocument, FetchBatchToFile, FetchMergeToFile, FetchMove, FetchArchivesDetails, FetchFileListByDocumentId, FetchArchivesMetadata, FetchReDocumentBase64ByFileId, FetchMinioReDocumentBase64ByFileId, FetchDeleteDocumentFile, FetchReIntoFlowBusiness, FetchMergeToFileConfirm, FetchBatchToFileConfirm }
diff --git a/src/views/components/category/PreviewForm.vue b/src/views/components/category/PreviewForm.vue
index 536de4d..a353a4f 100644
--- a/src/views/components/category/PreviewForm.vue
+++ b/src/views/components/category/PreviewForm.vue
@@ -205,6 +205,7 @@
:selected-category="selectedCategory"
:selections="mergeFileRows"
:display-fields="mergeFileFields"
+ :business-type="9"
:extra-params="mergeFlowParams"
@close-dialog="handleMergeFlowSuccess"
/>
@@ -1844,7 +1845,6 @@ export default {
})
} else if (this.isDesFormType === 'mergeFile') {
// 合并成件
-
FetchReDocumentInitFlowByCategoryId({ 'documentId': null }).then((res) => {
const flowItem = res && res.length > 0 ? res[0] : null
if (flowItem && flowItem.status === 1) {
diff --git a/src/views/prearchiveLibrary/index.vue b/src/views/prearchiveLibrary/index.vue
index 9d0e32d..7b198d2 100644
--- a/src/views/prearchiveLibrary/index.vue
+++ b/src/views/prearchiveLibrary/index.vue
@@ -88,6 +88,12 @@
{{ scope.row[field.fieldName] }}
+
+
+ 流程中
+ -
+
+
@@ -99,7 +105,7 @@
-
+
@@ -338,6 +344,7 @@ export default {
},
// 著录界面-form/详情-api
handleForm(type) {
+ if (type === 'edit' && this.checkFlowInProgress(this.crud.selections)) return
if (this.$refs.previewForm) {
this.$refs.previewForm.resetForm()
}
@@ -528,8 +535,18 @@ export default {
this.$refs.archivesInfo.parentInfo = row
this.$refs.archivesInfo.getDetial(row.id)
},
+ // 检查所选数据是否有流程中的记录
+ checkFlowInProgress(selections) {
+ const inFlow = selections.some(item => item.is_flow === 1)
+ if (inFlow) {
+ this.$message({ message: '所选数据包含流程中的记录,无法进行此操作', type: 'warning', offset: 8 })
+ return true
+ }
+ return false
+ },
// 删除
toDelete(datas) {
+ if (this.checkFlowInProgress(datas)) return
this.$confirm('此操作将删除当前所选预归档数据' + '你是否还要继续?', '提示', {
confirmButtonText: '继续',
cancelButtonText: '取消',
@@ -620,6 +637,7 @@ export default {
},
// 批量成件
handleBatch() {
+ if (this.checkFlowInProgress(this.crud.selections)) return
this.$refs.batchForm.batchVisible = true
this.$refs.batchForm.selectionsArc = this.crud.selections
this.$nextTick(() => {
@@ -628,11 +646,13 @@ export default {
},
// 合并成件
handelMerge() {
+ if (this.checkFlowInProgress(this.crud.selections)) return
this.mergeVisible = true
this.getCategoryDataTree()
},
// 移动
handleMove() {
+ if (this.checkFlowInProgress(this.crud.selections)) return
this.$refs.moveForm.moveVisible = true
this.$refs.moveForm.moveArc = this.crud.selections
},
@@ -676,6 +696,8 @@ export default {
this.$refs.previewForm.fileOriginal = null
this.$refs.previewForm.fileJsonString = null
this.$refs.previewForm.preUplpadClose()
+ this.form.categoryId = null
+ this.selectedCategoryMerge = null
}
}
}
diff --git a/src/views/prearchiveLibrary/module/batchFile.vue b/src/views/prearchiveLibrary/module/batchFile.vue
index ebb59c9..d975bfd 100644
--- a/src/views/prearchiveLibrary/module/batchFile.vue
+++ b/src/views/prearchiveLibrary/module/batchFile.vue
@@ -106,6 +106,15 @@
+
@@ -117,14 +126,16 @@ import { FetchMenuByFondsId, FetchInitCategoryFieldByPid } from '@/api/system/ca
import { FetchArchivesScopeByCategoryId } from '@/api/system/archivesScope'
import { FetchCheckRepeat } from '@/api/system/fieldMate'
import { FetchBatchToFile } from '@/api/prearchiveLibrary/prearchiveLibrary'
+import { FetchReDocumentInitFlowByCategoryId } from '@/api/system/category/process'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
// import { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
import ScopeModule from './scope'
+import MergeIntoDocument from './mergeIntoDocument.vue'
import { mapGetters } from 'vuex'
export default {
name: 'BatchFile',
- components: { Treeselect, ScopeModule },
+ components: { Treeselect, ScopeModule, MergeIntoDocument },
mixins: [preLibraryCrud],
props: {
selectedDocument: {
@@ -132,6 +143,11 @@ export default {
default: function() {
return {}
}
+ },
+ // 档案列表列配置
+ displayFields: {
+ type: Array,
+ default: () => []
}
},
data() {
@@ -174,7 +190,8 @@ export default {
rightLoading: false,
isCorrField: true,
allCorrField: [],
- isTest: false
+ isTest: false,
+ batchFlowParams: {} // 批量成件流程附加参数
}
},
computed: {
@@ -598,36 +615,77 @@ export default {
const archivesIds = this.selectionsArc.map(item => {
return item.id
})
- const params = {
- 'archival_category_code': this.batchCategory.code,
- 'fondsAffiliation': this.selectedDocument.fondsId,
- 'archivesIds': archivesIds,
- 'documentId': this.selectedDocument.id,
- 'categoryId': this.form.categoryId,
- 'dtos': dtos
- }
- console.log(params)
+
+ // 判断批量成件审批流程是否开启
+ FetchReDocumentInitFlowByCategoryId({ 'documentId': null }).then((flowRes) => {
+ const flowItem = flowRes && flowRes.length > 0 ? flowRes[0] : null
+ if (flowItem && flowItem.status === 1) {
+ const batchFlowParams = {
+ 'sourceDocumentId': this.selectedDocument.id, // 来源预归档门类
+ 'purposeCategoryId': this.form.categoryId, // 目的门类
+ 'archivalCategoryCode': this.batchCategory.code, // 目的门类code
+ 'archivesIds': archivesIds, // 预归档档案id集合
+ // 'estimatedArchiveNo': this.addOrUpdateForm.archive_no, // 预计档号
+ 'dataJson': JSON.stringify(dtos) // 保存json 流程通过添加到档案
+ }
+ console.log('batchFlowParams', batchFlowParams)
+ this.batchFlowParams = batchFlowParams
+ this.archivesBtnLoading = false
+ this.$nextTick(() => {
+ this.$refs.mergeIntoDocument.archivesFillingVisible = true
+ })
+ } else {
+ // 审批流程未开启,直接批量成件
+ const params = {
+ 'archival_category_code': this.batchCategory.code,
+ 'fondsAffiliation': this.selectedDocument.fondsId,
+ 'archivesIds': archivesIds,
+ 'documentId': this.selectedDocument.id,
+ 'categoryId': this.form.categoryId,
+ 'dtos': dtos
+ }
+ console.log(params)
+ this.submitBatchToFile(params)
+ }
+ }).catch(err => {
+ console.log(err)
+ this.archivesBtnLoading = false
+ })
+ },
+ // 流程未开启时直接提交批量成件
+ submitBatchToFile(params) {
FetchBatchToFile(params).then((res) => {
console.log(res)
if (res === 'SUCCESS') {
- this.$emit('refresh')
- this.batchVisible = false
- Object.assign(this.form, {
- ruleName: null,
- scope: null,
- documentId: null,
- categoryId: null
- })
- this.selectedCategoryName = null
- this.selectedCategory = null
- this.allFieldData = []
- this.allCorrField = []
- this.isTest = false
- this.batchCategory = {}
+ this.$message({ message: '批量成件成功', type: 'success', offset: 8 })
+ this.resetBatchForm()
+ } else {
+ this.$message({ message: '批量成件失败', type: 'error', offset: 8 })
}
this.archivesBtnLoading = false
})
},
+ // 批量成件审批流程提交成功回调
+ handleBatchFlowSuccess() {
+ this.resetBatchForm()
+ },
+ // 重置批量成件表单并刷新列表
+ resetBatchForm() {
+ this.$emit('refresh')
+ this.batchVisible = false
+ Object.assign(this.form, {
+ ruleName: null,
+ scope: null,
+ documentId: null,
+ categoryId: null
+ })
+ this.selectedCategoryName = null
+ this.selectedCategory = null
+ this.allFieldData = []
+ this.allCorrField = []
+ this.isTest = false
+ this.batchCategory = {}
+ },
normalizer(node) {
if (node.children && !node.children.length) {
delete node.children
diff --git a/src/views/prearchiveLibrary/module/mergeIntoDocument.vue b/src/views/prearchiveLibrary/module/mergeIntoDocument.vue
index 0a01a7b..99cb402 100644
--- a/src/views/prearchiveLibrary/module/mergeIntoDocument.vue
+++ b/src/views/prearchiveLibrary/module/mergeIntoDocument.vue
@@ -96,6 +96,11 @@ export default {
extraParams: {
type: Object,
default: () => ({})
+ },
+ // 业务类型 8.批量成件 9.合并成件 10.预归档移动
+ businessType: {
+ type: Number,
+ default: 9
}
},
data() {
@@ -120,7 +125,10 @@ export default {
...mapGetters([
'user',
'baseApi'
- ])
+ ]),
+ successMessage() {
+ return this.businessType === 8 ? '批量成件提交成功' : '合并成件提交成功'
+ }
},
mounted() {
},
@@ -139,7 +147,7 @@ export default {
const params = {
'username': this.user.username,
'fondsNo': this.form.fondsNo,
- 'businessType': 9 // 8.批量成件 9.合并成件 10.预归档移动
+ 'businessType': this.businessType // 8.批量成件 9.合并成件 10.预归档移动
}
FetchBusinessFlowTitle(params).then((res) => {
if (res.code !== 500) {
@@ -161,7 +169,7 @@ export default {
archivesIds.push(val.id)
})
const params = {
- 'businessType': 9,
+ 'businessType': this.businessType,
'title': this.form.title,
'applicant': this.user.username,
'fondsNo': this.form.fondsNo,
@@ -171,13 +179,14 @@ export default {
console.log(params)
FetchReIntoFlowBusiness(params).then((res) => {
if (res.code !== 500) {
- this.$message({ message: '合并成件提交成功', type: 'success', offset: 8 })
+ this.$message({ message: this.successMessage, type: 'success', offset: 8 })
this.$emit('close-dialog')
} else {
this.$message({ message: res.message, type: 'error', offset: 8 })
}
this.archivesFillingVisible = false
this.btnLoading = false
+ this.form.remarks = null
}).catch(err => {
this.btnLoading = false
console.log(err)
@@ -196,6 +205,7 @@ export default {
},
handleCloseDialog() {
this.archivesFillingVisible = false
+ this.form.remarks = null
}
}
}
diff --git a/src/views/system/user/processCenter/module/form.vue b/src/views/system/user/processCenter/module/form.vue
index 00c6571..f5fc4a0 100644
--- a/src/views/system/user/processCenter/module/form.vue
+++ b/src/views/system/user/processCenter/module/form.vue
@@ -57,7 +57,7 @@