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. 236
      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 })

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

@ -1,88 +1,99 @@
<template>
<!-- 移动 -->
<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" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<div class="move-main">
<div class="move-left">
<el-tree
ref="treeMove"
:data="categoryTree"
node-key="id"
default-expand-all
:props="defaultProps"
:expand-on-click-node="false"
@node-click="handleMoveNodeClick"
/>
</div>
<div class="move-right">
<div style="padding: 10px;">
<el-input v-model="query.search" placeholder="输入题名或档号搜索" style="width: 200px;" />
<el-button class="filter-item filter-search" size="mini" type="success" icon="el-icon-search" @click="getViewTableList('search')">搜索</el-button>
<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" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<div class="move-main">
<div class="move-left">
<el-tree
ref="treeMove"
:data="categoryTree"
node-key="id"
default-expand-all
:props="defaultProps"
:expand-on-click-node="false"
@node-click="handleMoveNodeClick"
/>
</div>
<div class="raido-main">
<!-- @select="handleSelect"
<div class="move-right">
<div style="padding: 10px;">
<el-input v-model="query.search" placeholder="输入题名或档号搜索" style="width: 200px;" />
<el-button class="filter-item filter-search" size="mini" type="success" icon="el-icon-search" @click="getViewTableList('search')">搜索</el-button>
</div>
<div class="raido-main">
<!-- @select="handleSelect"
@selection-change="selectionChangeHandler"
@row-click="clickRowHandler" -->
<el-table
ref="table"
v-loading="loading"
lazy
:data="tableData"
style="width: 100%;"
:row-key="getRowKey"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
highlight-current-row
@selection-change="selectionChangeHandler"
@row-click="clickRowHandler"
>
<el-table-column type="selection" align="center" width="55" />
<el-table-column label="序号" width="55" align="center" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ (page.page === 1 ? 0 : (page.page === 0 ? 0 : page.page - 1)) * page.size + scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column :label="selectedCategoryMove.arrangeType === 1 ? '原文':'卷内'" prop="child" width="55" align="center">
<template slot-scope="scope">
{{ scope.row.child === '' ? 0 : scope.row.child }}
</template>
</el-table-column>
<el-table-column v-for="field in tableDisplayFields" :key="field.id" :label="field.fieldCnName" :align="field.displayformatType" :width="field.displayLength" show-overflow-tooltip>
<template slot="header">
<el-tooltip
class="item"
effect="dark"
:content="field.fieldCnName"
placement="top-start"
>
<span>{{ field.fieldCnName }}</span>
</el-tooltip>
</template>
<template slot-scope="scope">
{{ scope.row[field.fieldName] }}
</template>
</el-table-column>
</el-table>
<el-table
ref="table"
v-loading="loading"
lazy
:data="tableData"
style="width: 100%;"
:row-key="getRowKey"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
highlight-current-row
@selection-change="selectionChangeHandler"
@row-click="clickRowHandler"
>
<el-table-column type="selection" align="center" width="55" />
<el-table-column label="序号" width="55" align="center" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ (page.page === 1 ? 0 : (page.page === 0 ? 0 : page.page - 1)) * page.size + scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column :label="selectedCategoryMove.arrangeType === 1 ? '原文':'卷内'" prop="child" width="55" align="center">
<template slot-scope="scope">
{{ scope.row.child === '' ? 0 : scope.row.child }}
</template>
</el-table-column>
<el-table-column v-for="field in tableDisplayFields" :key="field.id" :label="field.fieldCnName" :align="field.displayformatType" :width="field.displayLength" show-overflow-tooltip>
<template slot="header">
<el-tooltip
class="item"
effect="dark"
:content="field.fieldCnName"
placement="top-start"
>
<span>{{ field.fieldCnName }}</span>
</el-tooltip>
</template>
<template slot-scope="scope">
{{ scope.row[field.fieldName] }}
</template>
</el-table-column>
</el-table>
</div>
<el-pagination
v-if="tableData.length !== 0"
:current-page="page.page"
:total="page.total"
:page-size="page.size"
:pager-count="5"
layout="total, prev, pager, next, sizes"
@size-change="handleSizeChange"
@current-change="handleCurrentPage"
/>
</div>
<el-pagination
v-if="tableData.length !== 0"
:current-page="page.page"
:total="page.total"
:page-size="page.size"
:pager-count="5"
layout="total, prev, pager, next, sizes"
@size-change="handleSizeChange"
@current-change="handleCurrentPage"
/>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="closedDialog">取消</el-button>
<el-button :loading="archivesBtnLoading" type="primary" @click="handleComfirmed">确定</el-button>
</div>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="closedDialog">取消</el-button>
<el-button :loading="archivesBtnLoading" type="primary" @click="handleComfirmed">确定</el-button>
</div>
</div>
</el-dialog>
</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,26 +302,56 @@ export default {
const archivesIds = this.moveArc.map(item => {
return item.id
})
const params = {
'archivesId': this.selections[0].id, // 移动到的收集库档案id
'archivesIds': archivesIds, // 移动的预归档档案信息
'categoryId': this.selectedCategoryMove.id, // 门类id
'documentId': this.selectedDocument.id // 预归档门类id
}
console.log(params)
FetchMove(params).then((res) => {
if (res.code !== 500) {
this.$message({ message: res, type: 'success', offset: 8 })
// 判断预归档移动审批流程是否开启
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 {
this.$message({ message: '移动操作失败', type: 'error', offset: 8 })
// 审批流程未开启,直接移动
const params = {
'archivesId': this.selections[0].id, // 移动到的收集库档案id
'archivesIds': archivesIds, // 移动的预归档档案信息
'categoryId': this.selectedCategoryMove.id, // 门类id
'documentId': this.selectedDocument.id // 预归档门类id
}
console.log(params)
FetchMove(params).then((res) => {
if (res.code !== 500) {
this.$message({ message: res, type: 'success', offset: 8 })
} else {
this.$message({ message: '移动操作失败', type: 'error', offset: 8 })
}
this.moveVisible = false
this.query.search = null
this.selections = []
this.$emit('refresh')
this.archivesBtnLoading = false
})
}
this.moveVisible = false
this.query.search = null
this.selections = []
this.$emit('refresh')
}).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
this.page.page = 1

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