Browse Source

预归档-批量成件

master
xuhuajiao 1 month ago
parent
commit
9d8bc30e11
  1. 11
      src/api/prearchiveLibrary/prearchiveLibrary.js
  2. 2
      src/views/components/category/PreviewForm.vue
  3. 24
      src/views/prearchiveLibrary/index.vue
  4. 108
      src/views/prearchiveLibrary/module/batchFile.vue
  5. 18
      src/views/prearchiveLibrary/module/mergeIntoDocument.vue
  6. 22
      src/views/system/user/processCenter/module/form.vue

11
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 }

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

24
src/views/prearchiveLibrary/index.vue

@ -88,6 +88,12 @@
{{ scope.row[field.fieldName] }}
</template>
</el-table-column>
<el-table-column label="状态" prop="is_flow" align="center" fixed="right">
<template slot-scope="scope">
<div v-if="scope.row.is_flow === 1" class="row-state soon-state">流程中</div>
<div v-else>-</div>
</template>
</el-table-column>
</el-table>
<!--分页组件-->
@ -99,7 +105,7 @@
<detail ref="archivesInfo" :selected-document="selectedDocument" />
<!-- 批量成件 -->
<batchFile ref="batchForm" :selected-document="selectedDocument" @refresh="crud.refresh" />
<batchFile ref="batchForm" :selected-document="selectedDocument" :display-fields="tableDisplayFields" @refresh="crud.refresh" />
<!-- 移动 -->
<moveFile ref="moveForm" :selected-document="selectedDocument" @refresh="crud.refresh" />
<!-- 合并成件 -->
@ -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('此操作将删除当前所选预归档数据' + '<span>你是否还要继续?</span>', '提示', {
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
}
}
}

108
src/views/prearchiveLibrary/module/batchFile.vue

@ -106,6 +106,15 @@
</div>
</el-dialog>
<ScopeModule ref="scopeModule" @getScope="hanleScopeSelect" />
<MergeIntoDocument
ref="mergeIntoDocument"
:selected-category="selectedDocument"
:selections="selectionsArc"
:display-fields="displayFields"
:business-type="8"
:extra-params="batchFlowParams"
@close-dialog="handleBatchFlowSuccess"
/>
</div>
</template>
@ -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

18
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
}
}
}

22
src/views/system/user/processCenter/module/form.vue

@ -57,7 +57,7 @@
<script>
import { FetchBecomeDocumentConfirm } from '@/api/collect/collect'
import { FetchMergeToFileConfirm } from '@/api/prearchiveLibrary/prearchiveLibrary'
import { FetchMergeToFileConfirm, FetchBatchToFileConfirm } from '@/api/prearchiveLibrary/prearchiveLibrary'
import { FetchGenProcessDiagram } from '@/api/system/flowable'
// FetchBusinessFlowDetails,
import { FetchHandBusinessFlowDetails, FetchUtilizeConfirm, FetchArchivesReturnConfirm, FetchArchivesOpenConfirm, FetchArchivesDestructionConfirm, FetchTransferConfirm, FetchOfflineTransferConfirm } from '@/api/archivesManage/library'
@ -315,16 +315,16 @@ export default {
})
} else if (this.selectRow.businessType === 8) {
// 批量成件
// FetchBatchToFileConfirm(params).then((res) => {
// if (res.code !== 500) {
// this.$message({ message: res, type: 'success', offset: 8 })
// } else {
// this.$message({ message: '操作提交失败', type: 'error', offset: 8 })
// }
// this.closedDialog()
// }).catch(err => {
// console.log(err)
// })
FetchBatchToFileConfirm(params).then((res) => {
if (res.code !== 500) {
this.$message({ message: res, type: 'success', offset: 8 })
} else {
this.$message({ message: '操作提交失败', type: 'error', offset: 8 })
}
this.closedDialog()
}).catch(err => {
console.log(err)
})
} else if (this.selectRow.businessType === 9) {
// 合并成件
FetchMergeToFileConfirm(params).then((res) => {

Loading…
Cancel
Save