|
|
@ -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] = '已借' |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|