|
|
@ -24,26 +24,29 @@ |
|
|
|
ref="table" |
|
|
|
style="width:100%" |
|
|
|
height="calc(100vh - 355px)" |
|
|
|
:data="tableData" |
|
|
|
:data="crud.data" |
|
|
|
@selection-change="selectionChangeHandler" |
|
|
|
@row-click="clickRowHandler" |
|
|
|
@row-dblclick="handleDbClick" |
|
|
|
> |
|
|
|
<el-table-column type="selection" width="55" /> |
|
|
|
<el-table-column type="index" label="序号" align="center" width="55" /> |
|
|
|
<el-table-column prop="docNum" align="center" label="单据号" width="160" /> |
|
|
|
<el-table-column prop="orderNo" align="center" label="单据号" width="160" /> |
|
|
|
<el-table-column prop="categoryName" align="center" label="门类名称" width="150" /> |
|
|
|
<el-table-column prop="archivesID" align="center" label="档号" width="220" /> |
|
|
|
<el-table-column prop="titleName" align="center" label="题名" width="200" /> |
|
|
|
<el-table-column prop="fieldName" align="center" label="盒名称" width="140" /> |
|
|
|
<el-table-column prop="storagePath" align="center" label="存放位置" width="220" /> |
|
|
|
<el-table-column prop="archiveNo" align="center" label="档号" width="100" /> |
|
|
|
<el-table-column prop="maintitle" align="center" label="题名" width="150" /> |
|
|
|
<el-table-column prop="caseName" align="center" label="盒名称" width="100" /> |
|
|
|
<el-table-column prop="folderLocationDetails" align="center" label="存放位置" width="120" /> |
|
|
|
<el-table-column prop="borrowerName" align="center" label="借阅人" width="100" /> |
|
|
|
<el-table-column prop="borrowDays" align="center" label="借阅时间" width="180" /> |
|
|
|
<el-table-column prop="borrowGoal" align="center" label="借阅目的" width="100" /> |
|
|
|
<el-table-column prop="lendStatus" align="center" label="借阅状态" width="100"> |
|
|
|
<el-table-column prop="borrowDays" align="center" label="借阅时间" width="200"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<!-- 逾期 have-lend / 待归还 no-lend --> |
|
|
|
<span class="cell-lend" style="width:76px">{{ scope.row.lendStatus }}</span> |
|
|
|
<div>{{ parseTime(scope.row.borrowStart, '{y}-{m}-{d}') + ' 至 ' + parseTime(scope.row.borrowEnd, '{y}-{m}-{d}') }}</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="purpose" align="center" label="借阅目的" width="100" /> |
|
|
|
<el-table-column prop="borrowType" align="center" label="借阅状态" min-width="100"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span :class="['cell-lend',scope.row.borrowType === '待归还'?'no-lend':'have-lend']" style="width:76px">{{ scope.row.borrowType }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="lendHandler" align="center" label="操作人" width="100" /> |
|
|
@ -61,17 +64,17 @@ |
|
|
|
<script> |
|
|
|
import pagination from '@crud/Pagination' |
|
|
|
import CRUD, { presenter } from '@crud/crud' |
|
|
|
import data3 from '../data3.json' |
|
|
|
import { lendingCrud } from '../mixins/lending' |
|
|
|
import archiveDetail from '../components/archiveDetail' |
|
|
|
import returnDialog from './module/returnDialog' |
|
|
|
export default { |
|
|
|
components: { pagination, archiveDetail, returnDialog }, |
|
|
|
mixins: [presenter()], |
|
|
|
mixins: [presenter(), lendingCrud], |
|
|
|
cruds() { |
|
|
|
return CRUD({ |
|
|
|
url: 'api/case/initCaseList', |
|
|
|
url: 'api/borrow/initReturnConfirmList', |
|
|
|
// crudMethod: caseCrudMethod, |
|
|
|
title: '档案盒', |
|
|
|
title: '归还确认', |
|
|
|
optShow: { |
|
|
|
add: false, |
|
|
|
edit: false, |
|
|
@ -95,14 +98,13 @@ export default { |
|
|
|
returnAgainVisible: false |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.getBorrowRule() |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.getData() |
|
|
|
this.lendSelect = this.queryOption[0].value |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getData() { |
|
|
|
this.tableData = data3.rows |
|
|
|
}, |
|
|
|
selectionChangeHandler(val) { |
|
|
|
this.selections = val |
|
|
|
}, |
|
|
@ -115,27 +117,31 @@ export default { |
|
|
|
// 档案详情 |
|
|
|
handleDbClick(row) { |
|
|
|
// this.$refs.table.clearSelection() |
|
|
|
const archiveDetailDom = this.$refs.archiveDetailDom |
|
|
|
const arr = data3.rows.filter(item => item.docNum === row.docNum) |
|
|
|
archiveDetailDom.rowData = row |
|
|
|
archiveDetailDom.tableData = arr |
|
|
|
// 借阅状态样式类名 |
|
|
|
if (row.lendStatus === '待归还') { |
|
|
|
archiveDetailDom.classLend = 'have-lend' |
|
|
|
} else if (row.lendStatus === '逾期') { |
|
|
|
archiveDetailDom.classLend = 'no-lend' |
|
|
|
} |
|
|
|
archiveDetailDom.detailVisible = true |
|
|
|
// const archiveDetailDom = this.$refs.archiveDetailDom |
|
|
|
// archiveDetailDom.rowData = row |
|
|
|
// archiveDetailDom.tableData = arr |
|
|
|
// // 借阅状态样式类名 |
|
|
|
// if (row.lendStatus === '待归还') { |
|
|
|
// archiveDetailDom.classLend = 'have-lend' |
|
|
|
// } else if (row.lendStatus === '逾期') { |
|
|
|
// archiveDetailDom.classLend = 'no-lend' |
|
|
|
// } |
|
|
|
// archiveDetailDom.detailVisible = true |
|
|
|
}, |
|
|
|
// 归还 |
|
|
|
handleReturn() { |
|
|
|
if (this.selections.length > 0) { |
|
|
|
// 离线 |
|
|
|
const returnDialogDom = this.$refs.returnDialogDom |
|
|
|
returnDialogDom.table = this.selections |
|
|
|
returnDialogDom.returnVisible = true |
|
|
|
// 在线 |
|
|
|
// this.$message.success('归还成功 ' + this.selections.length + ' 条数据' + ' ' + '归还失败0条数据') |
|
|
|
if (this.lineStateVal === 'offline') { |
|
|
|
// 离线 |
|
|
|
const returnDialogDom = this.$refs.returnDialogDom |
|
|
|
returnDialogDom.table = this.selections |
|
|
|
returnDialogDom.returnVisible = true |
|
|
|
} else { |
|
|
|
// 在线 |
|
|
|
const params = this.selections.map(item => item.id) |
|
|
|
console.log(params) |
|
|
|
this.handleConfirmReturn(params, this.selections) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|