Commit c8b0ab27dc2aa23f4089fae8c859c41339d142cd
1 parent
ff721df9
档案归还
Showing
5 changed files
with
239 additions
and
0 deletions
ruoyi-archives/src/main/java/com/ruoyi/controller/ArchivesBorrowController.java
| ... | ... | @@ -43,5 +43,22 @@ public class ArchivesBorrowController extends BaseController |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | |
| 46 | + @PreAuthorize("@ss.hasPermi('archives:borrow:update')") | |
| 47 | + @Log(title = "归还", businessType = BusinessType.UPDATE) | |
| 48 | + @PostMapping("/archivesReturn/{ids}") | |
| 49 | + public AjaxResult archivesReturn(@PathVariable Long[] ids) | |
| 50 | + { | |
| 51 | + archivesBorrowService.archivesReturn(ids); | |
| 52 | + return success(); | |
| 53 | + } | |
| 54 | + | |
| 55 | + @PreAuthorize("@ss.hasPermi('archives:borrow:update')") | |
| 56 | + @Log(title = "续借", businessType = BusinessType.UPDATE) | |
| 57 | + @PostMapping("/archivesRenew/{ids}") | |
| 58 | + public AjaxResult archivesRenew(@PathVariable Long[] ids) | |
| 59 | + { | |
| 60 | + archivesBorrowService.archivesRenew(ids); | |
| 61 | + return success(); | |
| 62 | + } | |
| 46 | 63 | |
| 47 | 64 | } | ... | ... |
ruoyi-archives/src/main/java/com/ruoyi/service/IArchivesBorrowService.java
| ... | ... | @@ -29,4 +29,19 @@ public interface IArchivesBorrowService |
| 29 | 29 | */ |
| 30 | 30 | List<ArchivesBorrow> selectArchivesBorrowListByFilingDept(ArchivesBorrow archivesBorrow); |
| 31 | 31 | |
| 32 | + /** | |
| 33 | + * 文件归还 | |
| 34 | + * | |
| 35 | + * @param ids | |
| 36 | + * @return | |
| 37 | + */ | |
| 38 | + int archivesReturn(Long[] ids); | |
| 39 | + | |
| 40 | + /** | |
| 41 | + * 文件续借 | |
| 42 | + * | |
| 43 | + * @param ids | |
| 44 | + * @return | |
| 45 | + */ | |
| 46 | + int archivesRenew(Long[] ids); | |
| 32 | 47 | } | ... | ... |
ruoyi-archives/src/main/java/com/ruoyi/service/impl/ArchivesBorrowServiceImpl.java
| ... | ... | @@ -44,4 +44,15 @@ public class ArchivesBorrowServiceImpl implements IArchivesBorrowService |
| 44 | 44 | return archivesBorrowMapper.selectArchivesBorrowListByFilingDept(archivesBorrow); |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | + @Override | |
| 48 | + public int archivesReturn(Long[] ids) { | |
| 49 | + return 0; | |
| 50 | + } | |
| 51 | + | |
| 52 | + @Override | |
| 53 | + public int archivesRenew(Long[] ids) { | |
| 54 | + return 0; | |
| 55 | + } | |
| 56 | + | |
| 57 | + | |
| 47 | 58 | } | ... | ... |
ruoyi-ui/src/api/service/borrowReturn.js
0 → 100644
| 1 | +import request from '@/utils/request' | |
| 2 | + | |
| 3 | + | |
| 4 | +export function listPost(query) { | |
| 5 | + return request({ | |
| 6 | + url: '/archives/borrow/list', | |
| 7 | + method: 'get', | |
| 8 | + params: query | |
| 9 | + }) | |
| 10 | +} | |
| 11 | + | |
| 12 | +export function archivesReturn(id) { | |
| 13 | + return request({ | |
| 14 | + url: '/service/expiration/archivesReturn/' + id, | |
| 15 | + method: 'post', | |
| 16 | + }) | |
| 17 | +} | |
| 18 | +export function archivesRenew(id) { | |
| 19 | + return request({ | |
| 20 | + url: '/service/expiration/archivesRenew/' + id, | |
| 21 | + method: 'post', | |
| 22 | + }) | |
| 23 | +} | ... | ... |
ruoyi-ui/src/views/service/borrowReturn/index.vue
0 → 100644
| 1 | +<template > | |
| 2 | + <div class="app-container" > | |
| 3 | + | |
| 4 | + <el-row :gutter="20" > | |
| 5 | + <!--部门数据--> | |
| 6 | + <el-col :span="3" :xs="24" style="min-height:700px"> | |
| 7 | + <div class="head-container"> | |
| 8 | + <el-input | |
| 9 | + v-model="deptName" | |
| 10 | + placeholder="请输入部门名称" | |
| 11 | + clearable | |
| 12 | + size="small" | |
| 13 | + prefix-icon="el-icon-search" | |
| 14 | + style="margin-bottom: 20px" | |
| 15 | + /> | |
| 16 | + </div> | |
| 17 | + <div class="head-container"> | |
| 18 | + <el-tree | |
| 19 | + :data="deptOptions" | |
| 20 | + :expand-on-click-node="false" | |
| 21 | + :filter-node-method="filterNode" | |
| 22 | + ref="tree" | |
| 23 | + default-expand-all | |
| 24 | + highlight-current | |
| 25 | + @node-click="handleNodeClick" | |
| 26 | + /> | |
| 27 | + </div> | |
| 28 | + </el-col> | |
| 29 | + | |
| 30 | + <!--用户数据--> | |
| 31 | + <el-col :span="21" :xs="24" > | |
| 32 | + <el-form :model="queryParams" ref="queryForm" size="small" :inline="true"> | |
| 33 | + <el-form-item label="借阅人" prop="" > | |
| 34 | + <el-input v-model="queryParams.name" /> | |
| 35 | + </el-form-item> | |
| 36 | + <el-form-item label="部门" prop=""> | |
| 37 | + <el-input v-model="queryParams.dept" /> | |
| 38 | + </el-form-item> | |
| 39 | + <el-form-item label="借阅日期" prop=""> | |
| 40 | + <el-input v-model="queryParams.borrowDate" /> | |
| 41 | + </el-form-item> | |
| 42 | + <el-form-item label="借阅单号" prop=""> | |
| 43 | + <el-input v-model="queryParams.borrowMark" /> | |
| 44 | + </el-form-item> | |
| 45 | + <el-form-item> | |
| 46 | + <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | |
| 47 | + <el-button type="primary" icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | |
| 48 | + <el-button type="primary" size="mini" @click="archivesReturn">归还</el-button> | |
| 49 | + <el-button type="primary" size="mini" @click="archivesRenew">续借</el-button> | |
| 50 | + </el-form-item> | |
| 51 | + </el-form> | |
| 52 | + | |
| 53 | + <el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange"> | |
| 54 | + <el-table-column type="selection" width="50" align="center" /> | |
| 55 | + <el-table-column label="档号" align="center" prop="archivalCode" /> | |
| 56 | + <el-table-column label="题名" align="center" prop="title" /> | |
| 57 | + <el-table-column label="目的" align="center" prop="borrowType" /> | |
| 58 | + <el-table-column label="借阅人" align="center" prop="name" /> | |
| 59 | + <el-table-column label="部门" align="center" prop="dept" /> | |
| 60 | + <el-table-column label="实体利用方式" align="center" prop="mode" /> | |
| 61 | + <el-table-column label="在库状态" align="center" prop="borrowStatus" /> | |
| 62 | + <el-table-column label="借阅日期" align="center" prop="borrowDate" /> | |
| 63 | + <el-table-column label="待归还日期" align="center" prop="returnDate" /> | |
| 64 | + <el-table-column label="借阅单号" align="center" prop="borrowMark" /> | |
| 65 | + </el-table> | |
| 66 | + </el-col> | |
| 67 | + | |
| 68 | + </el-row> | |
| 69 | + </div> | |
| 70 | +</template> | |
| 71 | + | |
| 72 | +<script > | |
| 73 | +import {treeselect} from "@/api/archives/dept"; | |
| 74 | +import {listPost} from "@/api/service/borrowReturn"; | |
| 75 | + | |
| 76 | +export default { | |
| 77 | + name: "borrowRecord", | |
| 78 | + data() { | |
| 79 | + return { | |
| 80 | + // 部门树选项 | |
| 81 | + deptOptions: undefined, | |
| 82 | + // 部门名称 | |
| 83 | + deptName: undefined, | |
| 84 | + deptId : null, | |
| 85 | + queryParams: { | |
| 86 | + pageNum: 1, | |
| 87 | + pageSize: 10, | |
| 88 | + name: undefined, | |
| 89 | + dept: undefined, | |
| 90 | + borrowDate: undefined, | |
| 91 | + borrowMark: undefined, | |
| 92 | + filingDept: undefined | |
| 93 | + }, | |
| 94 | + loading: false, | |
| 95 | + list: [], | |
| 96 | + }; | |
| 97 | + }, | |
| 98 | + | |
| 99 | + watch: { | |
| 100 | + // 根据名称筛选部门树 | |
| 101 | + deptName(val) { | |
| 102 | + this.$refs.tree.filter(val); | |
| 103 | + }, | |
| 104 | + }, | |
| 105 | + created() { | |
| 106 | + this.getTreeselect(); | |
| 107 | + this.getList(); | |
| 108 | + }, | |
| 109 | + methods: { | |
| 110 | + /** 分页查询 */ | |
| 111 | + getList() { | |
| 112 | + this.loading = true; | |
| 113 | + listPost(this.queryParams).then(response => { | |
| 114 | + this.list = response.rows; | |
| 115 | + this.total = response.total; | |
| 116 | + this.loading = false; | |
| 117 | + }); | |
| 118 | + }, | |
| 119 | + /** 树形结构 */ | |
| 120 | + getTreeselect() { | |
| 121 | + treeselect().then(response => { | |
| 122 | + this.deptOptions = response.data; | |
| 123 | + }); | |
| 124 | + }, | |
| 125 | + /** 树形结构的节点单点触发 */ | |
| 126 | + handleNodeClick(data) { | |
| 127 | + this.queryParams.filingDept = data.id; | |
| 128 | + this.getList(); | |
| 129 | + }, | |
| 130 | + filterNode(value, data) { | |
| 131 | + if (!value) return true; | |
| 132 | + return data.label.indexOf(value) !== -1; | |
| 133 | + }, | |
| 134 | + // 多选框选中数据 | |
| 135 | + handleSelectionChange(selection) { | |
| 136 | + this.params.ids= selection.map(item => item.id) | |
| 137 | + this.single = selection.length!==1 | |
| 138 | + this.multiple = !selection.length | |
| 139 | + }, | |
| 140 | + /** 搜索按钮操作 */ | |
| 141 | + handleQuery() { | |
| 142 | + this.queryParams.pageNum = 1; | |
| 143 | + this.getList(); | |
| 144 | + }, | |
| 145 | + /** 重置按钮操作 */ | |
| 146 | + resetQuery() { | |
| 147 | + this.resetForm("queryForm"); | |
| 148 | + this.handleQuery(); | |
| 149 | + }, | |
| 150 | + /** 归还按钮 */ | |
| 151 | + archivesReturn(row) { | |
| 152 | + const ids =row.id || this.ids; | |
| 153 | + this.$modal.confirm('是否确认归还?').then(function() { | |
| 154 | + return this.archivesReturn(ids); | |
| 155 | + }).then(() => { | |
| 156 | + this.getList(); | |
| 157 | + this.$modal.msgSuccess("提交成功"); | |
| 158 | + }).catch(() => {}); | |
| 159 | + }, | |
| 160 | + /** 续借按钮 */ | |
| 161 | + archivesRenew(row) { | |
| 162 | + const ids =row.id || this.ids; | |
| 163 | + this.$modal.confirm('是否确认续借?').then(function() { | |
| 164 | + return this.archivesRenew(ids); | |
| 165 | + }).then(() => { | |
| 166 | + this.getList(); | |
| 167 | + this.$modal.msgSuccess("提交成功"); | |
| 168 | + }).catch(() => {}); | |
| 169 | + } | |
| 170 | + | |
| 171 | + } | |
| 172 | +}; | |
| 173 | +</script> | ... | ... |