FinalYu 4 mesi fa
parent
commit
a3c02f366d

+ 76 - 8
nasc-admin/src/main/java/com/nasc/web/controller/custom/NascRecordController.java

@@ -3,6 +3,7 @@ package com.nasc.web.controller.custom;
 import cn.hutool.core.util.StrUtil;
 import cn.hutool.poi.excel.ExcelReader;
 import cn.hutool.poi.excel.ExcelUtil;
+import com.google.zxing.WriterException;
 import com.nasc.common.annotation.Log;
 import com.nasc.common.core.controller.BaseController;
 import com.nasc.common.core.domain.AjaxResult;
@@ -10,10 +11,7 @@ import com.nasc.common.core.page.TableDataInfo;
 import com.nasc.common.core.text.Convert;
 import com.nasc.common.enums.BusinessType;
 import com.nasc.common.utils.StringUtils;
-import com.nasc.custom.domain.NascCertificate;
-import com.nasc.custom.domain.NascDealRecord;
-import com.nasc.custom.domain.NascManualVerify;
-import com.nasc.custom.domain.NascPrintLog;
+import com.nasc.custom.domain.*;
 import com.nasc.custom.service.INascRecordService;
 import com.nasc.framework.web.domain.server.Sys;
 import com.nasc.web.controller.tool.BarcodeGenerator;
@@ -53,6 +51,27 @@ public class NascRecordController extends BaseController {
         return toAjax(recordService.insertPrintLog(printLog));
     }
 
+    @GetMapping("/getSerialNumber")
+    public AjaxResult getSerialNumber() {
+        String serialNumber = new StringBuilder(Convert.toStr(new Date().getTime())).reverse().toString();
+        return AjaxResult.success("success", BarcodeGenerator.shuffleString(serialNumber));
+    }
+
+    @GetMapping("/getSerialNumberBarcode")
+    public AjaxResult getSerialNumberBarcode() {
+        String serialNumber = new StringBuilder(Convert.toStr(new Date().getTime())).reverse().toString();
+        serialNumber = BarcodeGenerator.shuffleString(serialNumber);
+        Map<String, String> result = new HashMap<>();
+        result.put("serialNumber", serialNumber);
+        try {
+            String barcode = BarcodeGenerator.generateBarcodeWithTextAsBase64(serialNumber, 300, 100, 20, 10, "Arial");
+            result.put("barcode", barcode);
+            return AjaxResult.success("success", result);
+        } catch (Exception e) {
+            return AjaxResult.error("生成条形码失败");
+        }
+    }
+
     /**
      * @Author: Yujianq
      * @Date: 2024/6/5 10:17
@@ -64,13 +83,17 @@ public class NascRecordController extends BaseController {
     @PostMapping("addDealRecord")
     public AjaxResult addDealRecord(@Validated @RequestBody NascDealRecord dealRecord) {
         dealRecord.setDealUser(getUserId());
-        String serialNumber = new StringBuilder(Convert.toStr(new Date().getTime())).reverse().toString();
-        dealRecord.setSerialNumber(BarcodeGenerator.shuffleString(serialNumber));
+        if (StrUtil.isEmpty(dealRecord.getSerialNumber())) {
+            String serialNumber = new StringBuilder(Convert.toStr(new Date().getTime())).reverse().toString();
+            dealRecord.setSerialNumber(BarcodeGenerator.shuffleString(serialNumber));
+        }
         try {
-            dealRecord.setBarcode(BarcodeGenerator.generateBarcodeAsBase64(dealRecord.getSerialNumber(), 300, 100));
+//            dealRecord.setBarcode(BarcodeGenerator.generateBarcodeAsBase64(dealRecord.getSerialNumber(), 300, 100));
+            dealRecord.setBarcode(BarcodeGenerator.generateBarcodeWithTextAsBase64(
+                    dealRecord.getSerialNumber(), 300, 100, 20, 10, "Arial"));
         } catch (Exception e) {
         }
-        return toAjax(recordService.addDealRecord(dealRecord));
+        return AjaxResult.success(recordService.addDealRecord(dealRecord));
     }
 
     @GetMapping("/listDealRecord")
@@ -80,6 +103,18 @@ public class NascRecordController extends BaseController {
         return getDataTable(list);
     }
 
+    @GetMapping("/getDealRecordById")
+    public AjaxResult getDealRecordById(Long id) {
+        return AjaxResult.success(recordService.getDealRecordById(id));
+    }
+
+    @Log(title = "修改受理记录状态", businessType = BusinessType.UPDATE)
+    @PostMapping("/updateDealRecordStatus")
+    public AjaxResult updateDealRecordStatus(@RequestBody NascDealRecord dealRecord) {
+        dealRecord.setWithStatus(1l);
+        return AjaxResult.success(recordService.updateDealRecordStatus(dealRecord));
+    }
+
     /**
      * @Author: Yujianq
      * @Date: 2024/6/5 10:17
@@ -167,4 +202,37 @@ public class NascRecordController extends BaseController {
         return getDataTable(list);
     }
 
+    @Log(title = "新增发放证书记录", businessType = BusinessType.INSERT)
+    @PostMapping("addCertificateSend")
+    public AjaxResult addCertificateSend(@Validated @RequestBody List<NascCertificateSend> certificateSendList) {
+        if (certificateSendList == null || certificateSendList.isEmpty()) {
+            return AjaxResult.error("参数错误");
+        }
+        certificateSendList.forEach((certificateSend -> {
+            certificateSend.setPrintUser(getUserId());
+            certificateSend.setCertStatus(0l);
+        }));
+        return AjaxResult.success(recordService.addCertificateSend(certificateSendList));
+    }
+
+    @Log(title = "发放证书", businessType = BusinessType.UPDATE)
+    @PostMapping("sendCertificate")
+    public AjaxResult sendCertificate(@Validated @RequestBody List<NascCertificateSend> certificateSendList) {
+        if (certificateSendList == null || certificateSendList.isEmpty()) {
+            return AjaxResult.error("参数错误");
+        }
+        certificateSendList.forEach((certificateSend -> {
+            certificateSend.setSendUser(getUserId());
+            certificateSend.setCertStatus(1l);
+        }));
+        return AjaxResult.success(recordService.sendCertificate(certificateSendList));
+    }
+
+    @GetMapping("/listCertificateSend")
+    public TableDataInfo listCertificateSend(NascCertificateSend certificateSend) {
+        startPage();
+        List<Map<String, Object>> list = recordService.selectCertificateSendList(certificateSend);
+        return getDataTable(list);
+    }
+
 }

+ 104 - 0
nasc-system/src/main/java/com/nasc/custom/domain/NascCertificateSend.java

@@ -0,0 +1,104 @@
+package com.nasc.custom.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import java.util.Date;
+
+/**
+ * @Author: Yujianq
+ * @Date: 2024/6/4 16:03
+ * @Description: 证照发放表
+ * @return:
+ */
+public class NascCertificateSend {
+
+    /** 证照发放表主键 */
+    private Long id;
+
+    /** 证照关联表 */
+    private Long certId;
+
+    /** 发放人 */
+    private Long sendUser;
+
+    /** 打印人 */
+    private Long printUser;
+
+    /** 证照状态 0 未发放 1 已发放 */
+    private Long certStatus;
+
+    /** 条形码编号 */
+    private Long serialNumber;
+
+    /** 打印时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date printTime;
+
+    /** 发放时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date sendTime;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getCertId() {
+        return certId;
+    }
+
+    public void setCertId(Long certId) {
+        this.certId = certId;
+    }
+
+    public Long getSerialNumber() {
+        return serialNumber;
+    }
+
+    public void setSerialNumber(Long serialNumber) {
+        this.serialNumber = serialNumber;
+    }
+
+    public Long getSendUser() {
+        return sendUser;
+    }
+
+    public void setSendUser(Long sendUser) {
+        this.sendUser = sendUser;
+    }
+
+    public Long getPrintUser() {
+        return printUser;
+    }
+
+    public void setPrintUser(Long printUser) {
+        this.printUser = printUser;
+    }
+
+    public Long getCertStatus() {
+        return certStatus;
+    }
+
+    public void setCertStatus(Long certStatus) {
+        this.certStatus = certStatus;
+    }
+
+    public Date getPrintTime() {
+        return printTime;
+    }
+
+    public void setPrintTime(Date printTime) {
+        this.printTime = printTime;
+    }
+
+    public Date getSendTime() {
+        return sendTime;
+    }
+
+    public void setSendTime(Date sendTime) {
+        this.sendTime = sendTime;
+    }
+}

+ 1 - 1
nasc-system/src/main/java/com/nasc/custom/domain/NascPrintLog.java

@@ -43,7 +43,7 @@ public class NascPrintLog {
     /** 打印内容 */
     private String content;
 
-    /** 打印类型 1 成功告知单 2 失败告知单 */
+    /** 打印类型 1 受理通知单 2 补正材料告知书 3 不予受理通知书 4 物料流转 */
     private Long printType;
 
     /** 打印时间 */

+ 30 - 0
nasc-system/src/main/java/com/nasc/custom/mapper/NascCertificateSendMapper.java

@@ -0,0 +1,30 @@
+package com.nasc.custom.mapper;
+
+import com.nasc.custom.domain.NascCertificateSend;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Author: Yujianq
+ * @Date: 2024/6/4 16:38
+ * @Description: 证照表
+ * @return:
+ */
+public interface NascCertificateSendMapper {
+
+    /**
+     * @Author: Yujianq
+     * @Date: 2024/6/5 10:50
+     * @Description: 新增证照发放信息
+     * @param certificateSendList
+     * @return: int
+     */
+    int insertCertificateSend(List<NascCertificateSend> certificateSendList);
+
+    List<Map<String, Object>> selectCertificateSendList(NascCertificateSend certificateSend);
+
+    int updateCertificateSend(@Param("certificateSendList") List<NascCertificateSend> certificateSendList, @Param("sendUser") Long sendUser);
+
+}

+ 5 - 1
nasc-system/src/main/java/com/nasc/custom/mapper/NascDealRecordMapper.java

@@ -20,7 +20,11 @@ public interface NascDealRecordMapper {
      * @param dealRecord
      * @return: int
      */
-    public int insertDealRecord(NascDealRecord dealRecord);
+    int insertDealRecord(NascDealRecord dealRecord);
 
     List<Map<String, Object>> selectDealRecordList(NascDealRecord dealRecord);
+
+    Map<String, Object> getDealRecordById(Long id);
+
+    int updateDealRecordStatus(NascDealRecord dealRecord);
 }

+ 11 - 4
nasc-system/src/main/java/com/nasc/custom/service/INascRecordService.java

@@ -1,9 +1,6 @@
 package com.nasc.custom.service;
 
-import com.nasc.custom.domain.NascCertificate;
-import com.nasc.custom.domain.NascDealRecord;
-import com.nasc.custom.domain.NascManualVerify;
-import com.nasc.custom.domain.NascPrintLog;
+import com.nasc.custom.domain.*;
 
 import java.util.List;
 import java.util.Map;
@@ -68,4 +65,14 @@ public interface INascRecordService {
     int insertCertificate(List<NascCertificate> certificateList);
 
     List<NascCertificate> selectCertificateList(NascCertificate certificate);
+
+    List<Map<String, Object>> selectCertificateSendList(NascCertificateSend certificateSend);
+
+    int addCertificateSend(List<NascCertificateSend> certificateSendList);
+
+    int sendCertificate(List<NascCertificateSend> certificateSendList);
+
+    Map<String, Object> getDealRecordById(Long id);
+
+    int updateDealRecordStatus(NascDealRecord dealRecord);
 }

+ 32 - 6
nasc-system/src/main/java/com/nasc/custom/service/impl/NascRecordServiceImpl.java

@@ -5,10 +5,7 @@ import com.alibaba.fastjson2.JSONArray;
 import com.alibaba.fastjson2.JSONObject;
 import com.nasc.common.core.text.Convert;
 import com.nasc.custom.domain.*;
-import com.nasc.custom.mapper.NascCertificateMapper;
-import com.nasc.custom.mapper.NascDealRecordMapper;
-import com.nasc.custom.mapper.NascManualVerifyMapper;
-import com.nasc.custom.mapper.NascPrintLogMapper;
+import com.nasc.custom.mapper.*;
 import com.nasc.custom.service.INascRecordService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -39,6 +36,9 @@ public class NascRecordServiceImpl implements INascRecordService {
     @Autowired
     private NascCertificateMapper certificateMapper;
 
+    @Autowired
+    private NascCertificateSendMapper certificateSendMapper;
+
     @Override
     @Transactional
     public int insertPrintLog(NascPrintLog printLog) {
@@ -58,10 +58,10 @@ public class NascRecordServiceImpl implements INascRecordService {
             }
         });
         int result = dealRecordMapper.insertDealRecord(dealRecord);
-        if (manualVerifyList.size() > 0) {
+        if (manualVerifyList.size() > 0 && result > 0) {
             manualVerifyMapper.updateManualVerifyDealId(dealRecord.getId(), manualVerifyList);
         }
-        return result;
+        return Convert.toInt(dealRecord.getId());
     }
 
     @Override
@@ -70,6 +70,16 @@ public class NascRecordServiceImpl implements INascRecordService {
     }
 
     @Override
+    public Map<String, Object> getDealRecordById(Long id) {
+        return dealRecordMapper.getDealRecordById(id);
+    }
+
+    @Override
+    public int updateDealRecordStatus(NascDealRecord dealRecord) {
+        return dealRecordMapper.updateDealRecordStatus(dealRecord);
+    }
+
+    @Override
     @Transactional
     public int addManualVerify(NascManualVerify manualVerify) {
         int result = manualVerifyMapper.insertManualVerify(manualVerify);
@@ -100,4 +110,20 @@ public class NascRecordServiceImpl implements INascRecordService {
     public List<NascCertificate> selectCertificateList(NascCertificate certificate) {
         return certificateMapper.selectCertificateList(certificate);
     }
+
+    @Override
+    public List<Map<String, Object>> selectCertificateSendList(NascCertificateSend certificateSend) {
+        return certificateSendMapper.selectCertificateSendList(certificateSend);
+    }
+
+    @Override
+    public int addCertificateSend(List<NascCertificateSend> certificateSendList) {
+        return certificateSendMapper.insertCertificateSend(certificateSendList);
+    }
+
+    @Override
+    public int sendCertificate(List<NascCertificateSend> certificateSendList) {
+        return certificateSendMapper.updateCertificateSend(certificateSendList, certificateSendList.get(0).getSendUser());
+    }
+
 }

+ 62 - 0
nasc-system/src/main/resources/mapper/custom/NascCertificateSendMapper.xml

@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.nasc.custom.mapper.NascCertificateSendMapper">
+
+    <insert id="insertCertificateSend" parameterType="NascCertificateSend" useGeneratedKeys="true" keyProperty="id">
+        INSERT INTO nasc_certificate_send (cert_id, print_user, cert_status, serial_number, print_time)
+        VALUES
+        <foreach item="item" index="index" collection="list" separator=",">
+            (#{item.certId}, #{item.printUser}, 0, #{item.serialNumber}, sysdate())
+        </foreach>
+    </insert>
+
+    <update id="updateCertificateSend">
+        UPDATE nasc_certificate_send
+        SET send_user = #{sendUser}, cert_status = 1, send_time = sysdate()
+        WHERE id IN
+        <foreach collection="certificateSendList" item="item" index="index"
+                 separator="," open="(" close=")">
+            #{item.id}
+        </foreach>
+    </update>
+
+    <resultMap id="certificateSendResult" type="java.util.HashMap">
+        <result property="id" column="id"/>
+        <result property="certStatus" column="cert_status"/>
+        <result property="serialNumber" column="serial_number"/>
+        <result property="printTime" column="print_time"/>
+        <result property="sendTime" column="send_time"/>
+        <result property="certificateNo" column="certificate_no"/>
+        <result property="certificateName" column="certificate_name"/>
+        <result property="certificateType" column="certificate_type"/>
+        <result property="phone" column="phone"/>
+        <result property="sendUser" column="send_user"/>
+        <result property="printUser" column="print_user"/>
+        <result property="sendDept" column="send_dept"/>
+        <result property="printDept" column="print_dept"/>
+    </resultMap>
+
+    <select id="selectCertificateSendList" resultMap="certificateSendResult">
+        SELECT cs.id, cs.cert_status, cs.serial_number,
+               DATE_FORMAT(cs.print_time, '%Y-%m-%d %H:%i:%s') AS print_time,
+               DATE_FORMAT(cs.send_time, '%Y-%m-%d %H:%i:%s') AS send_time,
+               c.certificate_no, c.certificate_name, c.certificate_type, c.phone,
+               u.user_name AS send_user, u1.user_name AS print_user,
+               d.dept_name AS send_dept, d1.dept_name AS print_dept
+        FROM nasc_certificate_send cs
+        LEFT JOIN sys_user u ON u.user_id = cs.send_user
+        LEFT JOIN sys_user u1 ON u1.user_id = cs.print_user
+        LEFT JOIN sys_dept d ON d.dept_id = u.dept_id
+        LEFT JOIN sys_dept d1 ON d1.dept_id = u1.dept_id
+        LEFT JOIN nasc_certificate c ON c.id = cs.cert_id
+        <where>
+            <if test="serialNumber != null and serialNumber != ''">
+                AND cs.serial_number = #{serialNumber}
+            </if>
+        </where>
+        ORDER BY cs.cert_status ASC, cs.print_time DESC
+    </select>
+
+</mapper> 

+ 22 - 1
nasc-system/src/main/resources/mapper/custom/NascDealRecordMapper.xml

@@ -15,6 +15,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="id" column="id"/>
         <result property="serialNumber" column="serial_number"/>
         <result property="barcode" column="barcode"/>
+        <result property="matterId" column="matter_id"/>
         <result property="withType" column="with_type"/>
         <result property="contacts" column="contacts"/>
         <result property="phone" column="phone"/>
@@ -27,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <select id="selectDealRecordList" parameterType="NascDealRecord" resultMap="dealRecordResult">
-        SELECT dr.id, dr.serial_number, dr.with_type, dr.contacts, dr.barcode,
+        SELECT dr.id, dr.serial_number, dr.with_type, dr.contacts, dr.barcode, dr.matter_id,
                dr.phone, dr.id_card, dr.with_status, dr.materials,
                DATE_FORMAT(dr.create_time, '%Y-%m-%d %H:%i:%s') AS create_time,
                m.item_name, u.user_name
@@ -38,8 +39,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="serialNumber != null and serialNumber != ''">
                 AND dr.serial_number = #{serialNumber}
             </if>
+            <if test="withStatus != null">
+                AND dr.with_status = #{withStatus}
+            </if>
         </where>
         ORDER BY dr.with_status ASC, dr.create_time DESC
     </select>
 
+    <select id="getDealRecordById" resultMap="dealRecordResult">
+        SELECT dr.id, dr.serial_number, dr.with_type, dr.contacts, dr.barcode,
+               dr.phone, dr.id_card, dr.with_status, dr.materials,
+               DATE_FORMAT(dr.create_time, '%Y-%m-%d %H:%i:%s') AS create_time,
+               m.item_name, u.user_name
+        FROM nasc_deal_record dr
+        LEFT JOIN nasc_matter m ON m.id = dr.matter_id
+        LEFT JOIN sys_user u ON u.user_id = dr.deal_user
+        WHERE dr.id = #{id}
+    </select>
+
+    <update id="updateDealRecordStatus">
+        UPDATE nasc_deal_record
+        SET with_status = #{withStatus}, update_time = sysdate()
+        WHERE id = #{id}
+    </update>
+
 </mapper> 

+ 87 - 0
nasc-ui/src/api/matter/record.js

@@ -14,6 +14,28 @@ export function addPrintLog(data) {
 }
 
 /**
+ * 获取受理编号
+ * @returns {*}
+ */
+export function getSerialNumber() {
+  return request({
+    url: '/nasc/record/getSerialNumber',
+    method: 'get'
+  })
+}
+
+/**
+ * 获取受理编号并生成条形码
+ * @returns {*}
+ */
+export function getSerialNumberBarcode() {
+  return request({
+    url: '/nasc/record/getSerialNumberBarcode',
+    method: 'get'
+  })
+}
+
+/**
  * 新增受理记录
  * @param data
  * @returns {*}
@@ -27,6 +49,19 @@ export function addDealRecord(data) {
 }
 
 /**
+ * 修改受理记录状态
+ * @param data
+ * @returns {*}
+ */
+export function updateDealRecordStatus(data) {
+  return request({
+    url: '/nasc/record/updateDealRecordStatus',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
  * 分页获取受理记录数据
  * @param query
  * @returns {*}
@@ -40,6 +75,19 @@ export function listDealRecord(query) {
 }
 
 /**
+ * 根据ID获取受理记录
+ * @param query
+ * @returns {*}
+ */
+export function getDealRecordById(query) {
+  return request({
+    url: '/nasc/record/getDealRecordById',
+    method: 'get',
+    params: query
+  })
+}
+
+/**
  * 新增人工核验记录
  * @param data
  * @returns {*}
@@ -115,3 +163,42 @@ export function listCertificate(query) {
     params: query
   })
 }
+
+/**
+ * 新增证书发放记录
+ * @param data
+ * @returns {*}
+ */
+export function addCertificateSend(data) {
+  return request({
+    url: '/nasc/record/addCertificateSend',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 发放证书
+ * @param data
+ * @returns {*}
+ */
+export function sendCertificate(data) {
+  return request({
+    url: '/nasc/record/sendCertificate',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 查询证照发放记录
+ * @param query
+ * @returns {*}
+ */
+export function listCertificateSend(query) {
+  return request({
+    url: '/nasc/record/listCertificateSend',
+    method: 'get',
+    params: query
+  })
+}

+ 29 - 4
nasc-ui/src/views/matter/certificate/index.vue

@@ -51,6 +51,10 @@
         </el-row>
         <el-row id="print_cert">
           <el-row style="overflow: auto; height: calc(100% - 120px);">
+            <div style="display: flex; justify-content: space-between; align-items: center;">
+              <h1>证照列表</h1>
+              <el-image :src="'data:image/png;base64,' + barcode" style="width: 200px;"></el-image>
+            </div>
             <el-table
               :data="selectionList"
               style="width: 100%">
@@ -73,7 +77,7 @@
 </template>
 
 <script>
-import {importCertificate, listCertificate} from "@/api/matter/record";
+import {addCertificateSend, getSerialNumberBarcode, importCertificate, listCertificate} from "@/api/matter/record";
 
 export default {
   name: "Certificate",
@@ -90,12 +94,13 @@ export default {
         pageNum: 1,
         pageSize: 10
       },
-      uploadFileUrl: process.env.VUE_APP_BASE_API + "/nasc/record/importCertificate",
       // 总条数
       total: 0,
       // 证照数据
       certificateList: [],
       selectionList: [],
+      barcode: '',
+      barcodeNum: '',
       printObj: {
         id: "print_cert",
         popTitle: "打印证照",
@@ -103,7 +108,7 @@ export default {
         beforeOpenCallback() {
         },
         openCallback(vue) {
-          // vue.savePrintLog('print_ycxgzd_fail', 2)
+          vue.saveCertificateSend()
         },
         closeCallback(vue) {
         }
@@ -142,11 +147,31 @@ export default {
       this.selectionList = selection
     },
     handlePrint() {
+      this.barcode = ''
       if (this.selectionList.length == 0) {
         this.$modal.msgError("至少选择一条数据");
         return
       }
-      document.getElementById('print_certificate').click()
+      getSerialNumberBarcode().then(response => {
+        if (response.code != 200) {
+          this.$modal.msgError("生成条形码失败,请重试");
+          return
+        }
+        this.barcode = response.data.barcode
+        this.barcodeNum = response.data.serialNumber
+        setTimeout(() => {
+          document.getElementById('print_certificate').click()
+        },100)
+      });
+    },
+    saveCertificateSend() {
+      let certificateSendList = JSON.parse(JSON.stringify(this.selectionList))
+      certificateSendList.forEach(item => {
+        item.certId = item.id
+        item.serialNumber = this.barcodeNum
+      })
+      addCertificateSend(certificateSendList).then(response => {
+      });
     },
     beforeUpload(file) {
       let ext = file.name.substring(file.name.lastIndexOf(".") + 1)

+ 149 - 0
nasc-ui/src/views/matter/certificate_send/index.vue

@@ -0,0 +1,149 @@
+<template>
+  <div class="app-container">
+    <el-row :gutter="20">
+      <el-col :span="24" :xs="24" style="height: calc(100vh - 130px); overflow: hidden;">
+        <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
+                 label-width="68px" @submit.native.prevent>
+          <el-form-item label="打印编号" prop="serialNumber">
+            <el-input v-model="queryParams.serialNumber" placeholder="请输入打印编号" clearable style="width: 240px"
+                      @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="primary" size="small" icon="el-icon-position" @click="handleSendCert">发放</el-button>
+          </el-col>
+        </el-row>
+        <el-row style="height: calc(100% - 100px); padding: 10px;overflow: auto;">
+          <el-table v-loading="loading" :data="certificateSendList"
+                    :row-key="getRowKey"
+                    @selection-change="handleSelectionChange">
+            <el-table-column type="selection" width="50" align="center" :reserve-selection="true" />
+            <el-table-column label="打印编号" align="center" prop="serialNumber"/>
+            <el-table-column label="证照类型" align="center" prop="certificateType">
+              <template slot-scope="scope">
+                <span v-if="scope.row.certificateType === 1">个人</span>
+                <span v-if="scope.row.certificateType === 2">企业</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="证照名称" align="center" prop="certificateName"/>
+            <el-table-column label="证照号码" align="center" prop="certificateNo"/>
+            <el-table-column label="发放状态" align="center" prop="certStatus">
+              <template slot-scope="scope">
+                <span v-if="scope.row.certStatus === 0">未发放</span>
+                <span v-if="scope.row.certStatus === 1">已发放</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="打印人员" align="center" prop="printUser">
+              <template slot-scope="scope">
+                <span v-if="scope.row.printUser">{{ scope.row.printUser }}({{ scope.row.printDept }})</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="打印时间" align="center" prop="printTime" width="160" />
+            <el-table-column label="发放人员" align="center" prop="sendUser">
+              <template slot-scope="scope">
+                <span v-if="scope.row.sendUser">{{ scope.row.sendUser }}({{ scope.row.sendDept }})</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="发放时间" align="center" prop="sendTime" width="160" />
+          </el-table>
+          <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
+                      :limit.sync="queryParams.pageSize" @pagination="getList"/>
+        </el-row>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import {listCertificateSend, sendCertificate} from "@/api/matter/record";
+
+export default {
+  name: "CertificateSend",
+  components: {},
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      dealDetailDialog: false,
+      // 显示搜索条件
+      showSearch: true,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        serialNumber: undefined
+      },
+      // 总条数
+      total: 0,
+      // 证照发放数据
+      certificateSendList: [],
+      selectionList: []
+    };
+  },
+  watch: {},
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询物料流转数据 */
+    getList() {
+      this.loading = true;
+      listCertificateSend(this.queryParams).then(response => {
+        this.certificateSendList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    getRowKey(row) {
+      return row.id;
+    },
+    /** 多选框选中数据 **/
+    handleSelectionChange(selection) {
+      this.selectionList = selection
+    },
+    handleSendCert() {
+      if (this.selectionList.length == 0) {
+        this.$modal.msgError("至少选择一条数据");
+        return
+      }
+      let data = []
+      this.selectionList.forEach((item, index) => {
+        if (item.certStatus != 1) {
+          data.push({
+            "id": item.id
+          })
+        }
+      })
+      if (data.length == 0) {
+        this.$modal.msgError("请选择未发放数据");
+        return
+      }
+      sendCertificate(data).then(response => {
+        if (response.code == 200) {
+          this.$modal.msgSuccess("发放成功");
+          this.getList()
+          return
+        }
+        this.$modal.msgError("发放失败");
+      });
+    }
+  }
+};
+</script>
+<style scoped>
+</style>

+ 3 - 2
nasc-ui/src/views/matter/deal/index.vue

@@ -159,12 +159,13 @@ export default {
       queryParams: {
         pageNum: 1,
         pageSize: 10,
-        serialNumber: undefined
+        serialNumber: undefined,
+        withStatus: 1
       },
       // 总条数
       total: 0,
       // 受理记录数据
-      dealRecordList: null,
+      dealRecordList: [],
       currDealRecord: null,
       detailKey: 0
     };

+ 294 - 0
nasc-ui/src/views/matter/deal_record/index.vue

@@ -0,0 +1,294 @@
+<template>
+  <div class="app-container">
+    <el-tabs v-model="activeName">
+      <el-tab-pane label="物料流转" name="first">
+        <el-row :gutter="20">
+          <!-- 物料流转数据 -->
+          <el-col :span="24" :xs="24">
+            <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
+                     label-width="68px" @submit.native.prevent>
+              <el-form-item label="受理编号" prop="serialNumber">
+                <el-input v-model="queryParams.serialNumber" placeholder="请输入受理编号" clearable style="width: 240px"
+                          @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-table v-loading="loading" :data="dealRecordList">
+              <el-table-column label="受理编号" align="center" prop="serialNumber"/>
+              <el-table-column label="业务类型" align="center" prop="withType">
+                <template slot-scope="scope">
+                  <span v-if="scope.row.withType === 1">个人</span>
+                  <span v-if="scope.row.withType === 2">企业</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="联系人" align="center" prop="contacts" width="100"/>
+              <el-table-column label="联系电话" align="center" prop="phone" width="120"/>
+              <el-table-column label="受理人" align="center" prop="userName" width="100"/>
+              <el-table-column label="受理时间" align="center" prop="createTime" width="160">
+              </el-table-column>
+              <el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">
+                <template slot-scope="scope" v-if="scope.row.userId !== 1">
+                  <!--              <el-button size="mini" type="text" icon="el-icon-document" @click="handleDetail(scope.row)">详情-->
+                  <!--              </el-button>-->
+                  <el-button size="mini" type="text" icon="el-icon-position" @click="handleProcessDeal(scope.row)">物料流转
+                  </el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+
+            <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
+                        :limit.sync="queryParams.pageSize" @pagination="getList"/>
+          </el-col>
+        </el-row>
+      </el-tab-pane>
+      <el-tab-pane label="受理通知单" name="second">配置管理</el-tab-pane>
+      <el-tab-pane label="补正材料告知书" name="third">角色管理</el-tab-pane>
+      <el-tab-pane label="不予受理通知书" name="fourth">定时任务补偿</el-tab-pane>
+    </el-tabs>
+
+    <el-dialog title="受理单详情" :visible.sync="dealDetailDialog" :close-on-click-modal="false" width="60%"
+               destroy-on-close append-to-body>
+      <el-button type="primary" size="small" icon="el-icon-printer" v-print="printObj" style="margin-left: 85%;margin-bottom: 10px;">打印</el-button>
+      <el-row style="height: 70vh; overflow: auto;">
+        <el-descriptions v-if="currDealRecord" id="print_deal_detail" class="margin-top" style="width: 100%; overflow: auto;" :column="3"
+                         border :key="detailKey">
+          <el-descriptions-item :span="3" label-style="width:110px;">
+            <template slot="label">
+              <i class="el-icon-price-tag"></i>
+              受理编号
+            </template>
+            {{ currDealRecord.serialNumber }}
+          </el-descriptions-item>
+          <el-descriptions-item :span="3">
+            <template slot="label">
+              <i class="el-icon-full-screen"></i>
+              条形码
+            </template>
+            <el-image :src="'data:image/png;base64,' + currDealRecord.barcode" style="width: 300px;"></el-image>
+          </el-descriptions-item>
+          <el-descriptions-item :span="3">
+            <template slot="label">
+              <i class="el-icon-tickets"></i>
+              事项名称
+            </template>
+            {{ currDealRecord.itemName }}
+          </el-descriptions-item>
+          <el-descriptions-item>
+            <template slot="label">
+              <i class="el-icon-collection-tag"></i>
+              业务类型
+            </template>
+            {{ currDealRecord.withType == 1 ? '个人' : '企业' }}
+          </el-descriptions-item>
+          <el-descriptions-item>
+            <template slot="label">
+              <i class="el-icon-user"></i>
+              联系人
+            </template>
+            {{ currDealRecord.contacts }}
+          </el-descriptions-item>
+          <el-descriptions-item>
+            <template slot="label">
+              <i class="el-icon-mobile-phone"></i>
+              联系电话
+            </template>
+            {{ currDealRecord.phone }}
+          </el-descriptions-item>
+          <el-descriptions-item :span="3">
+            <template slot="label">
+              <i class="el-icon-postcard"></i>
+              {{ currDealRecord.withType == 1 ? '身份证号码' : '企业社会信用代码' }}
+            </template>
+            {{ currDealRecord.idCard }}
+          </el-descriptions-item>
+          <el-descriptions-item>
+            <template slot="label">
+              <i class="el-icon-user"></i>
+              受理人
+            </template>
+            {{ currDealRecord.userName }}
+          </el-descriptions-item>
+          <el-descriptions-item :span="2">
+            <template slot="label">
+              <i class="el-icon-time"></i>
+              受理时间
+            </template>
+            {{ currDealRecord.createTime }}
+          </el-descriptions-item>
+          <el-descriptions-item :span="3">
+            <template slot="label">
+              <i class="el-icon-document-checked"></i>
+              已有材料
+            </template>
+            <template v-if="this.currDealRecord.materialList && this.currDealRecord.materialList.length > 0">
+              <ul>
+                <li v-for="(item) in this.currDealRecord.materialList" v-if="item.reasonFlag">
+                  {{ item.verification === 1 ? (item.listName + '【' + item.dealStatusName + '】') : item.listName }}
+                </li>
+              </ul>
+            </template>
+          </el-descriptions-item>
+          <el-descriptions-item :span="3">
+            <template slot="label">
+              <i class="el-icon-document-delete"></i>
+              缺失材料
+            </template>
+            <template v-if="this.currDealRecord.materialList && this.currDealRecord.materialList.length > 0">
+              <ul>
+                <li v-for="(item) in this.currDealRecord.materialList" v-if="!item.reasonFlag">
+                  {{ item.listName + ',【原因】:' + item.reason }}
+                </li>
+              </ul>
+            </template>
+          </el-descriptions-item>
+        </el-descriptions>
+      </el-row>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {addPrintLog, getManualVerifyByIds, listDealRecord, updateDealRecordStatus} from "@/api/matter/record";
+
+export default {
+  name: "DealRecord",
+  components: {},
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      dealDetailDialog: false,
+      activeName: 'first',
+      // 显示搜索条件
+      showSearch: true,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        serialNumber: undefined,
+        withStatus: 0
+      },
+      // 总条数
+      total: 0,
+      // 受理记录数据
+      dealRecordList: [],
+      currDealRecord: null,
+      detailKey: 0,
+      printObj: {
+        id: "print_deal_detail",
+        popTitle: "打印物料流转单",
+        extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>',
+        beforeOpenCallback() {
+        },
+        openCallback(vue) {
+          vue.savePrintLog('print_deal_detail', 4)
+        },
+        closeCallback(vue) {
+        }
+      }
+    };
+  },
+  watch: {},
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询物料流转数据 */
+    getList() {
+      this.loading = true;
+      listDealRecord(this.queryParams).then(response => {
+        this.dealRecordList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    /** 受理单详情 */
+    handleDetail(row) {
+      this.currDealRecord = row
+      if (row.materials) {
+        let obj = JSON.parse(row.materials)
+        let manualVerifyList = []
+        obj.forEach((item, index) => {
+          if (item.verification === 1) {
+            manualVerifyList.push(item.manualVerifyId)
+          }
+        })
+        if (manualVerifyList && manualVerifyList.length > 0) {
+          getManualVerifyByIds(manualVerifyList).then(response => {
+            let data = response.data
+            obj.forEach((item, index) => {
+              data.forEach((d) => {
+                if (d.materialId == item.id) {
+                  item.dealStatus = d.dealStatus
+                  item.dealStatusName = d.dealStatus == 1 ? '人工核验通过' : (d.dealStatus == 2 ? '人工核验未通过' : '待核验')
+                }
+              })
+            })
+            this.$nextTick(() => {
+              this.currDealRecord.materialList = obj
+              this.detailKey ++
+            })
+          });
+        } else {
+          this.$nextTick(() => {
+            this.currDealRecord.materialList = obj
+            this.detailKey ++
+          })
+        }
+      }
+      this.dealDetailDialog = true
+    },
+    /** 新增打印日志 **/
+    savePrintLog(elm, type) {
+      let data = {}
+      data.content = document.getElementById(elm).outerHTML
+      data.printType = type
+      data.matter = this.currDealRecord.matterId
+      data.matterName = this.currDealRecord.itemName
+      data.withType = this.currDealRecord.withType
+      data.contacts = this.currDealRecord.contacts
+      data.phone = this.currDealRecord.phone
+      data.idCard = this.currDealRecord.idCard
+      addPrintLog(data).then((response) => {
+      });
+    },
+    /** 物料流转 */
+    handleProcessDeal(row) {
+      this.$confirm('您正在流转该受理记录, 是否继续?', '温馨提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        let data = {
+          "id": row.id
+        }
+        updateDealRecordStatus(data).then((response) => {
+          if (response.data > 0) {
+            this.handleDetail(row)
+            this.getList()
+          } else {
+            this.$modal.msgError("流转失败");
+          }
+        });
+      }).catch(() => {
+      })
+    }
+  }
+};
+</script>
+<style scoped>
+</style>

+ 190 - 9
nasc-ui/src/views/matter/index/index.vue

@@ -187,6 +187,9 @@
     <el-dialog title="受理单" :visible.sync="dialogDealWithFormVisible" :close-on-click-modal="false" width="800px">
       <el-form :model="dealWithForm" ref="dealWithForm" :rules="dealWithFormRules" label-width="120px"
                style="height: 60vh; overflow-y: auto;">
+        <el-form-item label="受理编号" prop="serialNumber">
+          <el-input v-model="dealWithForm.serialNumber" readonly></el-input>
+        </el-form-item>
         <el-form-item label="办理类型" prop="withType">
           <el-radio-group v-model="dealWithForm.withType">
             <el-radio :label="1">个人</el-radio>
@@ -225,15 +228,116 @@
         </el-table>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button type="success" @click="handlePrintDealWith('print_suc')">打印成功一次性告知单</el-button>
-        <el-button type="info" @click="handlePrintDealWith('print_fail')">打印失败一次性告知单</el-button>
-        <el-button id="print_suc" type="success" v-print="printSuccessObj" style="display: none;">打印成功一次性告知单</el-button>
-        <el-button id="print_fail" type="info" v-print="printFailObj" style="display: none;">打印失败一次性告知单</el-button>
+        <el-button type="success" @click="handlePrintDealWith('print_suc')">受理通知单</el-button>
+        <el-button type="info" @click="handlePrintDealWith('print_fail')">补正材料告知书</el-button>
+        <el-button type="danger" @click="handlePrintDealWith('print_fail')">不予受理通知书</el-button>
+        <el-button id="print_suc" type="success" v-print="printSuccessObj" style="display: none;">受理通知单</el-button>
+        <el-button id="print_fail" type="info" v-print="printFailObj" style="display: none;">补正材料告知书</el-button>
         <el-button type="warning" @click="handleBtnSaveDealWith(1)">物料流转</el-button>
         <el-button type="primary" @click="handleBtnSaveDealWith(0)">保存</el-button>
         <el-button @click="handleCancelDealWith">取消</el-button>
       </div>
     </el-dialog>
+
+    <!-- 物料流转单打印 -->
+    <el-dialog title="物料流转单打印" :visible.sync="dealDetailDialog" :close-on-click-modal="false" width="60%"
+               destroy-on-close append-to-body>
+      <el-button type="primary" size="small" icon="el-icon-printer" v-print="printObj" style="margin-left: 85%;margin-bottom: 10px;">打印</el-button>
+      <el-row style="height: 70vh; overflow: auto;">
+        <el-descriptions v-if="currDealRecord" id="print_deal_detail" class="margin-top" style="width: 100%; overflow: auto;" :column="3"
+                         border :key="detailKey">
+          <el-descriptions-item :span="3" label-style="width:110px;">
+            <template slot="label">
+              <i class="el-icon-price-tag"></i>
+              受理编号
+            </template>
+            {{ currDealRecord.serialNumber }}
+          </el-descriptions-item>
+          <el-descriptions-item :span="3">
+            <template slot="label">
+              <i class="el-icon-full-screen"></i>
+              条形码
+            </template>
+            <el-image :src="'data:image/png;base64,' + currDealRecord.barcode" style="width: 300px;"></el-image>
+          </el-descriptions-item>
+          <el-descriptions-item :span="3">
+            <template slot="label">
+              <i class="el-icon-tickets"></i>
+              事项名称
+            </template>
+            {{ currDealRecord.itemName }}
+          </el-descriptions-item>
+          <el-descriptions-item>
+            <template slot="label">
+              <i class="el-icon-collection-tag"></i>
+              业务类型
+            </template>
+            {{ currDealRecord.withType == 1 ? '个人' : '企业' }}
+          </el-descriptions-item>
+          <el-descriptions-item>
+            <template slot="label">
+              <i class="el-icon-user"></i>
+              联系人
+            </template>
+            {{ currDealRecord.contacts }}
+          </el-descriptions-item>
+          <el-descriptions-item>
+            <template slot="label">
+              <i class="el-icon-mobile-phone"></i>
+              联系电话
+            </template>
+            {{ currDealRecord.phone }}
+          </el-descriptions-item>
+          <el-descriptions-item :span="3">
+            <template slot="label">
+              <i class="el-icon-postcard"></i>
+              {{ currDealRecord.withType == 1 ? '身份证号码' : '企业社会信用代码' }}
+            </template>
+            {{ currDealRecord.idCard }}
+          </el-descriptions-item>
+          <el-descriptions-item>
+            <template slot="label">
+              <i class="el-icon-user"></i>
+              受理人
+            </template>
+            {{ currDealRecord.userName }}
+          </el-descriptions-item>
+          <el-descriptions-item :span="2">
+            <template slot="label">
+              <i class="el-icon-time"></i>
+              受理时间
+            </template>
+            {{ currDealRecord.createTime }}
+          </el-descriptions-item>
+          <el-descriptions-item :span="3">
+            <template slot="label">
+              <i class="el-icon-document-checked"></i>
+              已有材料
+            </template>
+            <template v-if="this.currDealRecord.materialList && this.currDealRecord.materialList.length > 0">
+              <ul>
+                <li v-for="(item) in this.currDealRecord.materialList" v-if="item.reasonFlag">
+                  {{ item.verification === 1 ? (item.listName + '【' + item.dealStatusName + '】') : item.listName }}
+                </li>
+              </ul>
+            </template>
+          </el-descriptions-item>
+          <el-descriptions-item :span="3">
+            <template slot="label">
+              <i class="el-icon-document-delete"></i>
+              缺失材料
+            </template>
+            <template v-if="this.currDealRecord.materialList && this.currDealRecord.materialList.length > 0">
+              <ul>
+                <li v-for="(item) in this.currDealRecord.materialList" v-if="!item.reasonFlag">
+                  {{ item.listName + ',【原因】:' + item.reason }}
+                </li>
+              </ul>
+            </template>
+          </el-descriptions-item>
+        </el-descriptions>
+      </el-row>
+    </el-dialog>
   </div>
 </template>
 
@@ -246,7 +350,14 @@ import {getQuestion} from '@/api/matter/question'
 import {getVncDesktop, listAllVncDesktop} from '@/api/matter/vnc'
 import iFrame from '@/components/iFrame/index.vue'
 import {mapGetters} from 'vuex'
-import {addDealRecord, addManualVerify, addPrintLog} from "@/api/matter/record";
+import {
+  addDealRecord,
+  addManualVerify,
+  addPrintLog,
+  getDealRecordById, getManualVerifyByIds,
+  getSerialNumber,
+  listDealRecord
+} from "@/api/matter/record";
 
 export default {
   name: "Index",
@@ -341,7 +452,7 @@ export default {
       ],
       printSuccessObj: {
         id: "print_ycxgzd",
-        popTitle: "成功一次性告知单",
+        popTitle: "受理通知单",
         extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>',
         openCallback(vue) {
           vue.savePrintLog('print_ycxgzd', 1)
@@ -351,7 +462,7 @@ export default {
       },
       printFailObj: {
         id: "print_ycxgzd_fail",
-        popTitle: "失败一次性告知单",
+        popTitle: "补正材料告知书",
         extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>',
         openCallback(vue) {
           vue.savePrintLog('print_ycxgzd_fail', 2)
@@ -361,6 +472,7 @@ export default {
       },
       dealWithKey: 0,
       dealWithForm: {
+        serialNumber: '',
         withType: 1,
         contacts: '',
         idCard: '',
@@ -381,6 +493,21 @@ export default {
           {required: true, message: '请输入手机号码', trigger: 'change'},
           {required: true, pattern: /^[1]([3-9])[0-9]{9}$/, message: '请输入正确的手机号', trigger: 'blur'}
         ]
+      },
+      dealDetailDialog: false,
+      currDealRecord: null,
+      detailKey: 0,
+      printObj: {
+        id: "print_deal_detail",
+        popTitle: "打印物料流转单",
+        extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>',
+        beforeOpenCallback() {
+        },
+        openCallback(vue) {
+          vue.savePrintLog('print_deal_detail', 4)
+        },
+        closeCallback(vue) {
+        }
       }
     };
   },
@@ -687,7 +814,14 @@ export default {
         this.dealWithForm.materials = JSON.parse(JSON.stringify(this.currMaterial.materialList))
       }
       this.dealWithPrintInfo()
-      this.dialogDealWithFormVisible = true
+      getSerialNumber().then(response => {
+        if (response.msg == "success") {
+          this.dealWithForm.serialNumber = response.data
+          this.dialogDealWithFormVisible = true
+        } else {
+          this.$modal.msgError("网络连接失败,请稍候再试");
+        }
+      });
     },
     /** 人工核验 **/
     handleManualVerify(data, event) {
@@ -734,6 +868,50 @@ export default {
       this.dialogDealWithFormVisible = false
       this.$refs['dealWithForm'].resetFields();
     },
+    printDetail(id) {
+      let params = {
+        "id": id
+      }
+      getDealRecordById(params).then((response) => {
+        if (response.data) {
+          this.currDealRecord = response.data
+          if (this.currDealRecord.materials) {
+            let obj = JSON.parse(this.currDealRecord.materials)
+            let manualVerifyList = []
+            obj.forEach((item, index) => {
+              if (item.verification === 1) {
+                manualVerifyList.push(item.manualVerifyId)
+              }
+            })
+            if (manualVerifyList && manualVerifyList.length > 0) {
+              getManualVerifyByIds(manualVerifyList).then(response => {
+                let data = response.data
+                obj.forEach((item, index) => {
+                  data.forEach((d) => {
+                    if (d.materialId == item.id) {
+                      item.dealStatus = d.dealStatus
+                      item.dealStatusName = d.dealStatus == 1 ? '人工核验通过' : (d.dealStatus == 2 ? '人工核验未通过' : '待核验')
+                    }
+                  })
+                })
+                this.$nextTick(() => {
+                  this.currDealRecord.materialList = obj
+                  this.detailKey ++
+                })
+              });
+            } else {
+              this.$nextTick(() => {
+                this.currDealRecord.materialList = obj
+                this.detailKey ++
+              })
+            }
+          }
+          this.dealDetailDialog = true
+          return
+        }
+        this.$modal.msgError("查询数据失败")
+      });
+    },
     /** 保存受理信息 **/
     handleBtnSaveDealWith(withStatus) {
       this.$refs['dealWithForm'].validate((valid) => {
@@ -751,7 +929,7 @@ export default {
             }
           }
           let data = JSON.parse(JSON.stringify(this.dealWithForm))
-          data.serialNumber = ''
+          data.serialNumber = this.dealWithForm.serialNumber
           data.withStatus = withStatus
           data.matterId = this.currMatter.id
           data.materials = JSON.stringify(this.dealWithForm.materials)
@@ -759,6 +937,9 @@ export default {
             if (response.code == 200) {
               this.$modal.msgSuccess("保存成功");
               this.handleCancelDealWith()
+              if (withStatus == 1) {
+                this.printDetail(response.data)
+              }
               return
             }
             this.$modal.msgError("保存失败")