Commit 0114ce227941c9a78bd48a3621b43aa90b5d62c9

Authored by ljq
2 parents 0da383a3 93e2f500

Merge remote-tracking branch 'origin/master'

ruoyi-service/pom.xml
... ... @@ -15,6 +15,10 @@
15 15 <groupId>com.ruoyi</groupId>
16 16 <artifactId>ruoyi-common</artifactId>
17 17 </dependency>
  18 + <dependency>
  19 + <groupId>com.ruoyi</groupId>
  20 + <artifactId>ruoyi-archives</artifactId>
  21 + </dependency>
18 22 </dependencies>
19 23  
20 24 <properties>
... ...
ruoyi-service/src/main/java/com/ruoyi/service/controller/ExpirationController.java 0 → 100644
  1 +package com.ruoyi.service.controller;
  2 +
  3 +
  4 +import com.ruoyi.common.annotation.Log;
  5 +import com.ruoyi.common.core.controller.BaseController;
  6 +import com.ruoyi.common.core.domain.AjaxResult;
  7 +import com.ruoyi.common.core.domain.model.LoginUser;
  8 +import com.ruoyi.common.core.page.TableDataInfo;
  9 +import com.ruoyi.common.enums.BusinessType;
  10 +import com.ruoyi.service.domain.Expiration;
  11 +import com.ruoyi.service.domain.Inventory;
  12 +import com.ruoyi.service.service.ExpirationService;
  13 +import org.springframework.security.access.prepost.PreAuthorize;
  14 +import org.springframework.validation.annotation.Validated;
  15 +import org.springframework.web.bind.annotation.*;
  16 +
  17 +import javax.annotation.Resource;
  18 +import java.util.List;
  19 +import java.util.Map;
  20 +import java.util.Random;
  21 +
  22 +
  23 +/**
  24 + * 档案到期鉴定 控制层
  25 + *
  26 + * @author ym
  27 + */
  28 +@RestController
  29 +@RequestMapping("/service/expiration")
  30 +public class ExpirationController extends BaseController
  31 +{
  32 +
  33 + @Resource
  34 + private ExpirationService expirationService;
  35 +
  36 +
  37 + @PreAuthorize("@ss.hasPermi('service:expiration:list')")
  38 + @GetMapping("/list")
  39 + public TableDataInfo list(Expiration expiration)
  40 + {
  41 + startPage();
  42 + List<Expiration> list = expirationService.selectList(expiration);
  43 + return getDataTable(list);
  44 + }
  45 +
  46 +
  47 + @PreAuthorize("@ss.hasPermi('service:inventory:edit')")
  48 + @Log(title = "库房盘点", businessType = BusinessType.UPDATE)
  49 + @PostMapping("/{ids}")
  50 + public AjaxResult apply(@PathVariable Long[] ids)
  51 + {
  52 + Expiration expiration=new Expiration();
  53 + expiration.setIds(ids);
  54 + //记录申请人
  55 + LoginUser loginUser=getLoginUser();
  56 + expiration.setApplicant(loginUser.getUsername());
  57 + //生成审批单号(时间戳毫秒+4位随机数)
  58 + String random=String.valueOf(System.currentTimeMillis()/1000)+1000+new Random().nextInt(9000);
  59 + expiration.setExpirationNo(random);
  60 + return toAjax(expirationService.apply(expiration));
  61 + }
  62 +
  63 + @PreAuthorize("@ss.hasPermi('service:inventory:edit')")
  64 + @Log(title = "库房盘点", businessType = BusinessType.UPDATE)
  65 + @PostMapping("/yb/{ids}")
  66 + public AjaxResult yb(@PathVariable Long[] ids)
  67 + {
  68 + Expiration expiration=new Expiration();
  69 + expiration.setIds(ids);
  70 + //记录申请人
  71 + LoginUser loginUser=getLoginUser();
  72 + expiration.setExamineUser(loginUser.getUsername());
  73 + expiration.setExpirationType(1);
  74 + return toAjax(expirationService.handle(expiration));
  75 + }
  76 +
  77 + @PreAuthorize("@ss.hasPermi('service:inventory:edit')")
  78 + @Log(title = "库房盘点", businessType = BusinessType.UPDATE)
  79 + @PostMapping("/xh/{ids}")
  80 + public AjaxResult xh(@PathVariable Long[] ids)
  81 + {
  82 + Expiration expiration=new Expiration();
  83 + expiration.setIds(ids);
  84 + //记录申请人
  85 + LoginUser loginUser=getLoginUser();
  86 + expiration.setExamineUser(loginUser.getUsername());
  87 + expiration.setExpirationType(2);
  88 + return toAjax(expirationService.handle(expiration));
  89 + }
  90 +
  91 + @PreAuthorize("@ss.hasPermi('service:inventory:edit')")
  92 + @Log(title = "库房盘点", businessType = BusinessType.UPDATE)
  93 + @PostMapping("/yj/{ids}")
  94 + public AjaxResult yj(@PathVariable Long[] ids)
  95 + {
  96 + Expiration expiration=new Expiration();
  97 + expiration.setIds(ids);
  98 + //记录申请人
  99 + LoginUser loginUser=getLoginUser();
  100 + expiration.setExamineUser(loginUser.getUsername());
  101 + expiration.setExpirationType(3);
  102 + return toAjax(expirationService.handle(expiration));
  103 + }
  104 +
  105 +}
... ...
ruoyi-service/src/main/java/com/ruoyi/service/domain/Expiration.java 0 → 100644
  1 +package com.ruoyi.service.domain;
  2 +
  3 +
  4 +import com.fasterxml.jackson.annotation.JsonFormat;
  5 +import com.ruoyi.domain.ArchivesCollectBox;
  6 +import java.util.Date;
  7 +
  8 +
  9 +/**
  10 + * 到期鉴定 expiration
  11 + *
  12 + * @author ym
  13 + */
  14 +public class Expiration extends ArchivesCollectBox
  15 +{
  16 + private static final long serialVersionUID = 1L;
  17 +
  18 + /** 主键 */
  19 + private Long id;
  20 +
  21 + /** 审批号 */
  22 + private String expirationNo;
  23 +
  24 + /** archives_collect_volume的主键 */
  25 + private Long foreignKey;
  26 +
  27 + /** 状态 0-未提交 1-待审核 */
  28 + private int examineState;
  29 +
  30 + /** 处理方式 1-延保 2-销毁 3-移交 */
  31 + private Integer expirationType;
  32 +
  33 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  34 + private Date createTime;
  35 +
  36 + /** 申请人 */
  37 + private String applicant;
  38 +
  39 + /** 申请时间 */
  40 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  41 + private Date applicationTime;
  42 +
  43 + /** 审批人 */
  44 + private String examineUser;
  45 +
  46 + /** 审批时间 */
  47 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  48 + private Date examineTime;
  49 +
  50 + private Long[] ids;
  51 +
  52 + @Override
  53 + public Long getId() {
  54 + return id;
  55 + }
  56 +
  57 + @Override
  58 + public void setId(Long id) {
  59 + this.id = id;
  60 + }
  61 +
  62 + public String getExpirationNo() {
  63 + return expirationNo;
  64 + }
  65 +
  66 + public void setExpirationNo(String expirationNo) {
  67 + this.expirationNo = expirationNo;
  68 + }
  69 +
  70 + public Long getForeignKey() {
  71 + return foreignKey;
  72 + }
  73 +
  74 + public void setForeignKey(Long foreignKey) {
  75 + this.foreignKey = foreignKey;
  76 + }
  77 +
  78 + public int getExamineState() {
  79 + return examineState;
  80 + }
  81 +
  82 + public void setExamineState(int examineState) {
  83 + this.examineState = examineState;
  84 + }
  85 +
  86 + public Integer getExpirationType() {
  87 + return expirationType;
  88 + }
  89 +
  90 + public void setExpirationType(Integer expirationType) {
  91 + this.expirationType = expirationType;
  92 + }
  93 +
  94 + @Override
  95 + public Date getCreateTime() {
  96 + return createTime;
  97 + }
  98 +
  99 + @Override
  100 + public void setCreateTime(Date createTime) {
  101 + this.createTime = createTime;
  102 + }
  103 +
  104 + public String getApplicant() {
  105 + return applicant;
  106 + }
  107 +
  108 + public void setApplicant(String applicant) {
  109 + this.applicant = applicant;
  110 + }
  111 +
  112 + public Date getApplicationTime() {
  113 + return applicationTime;
  114 + }
  115 +
  116 + public void setApplicationTime(Date applicationTime) {
  117 + this.applicationTime = applicationTime;
  118 + }
  119 +
  120 + public String getExamineUser() {
  121 + return examineUser;
  122 + }
  123 +
  124 + public void setExamineUser(String examineUser) {
  125 + this.examineUser = examineUser;
  126 + }
  127 +
  128 + public Date getExamineTime() {
  129 + return examineTime;
  130 + }
  131 +
  132 + public void setExamineTime(Date examineTime) {
  133 + this.examineTime = examineTime;
  134 + }
  135 +
  136 + public Long[] getIds() {
  137 + return ids;
  138 + }
  139 +
  140 + public void setIds(Long[] ids) {
  141 + this.ids = ids;
  142 + }
  143 +}
... ...
ruoyi-service/src/main/java/com/ruoyi/service/mapper/ExpirationMapper.java 0 → 100644
  1 +package com.ruoyi.service.mapper;
  2 +
  3 +
  4 +
  5 +
  6 +import com.ruoyi.service.domain.Expiration;
  7 +
  8 +import java.util.List;
  9 +
  10 +/**
  11 + * 档案到期鉴定 数据层
  12 + *
  13 + * @author ym
  14 + */
  15 +public interface ExpirationMapper
  16 +{
  17 + int insert(Expiration expiration);
  18 + List<Expiration> selectList(Expiration expiration);
  19 + int apply(Expiration expiration);
  20 + int handle(Expiration expiration);
  21 +}
... ...
ruoyi-service/src/main/java/com/ruoyi/service/service/ExpirationService.java 0 → 100644
  1 +package com.ruoyi.service.service;
  2 +
  3 +
  4 +import com.ruoyi.service.domain.Expiration;
  5 +import java.util.List;
  6 +
  7 +/**
  8 + * 档案到期鉴定 服务层
  9 + *
  10 + * @author ym
  11 + */
  12 +public interface ExpirationService
  13 +{
  14 + int insert(Expiration expiration);
  15 + List<Expiration> selectList(Expiration expiration);
  16 + int apply(Expiration expiration);
  17 + int handle(Expiration expiration);
  18 +
  19 +}
... ...
ruoyi-service/src/main/java/com/ruoyi/service/service/impl/ExpirationServiceImpl.java 0 → 100644
  1 +package com.ruoyi.service.service.impl;
  2 +
  3 +
  4 +import com.ruoyi.service.domain.Expiration;
  5 +import com.ruoyi.service.mapper.ExpirationMapper;
  6 +import com.ruoyi.service.service.ExpirationService;
  7 +import org.springframework.stereotype.Service;
  8 +
  9 +
  10 +import javax.annotation.Resource;
  11 +import java.util.List;
  12 +
  13 +
  14 +/**
  15 + * 档案到期鉴定 服务实现
  16 + *
  17 + * @author ym
  18 + */
  19 +@Service
  20 +public class ExpirationServiceImpl implements ExpirationService
  21 +{
  22 + @Resource
  23 + private ExpirationMapper expirationMapper;
  24 +
  25 +
  26 + @Override
  27 + public int insert(Expiration expiration) {
  28 + return expirationMapper.insert(expiration);
  29 + }
  30 +
  31 + @Override
  32 + public List<Expiration> selectList(Expiration expiration) {
  33 + return expirationMapper.selectList(expiration);
  34 + }
  35 +
  36 + @Override
  37 + public int apply(Expiration expiration) {
  38 + return expirationMapper.apply(expiration);
  39 + }
  40 +
  41 + @Override
  42 + public int handle(Expiration expiration) {
  43 + return expirationMapper.handle(expiration);
  44 + }
  45 +
  46 +
  47 +
  48 +}
... ...
ruoyi-service/src/main/resources/mapper/sevice/ExpirationMapper.xml 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8" ?>
  2 +<!DOCTYPE mapper
  3 +PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4 +"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5 +<mapper namespace="com.ruoyi.service.mapper.ExpirationMapper">
  6 +
  7 + <insert id="insert" parameterType="com.ruoyi.service.domain.Expiration">
  8 + insert into expiration(
  9 + <if test="expirationNo != null and expirationNo != ''">expirationNo,</if>
  10 + <if test="foreignKey != null and foreignKey != ''">foreignKey,</if>
  11 + createTime
  12 + )values(
  13 + <if test="expirationNo != null and expirationNo != ''">#{expirationNo},</if>
  14 + <if test="foreignKey != null and foreignKey != ''">#{foreignKey},</if>
  15 + sysdate()
  16 + )
  17 + </insert>
  18 +
  19 + <!--<resultMap type="Expiration" id="expiration">
  20 + <result property="id" column="id" />
  21 + <result property="expirationNo" column="expirationNo" />
  22 + <result property="foreignKey" column="foreignKey" />
  23 + <result property="examineState" column="examineState" />
  24 + <result property="expirationType" column="expirationType" />
  25 + <result property="createTime" column="createTime" />
  26 + <result property="applicant" column="applicant" />
  27 + <result property="applicationTime" column="applicationTime" />
  28 + <result property="examineUser" column="examineUser" />
  29 + <result property="examineTime" column="examineTime" />
  30 + <result property="general" column="general" />
  31 + <result property="year" column="year" />
  32 + <result property="volumeMark" column="volume_mark" />
  33 + <result property="title" column="title" />
  34 + <result property="safekeepingDate" column="safekeeping_date" />
  35 + <result property="vlimeName" column="vlime_name" />
  36 + <result property="vlimeDept" column="vlime_dept" />
  37 + <result property="vlimeDate" column="vlime_date" />
  38 + <result property="file" column="file" />
  39 + <result property="testing" column="testing" />
  40 + <result property="fileCheck" column="file_check" />
  41 + <result property="expireDate" column="expire_date" />
  42 + <result property="deportNodeId" column="deport_node_id" />
  43 + <result property="secretLevel" column="secret_level" />
  44 + <result property="filingDept" column="filing_dept" />
  45 + </resultMap>-->
  46 +
  47 + <resultMap type="Expiration" id="expiration">
  48 + <result property="id" column="id" />
  49 + <result property="expirationNo" column="expirationNo" />
  50 + <result property="foreignKey" column="foreignKey" />
  51 + <result property="examineState" column="examineState" />
  52 + <result property="expirationType" column="expirationType" />
  53 + <result property="createTime" column="createTime" />
  54 + <result property="applicant" column="applicant" />
  55 + <result property="applicationTime" column="applicationTime" />
  56 + <result property="examineUser" column="examineUser" />
  57 + <result property="examineTime" column="examineTime" />
  58 + <result property="general" column="general" />
  59 + <result property="year" column="year" />
  60 + <result property="title" column="title" />
  61 + <result property="sort" column="sort" />
  62 + <result property="safekeepingDate" column="safekeeping_date" />
  63 + <result property="secretLevel" column="secret_level" />
  64 + <result property="pages" column="pages" />
  65 + <result property="filingNumber" column="filing_number" />
  66 + <result property="zkNumber" column="zk_number" />
  67 + <result property="locationCode" column="location_code" />
  68 + <result property="filingDept" column="filing_dept" />
  69 + <result property="archivalCode" column="archival_code" />
  70 + <result property="responsibilityName" column="responsibility_name" />
  71 + <result property="serialMark" column="serial_mark" />
  72 + <result property="pieceMark" column="piece_mark" />
  73 + <result property="registerMark" column="register_mark" />
  74 + <result property="counsellors" column="counsellors" />
  75 + <result property="filingName" column="filing_name" />
  76 + <result property="summaryName" column="summary_name" />
  77 + <result property="recordType" column="record_type" />
  78 + <result property="carrierType" column="carrier_type" />
  79 + <result property="draftName" column="draft_name" />
  80 + <result property="page" column="page" />
  81 + <result property="documentMark" column="document_mark" />
  82 + <result property="text" column="text" />
  83 + <result property="status" column="status" />
  84 + <result property="apprvoal" column="apprvoal" />
  85 + <result property="belongRole" column="belong_role" />
  86 + <result property="boxMark" column="box_mark" />
  87 + </resultMap>
  88 +
  89 + <!--<select id="selectList" resultMap="expiration" parameterType="com.ruoyi.service.domain.Expiration">
  90 + select a.*,b.* from expiration a,archives_collect_volume b,archives_dept c
  91 + where a.foreignKey=b.id and b.filing_dept=c.dept_id
  92 + <if test="filingDept != null and filingDept != ''">
  93 + AND (b.filing_dept=#{filingDept} or FIND_IN_SET(#{filingDept},c.ancestors))
  94 + </if>
  95 + <if test="examineState != null">
  96 + AND a.examineState =#{examineState}
  97 + </if>
  98 + <if test="expirationType != null and expirationType != ''">
  99 + AND a.expirationType =#{expirationType}
  100 + </if>
  101 + <if test="expirationNo != null and expirationNo != ''">
  102 + AND a.expirationNo =#{expirationNo}
  103 + </if>
  104 + </select>-->
  105 +
  106 + <select id="selectList" resultMap="expiration" parameterType="com.ruoyi.service.domain.Expiration">
  107 + select a.*,b.* from expiration a,archives_collect_box b,archives_dept c
  108 + where a.foreignKey=b.id and a.deptId=c.dept_id
  109 + <if test="filingDept != null and filingDept != ''">
  110 + AND (b.filing_dept=#{filingDept} or FIND_IN_SET(#{filingDept},c.ancestors))
  111 + </if>
  112 + <if test="examineState != null">
  113 + AND a.examineState =#{examineState}
  114 + </if>
  115 + <if test="expirationType != null and expirationType != ''">
  116 + AND a.expirationType =#{expirationType}
  117 + </if>
  118 + <if test="expirationNo != null and expirationNo != ''">
  119 + AND a.expirationNo =#{expirationNo}
  120 + </if>
  121 + </select>
  122 +
  123 +
  124 +
  125 + <update id="apply" parameterType="com.ruoyi.service.domain.Expiration">
  126 + update expiration set
  127 + examineState = 1, expirationNo = #{expirationNo}, applicant = #{applicant}, applicationTime = sysdate()
  128 + where id in
  129 + <foreach collection="ids" item="id" open="(" separator="," close=")">
  130 + #{id}
  131 + </foreach>
  132 + </update>
  133 +
  134 + <update id="handle" parameterType="com.ruoyi.service.domain.Expiration">
  135 + update expiration set
  136 + examineState = 3, expirationType = #{expirationType}, examineUser = #{examineUser}, examineTime = sysdate()
  137 + where id in
  138 + <foreach collection="ids" item="id" open="(" separator="," close=")">
  139 + #{id}
  140 + </foreach>
  141 + </update>
  142 +
  143 +</mapper>
0 144 \ No newline at end of file
... ...
ruoyi-ui/src/api/service/expiration.js 0 → 100644
  1 +import request from '@/utils/request'
  2 +
  3 +export function treeselect() {
  4 + return request({
  5 + url: '/service/safety/treeselect',
  6 + method: 'get'
  7 + })
  8 +}
  9 +
  10 +export function listPost(query) {
  11 + return request({
  12 + url: '/service/expiration/list',
  13 + method: 'get',
  14 + params: query
  15 + })
  16 +}
  17 +
  18 +export function apply(id) {
  19 + return request({
  20 + url: '/service/expiration/' + id,
  21 + method: 'post',
  22 + })
  23 +}
  24 +
  25 +export function yb(id) {
  26 + return request({
  27 + url: '/service/expiration/yb/' + id,
  28 + method: 'post',
  29 + })
  30 +}
  31 +
  32 +export function xh(id) {
  33 + return request({
  34 + url: '/service/expiration/xh/' + id,
  35 + method: 'post',
  36 + })
  37 +}
  38 +
  39 +export function yj(id) {
  40 + return request({
  41 + url: '/service/expiration/yj/' + id,
  42 + method: 'post',
  43 + })
  44 +}
  45 +
... ...
ruoyi-ui/src/views/service/expiration/index.vue 0 → 100644
  1 +<!--档案到期鉴定-->
  2 +<template>
  3 + <div class="app-container">
  4 + <el-row :gutter="20">
  5 + <el-col :span="3" :xs="24">
  6 + <div class="head-container">
  7 + <el-tree
  8 + :data="options"
  9 + :props="defaultProps"
  10 + :expand-on-click-node="false"
  11 + :filter-node-method="filterNode"
  12 + :default-expand-all=true
  13 + node-key="id"
  14 + ref="tree"
  15 + highlight-current
  16 + @node-click="handleNodeClick"
  17 + />
  18 + </div>
  19 + </el-col>
  20 + <el-col :span="20" :xs="24" >
  21 + <el-tabs type="border-card" value="0" @tab-click="clickTab">
  22 + <el-tab-pane label="到期档案" name="0" ></el-tab-pane>
  23 + <el-tab-pane label="审批结果" name="1" ></el-tab-pane>
  24 + <el-row :gutter="10" class="mb8" v-if="examineState==0">
  25 + <el-col :span="1.5">
  26 + <el-button
  27 + type="primary"
  28 + plain
  29 + size="mini"
  30 + :disabled="multiple"
  31 + @click="apply"
  32 + v-hasPermi="['server:expiration:add']"
  33 + >提交审批</el-button>
  34 + </el-col>
  35 + </el-row>
  36 + <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" v-if="examineState==1">
  37 + <el-form-item label="选择类型" prop="workType">
  38 + <el-select v-model="queryParams.expirationType" placeholder="请选择" clearable >
  39 + <el-option
  40 + v-for="dict in dict.type.expirationType"
  41 + :key="dict.value"
  42 + :label="dict.label"
  43 + :value="dict.value"
  44 + />
  45 + </el-select>
  46 + </el-form-item>
  47 + <el-form-item label="审批单号" prop="expirationNo">
  48 + <el-input v-model="queryParams.expirationNo" />
  49 + </el-form-item>
  50 + <el-form-item>
  51 + <el-button type="primary" size="mini" @click="handleQuery">搜索</el-button>
  52 + <el-button type="primary" size="mini" @click="resetQuery">重置</el-button>
  53 + <el-button type="primary" size="mini" @click="yb">延保</el-button>
  54 + <el-button type="primary" size="mini" @click="xh">销毁</el-button>
  55 + <el-button type="primary" size="mini" @click="yj">移交</el-button>
  56 + </el-form-item>
  57 + </el-form>
  58 +
  59 + <el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange">
  60 + <el-table-column type="selection" width="50" align="center" />
  61 + <el-table-column label="审批号" align="center" prop="expirationNo" show-overflow-tooltip v-if="examineState==1"/>
  62 + <el-table-column label="申请人" align="center" prop="applicant" v-if="examineState==1"/>
  63 + <el-table-column label="全宗号" align="center" prop="general" />
  64 + <el-table-column label="年度" align="center" prop="year" />
  65 + <el-table-column label="题名" align="center" prop="title" />
  66 + <el-table-column label="分类号" align="center" prop="sort" />
  67 + <el-table-column label="保管期限" align="center" prop="safekeepingDate" show-overflow-tooltip />
  68 + <el-table-column label="密级" align="center" prop="secretLevel" />
  69 + <el-table-column label="页数" align="center" prop="pages" />
  70 + <el-table-column label="归档份数" align="center" prop="filingNumber" />
  71 + <el-table-column label="在库份数" align="center" prop="zkNumber" />
  72 + <el-table-column label="库位码" align="center" prop="locationCode" />
  73 + <el-table-column label="归档部门" align="center" prop="filingDept" />
  74 + <el-table-column label="档号" align="center" prop="archivalCode" />
  75 + <el-table-column label="责任者" align="center" prop="responsibilityName" />
  76 +<!-- <el-table-column label="审批号" align="center" prop="expirationNo" show-overflow-tooltip v-if="examineState==1"/>
  77 + <el-table-column label="申请人" align="center" prop="applicant" v-if="examineState==1"/>
  78 + <el-table-column label="全宗号" align="center" prop="general" />
  79 + <el-table-column label="年度" align="center" prop="year" />
  80 + <el-table-column label="案卷号" align="center" prop="volumeMark" />
  81 + <el-table-column label="题名" align="center" prop="title" />
  82 + <el-table-column label="保管期限" align="center" prop="safekeepingDate" show-overflow-tooltip />
  83 + <el-table-column label="立卷人" align="center" prop="vlimeName" />
  84 + <el-table-column label="立卷单位" align="center" prop="vlimeDept" />
  85 + <el-table-column label="立卷时间" align="center" prop="vlimDate" />
  86 + <el-table-column label="到期时间" align="center" prop="expireDate" />
  87 + <el-table-column label="库位码" align="center" prop="locationCode" />
  88 + <el-table-column label="密级" align="center" prop="secretLevel" />
  89 + <el-table-column label="归档部门" align="center" prop="filingDept" />-->
  90 + </el-table>
  91 + <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList"/>
  92 + </el-tabs>
  93 + </el-col>
  94 + </el-row>
  95 +
  96 + <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
  97 + <el-form ref="form" :model="form" :rules="rules" label-width="90px">
  98 + <el-form-item label="处理方式" prop="expirationType">
  99 + <el-select v-model="form.expirationType" placeholder="处理方式" >
  100 + <el-option
  101 + v-for="dict in dict.type.expirationType"
  102 + :key="dict.value"
  103 + :label="dict.label"
  104 + :value="dict.value"
  105 + />
  106 + </el-select>
  107 + </el-form-item>
  108 + </el-form>
  109 + <div slot="footer" class="dialog-footer">
  110 + <el-button type="primary" @click="submitForm">确 定</el-button>
  111 + <el-button @click="cancel">取 消</el-button>
  112 + </div>
  113 + </el-dialog>
  114 +
  115 + </div>
  116 +</template>
  117 +<script>
  118 +
  119 +import {getDepots} from "@/api/service/depot";
  120 +import {treeselect} from "@/api/archives/dept";
  121 +import {listPost, apply, yb, xh, yj} from "@/api/service/expiration";
  122 +import Treeselect from "@riophae/vue-treeselect";
  123 +import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  124 +import {delPost} from "@/api/service/inventory";
  125 +
  126 +export default {
  127 + dicts: ['expirationType'],
  128 + components: { Treeselect },
  129 + data() {
  130 + return {
  131 + postList: null,
  132 + form: {},
  133 + // 遮罩层
  134 + loading: true,
  135 + // 选中数组
  136 + ids: [],
  137 + // 非单个禁用
  138 + single: true,
  139 + // 非多个禁用
  140 + multiple: true,
  141 + // 显示搜索条件
  142 + showSearch: true,
  143 + // 总条数
  144 + total: 0,
  145 + // 弹出层标题
  146 + title: "",
  147 + // 部门树选项
  148 + options: undefined,
  149 + // 是否显示弹出层
  150 + open: false,
  151 + // 表单参数
  152 + defaultProps: {
  153 + children: "children",
  154 + label: "label"
  155 + },
  156 + // 查询参数
  157 + queryParams: {
  158 + pageNum: 1,
  159 + pageSize: 10,
  160 + filingDept:undefined,
  161 + examineState:0,
  162 + expirationType:undefined,
  163 + expirationNo:undefined
  164 + },
  165 + // 表单校验
  166 + rules: {
  167 + },
  168 + depotList:[],
  169 + examineState:0
  170 + };
  171 + },
  172 + watch: {
  173 + // 根据名称筛选部门树
  174 + deptName(val) {
  175 + this.$refs.tree.filter(val);
  176 + }
  177 + },
  178 + created() {
  179 + this.getList();
  180 + this.getTreeselect();
  181 + this.getDepots();
  182 + },
  183 + methods: {
  184 + /** 树形结构 */
  185 + getTreeselect() {
  186 + treeselect().then(response => {
  187 + this.options = response.data;
  188 + });
  189 + },
  190 + // 筛选节点
  191 + filterNode(value, data) {
  192 + if (!value) return true;
  193 + return data.label.indexOf(value) !== -1;
  194 + },
  195 + // 节点单击事件
  196 + handleNodeClick(data) {
  197 + console.log(data.id)
  198 + this.queryParams.filingDept=data.id;
  199 + this.handleQuery();
  200 + },/** 搜索按钮操作 */
  201 + handleQuery() {
  202 + this.queryParams.pageNum = 1;
  203 + this.getList();
  204 + },/** 重置按钮操作 */
  205 + resetQuery() {
  206 + this.resetForm("queryForm");
  207 + this.handleQuery();
  208 + },
  209 + // 多选框选中数据
  210 + handleSelectionChange(selection) {
  211 + this.ids = selection.map(item => item.id);
  212 + this.single = selection.length != 1;
  213 + this.multiple = !selection.length;
  214 + },
  215 + /** 分页 */
  216 + getList() {
  217 + this.queryParams.examineState=this.examineState;
  218 + this.loading = true;
  219 + listPost(this.queryParams).then(response => {
  220 + this.postList = response.rows;
  221 + this.total = response.total;
  222 + this.loading = false;
  223 + });
  224 + },
  225 + // 取消按钮
  226 + cancel() {
  227 + this.open = false;
  228 + this.reset();
  229 + },
  230 + // 表单重置
  231 + reset() {
  232 + this.form = {
  233 + expirationType: undefined,
  234 + ids: undefined
  235 + };
  236 + this.resetForm("form");
  237 + },
  238 + /** 提交申请 */
  239 + apply(row) {
  240 + const ids =row.id || this.ids;
  241 + this.$modal.confirm('是否确认提交数据?').then(function() {
  242 + return apply(ids);
  243 + }).then(() => {
  244 + this.getList();
  245 + this.$modal.msgSuccess("提交成功");
  246 + }).catch(() => {});
  247 + },
  248 + /** 延保 */
  249 + yb(row) {
  250 + const ids =row.id || this.ids;
  251 + this.$modal.confirm('是否确认延保数据?').then(function() {
  252 + return yb(ids);
  253 + }).then(() => {
  254 + this.getList();
  255 + this.$modal.msgSuccess("提交成功");
  256 + }).catch(() => {});
  257 + },
  258 + /** 销毁 */
  259 + xh(row) {
  260 + const ids =row.id || this.ids;
  261 + this.$modal.confirm('是否确认销毁数据?').then(function() {
  262 + return xh(ids);
  263 + }).then(() => {
  264 + this.getList();
  265 + this.$modal.msgSuccess("提交成功");
  266 + }).catch(() => {});
  267 + },
  268 + /** 移交 */
  269 + yj(row) {
  270 + const ids =row.id || this.ids;
  271 + this.$modal.confirm('是否确认移交数据?').then(function() {
  272 + return yj(ids);
  273 + }).then(() => {
  274 + this.getList();
  275 + this.$modal.msgSuccess("提交成功");
  276 + }).catch(() => {});
  277 + },
  278 + submitForm: function() {
  279 + this.$refs["form"].validate(valid => {
  280 + if (valid) {
  281 + updatePost(this.form).then(response => {
  282 + this.$modal.msgSuccess("提交成功");
  283 + this.open = false;
  284 + this.getList();
  285 + });
  286 + }
  287 + });
  288 + },
  289 + /*以下为初始化数据及以下工具类--------------------------------------------------*/
  290 + /** 获取档案库列表 */
  291 + getDepots(){
  292 + getDepots().then(response=>{
  293 + this.depotList=response.depotList;
  294 + })
  295 + },
  296 + expirationTypeFormat(row, column) {
  297 + return this.selectDictLabel(this.dict.type.expirationType, row.expirationType);
  298 + },
  299 + /** 简单Tab */
  300 + clickTab(tab, event) {
  301 + this.examineState=tab.name;
  302 + this.handleQuery();
  303 + }
  304 + }
  305 +};
  306 +</script>
... ...