Browse Source

预归档移动

master
xuhuajiao 4 weeks ago
parent
commit
6c2f3ee783
  1. 10
      src/api/archivesManage/library.js
  2. 2
      src/views/prearchiveLibrary/index.vue
  3. 6
      src/views/prearchiveLibrary/module/mergeIntoDocument.vue
  4. 50
      src/views/prearchiveLibrary/module/moveFile.vue
  5. 22
      src/views/system/user/processCenter/module/form.vue

10
src/api/archivesManage/library.js

@ -127,6 +127,15 @@ export function FetchOfflineTransferConfirm(data) {
})
}
// 移动文件流程确定
export function FetchMoveToFileConfirm(data) {
return request({
url: 'api/re-document/moveToFileConfirm',
method: 'post',
data: data
})
}
// 根据档案获得操作记录
export function FetchArchivesOperateLog(params) {
return request({
@ -151,5 +160,6 @@ export default {
FetchTransferConfirm,
FetchOfflineTransferConfirm,
FetchHandBusinessFlowDetails,
FetchMoveToFileConfirm,
FetchArchivesOperateLog
}

2
src/views/prearchiveLibrary/index.vue

@ -107,7 +107,7 @@
<!-- 批量成件 -->
<batchFile ref="batchForm" :selected-document="selectedDocument" :display-fields="tableDisplayFields" @refresh="crud.refresh" />
<!-- 移动 -->
<moveFile ref="moveForm" :selected-document="selectedDocument" @refresh="crud.refresh" />
<moveFile ref="moveForm" :selected-document="selectedDocument" :display-fields="tableDisplayFields" @refresh="crud.refresh" />
<!-- 合并成件 -->
<el-dialog class="dialog-middle" :modal-append-to-body="false" :close-on-click-modal="false" :before-close="closeDialog" :visible="mergeVisible" title="合并成件">
<span class="dialog-right-top" />

6
src/views/prearchiveLibrary/module/mergeIntoDocument.vue

@ -127,7 +127,9 @@ export default {
'baseApi'
]),
successMessage() {
return this.businessType === 8 ? '批量成件提交成功' : '合并成件提交成功'
if (this.businessType === 8) return '批量成件提交成功'
if (this.businessType === 10) return '预归档移动提交成功'
return '合并成件提交成功'
}
},
mounted() {
@ -176,7 +178,7 @@ export default {
'remarks': this.form.remarks,
...this.extraParams
}
console.log(params)
console.log('测移动', params)
FetchReIntoFlowBusiness(params).then((res) => {
if (res.code !== 500) {
this.$message({ message: this.successMessage, type: 'success', offset: 8 })

50
src/views/prearchiveLibrary/module/moveFile.vue

@ -1,4 +1,5 @@
<template>
<div>
<!-- 移动 -->
<el-dialog class="move-form" append-to-body :modal-append-to-body="false" :close-on-click-modal="false" :before-close="handleClose" :visible="moveVisible" title="移动" @opened="opened">
<span class="dialog-right-top" />
@ -83,6 +84,16 @@
</div>
</div>
</el-dialog>
<MergeIntoDocument
ref="mergeIntoDocument"
:selected-category="selectedDocument"
:selections="moveArc"
:display-fields="displayFields"
:business-type="10"
:extra-params="moveFlowParams"
@close-dialog="handleMoveFlowSuccess"
/>
</div>
</template>
<script>
@ -90,11 +101,13 @@ import { preLibraryCrud } from '../mixins/index'
import { FetchMove } from '@/api/prearchiveLibrary/prearchiveLibrary'
import { FetchMenuByFondsId } from '@/api/system/category/category'
import { FetchInitCategoryViewTable, FetchInitCategoryView } from '@/api/collect/collect'
import { FetchReDocumentInitFlowByCategoryId } from '@/api/system/category/process'
import MergeIntoDocument from './mergeIntoDocument.vue'
// import { FetchInitSearchFonds } from '@/api/archiveUtilize/archiveUtilize'
import Vue from 'vue'
export default {
name: 'MoveFile',
components: { },
components: { MergeIntoDocument },
mixins: [preLibraryCrud],
props: {
selectedDocument: {
@ -102,6 +115,10 @@ export default {
default: function() {
return {}
}
},
displayFields: {
type: Array,
default: () => []
}
},
data() {
@ -119,6 +136,7 @@ export default {
tableDisplayFields: [],
selections: [],
moveArc: [],
moveFlowParams: {},
defaultProps: { children: 'children', label: 'cnName' },
page: {
page: 1,
@ -284,6 +302,24 @@ export default {
const archivesIds = this.moveArc.map(item => {
return item.id
})
// 判断预归档移动审批流程是否开启
FetchReDocumentInitFlowByCategoryId({ 'documentId': null }).then((flowRes) => {
const flowItem = flowRes && flowRes.length > 0 ? flowRes[0] : null
if (flowItem && flowItem.status === 1) {
// 审批流程开启,走流程提交
this.moveFlowParams = {
'archivesIds': archivesIds, // 移动的预归档档案信息
'purposeCategoryId': this.selectedCategoryMove.id, // 目的门类(预归档用)
'sourceDocumentId': this.selectedDocument.id, // 预归档门类id
'archivalCategoryCode': this.selectedCategoryMove.code,
'moveArchiveId': this.selections[0].id // 移动到的收集库档案id
}
this.archivesBtnLoading = false
this.$nextTick(() => {
this.$refs.mergeIntoDocument.archivesFillingVisible = true
})
} else {
// 审批流程未开启,直接移动
const params = {
'archivesId': this.selections[0].id, // 移动到的收集库档案id
'archivesIds': archivesIds, // 移动的预归档档案信息
@ -303,6 +339,18 @@ export default {
this.$emit('refresh')
this.archivesBtnLoading = false
})
}
}).catch(err => {
console.log(err)
this.archivesBtnLoading = false
})
},
// 预归档移动审批流程提交成功回调
handleMoveFlowSuccess() {
this.moveVisible = false
this.query.search = null
this.selections = []
this.$emit('refresh')
},
handleSizeChange(size) {
this.page.size = size

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

@ -60,7 +60,7 @@ import { FetchBecomeDocumentConfirm } from '@/api/collect/collect'
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'
import { FetchHandBusinessFlowDetails, FetchUtilizeConfirm, FetchArchivesReturnConfirm, FetchArchivesOpenConfirm, FetchArchivesDestructionConfirm, FetchTransferConfirm, FetchOfflineTransferConfirm, FetchMoveToFileConfirm } from '@/api/archivesManage/library'
import businessDetails from '@/views/system/processManage/runningProcess/module/businessDetails/index.vue'
export default {
name: 'Form',
@ -339,16 +339,16 @@ export default {
})
} else if (this.selectRow.businessType === 10) {
// 预归档移动
// FetchMoveConfirm(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)
// })
FetchMoveToFileConfirm(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)
})
}
// this.closedDialog()
} else {

Loading…
Cancel
Save