index.vue
15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
<template>
<div class="app-container">
<el-row :gutter="20">
<!--部门数据-->
<el-col :span="4" :xs="24">
<div class="head-container">
<el-input
v-model="deptName"
placeholder="请输入部门名称"
clearable
size="small"
prefix-icon="el-icon-search"
style="margin-bottom: 20px"
/>
</div>
<div class="head-container">
<el-tree
:data="deptOptions"
:expand-on-click-node="false"
ref="tree"
default-expand-all
highlight-current
@node-click="handleNodeClick"
/>
</div>
</el-col>
<el-col :span="20" :xs="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" >
<el-form-item label="全宗号1" prop="general">
<el-input
v-model="queryParams.general"
placeholder="请输入全宗号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="年度" prop="year">
<el-input
v-model="queryParams.year"
placeholder="请输入年度"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="题名" prop="title">
<el-input
v-model="queryParams.title"
placeholder="请输入题名"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="分类号" prop="sort">
<el-input
v-model="queryParams.sort"
placeholder="请输入分类号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5" >
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
:disabled="single"
@click="handleupdateborrow"
v-hasPermi="['archives:collerctbox:inserBox']"
>借阅</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="boxList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="操作" align="center" prop="year" >
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleCheck(scope.row)"
v-hasPermi="['archives:box:check']"
>查看</el-button>
</template>
</el-table-column>
<el-table-column label="全宗号" align="center" prop="general" />
<el-table-column label="年度" align="center" prop="year" />
<el-table-column label="题名" align="center" prop="title" />
<el-table-column label="分类号" align="center" prop="sort" />
<el-table-column label="保管期限" align="center" prop="safekeepingDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.safekeepingDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="密级" align="center" prop="secretLevel" />
<el-table-column label="页数" align="center" prop="pages" />
<el-table-column label="归档份数" align="center" prop="filingNumber" />
<el-table-column label="在库份数" align="center" prop="zkNumber" />
<el-table-column label="库位码" align="center" prop="locationCode" />
<el-table-column label="归档部门" align="center" prop="filingDept" />
<el-table-column label="档号" align="center" prop="archivalCode" />
<el-table-column label="责任者" align="center" prop="responsibilityName" />
<el-table-column label="序号" align="center" prop="serialMark" />
<el-table-column label="件号" align="center" prop="pieceMark" />
<el-table-column label="登记号" align="center" prop="registerMark" />
<el-table-column label="参议人员" align="center" prop="counsellors" />
<el-table-column label="归档人" align="center" prop="filingName" />
<el-table-column label="纪要人" align="center" prop="summaryName" />
<el-table-column label="文种" align="center" prop="recordType" />
<el-table-column label="载体类型" align="center" prop="carrierType" />
<el-table-column label="拟稿人" align="center" prop="draftName" />
<el-table-column label="页次" align="center" prop="page" />
<el-table-column label="文号" align="center" prop="documentMark" />
<el-table-column label="原文" align="center" prop="text" />
<el-table-column label="盒号" align="center" prop="boxMark" />
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-col>
</el-row>
<el-dialog :title="title" :visible.sync="open" width="40%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row>
<el-col :span="12">
<el-form-item label="借阅人" prop="name">
<el-input v-model="form.name" placeholder="请输入借阅人" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="借阅部门" prop="dept">
<el-input v-model="form.dept" placeholder="请输入借阅部门" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="借阅日期" prop="borrowDate">
<el-date-picker clearable
v-model="form.borrowDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择借阅日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="电话" prop="phone">
<el-input v-model="form.phone" placeholder="请输入电话" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="实体利用方式" prop="mode" >
<el-radio v-model="form.mode" label="1">实体借阅</el-radio>
<el-radio v-model="form.mode" label="2">实体查阅</el-radio>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="电子利用方式" prop="mode">
<el-radio v-model="form.mode" label="3">查看</el-radio>
<el-radio v-model="form.mode" label="4">下载</el-radio>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="档案门类" prop="boxType">
<el-input v-model="form.boxType" placeholder="请输入借阅登记人" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="借阅登记人" prop="borrowName">
<el-input v-model="form.borrowName" placeholder="请输入借阅登记人" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-form-item label="借阅目的" prop="borrowType">
<el-select v-model="form.borrowType" placeholder="请选择借阅目的">
<el-option
v-for="dict in dict.type.borrow_type"
:key="dict.value"
:label="dict.label"
:value="dict.value">
</el-option>
</el-select>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="申请借阅档案信息" >
添加档案
<table id="borrowTable" >
<tr style="border:1px solid #FFDCDF;">
<td>档号</td>
<td>题名</td>
</tr>
<tr style="border:1px solid #FFDCDF;">
<td> <span>{{ CollertBox1 }}</span>
<td> <span>{{ CollertBox2 }}</span> </td>
</tr>
<tr>
</tr>
</table>
</el-form-item>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listCollerBox, getBox, delBox, addBox, updateBox,updatedelBox } from "@/api/archives/collerctbox";
import { addBorrow } from "@/api/archives/borrow.js";
import file from "@/views/archives/file";
import {treeselect} from "@/api/archives/dept";
export default {
dicts: ['borrow_type'],
components: { file },
props: {
statusPd: {
type: Number, // 这里你接收的值是什么类型就写什么类型
},
boxsId: {
type: Number,
}
},
watch: {
// 根据名称筛选部门树
deptName(val) {
this.$refs.tree.filter(val);
},
},
data() {
return {
// 部门树选项
deptOptions: undefined,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 【登记著录】表格数据
boxList: [],
boxtwoList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
general: null,
year: null,
title: null,
sort: null,
safekeepingDate: null,
secretLevel: null,
pages: null,
filingNumber: null,
zkNumber: null,
locationCode: null,
filingDept: null,
archivalCode: null,
responsibilityName: null,
serialMark: null,
pieceMark: null,
registerMark: null,
counsellors: null,
filingName: null,
summaryName: null,
recordType: null,
carrierType: null,
draftName: null,
page: null,
documentMark: null,
text: null,
status: null,
apprvoal: null,
belongRole: null,
boxMark: null,
},
// 表单参数
form: {},
// 表单校验
rules: {
},
borrowStatus: 1,//可借阅
collectBoxId: null,
CollertBox1: null,
CollertBox2: null,
};
},
//statusPd 0未整理文件 1 已整理文件 2 盒
created() {
this.getList();
this.getTreeselect();
},
methods: {
/** 查询部门下拉树结构 */
getTreeselect() {
treeselect().then(response => {
this.deptOptions = response.data;
});
},
/** 查询【登记著录】列表 */
getList() {
this.queryParams.deptId = this.deptId != null ? this.deptId : "000"//是否盒内文件
this.queryParams.borrowStatus = this.borrowStatus;
this.queryParams.boxId = this.boxsId != null ? this.boxsId : null; //是否盒内文件
this.queryParams.remove = 0; //未删除数据
listCollerBox(this.queryParams).then(response => {
this.boxList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: null,
name: null,
dept: null,
borrowDate: null,
phone: null,
mode: null,
boxType: null,
borrowName: null,
borrowType: null,
collectBoxId: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
returnDate: null,
returnedDate: null,
borrowMark: null,
deptId : null,
deptName: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
// 节点单击事件
handleNodeClick(data) {
this.deptId = data.id;
this.deptName = data.label;
this.getList();
},
//借阅按钮
handleupdateborrow(row){
this.open = true;
const id = row.id || this.ids
this.collectBoxId = Number(id);
getBox(id).then(response => {
this.CollertBox1 = response.data.archivalCode;
this.CollertBox2 = response.data.title;
});
this.form.name = this.$store.state.user.name;
this.form.boxType = this.deptName;
},
//借阅
submitForm(){
this.$refs["form"].validate(valid => {
if (valid) {
this.form.collectBoxId = this.collectBoxId;
addBorrow(this.form).then(response => {
this.open = false;
this.handleSelectId(this.collectBoxId,"2");//可借阅 转为可归还
});
}
});
},
////可借阅 转为可归还
handleSelectId(id,borrowStatus){
debugger
getBox(id).then(response => {
let from = response.data;
from.borrowStatus = borrowStatus;
updateBox(from).then(response => {
this.$modal.msgSuccess("提交成功");
this.open = false;
this.getList();
});
});
},
}
};
</script>
<style>
#borrowTable{
width: 80%;
border: 1px solid #FFDCDF;
margin-left: 10% ;
text-align: center;
}
#borrowTable tr td{
border: 1px solid #FFDCDF;
}
#borrowTable{
border-collapse: collapse;
}
</style>