8 changed files with 394 additions and 56 deletions
-
19src/api/prearchiveLibrary/prearchiveLibrary.js
-
80src/views/components/category/PreviewForm.vue
-
4src/views/prearchiveLibrary/index.vue
-
12src/views/prearchiveLibrary/module/detail.vue
-
211src/views/prearchiveLibrary/module/mergeIntoDocument.vue
-
67src/views/system/processManage/runningProcess/module/businessDetails/index.vue
-
12src/views/system/user/processCenter/index.vue
-
45src/views/system/user/processCenter/module/form.vue
@ -0,0 +1,211 @@ |
|||
<template> |
|||
<!-- 归档审批 --> |
|||
<el-dialog class="detail-dialog" :visible.sync="archivesFillingVisible" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body title="流程详情" :before-close="handleCloseDialog" @opened="opened"> |
|||
<div class="setting-dialog"> |
|||
<div style="padding-top: 20px;"> |
|||
<el-form ref="form" :model="form" inline :rules="rules" label-width="80px"> |
|||
<el-row> |
|||
<el-form-item label="标题" prop="title"> |
|||
<el-input v-model="form.title" style="width: 572px;" /> |
|||
</el-form-item> |
|||
</el-row> |
|||
<el-row> |
|||
<el-form-item label="全宗" prop="fondsNo"> |
|||
<el-input v-model="form.fondsNo" disabled /> |
|||
</el-form-item> |
|||
<el-form-item label="申请人" prop="applicant"> |
|||
<el-input v-model="form.applicant" disabled /> |
|||
</el-form-item> |
|||
</el-row> |
|||
<el-row> |
|||
<el-form-item label="备注" prop="remarks"> |
|||
<el-input v-model="form.remarks" type="textarea" :rows="3" style="width: 572px;" /> |
|||
</el-form-item> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
<div class="detail-tab tab-content"> |
|||
<ul class="tab-nav"> |
|||
<li :class="{'active-tab-nav': activeIndex == 0 }" @click="changeActiveTab(0)">档案列表</li> |
|||
</ul> |
|||
<el-table |
|||
v-if="activeIndex == 0" |
|||
:data="selections" |
|||
height="300" |
|||
border |
|||
style="width: 100%;" |
|||
> |
|||
<el-table-column label="序号" width="55" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.$index + 1 }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="原文" prop="filesNum" width="60" align="center"> |
|||
<template slot-scope="scope"> |
|||
{{ scope.row.filesNum === '' || scope.row.filesNum === null || scope.row.filesNum === undefined ? 0 : scope.row.filesNum }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column v-for="field in displayFields" :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> |
|||
<div slot="footer" class="dialog-footer"> |
|||
<el-button :loading="btnLoading" type="primary" @click="handleComfired">确定</el-button> |
|||
</div> |
|||
</div> |
|||
</el-dialog> |
|||
</template> |
|||
|
|||
<script> |
|||
import { FetchFondsDetail } from '@/api/system/fonds' |
|||
import { mapGetters } from 'vuex' |
|||
import { FetchBusinessFlowTitle } from '@/api/collect/collect' |
|||
import { FetchReIntoFlowBusiness } from '@/api/prearchiveLibrary/prearchiveLibrary' |
|||
export default { |
|||
name: 'ArchivesFilling', |
|||
props: { |
|||
selectedCategory: { |
|||
type: Object, |
|||
default: function() { |
|||
return {} |
|||
} |
|||
}, |
|||
selections: { |
|||
type: Array, |
|||
default: () => [] |
|||
}, |
|||
// 档案列表列配置 |
|||
displayFields: { |
|||
type: Array, |
|||
default: () => [] |
|||
}, |
|||
// 合并成件时父组件传入的附加参数 |
|||
extraParams: { |
|||
type: Object, |
|||
default: () => ({}) |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
btnLoading: false, |
|||
archivesFillingVisible: false, |
|||
activeIndex: 0, |
|||
form: { |
|||
title: null, |
|||
username: null, |
|||
fondsNo: null, |
|||
remarks: null |
|||
}, |
|||
rules: { |
|||
title: [ |
|||
{ required: true, message: '标题不可为空', trigger: 'blur' } |
|||
] |
|||
} |
|||
} |
|||
}, |
|||
computed: { |
|||
...mapGetters([ |
|||
'user', |
|||
'baseApi' |
|||
]) |
|||
}, |
|||
mounted() { |
|||
}, |
|||
methods: { |
|||
getFondsDetail() { |
|||
FetchFondsDetail({ id: this.user.fonds.id }).then((res) => { |
|||
this.form.fondsNo = res.fondsNo |
|||
if (res.fondsNo) { |
|||
this.getBusinessFlowTitle() |
|||
} |
|||
}).catch(err => { |
|||
console.log(err) |
|||
}) |
|||
}, |
|||
getBusinessFlowTitle() { |
|||
const params = { |
|||
'username': this.user.username, |
|||
'fondsNo': this.form.fondsNo, |
|||
'businessType': 9 // 8.批量成件 9.合并成件 10.预归档移动 |
|||
} |
|||
FetchBusinessFlowTitle(params).then((res) => { |
|||
if (res.code !== 500) { |
|||
console.log(res) |
|||
this.form.title = res |
|||
} else { |
|||
this.$message({ message: '失败', type: 'error', offset: 8 }) |
|||
} |
|||
}).catch(err => { |
|||
console.log(err) |
|||
}) |
|||
}, |
|||
handleComfired() { |
|||
this.btnLoading = true |
|||
this.$refs.form.validate((valid) => { |
|||
if (valid) { |
|||
const archivesIds = [] |
|||
this.selections.forEach(val => { |
|||
archivesIds.push(val.id) |
|||
}) |
|||
const params = { |
|||
'businessType': 9, |
|||
'title': this.form.title, |
|||
'applicant': this.user.username, |
|||
'fondsNo': this.form.fondsNo, |
|||
'remarks': this.form.remarks, |
|||
...this.extraParams |
|||
} |
|||
console.log(params) |
|||
FetchReIntoFlowBusiness(params).then((res) => { |
|||
if (res.code !== 500) { |
|||
this.$message({ message: '合并成件提交成功', type: 'success', offset: 8 }) |
|||
this.$emit('close-dialog') |
|||
} else { |
|||
this.$message({ message: res.message, type: 'error', offset: 8 }) |
|||
} |
|||
this.archivesFillingVisible = false |
|||
this.btnLoading = false |
|||
}).catch(err => { |
|||
this.btnLoading = false |
|||
console.log(err) |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
changeActiveTab(data) { |
|||
this.activeIndex = data |
|||
}, |
|||
opened() { |
|||
if (this.activeIndex === 0) { |
|||
this.form.applicant = this.user.username |
|||
this.getFondsDetail() |
|||
} |
|||
}, |
|||
handleCloseDialog() { |
|||
this.archivesFillingVisible = false |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang='scss' scoped> |
|||
|
|||
.detail-dialog{ |
|||
.detail-tab .tab-nav{ |
|||
margin: 0 0 18px 0; |
|||
} |
|||
} |
|||
</style> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue