Commit c42e803045c550d941a13adbe703ad59b487b54c
1 parent
06cb983b
档案合并
Showing
6 changed files
with
122 additions
and
21 deletions
ruoyi-archives/src/main/java/com/ruoyi/domain/ArchivesCollectBox.java
| ... | ... | @@ -20,6 +20,10 @@ public class ArchivesCollectBox extends BaseEntity |
| 20 | 20 | /** 主键 */ |
| 21 | 21 | private Long id; |
| 22 | 22 | |
| 23 | + | |
| 24 | + /** 盒ID */ | |
| 25 | + @Excel(name = "盒ID") | |
| 26 | + private Long boxId; | |
| 23 | 27 | /** 全宗号 */ |
| 24 | 28 | @Excel(name = "全宗号") |
| 25 | 29 | private String general; |
| ... | ... | @@ -413,10 +417,19 @@ public class ArchivesCollectBox extends BaseEntity |
| 413 | 417 | return boxMark; |
| 414 | 418 | } |
| 415 | 419 | |
| 420 | + public Long getBoxId() { | |
| 421 | + return boxId; | |
| 422 | + } | |
| 423 | + | |
| 424 | + public void setBoxId(Long boxId) { | |
| 425 | + this.boxId = boxId; | |
| 426 | + } | |
| 427 | + | |
| 416 | 428 | @Override |
| 417 | 429 | public String toString() { |
| 418 | 430 | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| 419 | 431 | .append("id", getId()) |
| 432 | + .append("boxId", getBoxId()) | |
| 420 | 433 | .append("general", getGeneral()) |
| 421 | 434 | .append("year", getYear()) |
| 422 | 435 | .append("title", getTitle()) | ... | ... |
ruoyi-archives/src/main/resources/mapper/archives/ArchivesCollectBoxMapper.xml
| ... | ... | @@ -6,6 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 6 | 6 | |
| 7 | 7 | <resultMap type="ArchivesCollectBox" id="ArchivesCollectBoxResult"> |
| 8 | 8 | <result property="id" column="id" /> |
| 9 | + <result property="boxId" column="box_id" /> | |
| 9 | 10 | <result property="general" column="general" /> |
| 10 | 11 | <result property="year" column="year" /> |
| 11 | 12 | <result property="title" column="title" /> |
| ... | ... | @@ -42,12 +43,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 42 | 43 | </resultMap> |
| 43 | 44 | |
| 44 | 45 | <sql id="selectArchivesCollectBoxVo"> |
| 45 | - select id, general, year, title, sort, safekeeping_date, secret_level, pages, filing_number, zk_number, location_code, filing_dept, archival_code, responsibility_name, serial_mark, piece_mark, register_mark, counsellors, filing_name, summary_name, record_type, carrier_type, draft_name, page, document_mark, text, create_by, create_time, update_by, update_time, status, apprvoal, belong_role, box_mark from archives_collect_box | |
| 46 | + select id,box_id, general, year, title, sort, safekeeping_date, secret_level, pages, filing_number, zk_number, location_code, filing_dept, archival_code, responsibility_name, serial_mark, piece_mark, register_mark, counsellors, filing_name, summary_name, record_type, carrier_type, draft_name, page, document_mark, text, create_by, create_time, update_by, update_time, status, apprvoal, belong_role, box_mark from archives_collect_box | |
| 46 | 47 | </sql> |
| 47 | 48 | |
| 48 | 49 | <select id="selectArchivesCollectBoxList" parameterType="ArchivesCollectBox" resultMap="ArchivesCollectBoxResult"> |
| 49 | 50 | <include refid="selectArchivesCollectBoxVo"/> |
| 50 | - <where> | |
| 51 | + <where> | |
| 52 | + <if test="boxId != null "> and box_id = #{boxId}</if> | |
| 51 | 53 | <if test="general != null and general != ''"> and general = #{general}</if> |
| 52 | 54 | <if test="year != null and year != ''"> and year = #{year}</if> |
| 53 | 55 | <if test="title != null and title != ''"> and title = #{title}</if> |
| ... | ... | @@ -88,6 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 88 | 90 | <insert id="insertArchivesCollectBox" parameterType="ArchivesCollectBox" useGeneratedKeys="true" keyProperty="id"> |
| 89 | 91 | insert into archives_collect_box |
| 90 | 92 | <trim prefix="(" suffix=")" suffixOverrides=","> |
| 93 | + <if test="boxId != null">box_id,</if> | |
| 91 | 94 | <if test="general != null">general,</if> |
| 92 | 95 | <if test="year != null">year,</if> |
| 93 | 96 | <if test="title != null">title,</if> |
| ... | ... | @@ -123,6 +126,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 123 | 126 | <if test="boxMark != null">box_mark,</if> |
| 124 | 127 | </trim> |
| 125 | 128 | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| 129 | + <if test="boxId != null">#{boxId},</if> | |
| 126 | 130 | <if test="general != null">#{general},</if> |
| 127 | 131 | <if test="year != null">#{year},</if> |
| 128 | 132 | <if test="title != null">#{title},</if> |
| ... | ... | @@ -162,6 +166,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 162 | 166 | <update id="updateArchivesCollectBox" parameterType="ArchivesCollectBox"> |
| 163 | 167 | update archives_collect_box |
| 164 | 168 | <trim prefix="SET" suffixOverrides=","> |
| 169 | + <if test="boxId != null">box_id = #{boxId},</if> | |
| 165 | 170 | <if test="general != null">general = #{general},</if> |
| 166 | 171 | <if test="year != null">year = #{year},</if> |
| 167 | 172 | <if test="title != null">title = #{title},</if> | ... | ... |
ruoyi-ui/src/api/archives/collerctbox.js
ruoyi-ui/src/views/archives/box/index.vue
| ... | ... | @@ -160,9 +160,8 @@ |
| 160 | 160 | |
| 161 | 161 | |
| 162 | 162 | |
| 163 | - <el-dialog :title="title" :visible.sync="boxOpen" width="80%" append-to-body> | |
| 164 | - | |
| 165 | - <indexbox :statusPd="2" /> | |
| 163 | + <el-dialog :title="title" :visible.sync="boxtOpen" width="80%" append-to-body> | |
| 164 | + <indexbox :boxsId= boxsId :statusPd= "2" v-if="boxtOpen"/> | |
| 166 | 165 | </el-dialog> |
| 167 | 166 | </div> |
| 168 | 167 | </template> |
| ... | ... | @@ -210,7 +209,8 @@ export default { |
| 210 | 209 | // 表单校验 |
| 211 | 210 | rules: { |
| 212 | 211 | }, |
| 213 | - boxOpen : false | |
| 212 | + boxtOpen : false, | |
| 213 | + boxsId : null, | |
| 214 | 214 | }; |
| 215 | 215 | }, |
| 216 | 216 | created() { |
| ... | ... | @@ -317,8 +317,10 @@ export default { |
| 317 | 317 | }, |
| 318 | 318 | |
| 319 | 319 | handleCheck(row){ |
| 320 | - this.boxOpen = true; | |
| 321 | - } | |
| 320 | + this.boxsId = row.id; | |
| 321 | + this.boxtOpen = true; | |
| 322 | + }, | |
| 323 | + | |
| 322 | 324 | } |
| 323 | 325 | }; |
| 324 | 326 | </script> | ... | ... |
ruoyi-ui/src/views/archives/collerctbox/index.vue
| ... | ... | @@ -46,7 +46,7 @@ |
| 46 | 46 | |
| 47 | 47 | |
| 48 | 48 | <el-col :span="1.5"> |
| 49 | - <el-select v-model="approval_type"> | |
| 49 | + <el-select v-model="approval"> | |
| 50 | 50 | <el-option |
| 51 | 51 | v-for="dict in dict.type.approval_type" |
| 52 | 52 | :key="dict.value" |
| ... | ... | @@ -115,6 +115,7 @@ |
| 115 | 115 | plain |
| 116 | 116 | icon="el-icon-download" |
| 117 | 117 | size="mini" |
| 118 | + :disabled="single" | |
| 118 | 119 | @click="handleinserBox" |
| 119 | 120 | v-hasPermi="['archives:collerctbox:inserBox']" |
| 120 | 121 | >加入盒</el-button> |
| ... | ... | @@ -167,7 +168,7 @@ |
| 167 | 168 | <el-table-column label="1.待整理 2.待审批" align="center" prop="apprvoal" /> |
| 168 | 169 | <el-table-column label="该文本属于哪个角色" align="center" prop="belongRole" /> |
| 169 | 170 | <el-table-column label="盒号" align="center" prop="boxMark" /> |
| 170 | - <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | |
| 171 | + <el-table-column label="操作" align="center" class-name="small-padding fixed-width" v-if="titleshow"> | |
| 171 | 172 | <template slot-scope="scope"> |
| 172 | 173 | <el-button |
| 173 | 174 | size="mini" |
| ... | ... | @@ -314,11 +315,51 @@ |
| 314 | 315 | <el-dialog :title="title" :visible.sync="fileOpen" width="80%" append-to-body> |
| 315 | 316 | <file :collboxId=collboxId /> |
| 316 | 317 | </el-dialog> |
| 318 | + | |
| 319 | + | |
| 320 | + <el-dialog :title="title" :visible.sync="boxOpen" width="80%" append-to-body> | |
| 321 | + <el-table v-loading="loading" :data="boxtwoList" @selection-change="handleSelectionChange"> | |
| 322 | + <el-table-column type="selection" width="55" align="center" /> | |
| 323 | + <el-table-column label="年度" align="center" prop="year" /> | |
| 324 | + <el-table-column label="卷盒规则" align="center" prop="boxRule" /> | |
| 325 | + <el-table-column label="盒号" align="center" prop="boxMark" /> | |
| 326 | + <el-table-column label="库位码" align="center" prop="deportNodeId" /> | |
| 327 | + <el-table-column label="描述" align="center" prop="describes" /> | |
| 328 | + </el-table> | |
| 329 | + | |
| 330 | + <el-col :span="1.5"> | |
| 331 | + <el-button | |
| 332 | + type="success" | |
| 333 | + plain | |
| 334 | + icon="el-icon-edit" | |
| 335 | + size="mini" | |
| 336 | + :disabled="single" | |
| 337 | + @click="handleUpdate" | |
| 338 | + v-hasPermi="['archives:box:edit']" | |
| 339 | + >修改</el-button> | |
| 340 | + </el-col> | |
| 341 | + <div slot="footer" class="dialog-footer"> | |
| 342 | + <el-button type="primary" @click="insetBox">确 定</el-button> | |
| 343 | + <el-button @click="cancel">取 消</el-button> | |
| 344 | + </div> | |
| 345 | + | |
| 346 | +<!-- | |
| 347 | + <pagination | |
| 348 | + v-show="total>0" | |
| 349 | + :total="total" | |
| 350 | + :page.sync="queryParams.pageNum" | |
| 351 | + :limit.sync="queryParams.pageSize" | |
| 352 | + @pagination="getList" | |
| 353 | + />--> | |
| 354 | + | |
| 355 | + </el-dialog> | |
| 317 | 356 | </div> |
| 318 | 357 | </template> |
| 319 | 358 | |
| 320 | 359 | <script> |
| 321 | -import { listBox, getBox, delBox, addBox, updateBox } from "@/api/archives/collerctbox"; | |
| 360 | +import { listCollerBox, getBox, delBox, addBox, updateBox } from "@/api/archives/collerctbox"; | |
| 361 | + | |
| 362 | + | |
| 322 | 363 | import file from "@/views/archives/file/index.vue"; |
| 323 | 364 | export default { |
| 324 | 365 | name: "collerctbox", |
| ... | ... | @@ -327,6 +368,9 @@ export default { |
| 327 | 368 | props: { |
| 328 | 369 | statusPd: { |
| 329 | 370 | type: Number, // 这里你接收的值是什么类型就写什么类型 |
| 371 | + }, | |
| 372 | + boxsId: { | |
| 373 | + type: Number, | |
| 330 | 374 | } |
| 331 | 375 | }, |
| 332 | 376 | |
| ... | ... | @@ -346,6 +390,7 @@ export default { |
| 346 | 390 | total: 0, |
| 347 | 391 | // 【请填写功能名称】表格数据 |
| 348 | 392 | boxList: [], |
| 393 | + boxtwoList: [], | |
| 349 | 394 | // 弹出层标题 |
| 350 | 395 | title: "", |
| 351 | 396 | // 是否显示弹出层 |
| ... | ... | @@ -389,16 +434,20 @@ export default { |
| 389 | 434 | // 表单校验 |
| 390 | 435 | rules: { |
| 391 | 436 | }, |
| 392 | - approval_type : null, | |
| 437 | + approval : "0", //是否审批 //默认待整理 | |
| 393 | 438 | // statusPd : null, //页面传递参数 1.未整理 2.已整理 3.盒 |
| 394 | - titleshow : true,//3.盒 不显示查询条件 | |
| 439 | + titleshow : true,//2.盒 不显示查询条件 | |
| 395 | 440 | fileOpen : false, |
| 396 | 441 | collboxId: null,//本次Id |
| 397 | - lecommit: false | |
| 442 | + lecommit: false, | |
| 443 | + inserBox: false,//加入盒按钮 | |
| 444 | + boxOpen:false, | |
| 445 | + collerboxid : null, | |
| 398 | 446 | }; |
| 399 | 447 | }, |
| 400 | 448 | //statusPd 0未整理文件 1 已整理文件 2 盒 |
| 401 | 449 | created() { |
| 450 | + debugger | |
| 402 | 451 | this.getList(); |
| 403 | 452 | this.titleshow =this.statusPd == 2 ? false : true; //提交 |
| 404 | 453 | this.lecommit = this.statusPd != "0" ? false :true; |
| ... | ... | @@ -407,9 +456,11 @@ export default { |
| 407 | 456 | methods: { |
| 408 | 457 | /** 查询【请填写功能名称】列表 */ |
| 409 | 458 | getList() { |
| 459 | + debugger | |
| 410 | 460 | this.loading = true; |
| 461 | + this.queryParams.boxId = this.boxsId != null ? this.boxsId : null; //是否盒内文件 | |
| 411 | 462 | this.queryParams.status = this.statusPd; |
| 412 | - listBox(this.queryParams).then(response => { | |
| 463 | + listCollerBox(this.queryParams).then(response => { | |
| 413 | 464 | this.boxList = response.rows; |
| 414 | 465 | this.total = response.total; |
| 415 | 466 | this.loading = false; |
| ... | ... | @@ -424,6 +475,7 @@ export default { |
| 424 | 475 | reset() { |
| 425 | 476 | this.form = { |
| 426 | 477 | id: null, |
| 478 | + boxId: null, | |
| 427 | 479 | general: null, |
| 428 | 480 | year: null, |
| 429 | 481 | title: null, |
| ... | ... | @@ -457,7 +509,6 @@ export default { |
| 457 | 509 | apprvoal: null, |
| 458 | 510 | belongRole: null, |
| 459 | 511 | boxMark: null, |
| 460 | - inserBox: false, | |
| 461 | 512 | }; |
| 462 | 513 | this.resetForm("form"); |
| 463 | 514 | }, |
| ... | ... | @@ -529,6 +580,13 @@ export default { |
| 529 | 580 | ...this.queryParams |
| 530 | 581 | }, `box_${new Date().getTime()}.xlsx`) |
| 531 | 582 | }, |
| 583 | + | |
| 584 | + | |
| 585 | + handleCheck(row){ | |
| 586 | + this.fileOpen = true; | |
| 587 | + this.collboxId = row.id; | |
| 588 | + }, | |
| 589 | + | |
| 532 | 590 | /** 提交按钮操作 */ |
| 533 | 591 | handleCommit(row){ |
| 534 | 592 | const id = row.id || this.ids |
| ... | ... | @@ -542,13 +600,35 @@ export default { |
| 542 | 600 | }); |
| 543 | 601 | }); |
| 544 | 602 | }, |
| 603 | + //打开加入盒页面 并保存id | |
| 545 | 604 | handleinserBox(row){ |
| 605 | + const collerboxid = row.id || this.ids; | |
| 606 | + this.boxOpen = true; | |
| 607 | + this.collerboxid = collerboxid; | |
| 608 | + listBox(this.queryParams).then(response => { | |
| 609 | + this.boxtwoList = response.rows; | |
| 610 | + }); | |
| 611 | + }, | |
| 546 | 612 | |
| 613 | + //加入盒 | |
| 614 | + insetBox(row){ | |
| 615 | + let id = row.id || this.ids; | |
| 616 | + if (id.length > 1){ | |
| 617 | + alert("请选择1个盒") | |
| 618 | + return; | |
| 619 | + } | |
| 620 | + let collerboxid = this.collerboxid; | |
| 621 | + getBox(collerboxid).then(response => { | |
| 622 | + let from = response.data; | |
| 623 | + from.boxId = id + ""; //盒id | |
| 624 | + from.status = "2"; | |
| 625 | + updateBox(from).then(response => { | |
| 626 | + this.$modal.msgSuccess("提交成功"); | |
| 627 | + this.boxOpen = false; | |
| 628 | + }); | |
| 629 | + }); | |
| 547 | 630 | }, |
| 548 | - handleCheck(row){ | |
| 549 | - this.fileOpen = true; | |
| 550 | - this.collboxId = row.id; | |
| 551 | - } | |
| 631 | + | |
| 552 | 632 | } |
| 553 | 633 | }; |
| 554 | 634 | </script> | ... | ... |
ruoyi-ui/src/views/archives/file/index.vue