From 7837a57c5aec5919e41bc48823d21af98725f47b Mon Sep 17 00:00:00 2001
From: xuhuajiao <13476289682@163.com>
Date: Fri, 29 Jul 2022 11:50:29 +0800
Subject: [PATCH] =?UTF-8?q?=E6=A1=A3=E6=A1=88=E7=AE=A1=E7=90=86-=E5=80=9F?=
=?UTF-8?q?=E9=98=85/=E5=85=A5=E5=BA=93=E7=8A=B6=E6=80=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../archivesList/archivesAnjuan/index.vue | 32 ++++++---
.../archivesList/archivesJuannei/index.vue | 6 +-
.../archivesList/mixins/archives.js | 71 ++++++++++++++++---
3 files changed, 86 insertions(+), 23 deletions(-)
diff --git a/src/views/archivesManage/archivesList/archivesAnjuan/index.vue b/src/views/archivesManage/archivesList/archivesAnjuan/index.vue
index 46d0b48..b1c7f7c 100644
--- a/src/views/archivesManage/archivesList/archivesAnjuan/index.vue
+++ b/src/views/archivesManage/archivesList/archivesAnjuan/index.vue
@@ -101,6 +101,12 @@
{{ scope.row[field.fieldName] }}
+
+
+
+ {{ scope.row.tid ? '已绑': '未绑' }}
+
+
@@ -109,23 +115,18 @@
-
+
- >{{ scope.row.is_storage | archivesStorageStatus }}
+ {{ storageTxt[scope.$index] }}
- {{ scope.row.is_borrow | archivesborrowStatus }}
-
-
-
-
-
- {{ scope.row.tid ? '已绑': '未绑' }}
+ {{ borrowTxt[scope.$index] }}
+
item.is_storage === 0 || item.is_storage === '' || item.is_storage === 1)
+ const index2 = this.selections.findIndex((item) => item.is_borrow === 3)
+ if (index !== -1) {
+ this.$message.error('所选档案还未入库不能借阅')
+ return false
+ }
+ if (index2 !== -1) {
+ this.$message.error('当前档案已借出,还未归还')
+ return false
+ }
const params = this.selections.map(item => {
return item.id
})
FetchIsExistBorrow(params).then(data => {
if (data.length === 0) {
this.lengingVisible = true
+ } else if (data.length === this.selections.length) {
+ this.$message.error('所选档案不可借阅')
} else {
this.$message.error('部分档案不可借阅')
}
@@ -388,6 +401,7 @@ export default {
if (data.length !== 0) {
this.$message.success('借阅成功')
this.lengingVisible = false
+ this.crud.refresh()
}
})
}
diff --git a/src/views/archivesManage/archivesList/archivesJuannei/index.vue b/src/views/archivesManage/archivesList/archivesJuannei/index.vue
index 55a1080..9d89736 100644
--- a/src/views/archivesManage/archivesList/archivesJuannei/index.vue
+++ b/src/views/archivesManage/archivesList/archivesJuannei/index.vue
@@ -92,9 +92,9 @@
-
-
- 未入
+
+
+ {{ storageTxt[scope.$index] }}
diff --git a/src/views/archivesManage/archivesList/mixins/archives.js b/src/views/archivesManage/archivesList/mixins/archives.js
index 99bfec1..67a3668 100644
--- a/src/views/archivesManage/archivesList/mixins/archives.js
+++ b/src/views/archivesManage/archivesList/mixins/archives.js
@@ -4,17 +4,27 @@ import { FetchTableDisplayFields, FetchInitArchivesView, FetchFormDisplayFields
export const archivesCrud = {
filters: {
archivesborrowStatus(val) {
- switch (val) {
- case 1:
- return '-'
- case 2:
- return '待借'
- case 3:
- return '已借'
- case 4:
- return '在库'
- case '':
- return '在库'
+ // switch (val) {
+ // case 1:
+ // return '-'
+ // case 2:
+ // return '待借'
+ // case 3:
+ // return '已借'
+ // case 4:
+ // return '在库'
+ // case '':
+ // return '-'
+ // }
+
+ if (val === 1) {
+ return '-'
+ } else if (val === 2) {
+ return '待借'
+ } else if (val === 3) {
+ return '已借'
+ } else if (val === '') {
+ return '-'
}
},
archivesStorageStatus(val) {
@@ -62,6 +72,8 @@ export const archivesCrud = {
{ key: '5', label: '待借' },
{ key: '6', label: '已借' }
],
+ storageTxt: [],
+ borrowTxt: [],
tableDisplayFields: [], // table-list-title字段
getTableDisplayFieldsLoading: false, // table-loading
formVisible: false,
@@ -187,6 +199,43 @@ export const archivesCrud = {
this[name] = data.list.content
this.yearGroup = data.yearGroup
this.page.total = data.list.totalElements
+
+ if (name === 'anjuanData' || name === 'junneiData') {
+ this[name].forEach((item, index) => {
+ // 入库状态
+ if (item.is_storage === 0) {
+ this.storageTxt[index] = '未入'
+ if (item.is_borrow === '') {
+ this.borrowTxt[index] = '-'
+ }
+ } else if (item.is_storage === 1) {
+ this.storageTxt[index] = '待入'
+ if (item.is_borrow === '') {
+ this.borrowTxt[index] = '-'
+ }
+ } else if (item.is_storage === 2) {
+ this.storageTxt[index] = '已入'
+ if (item.is_borrow === '') {
+ this.borrowTxt[index] = '在库'
+ }
+ } else if (item.is_storage === 3) {
+ this.storageTxt[index] = '待出'
+ } else if (item.is_storage === '') {
+ this.storageTxt[index] = '未入'
+ if (item.is_borrow === '') {
+ this.borrowTxt[index] = '-'
+ }
+ }
+ // 借阅状态
+ if (item.is_borrow === 1) {
+ this.borrowTxt[index] = '待借'
+ } else if (item.is_borrow === 2) {
+ this.borrowTxt[index] = '待借'
+ } else if (item.is_borrow === 3) {
+ this.borrowTxt[index] = '已借'
+ }
+ })
+ }
}
})
},