diff --git a/src/assets/styles/lend-manage.scss b/src/assets/styles/lend-manage.scss index 19d2270..7af95f0 100644 --- a/src/assets/styles/lend-manage.scss +++ b/src/assets/styles/lend-manage.scss @@ -33,7 +33,10 @@ color: #F65163; border: 1px solid #F65163; } - +.wait-lend{ + color: #fd8042; + border: 1px solid #fd8042; +} .have-lend { color: #fff; background-color: #F65163; diff --git a/src/views/archivesManage/archivesList/archivesAnjuan/index.vue b/src/views/archivesManage/archivesList/archivesAnjuan/index.vue index b8c40cb..9095cc6 100644 --- a/src/views/archivesManage/archivesList/archivesAnjuan/index.vue +++ b/src/views/archivesManage/archivesList/archivesAnjuan/index.vue @@ -4,9 +4,9 @@
- 新增 + 新增 - 修改 + 修改 删除 @@ -231,6 +231,10 @@ export default { default: function() { return {} } + }, + isHasProject: { + type: Boolean, + default: true } }, data() { @@ -270,6 +274,8 @@ export default { }, isProject: function(newValue, oldValue) { }, + isHasProject: function(newValue, oldValue) { + }, fixedStatusBar: function(newValue, oldValue) { }, projectSelection: function(newValue, oldValue) { diff --git a/src/views/archivesManage/archivesList/archivesJuannei/index.vue b/src/views/archivesManage/archivesList/archivesJuannei/index.vue index 5d9dcdf..acb9b24 100644 --- a/src/views/archivesManage/archivesList/archivesJuannei/index.vue +++ b/src/views/archivesManage/archivesList/archivesJuannei/index.vue @@ -4,9 +4,9 @@
- 新增 + 新增 - 修改 + 修改 删除 diff --git a/src/views/archivesManage/archivesList/archivesProject/index.vue b/src/views/archivesManage/archivesList/archivesProject/index.vue index 283ef23..e1e9f12 100644 --- a/src/views/archivesManage/archivesList/archivesProject/index.vue +++ b/src/views/archivesManage/archivesList/archivesProject/index.vue @@ -4,9 +4,9 @@
- 新增 + 新增 - 修改 + 修改 删除
diff --git a/src/views/archivesManage/archivesList/index.vue b/src/views/archivesManage/archivesList/index.vue index f65c826..68f2f01 100644 --- a/src/views/archivesManage/archivesList/index.vue +++ b/src/views/archivesManage/archivesList/index.vue @@ -43,6 +43,7 @@ ref="anjuan" :selected-category="selectedCategory" :is-project="isProject" + :is-has-project="isHasProject" :project-selection="projectSelection" :fixed-status-bar="fixedStatusBar" :archive-year="archiveYear" @@ -128,7 +129,8 @@ export default { 'organizationMatter': null }, treeCurrentNode: null, - nodeClick: false + nodeClick: false, + isHasProject: null // 案卷上是否有项目门类 } }, watch: { @@ -198,7 +200,6 @@ export default { if (this.$refs.archivesTree.getNode(selectedKey) && this.$refs.archivesTree.getNode(selectedKey).parent) { this.expandParents(this.$refs.archivesTree.getNode(selectedKey).parent) } - // 删除刷新 if (localStorage.getItem('isDelt') === '1') { if (this.$refs.project) { @@ -264,6 +265,12 @@ export default { } this.crud.selectionChangeHandler([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() // 缓存当前的选中的 @@ -365,6 +372,10 @@ export default { } }) } + // 已装盒得案卷,不可新增案卷 + if (this.anjuanSelection.case_no) { + this.isAnjuan = true + } }, // 智能分类获取年度 getYear(obj) { diff --git a/src/views/archivesManage/archivesList/mixins/archives.js b/src/views/archivesManage/archivesList/mixins/archives.js index adda039..d16fb54 100644 --- a/src/views/archivesManage/archivesList/mixins/archives.js +++ b/src/views/archivesManage/archivesList/mixins/archives.js @@ -227,7 +227,7 @@ export const archivesCrud = { } }, // 著录界面-form/详情-api - handleForm(type, title) { + handleForm(type, title, isAnOrJuan) { if (type === 'add') { this.formTitle = '新增' + title this.arcId = null @@ -244,14 +244,31 @@ export const archivesCrud = { categoryId: this.categoryId, archivesId: this.arcId } - this.getFormInfo(params, type) + this.getFormInfo(params, type, isAnOrJuan) }, - getFormInfo(params, type) { + getFormInfo(params, type, isAnOrJuan) { FetchFormDisplayFields(params).then(data => { this.formPreviewData = data.showFiled this.$nextTick(() => { if (type === 'edit') { 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.$refs.previewForm.FetchNoFormatField(this.categoryId) diff --git a/src/views/archivesManage/lendManage/lendConfirm/index.vue b/src/views/archivesManage/lendManage/lendConfirm/index.vue index d3e212d..0afe8e1 100644 --- a/src/views/archivesManage/lendManage/lendConfirm/index.vue +++ b/src/views/archivesManage/lendManage/lendConfirm/index.vue @@ -37,7 +37,7 @@ diff --git a/src/views/archivesManage/lendManage/mixins/lending.js b/src/views/archivesManage/lendManage/mixins/lending.js index da0021e..8845388 100644 --- a/src/views/archivesManage/lendManage/mixins/lending.js +++ b/src/views/archivesManage/lendManage/mixins/lending.js @@ -78,12 +78,16 @@ export const lendingCrud = { return 'cell-lend have-lend' case '已归还': return 'cell-lend has-return' + case '待借阅': + return 'cell-lend wait-lend' case -1: return 'cell-lend have-lend' case 5: return 'cell-lend have-lend' case 4: return 'cell-lend has-return' + case 2: + return 'cell-lend wait-lend' default: return 'cell-lend no-lend' }