Commit c42e803045c550d941a13adbe703ad59b487b54c

Authored by ljq
1 parent 06cb983b

档案合并

ruoyi-archives/src/main/java/com/ruoyi/domain/ArchivesCollectBox.java
@@ -20,6 +20,10 @@ public class ArchivesCollectBox extends BaseEntity @@ -20,6 +20,10 @@ public class ArchivesCollectBox extends BaseEntity
20 /** 主键 */ 20 /** 主键 */
21 private Long id; 21 private Long id;
22 22
  23 +
  24 + /** 盒ID */
  25 + @Excel(name = "盒ID")
  26 + private Long boxId;
23 /** 全宗号 */ 27 /** 全宗号 */
24 @Excel(name = "全宗号") 28 @Excel(name = "全宗号")
25 private String general; 29 private String general;
@@ -413,10 +417,19 @@ public class ArchivesCollectBox extends BaseEntity @@ -413,10 +417,19 @@ public class ArchivesCollectBox extends BaseEntity
413 return boxMark; 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 @Override 428 @Override
417 public String toString() { 429 public String toString() {
418 return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) 430 return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
419 .append("id", getId()) 431 .append("id", getId())
  432 + .append("boxId", getBoxId())
420 .append("general", getGeneral()) 433 .append("general", getGeneral())
421 .append("year", getYear()) 434 .append("year", getYear())
422 .append("title", getTitle()) 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 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
6 6
7 <resultMap type="ArchivesCollectBox" id="ArchivesCollectBoxResult"> 7 <resultMap type="ArchivesCollectBox" id="ArchivesCollectBoxResult">
8 <result property="id" column="id" /> 8 <result property="id" column="id" />
  9 + <result property="boxId" column="box_id" />
9 <result property="general" column="general" /> 10 <result property="general" column="general" />
10 <result property="year" column="year" /> 11 <result property="year" column="year" />
11 <result property="title" column="title" /> 12 <result property="title" column="title" />
@@ -42,12 +43,13 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -42,12 +43,13 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
42 </resultMap> 43 </resultMap>
43 44
44 <sql id="selectArchivesCollectBoxVo"> 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 </sql> 47 </sql>
47 48
48 <select id="selectArchivesCollectBoxList" parameterType="ArchivesCollectBox" resultMap="ArchivesCollectBoxResult"> 49 <select id="selectArchivesCollectBoxList" parameterType="ArchivesCollectBox" resultMap="ArchivesCollectBoxResult">
49 <include refid="selectArchivesCollectBoxVo"/> 50 <include refid="selectArchivesCollectBoxVo"/>
50 - <where> 51 + <where>
  52 + <if test="boxId != null "> and box_id = #{boxId}</if>
51 <if test="general != null and general != ''"> and general = #{general}</if> 53 <if test="general != null and general != ''"> and general = #{general}</if>
52 <if test="year != null and year != ''"> and year = #{year}</if> 54 <if test="year != null and year != ''"> and year = #{year}</if>
53 <if test="title != null and title != ''"> and title = #{title}</if> 55 <if test="title != null and title != ''"> and title = #{title}</if>
@@ -88,6 +90,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -88,6 +90,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
88 <insert id="insertArchivesCollectBox" parameterType="ArchivesCollectBox" useGeneratedKeys="true" keyProperty="id"> 90 <insert id="insertArchivesCollectBox" parameterType="ArchivesCollectBox" useGeneratedKeys="true" keyProperty="id">
89 insert into archives_collect_box 91 insert into archives_collect_box
90 <trim prefix="(" suffix=")" suffixOverrides=","> 92 <trim prefix="(" suffix=")" suffixOverrides=",">
  93 + <if test="boxId != null">box_id,</if>
91 <if test="general != null">general,</if> 94 <if test="general != null">general,</if>
92 <if test="year != null">year,</if> 95 <if test="year != null">year,</if>
93 <if test="title != null">title,</if> 96 <if test="title != null">title,</if>
@@ -123,6 +126,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -123,6 +126,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
123 <if test="boxMark != null">box_mark,</if> 126 <if test="boxMark != null">box_mark,</if>
124 </trim> 127 </trim>
125 <trim prefix="values (" suffix=")" suffixOverrides=","> 128 <trim prefix="values (" suffix=")" suffixOverrides=",">
  129 + <if test="boxId != null">#{boxId},</if>
126 <if test="general != null">#{general},</if> 130 <if test="general != null">#{general},</if>
127 <if test="year != null">#{year},</if> 131 <if test="year != null">#{year},</if>
128 <if test="title != null">#{title},</if> 132 <if test="title != null">#{title},</if>
@@ -162,6 +166,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -162,6 +166,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
162 <update id="updateArchivesCollectBox" parameterType="ArchivesCollectBox"> 166 <update id="updateArchivesCollectBox" parameterType="ArchivesCollectBox">
163 update archives_collect_box 167 update archives_collect_box
164 <trim prefix="SET" suffixOverrides=","> 168 <trim prefix="SET" suffixOverrides=",">
  169 + <if test="boxId != null">box_id = #{boxId},</if>
165 <if test="general != null">general = #{general},</if> 170 <if test="general != null">general = #{general},</if>
166 <if test="year != null">year = #{year},</if> 171 <if test="year != null">year = #{year},</if>
167 <if test="title != null">title = #{title},</if> 172 <if test="title != null">title = #{title},</if>
ruoyi-ui/src/api/archives/collerctbox.js
1 import request from '@/utils/request' 1 import request from '@/utils/request'
2 2
3 // 查询【请填写功能名称】列表 3 // 查询【请填写功能名称】列表
4 -export function listBox(query) { 4 +export function listCollerBox(query) {
5 return request({ 5 return request({
6 url: '/archives/collerctbox/list', 6 url: '/archives/collerctbox/list',
7 method: 'get', 7 method: 'get',
ruoyi-ui/src/views/archives/box/index.vue
@@ -160,9 +160,8 @@ @@ -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 </el-dialog> 165 </el-dialog>
167 </div> 166 </div>
168 </template> 167 </template>
@@ -210,7 +209,8 @@ export default { @@ -210,7 +209,8 @@ export default {
210 // 表单校验 209 // 表单校验
211 rules: { 210 rules: {
212 }, 211 },
213 - boxOpen : false 212 + boxtOpen : false,
  213 + boxsId : null,
214 }; 214 };
215 }, 215 },
216 created() { 216 created() {
@@ -317,8 +317,10 @@ export default { @@ -317,8 +317,10 @@ export default {
317 }, 317 },
318 318
319 handleCheck(row){ 319 handleCheck(row){
320 - this.boxOpen = true;  
321 - } 320 + this.boxsId = row.id;
  321 + this.boxtOpen = true;
  322 + },
  323 +
322 } 324 }
323 }; 325 };
324 </script> 326 </script>
ruoyi-ui/src/views/archives/collerctbox/index.vue
@@ -46,7 +46,7 @@ @@ -46,7 +46,7 @@
46 46
47 47
48 <el-col :span="1.5"> 48 <el-col :span="1.5">
49 - <el-select v-model="approval_type"> 49 + <el-select v-model="approval">
50 <el-option 50 <el-option
51 v-for="dict in dict.type.approval_type" 51 v-for="dict in dict.type.approval_type"
52 :key="dict.value" 52 :key="dict.value"
@@ -115,6 +115,7 @@ @@ -115,6 +115,7 @@
115 plain 115 plain
116 icon="el-icon-download" 116 icon="el-icon-download"
117 size="mini" 117 size="mini"
  118 + :disabled="single"
118 @click="handleinserBox" 119 @click="handleinserBox"
119 v-hasPermi="['archives:collerctbox:inserBox']" 120 v-hasPermi="['archives:collerctbox:inserBox']"
120 >加入盒</el-button> 121 >加入盒</el-button>
@@ -167,7 +168,7 @@ @@ -167,7 +168,7 @@
167 <el-table-column label="1.待整理 2.待审批" align="center" prop="apprvoal" /> 168 <el-table-column label="1.待整理 2.待审批" align="center" prop="apprvoal" />
168 <el-table-column label="该文本属于哪个角色" align="center" prop="belongRole" /> 169 <el-table-column label="该文本属于哪个角色" align="center" prop="belongRole" />
169 <el-table-column label="盒号" align="center" prop="boxMark" /> 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 <template slot-scope="scope"> 172 <template slot-scope="scope">
172 <el-button 173 <el-button
173 size="mini" 174 size="mini"
@@ -314,11 +315,51 @@ @@ -314,11 +315,51 @@
314 <el-dialog :title="title" :visible.sync="fileOpen" width="80%" append-to-body> 315 <el-dialog :title="title" :visible.sync="fileOpen" width="80%" append-to-body>
315 <file :collboxId=collboxId /> 316 <file :collboxId=collboxId />
316 </el-dialog> 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 </div> 356 </div>
318 </template> 357 </template>
319 358
320 <script> 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 import file from "@/views/archives/file/index.vue"; 363 import file from "@/views/archives/file/index.vue";
323 export default { 364 export default {
324 name: "collerctbox", 365 name: "collerctbox",
@@ -327,6 +368,9 @@ export default { @@ -327,6 +368,9 @@ export default {
327 props: { 368 props: {
328 statusPd: { 369 statusPd: {
329 type: Number, // 这里你接收的值是什么类型就写什么类型 370 type: Number, // 这里你接收的值是什么类型就写什么类型
  371 + },
  372 + boxsId: {
  373 + type: Number,
330 } 374 }
331 }, 375 },
332 376
@@ -346,6 +390,7 @@ export default { @@ -346,6 +390,7 @@ export default {
346 total: 0, 390 total: 0,
347 // 【请填写功能名称】表格数据 391 // 【请填写功能名称】表格数据
348 boxList: [], 392 boxList: [],
  393 + boxtwoList: [],
349 // 弹出层标题 394 // 弹出层标题
350 title: "", 395 title: "",
351 // 是否显示弹出层 396 // 是否显示弹出层
@@ -389,16 +434,20 @@ export default { @@ -389,16 +434,20 @@ export default {
389 // 表单校验 434 // 表单校验
390 rules: { 435 rules: {
391 }, 436 },
392 - approval_type : null, 437 + approval : "0", //是否审批 //默认待整理
393 // statusPd : null, //页面传递参数 1.未整理 2.已整理 3.盒 438 // statusPd : null, //页面传递参数 1.未整理 2.已整理 3.盒
394 - titleshow : true,//3.盒 不显示查询条件 439 + titleshow : true,//2.盒 不显示查询条件
395 fileOpen : false, 440 fileOpen : false,
396 collboxId: null,//本次Id 441 collboxId: null,//本次Id
397 - lecommit: false 442 + lecommit: false,
  443 + inserBox: false,//加入盒按钮
  444 + boxOpen:false,
  445 + collerboxid : null,
398 }; 446 };
399 }, 447 },
400 //statusPd 0未整理文件 1 已整理文件 2 盒 448 //statusPd 0未整理文件 1 已整理文件 2 盒
401 created() { 449 created() {
  450 + debugger
402 this.getList(); 451 this.getList();
403 this.titleshow =this.statusPd == 2 ? false : true; //提交 452 this.titleshow =this.statusPd == 2 ? false : true; //提交
404 this.lecommit = this.statusPd != "0" ? false :true; 453 this.lecommit = this.statusPd != "0" ? false :true;
@@ -407,9 +456,11 @@ export default { @@ -407,9 +456,11 @@ export default {
407 methods: { 456 methods: {
408 /** 查询【请填写功能名称】列表 */ 457 /** 查询【请填写功能名称】列表 */
409 getList() { 458 getList() {
  459 + debugger
410 this.loading = true; 460 this.loading = true;
  461 + this.queryParams.boxId = this.boxsId != null ? this.boxsId : null; //是否盒内文件
411 this.queryParams.status = this.statusPd; 462 this.queryParams.status = this.statusPd;
412 - listBox(this.queryParams).then(response => { 463 + listCollerBox(this.queryParams).then(response => {
413 this.boxList = response.rows; 464 this.boxList = response.rows;
414 this.total = response.total; 465 this.total = response.total;
415 this.loading = false; 466 this.loading = false;
@@ -424,6 +475,7 @@ export default { @@ -424,6 +475,7 @@ export default {
424 reset() { 475 reset() {
425 this.form = { 476 this.form = {
426 id: null, 477 id: null,
  478 + boxId: null,
427 general: null, 479 general: null,
428 year: null, 480 year: null,
429 title: null, 481 title: null,
@@ -457,7 +509,6 @@ export default { @@ -457,7 +509,6 @@ export default {
457 apprvoal: null, 509 apprvoal: null,
458 belongRole: null, 510 belongRole: null,
459 boxMark: null, 511 boxMark: null,
460 - inserBox: false,  
461 }; 512 };
462 this.resetForm("form"); 513 this.resetForm("form");
463 }, 514 },
@@ -529,6 +580,13 @@ export default { @@ -529,6 +580,13 @@ export default {
529 ...this.queryParams 580 ...this.queryParams
530 }, `box_${new Date().getTime()}.xlsx`) 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 handleCommit(row){ 591 handleCommit(row){
534 const id = row.id || this.ids 592 const id = row.id || this.ids
@@ -542,13 +600,35 @@ export default { @@ -542,13 +600,35 @@ export default {
542 }); 600 });
543 }); 601 });
544 }, 602 },
  603 + //打开加入盒页面 并保存id
545 handleinserBox(row){ 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 </script> 634 </script>
ruoyi-ui/src/views/archives/file/index.vue
@@ -342,6 +342,7 @@ export default { @@ -342,6 +342,7 @@ export default {
342 this.getList(); 342 this.getList();
343 }); 343 });
344 } else { 344 } else {
  345 + this.form.colletctId = this.collboxId;
345 addFile(this.form).then(response => { 346 addFile(this.form).then(response => {
346 this.$modal.msgSuccess("新增成功"); 347 this.$modal.msgSuccess("新增成功");
347 this.open = false; 348 this.open = false;