Browse Source

待借阅颜色/档案新增根据上级门类获取同字段数据/案卷的新增根据项目门类有无显示/已装盒的案卷不可新增

master
xuhuajiao 2 years ago
parent
commit
af858ed533
  1. 5
      src/assets/styles/lend-manage.scss
  2. 10
      src/views/archivesManage/archivesList/archivesAnjuan/index.vue
  3. 4
      src/views/archivesManage/archivesList/archivesJuannei/index.vue
  4. 4
      src/views/archivesManage/archivesList/archivesProject/index.vue
  5. 15
      src/views/archivesManage/archivesList/index.vue
  6. 23
      src/views/archivesManage/archivesList/mixins/archives.js
  7. 2
      src/views/archivesManage/lendManage/lendConfirm/index.vue
  8. 4
      src/views/archivesManage/lendManage/mixins/lending.js

5
src/assets/styles/lend-manage.scss

@ -33,7 +33,10 @@
color: #F65163; color: #F65163;
border: 1px solid #F65163; border: 1px solid #F65163;
} }
.wait-lend{
color: #fd8042;
border: 1px solid #fd8042;
}
.have-lend { .have-lend {
color: #fff; color: #fff;
background-color: #F65163; background-color: #F65163;

10
src/views/archivesManage/archivesList/archivesAnjuan/index.vue

@ -4,9 +4,9 @@
<div class="head-container head-archives clearfix"> <div class="head-container head-archives clearfix">
<div v-if="!recycleMain.isRecycle" class="archives-crud"> <div v-if="!recycleMain.isRecycle" class="archives-crud">
<!-- 新增 --> <!-- 新增 -->
<el-button size="mini" :disabled="isProject && selectedCategory.isType === 2" icon="el-icon-plus" @click="handleForm('add','档案')">新增</el-button>
<el-button v-if="!isHasProject" size="mini" :disabled="isProject && selectedCategory.isType === 2" icon="el-icon-plus" @click="handleForm('add','档案', 1)">新增</el-button>
<!-- 修改 --> <!-- 修改 -->
<el-button size="mini" icon="el-icon-edit" :disabled="selections.length !== 1" @click="handleForm('edit','档案')">修改</el-button>
<el-button size="mini" icon="el-icon-edit" :disabled="selections.length !== 1" @click="handleForm('edit','档案',null)">修改</el-button>
<!-- 删除btn 多选 --> <!-- 删除btn 多选 -->
<el-button v-permission="permission.del" icon="el-icon-delete" size="mini" :loading="crud.delAllLoading" :disabled="selections.length === 0" @click="toDelete(selections)">删除</el-button> <el-button v-permission="permission.del" icon="el-icon-delete" size="mini" :loading="crud.delAllLoading" :disabled="selections.length === 0" @click="toDelete(selections)">删除</el-button>
<!-- 导出btn :disabled="!crud.data.length" --> <!-- 导出btn :disabled="!crud.data.length" -->
@ -231,6 +231,10 @@ export default {
default: function() { default: function() {
return {} return {}
} }
},
isHasProject: {
type: Boolean,
default: true
} }
}, },
data() { data() {
@ -270,6 +274,8 @@ export default {
}, },
isProject: function(newValue, oldValue) { isProject: function(newValue, oldValue) {
}, },
isHasProject: function(newValue, oldValue) {
},
fixedStatusBar: function(newValue, oldValue) { fixedStatusBar: function(newValue, oldValue) {
}, },
projectSelection: function(newValue, oldValue) { projectSelection: function(newValue, oldValue) {

4
src/views/archivesManage/archivesList/archivesJuannei/index.vue

@ -4,9 +4,9 @@
<div class="head-container head-archives clearfix"> <div class="head-container head-archives clearfix">
<div v-if="!recycleMain.isRecycle" class="archives-crud"> <div v-if="!recycleMain.isRecycle" class="archives-crud">
<!-- 新增 --> <!-- 新增 -->
<el-button v-if="selectedCategory.isType !== 4" size="mini" :disabled="isAnjuan" icon="el-icon-plus" @click="handleForm('add','档案')">新增</el-button>
<el-button v-if="selectedCategory.isType !== 4" size="mini" :disabled="isAnjuan" icon="el-icon-plus" @click="handleForm('add','档案',2)">新增</el-button>
<!-- 修改 --> <!-- 修改 -->
<el-button size="mini" icon="el-icon-edit" :disabled="selections.length !== 1" @click="handleForm('edit','档案')">修改</el-button>
<el-button size="mini" icon="el-icon-edit" :disabled="selections.length !== 1" @click="handleForm('edit','档案',null)">修改</el-button>
<!-- 删除btn 多选 --> <!-- 删除btn 多选 -->
<el-button v-permission="permission.del" icon="el-icon-delete" size="mini" :loading="crud.delAllLoading" :disabled="selections.length === 0" @click="toDelete(selections)">删除</el-button> <el-button v-permission="permission.del" icon="el-icon-delete" size="mini" :loading="crud.delAllLoading" :disabled="selections.length === 0" @click="toDelete(selections)">删除</el-button>
<!-- 导出btn :disabled="!crud.data.length" --> <!-- 导出btn :disabled="!crud.data.length" -->

4
src/views/archivesManage/archivesList/archivesProject/index.vue

@ -4,9 +4,9 @@
<div class="head-container head-archives clearfix"> <div class="head-container head-archives clearfix">
<div v-if="!recycleMain.isRecycle" class="archives-crud"> <div v-if="!recycleMain.isRecycle" class="archives-crud">
<!-- 新增 --> <!-- 新增 -->
<el-button size="mini" icon="el-icon-plus" @click="handleForm('add','项目')">新增</el-button>
<el-button size="mini" icon="el-icon-plus" @click="handleForm('add','项目', null)">新增</el-button>
<!-- 修改 --> <!-- 修改 -->
<el-button size="mini" icon="el-icon-edit" :disabled="selections .length !== 1" @click="handleForm('edit','项目')">修改</el-button>
<el-button size="mini" icon="el-icon-edit" :disabled="selections .length !== 1" @click="handleForm('edit','项目', null)">修改</el-button>
<!-- 删除btn 多选 --> <!-- 删除btn 多选 -->
<el-button icon="el-icon-delete" size="mini" :loading="crud.delAllLoading" :disabled="selections.length === 0" @click="toDelete(selections)">删除</el-button> <el-button icon="el-icon-delete" size="mini" :loading="crud.delAllLoading" :disabled="selections.length === 0" @click="toDelete(selections)">删除</el-button>
</div> </div>

15
src/views/archivesManage/archivesList/index.vue

@ -43,6 +43,7 @@
ref="anjuan" ref="anjuan"
:selected-category="selectedCategory" :selected-category="selectedCategory"
:is-project="isProject" :is-project="isProject"
:is-has-project="isHasProject"
:project-selection="projectSelection" :project-selection="projectSelection"
:fixed-status-bar="fixedStatusBar" :fixed-status-bar="fixedStatusBar"
:archive-year="archiveYear" :archive-year="archiveYear"
@ -128,7 +129,8 @@ export default {
'organizationMatter': null 'organizationMatter': null
}, },
treeCurrentNode: null, treeCurrentNode: null,
nodeClick: false
nodeClick: false,
isHasProject: null //
} }
}, },
watch: { watch: {
@ -198,7 +200,6 @@ export default {
if (this.$refs.archivesTree.getNode(selectedKey) && this.$refs.archivesTree.getNode(selectedKey).parent) { if (this.$refs.archivesTree.getNode(selectedKey) && this.$refs.archivesTree.getNode(selectedKey).parent) {
this.expandParents(this.$refs.archivesTree.getNode(selectedKey).parent) this.expandParents(this.$refs.archivesTree.getNode(selectedKey).parent)
} }
// //
if (localStorage.getItem('isDelt') === '1') { if (localStorage.getItem('isDelt') === '1') {
if (this.$refs.project) { if (this.$refs.project) {
@ -264,6 +265,12 @@ export default {
} }
this.crud.selectionChangeHandler([val]) this.crud.selectionChangeHandler([val])
this.selectedCategory = val this.selectedCategory = val
// -hide, -show
if (this.$refs.archivesTree.getNode(this.selectedCategory.id).parent.data.isType === 2) {
this.isHasProject = true
} else {
this.isHasProject = false
}
this.handleTableList() this.handleTableList()
// //
@ -365,6 +372,10 @@ export default {
} }
}) })
} }
//
if (this.anjuanSelection.case_no) {
this.isAnjuan = true
}
}, },
// //
getYear(obj) { getYear(obj) {

23
src/views/archivesManage/archivesList/mixins/archives.js

@ -227,7 +227,7 @@ export const archivesCrud = {
} }
}, },
// 著录界面-form/详情-api // 著录界面-form/详情-api
handleForm(type, title) {
handleForm(type, title, isAnOrJuan) {
if (type === 'add') { if (type === 'add') {
this.formTitle = '新增' + title this.formTitle = '新增' + title
this.arcId = null this.arcId = null
@ -244,14 +244,31 @@ export const archivesCrud = {
categoryId: this.categoryId, categoryId: this.categoryId,
archivesId: this.arcId archivesId: this.arcId
} }
this.getFormInfo(params, type)
this.getFormInfo(params, type, isAnOrJuan)
}, },
getFormInfo(params, type) {
getFormInfo(params, type, isAnOrJuan) {
FetchFormDisplayFields(params).then(data => { FetchFormDisplayFields(params).then(data => {
this.formPreviewData = data.showFiled this.formPreviewData = data.showFiled
this.$nextTick(() => { this.$nextTick(() => {
if (type === 'edit') { if (type === 'edit') {
this.$refs.previewForm.addOrUpdateForm = data.echo this.$refs.previewForm.addOrUpdateForm = data.echo
} else {
if (this.recycleMain.selectedCategory.isType !== 5) {
// 新增时拿到项目和案卷的相同的字段的值
this.formPreviewData.forEach(item => {
if (isAnOrJuan === 1) {
if (this.recycleMain.selectedCategory.isType !== 3) {
if (this.recycleMain.projectSelection[item.fieldName]) {
this.$refs.previewForm.addOrUpdateForm = JSON.parse(JSON.stringify(this.recycleMain.projectSelection))
}
}
} else if (isAnOrJuan === 2) {
if (this.recycleMain.anjuanSelection[item.fieldName]) {
this.$refs.previewForm.addOrUpdateForm = JSON.parse(JSON.stringify(this.recycleMain.anjuanSelection))
}
}
})
}
} }
this.isDesFormType = 'arcives' this.isDesFormType = 'arcives'
this.$refs.previewForm.FetchNoFormatField(this.categoryId) this.$refs.previewForm.FetchNoFormatField(this.categoryId)

2
src/views/archivesManage/lendManage/lendConfirm/index.vue

@ -37,7 +37,7 @@
<el-table-column prop="borrowType" align="center" label="借阅状态" min-width="70"> <el-table-column prop="borrowType" align="center" label="借阅状态" min-width="70">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 待借阅 --> <!-- 待借阅 -->
<span class="cell-lend no-lend" style="width:76px">{{ scope.row.borrowType | borrowStatus }}</span>
<span class="cell-lend wait-lend" style="width:76px">{{ scope.row.borrowType | borrowStatus }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createTime" align="center" label="操作时间" min-width="120"> <el-table-column prop="createTime" align="center" label="操作时间" min-width="120">

4
src/views/archivesManage/lendManage/mixins/lending.js

@ -78,12 +78,16 @@ export const lendingCrud = {
return 'cell-lend have-lend' return 'cell-lend have-lend'
case '已归还': case '已归还':
return 'cell-lend has-return' return 'cell-lend has-return'
case '待借阅':
return 'cell-lend wait-lend'
case -1: case -1:
return 'cell-lend have-lend' return 'cell-lend have-lend'
case 5: case 5:
return 'cell-lend have-lend' return 'cell-lend have-lend'
case 4: case 4:
return 'cell-lend has-return' return 'cell-lend has-return'
case 2:
return 'cell-lend wait-lend'
default: default:
return 'cell-lend no-lend' return 'cell-lend no-lend'
} }

Loading…
Cancel
Save