Przeglądaj źródła

feat:铨一检测报表展示,包装节点修复排产未关闭

lucky 6 miesięcy temu
rodzic
commit
3de23d2687
24 zmienionych plików z 2752 dodań i 122 usunięć
  1. 1 0
      pom.xml
  2. 16 0
      zkqy-fujian-amichi/pom.xml
  3. 4 4
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/QualityinspectioninformationController.java
  4. 148 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/SharedFileController.java
  5. 19 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/SharedFile.java
  6. 79 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/SharedFilesMapper.java
  7. 65 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/ISharedFileService.java
  8. 154 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/SharedFileServiceImpl.java
  9. 31 1
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/StationInformationServiceImpl.java
  10. 89 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/utils/SharedFolderUtil.java
  11. 98 0
      zkqy-fujian-amichi/src/main/resources/mapper/SharedFilesMapper.xml
  12. 17 0
      zkqy-fujian-amichi/src/test/java/com/zkqy/amichi/Test01.java
  13. 1 1
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/impl/runbpm/chemicalfiber/WrappingNode.java
  14. 52 0
      zkqy-ui/src/api/amichi/sharedFile/files.js
  15. BIN
      zkqy-ui/src/assets/qy/image.png
  16. 508 0
      zkqy-ui/src/views/amichi/qualityinspectioninformation/bp_inspection/QualityStatement.vue
  17. 41 38
      zkqy-ui/src/views/amichi/qualityinspectioninformation/bp_inspection/index.vue
  18. 506 0
      zkqy-ui/src/views/amichi/qualityinspectioninformation/bp_leavefactory/QualityStatement.vue
  19. 42 39
      zkqy-ui/src/views/amichi/qualityinspectioninformation/bp_leavefactory/index.vue
  20. 40 6
      zkqy-ui/src/views/amichi/qualityinspectioninformation/index.vue
  21. 506 0
      zkqy-ui/src/views/amichi/qualityinspectioninformation/jl_inspection/QualityStatement.vue
  22. 35 32
      zkqy-ui/src/views/amichi/qualityinspectioninformation/jl_inspection/index.vue
  23. 299 0
      zkqy-ui/src/views/amichi/qualityinspectioninformation/sharedFile/index.vue
  24. 1 1
      zkqy-ui/src/views/login.vue

+ 1 - 0
pom.xml

@@ -214,6 +214,7 @@
             <version>3.3.2</version>
             <scope>compile</scope>
         </dependency>
+
         <!-- 达梦驱动包 -->
         <dependency>
             <groupId>com.google.code.gson</groupId>

+ 16 - 0
zkqy-fujian-amichi/pom.xml

@@ -21,6 +21,22 @@
             <groupId>com.zkqy</groupId>
             <artifactId>zkqy-framework</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.codelibs</groupId>
+            <artifactId>jcifs</artifactId>
+            <version>2.1.19</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.bouncycastle</groupId>
+                    <artifactId>bcprov-jdk15on</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.bouncycastle</groupId>
+            <artifactId>bcprov-jdk15on</artifactId>
+            <version>1.70</version>
+        </dependency>
         <dependency>
             <groupId>com.google.zxing</groupId>
             <artifactId>core</artifactId>

+ 4 - 4
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/QualityinspectioninformationController.java

@@ -145,12 +145,12 @@ public class QualityinspectioninformationController extends BaseController
                 //添加数据
                 Qualityinspectioninformation qualityinspectioninformation = new Qualityinspectioninformation();
                 qualityinspectioninformation.setManufacturingProcess(headerListener.getProcess());
-                qualityinspectioninformation.setReportName(headerListener.getYear()+"/"+headerListener.getMonth()+"/"+sheetName);
-                qualityinspectioninformation.setReportDate(headerListener.getYear()+"/"+headerListener.getMonth());
+                qualityinspectioninformation.setReportName(headerListener.getYear()+""+headerListener.getMonth()+"/"+sheetName);
+                qualityinspectioninformation.setReportDate(headerListener.getYear()+""+headerListener.getMonth());
                 qualityinspectioninformation.setInspector(headerListener.getInspector());//检验员
                 qualityinspectioninformation.setExamine(headerListener.getReviewer());//审核人
                 qualityinspectioninformation.setInspectorDate(headerListener.getInspectDate()); //检验人签署时间
-                qualityinspectioninformation.setInspectorDate(headerListener.getReviewDate()); //审核人审核时间
+                qualityinspectioninformation.setExamineDate(headerListener.getReviewDate()); //审核人审核时间
                 qualityinspectioninformation.setType(sheetName);//类型
                 //判断数据解析是否正确😒
                 if(StringUtils.isNull(headerListener.getProcess())){
@@ -161,7 +161,7 @@ public class QualityinspectioninformationController extends BaseController
                     case "来料检验":
                         qualityinspectioninformation.setJlOneFailedBatch(headerListener.getOne()); //一次不合格批次
                         qualityinspectioninformation.setJlTotalBatchForInspection(headerListener.getTwo()); //报检总批次
-                        qualityinspectioninformation.setJlQuantityOfRejectsReturns(headerListener.getTwo().equals("null")?"0":headerListener.getTwo()); //废品/退换货数量
+                        qualityinspectioninformation.setJlQuantityOfRejectsReturns(headerListener.getThree().equals("null")?"0":headerListener.getThree()); //废品/退换货数量
                         qualityinspectioninformation.setJlQualifiedRateOfTheMonth(headerListener.getFour()); //本月合格率批次
                         System.out.println("1");
                         break;

+ 148 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/SharedFileController.java

@@ -0,0 +1,148 @@
+package com.zkqy.amichi.controller;
+
+
+import com.zkqy.amichi.domain.SharedFile;
+import com.zkqy.amichi.service.ISharedFileService;
+import com.zkqy.common.annotation.Anonymous;
+import com.zkqy.common.annotation.Log;
+import com.zkqy.common.core.controller.BaseController;
+import com.zkqy.common.core.domain.AjaxResult;
+import com.zkqy.common.core.page.TableDataInfo;
+import com.zkqy.common.enums.BusinessType;
+import com.zkqy.common.utils.poi.ExcelUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.util.MultiValueMap;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.List;
+
+@RestController
+@RequestMapping("/SharedFile/files")
+public class SharedFileController  extends BaseController {
+
+
+    @Autowired
+    private ISharedFileService sharedFileService;
+
+
+    @Value("${zkqy.profile}")
+    public String profile;
+
+
+    @GetMapping("/play")
+    @Anonymous
+    public AjaxResult syncSharedFiles() {
+        System.out.println("=================同步文件名称到数据start=============="+System.currentTimeMillis());
+        //执行业务方法同步文件名称到数据库
+        String resultMsg = sharedFileService.syncSharedFiles();
+        System.out.println("=================同步文件名称到数据end=============="+System.currentTimeMillis());
+        return AjaxResult.success(resultMsg);
+    }
+
+    @RequestMapping("/download")
+    @Anonymous
+    public ResponseEntity<byte[]> testResponseEntity(HttpSession session,@RequestParam("fileName") String fileName) throws
+            IOException {
+        //获取ServletContext对象
+        ServletContext servletContext = session.getServletContext();
+        //获取服务器中文件的真实路径
+//        String realPath = servletContext.getRealPath(profile+ File.separator +fileName);
+        //创建输入流
+        InputStream is = new FileInputStream(profile+ File.separator +fileName);
+        //创建字节数组
+        byte[] bytes = new byte[is.available()];
+        //将流读到字节数组中
+        is.read(bytes);
+        //创建HttpHeaders对象设置响应头信息
+        MultiValueMap<String, String> headers = new HttpHeaders();
+        //设置要下载方式以及下载文件的名字
+        headers.add("Content-Disposition", "attachment;filename="+fileName);
+        //设置响应状态码
+        HttpStatus statusCode = HttpStatus.OK;
+        //创建ResponseEntity对象
+        ResponseEntity<byte[]> responseEntity = new ResponseEntity<>(bytes, headers, statusCode);
+        //关闭输入流
+        is.close();
+        return responseEntity;
+    }
+
+    /**
+     * 查询共享文件列表
+     */
+    @PreAuthorize("@ss.hasPermi('SharedFile:files:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(SharedFile sharedFiles)
+    {
+        startPage();
+        List<SharedFile> list = sharedFileService.selectSharedFilesList(sharedFiles);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出共享文件列表
+     */
+    @PreAuthorize("@ss.hasPermi('SharedFile:files:export')")
+    @Log(title = "共享文件", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, SharedFile sharedFiles)
+    {
+        List<SharedFile> list = sharedFileService.selectSharedFilesList(sharedFiles);
+        ExcelUtil<SharedFile> util = new ExcelUtil<SharedFile>(SharedFile.class);
+        util.exportExcel(response, list, "共享文件数据");
+    }
+
+    /**
+     * 获取共享文件详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('SharedFile:files:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(sharedFileService.selectSharedFilesById(id));
+    }
+
+    /**
+     * 新增共享文件
+     */
+    @PreAuthorize("@ss.hasPermi('SharedFile:files:add')")
+    @Log(title = "共享文件", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody SharedFile sharedFiles)
+    {
+        return toAjax(sharedFileService.insertSharedFiles(sharedFiles));
+    }
+
+    /**
+     * 修改共享文件
+     */
+    @PreAuthorize("@ss.hasPermi('SharedFile:files:edit')")
+    @Log(title = "共享文件", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody SharedFile sharedFiles)
+    {
+        return toAjax(sharedFileService.updateSharedFiles(sharedFiles));
+    }
+
+    /**
+     * 删除共享文件
+     */
+    @PreAuthorize("@ss.hasPermi('SharedFile:files:remove')")
+    @Log(title = "共享文件", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(sharedFileService.deleteSharedFilesByIds(ids));
+    }
+}

+ 19 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/SharedFile.java

@@ -0,0 +1,19 @@
+package com.zkqy.amichi.domain;
+
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 读取共享文件
+ */
+@Data
+public class SharedFile {
+    private Long id;
+
+    private String fileName;    // 文件名
+    private String filePath;    // 文件路径
+    private Long fileSize;      // 文件大小
+    private Date createTime;    // 创建时间
+    private String createBy;    // 创建人
+}

+ 79 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/SharedFilesMapper.java

@@ -0,0 +1,79 @@
+package com.zkqy.amichi.mapper;
+
+import java.util.List;
+
+import com.zkqy.amichi.domain.SharedFile;
+import org.apache.ibatis.annotations.Mapper;
+
+
+/**
+ * 共享文件Mapper接口
+ * 
+ * @author hmc
+ * @date 2025-01-16
+ */
+@Mapper
+public interface SharedFilesMapper 
+{
+    /**
+     * 查询共享文件
+     * 
+     * @param id 共享文件主键
+     * @return 共享文件
+     */
+    public SharedFile selectSharedFilesById(Long id);
+
+    /**
+     * 查询共享文件列表
+     * 
+     * @param sharedFiles 共享文件
+     * @return 共享文件集合
+     */
+    public List<SharedFile> selectSharedFilesList(SharedFile sharedFiles);
+
+    /**
+     * 新增共享文件
+     * 
+     * @param sharedFiles 共享文件
+     * @return 结果
+     */
+    public int insertSharedFiles(SharedFile sharedFiles);
+
+    /**
+     * 修改共享文件
+     * 
+     * @param sharedFiles 共享文件
+     * @return 结果
+     */
+    public int updateSharedFiles(SharedFile sharedFiles);
+
+    /**
+     * 删除共享文件
+     * 
+     * @param id 共享文件主键
+     * @return 结果
+     */
+    public int deleteSharedFilesById(Long id);
+
+    /**
+     * 批量删除共享文件
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteSharedFilesByIds(Long[] ids);
+
+    /**
+     * 根据名称删除文件
+     * @param fileName
+     * @return
+     */
+    public int  deleteSharedFilesByName(String fileName);
+
+    /**
+     * 批量新增文件目录信息
+     * @param files
+     * @return
+     */
+    int batchInsert(List<SharedFile> files);
+}

+ 65 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/ISharedFileService.java

@@ -0,0 +1,65 @@
+package com.zkqy.amichi.service;
+
+import com.zkqy.amichi.domain.SharedFile;
+
+import java.util.List;
+
+
+public interface ISharedFileService {
+
+
+    /**
+     * 同步文件逻辑
+     * @return
+     */
+    String  syncSharedFiles();
+
+
+    /**
+     * 查询共享文件
+     *
+     * @param id 共享文件主键
+     * @return 共享文件
+     */
+    public SharedFile selectSharedFilesById(Long id);
+
+    /**
+     * 查询共享文件列表
+     *
+     * @param SharedFile 共享文件
+     * @return 共享文件集合
+     */
+    public List<SharedFile> selectSharedFilesList(SharedFile SharedFile);
+
+    /**
+     * 新增共享文件
+     *
+     * @param SharedFile 共享文件
+     * @return 结果
+     */
+    public int insertSharedFiles(SharedFile SharedFile);
+
+    /**
+     * 修改共享文件
+     *
+     * @param SharedFile 共享文件
+     * @return 结果
+     */
+    public int updateSharedFiles(SharedFile SharedFile);
+
+    /**
+     * 批量删除共享文件
+     *
+     * @param ids 需要删除的共享文件主键集合
+     * @return 结果
+     */
+    public int deleteSharedFilesByIds(Long[] ids);
+
+    /**
+     * 删除共享文件信息
+     *
+     * @param id 共享文件主键
+     * @return 结果
+     */
+    public int deleteSharedFilesById(Long id);
+}

+ 154 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/SharedFileServiceImpl.java

@@ -0,0 +1,154 @@
+package com.zkqy.amichi.service.impl;
+
+import com.zkqy.amichi.domain.SharedFile;
+import com.zkqy.amichi.mapper.SharedFilesMapper;
+import com.zkqy.amichi.service.ISharedFileService;
+import com.zkqy.amichi.utils.SharedFolderUtil;
+import com.zkqy.common.core.domain.entity.SysDictData;
+import com.zkqy.common.utils.DateUtils;
+import com.zkqy.system.mapper.SysDictDataMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.List;
+import java.util.stream.Collectors;
+
+@Service
+public class SharedFileServiceImpl implements ISharedFileService {
+
+    @Autowired
+    private SharedFolderUtil sharedFolderUtil;
+
+    @Autowired
+    private SharedFilesMapper sharedFilesMapper;
+
+    @Autowired
+    private SysDictDataMapper sysDictDataMapper;
+
+    @Value("${zkqy.profile}")
+    public String profile;
+
+    @Override
+    public String syncSharedFiles() {
+
+//        String folderName = null;
+//        try {
+//            folderName = URLEncoder.encode("dpgx", "UTF-8");
+//        } catch (UnsupportedEncodingException e) {
+//            throw new RuntimeException(e);
+//        }
+
+        //1、共享文件夹路径
+//        String sharedPath = "smb://192.168.110.15/dpgx/";
+        List<SysDictData> gxwjaddres = sysDictDataMapper.selectDictDataByType("gxwjaddres");
+        int i=0;
+        for (SysDictData gxwjaddre : gxwjaddres) {
+            //2、本地文件路径
+            String localPath = profile;
+            //3、读取共享文件夹中的所有文件
+            List<SharedFile> files = sharedFolderUtil.listFiles(gxwjaddre.getDictValue(), localPath);
+            //4、判断共享文件夹是否为空,如果为空没有新增意义
+            if (!files.isEmpty()) {
+                //4.1读取数据库所有文件名称
+                List<SharedFile> dbFiles = sharedFilesMapper.selectSharedFilesList(new SharedFile());
+                if(!dbFiles.isEmpty()){
+                    //4.2、提取名称
+                    List<String> dbFileNames = dbFiles.stream().map(SharedFile::getFileName).collect(Collectors.toList());
+                    //4.3、找出不在数据库中的文件(即新增文件)
+                    List<SharedFile> files2  = files.stream()
+                            .filter(f -> !dbFileNames.contains(f.getFileName()))
+                            .collect(Collectors.toList());
+                    if(!files2.isEmpty()){
+                        //5、新增逻辑
+                        sharedFilesMapper.batchInsert(files2);
+                    }
+                }else { //数据库为空,就全提那家
+                    //6、新增逻辑
+                    sharedFilesMapper.batchInsert(files);
+                }
+                i++;
+            }
+        }
+        if(i==gxwjaddres.size()){
+            return "共享成功";
+        }
+        return "共享成功";
+    }
+
+
+    /**
+     * 查询共享文件
+     *
+     * @param id 共享文件主键
+     * @return 共享文件
+     */
+    @Override
+    public SharedFile selectSharedFilesById(Long id)
+    {
+        return sharedFilesMapper.selectSharedFilesById(id);
+    }
+
+    /**
+     * 查询共享文件列表
+     *
+     * @param sharedFiles 共享文件
+     * @return 共享文件
+     */
+    @Override
+    public List<SharedFile> selectSharedFilesList(SharedFile sharedFiles)
+    {
+        return sharedFilesMapper.selectSharedFilesList(sharedFiles);
+    }
+
+    /**
+     * 新增共享文件
+     *
+     * @param sharedFiles 共享文件
+     * @return 结果
+     */
+    @Override
+    public int insertSharedFiles(SharedFile sharedFiles)
+    {
+        sharedFiles.setCreateTime(DateUtils.getNowDate());
+        return sharedFilesMapper.insertSharedFiles(sharedFiles);
+    }
+
+    /**
+     * 修改共享文件
+     *
+     * @param sharedFiles 共享文件
+     * @return 结果
+     */
+    @Override
+    public int updateSharedFiles(SharedFile sharedFiles)
+    {
+        return sharedFilesMapper.updateSharedFiles(sharedFiles);
+    }
+
+    /**
+     * 批量删除共享文件
+     *
+     * @param ids 需要删除的共享文件主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSharedFilesByIds(Long[] ids)
+    {
+        return sharedFilesMapper.deleteSharedFilesByIds(ids);
+    }
+
+    /**
+     * 删除共享文件信息
+     *
+     * @param id 共享文件主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSharedFilesById(Long id)
+    {
+        return sharedFilesMapper.deleteSharedFilesById(id);
+    }
+}

+ 31 - 1
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/StationInformationServiceImpl.java

@@ -1,6 +1,9 @@
 package com.zkqy.amichi.service.impl;
 
 import cn.hutool.core.date.DateTime;
+import cn.hutool.core.util.CharsetUtil;
+import cn.hutool.crypto.symmetric.SymmetricAlgorithm;
+import cn.hutool.crypto.symmetric.SymmetricCrypto;
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONArray;
 import com.alibaba.fastjson2.JSONObject;
@@ -15,13 +18,16 @@ import com.zkqy.amichi.jd.domain.MaterialRetentionLogVo;
 import com.zkqy.amichi.mapper.*;
 import com.zkqy.amichi.service.IStationInformationService;
 import com.zkqy.amichi.utils.WarehouseEntryNumberGenerator;
+import com.zkqy.common.core.domain.entity.SysTenant;
 import com.zkqy.common.utils.DateUtils;
 import com.zkqy.common.utils.StringUtils;
 import com.zkqy.execution.produce.dispersed.entity.BpmExecuteNodeLog;
 import com.zkqy.execution.produce.dispersed.entity.BpmExecuteProcess;
 import com.zkqy.execution.produce.dispersed.mapper.BpmExecuteNodeLogMapper;
 import com.zkqy.execution.produce.dispersed.mapper.BpmExecuteProcessMapper;
+import com.zkqy.framework.web.service.SysLoginService;
 import com.zkqy.system.mapper.SysDictDataMapper;
+import com.zkqy.system.mapper.SysTenantMapper;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
@@ -32,6 +38,7 @@ import org.springframework.transaction.annotation.Transactional;
 
 import java.io.IOException;
 import java.time.LocalDateTime;
+import java.time.ZoneOffset;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -186,7 +193,11 @@ public class StationInformationServiceImpl implements IStationInformationService
         return stationInformationMapper.deleteStationInformationById(id);
     }
 
+    @Autowired
+    private SysLoginService loginService;
 
+    @Autowired
+    private  SysTenantMapper sysTenantMapper;
     /**
      * 手持扫描真实逻辑
      * @param contentString
@@ -195,7 +206,26 @@ public class StationInformationServiceImpl implements IStationInformationService
     @Override
     @Transactional
     public String stationProductScanningTwo2(String contentString) throws Exception {
-
+        //abc
+        SysTenant sysTenant = sysTenantMapper.selectSysTenantByTenantId(216L);
+        //检查租户过期时间
+        if (sysTenant.getTenantExpirationTime() == null || sysTenant.getTenantExpirationTime().isEmpty()) {
+            return "未激活-系统-扫描失败-0-0-0-0";
+        }
+        SymmetricCrypto symmetricCrypto = new SymmetricCrypto(SymmetricAlgorithm.DES, "sgEsnN6QWq8W7j5H01020304".getBytes());
+        //当前时间
+        LocalDateTime now = LocalDateTime.now();
+        long nowSecond = now.toEpochSecond(ZoneOffset.ofHours(8));
+        //到期时间
+        String LastActiveTimeStr = symmetricCrypto.decryptStr(sysTenant.getTenantExpirationTime(), CharsetUtil.CHARSET_UTF_8);
+        LocalDateTime LastActiveDateTime = DateUtils.toLocalDateTime(LastActiveTimeStr, "yyyy-MM-dd HH:mm:ss");
+        long expirationTimeSecond = LastActiveDateTime.toEpochSecond(ZoneOffset.ofHours(8));
+        //计算时间戳
+        long difference = expirationTimeSecond - nowSecond; //相差的时间数 后边减前边
+        //如果是负数证明已经过期了
+        if (difference < 0) {
+            return "未激活-系统-扫描失败-0-0-0-0";
+        }
         //扫描人员码信息
         if(contentString.contains("scan@")){
             //扫描标记替换为空

+ 89 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/utils/SharedFolderUtil.java

@@ -0,0 +1,89 @@
+package com.zkqy.amichi.utils;
+
+import com.zkqy.amichi.domain.SharedFile;
+import com.zkqy.common.utils.SecurityUtils;
+import com.zkqy.common.utils.StringUtils;
+import jcifs.CIFSContext;
+import jcifs.config.PropertyConfiguration;
+import jcifs.context.BaseContext;
+import jcifs.smb1.smb1.SmbFile;
+import org.springframework.stereotype.Component;
+
+import java.io.*;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Properties;
+
+@Component
+public class SharedFolderUtil {
+
+    /**
+     * 读取共享文件夹中的所有文件
+     * @param sharedPath 共享文件夹路径,格式如:smb://username:password@192.168.1.100/share/
+     */
+    public List<SharedFile> listFiles(String sharedPath,String localPath) {
+        List<SharedFile> files = new ArrayList<>();
+        try {
+            // 使用新的方式创建 SmbFile
+            SmbFile smbFile = new SmbFile(sharedPath);
+            // 判断共享文件夹是否存在
+            if (smbFile.exists()) {
+                SmbFile[] smbFiles = smbFile.listFiles();
+                // 遍历共享文件夹中的所有文件
+                for (SmbFile file : smbFiles) {
+                    //判断是文件还是文件夹
+                    if (file.isFile()) {
+                        SharedFile sharedFile = new SharedFile();
+                        sharedFile.setFileName(file.getName());
+                        sharedFile.setFilePath(file.getPath());
+                        sharedFile.setFileSize(file.length());
+                        sharedFile.setCreateTime(new Date());
+                        sharedFile.setCreateBy("hmc");
+                        files.add(sharedFile);
+                        //拷贝文件到本地指定目录
+                        this.saveToLocal(file,localPath);
+                    }
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new RuntimeException("读取共享文件夹失败: " + e.getMessage());
+        }
+        return files;
+    }
+
+
+    /**
+
+     * 将文件保存到本地
+
+     */
+
+    private String saveToLocal(SmbFile smbFile,String localPath) throws IOException {
+
+        //String localPath = "E:\\plan";
+
+        // 创建本地存储目录
+        File localDir = new File(localPath);
+        if (!localDir.exists()) {
+            localDir.mkdirs();
+        }
+        // 构建本地文件路径
+        String fileName = smbFile.getName();
+        String localFilePath = localPath + File.separator + fileName;
+        File localFile = new File(localFilePath);
+        // 如果本地文件不存在或者大小不一致,则复制
+        if (!localFile.exists() || localFile.length() != smbFile.length()) {
+            try (InputStream in = smbFile.getInputStream();
+                 OutputStream out = new FileOutputStream(localFile)) {
+                byte[] buffer = new byte[1024 * 1024]; // 1MB buffer
+                int length;
+                while ((length = in.read(buffer)) > 0) {
+                    out.write(buffer, 0, length);
+                }
+            }
+        }
+        return localFilePath;
+    }
+}

+ 98 - 0
zkqy-fujian-amichi/src/main/resources/mapper/SharedFilesMapper.xml

@@ -0,0 +1,98 @@
+<?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.zkqy.amichi.mapper.SharedFilesMapper">
+    
+    <resultMap type="com.zkqy.amichi.domain.SharedFile" id="SharedFilesResult">
+        <result property="id"    column="id"    />
+        <result property="fileName"    column="file_name"    />
+        <result property="filePath"    column="file_path"    />
+        <result property="fileSize"    column="file_size"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="createBy"    column="create_by"    />
+    </resultMap>
+
+    <sql id="selectSharedFilesVo">
+        select id, file_name, file_path, file_size, create_time, create_by from fjqydb.shared_files
+    </sql>
+
+    <select id="selectSharedFilesList" parameterType="com.zkqy.amichi.domain.SharedFile" resultMap="SharedFilesResult">
+        <include refid="selectSharedFilesVo"/>
+        <where>  
+            <if test="fileName != null  and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if>
+            <if test="filePath != null  and filePath != ''"> and file_path = #{filePath}</if>
+            <if test="fileSize != null "> and file_size = #{fileSize}</if>
+        </where>
+    </select>
+    
+    <select id="selectSharedFilesById" parameterType="Long" resultMap="SharedFilesResult">
+        <include refid="selectSharedFilesVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertSharedFiles" parameterType="com.zkqy.amichi.domain.SharedFile" useGeneratedKeys="true" keyProperty="id">
+        insert into fjqydb.shared_files
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="fileName != null">file_name,</if>
+            <if test="filePath != null">file_path,</if>
+            <if test="fileSize != null">file_size,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="createBy != null">create_by,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="fileName != null">#{fileName},</if>
+            <if test="filePath != null">#{filePath},</if>
+            <if test="fileSize != null">#{fileSize},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="createBy != null">#{createBy},</if>
+         </trim>
+    </insert>
+    <insert id="batchInsert">
+        <foreach collection ="list" item="item" separator =";">
+            insert into fjqydb.shared_files
+            <trim prefix="(" suffix=")" suffixOverrides=",">
+                <if test="item.fileName != null">file_name,</if>
+                <if test="item.filePath != null">file_path,</if>
+                <if test="item.fileSize != null">file_size,</if>
+                <if test="item.createTime != null">create_time,</if>
+                <if test="item.createBy != null">create_by,</if>
+            </trim>
+            VALUES
+            <trim prefix="(" suffix=")" suffixOverrides=",">
+                <if test="item.fileName != null">#{item.fileName},</if>
+                <if test="item.filePath != null">#{item.filePath},</if>
+                <if test="item.fileSize != null">#{item.fileSize},</if>
+                <if test="item.createTime != null">#{item.createTime},</if>
+                <if test="item.createBy != null">#{item.createBy},</if>
+            </trim>
+        </foreach>
+    </insert>
+
+    <update id="updateSharedFiles" parameterType="com.zkqy.amichi.domain.SharedFile">
+        update fjqydb.shared_files
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="fileName != null">file_name = #{fileName},</if>
+            <if test="filePath != null">file_path = #{filePath},</if>
+            <if test="fileSize != null">file_size = #{fileSize},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteSharedFilesById" parameterType="Long">
+        delete from fjqydb.shared_files where id = #{id}
+    </delete>
+
+    <delete id="deleteSharedFilesByIds" parameterType="String">
+        delete from fjqydb.shared_files where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+    <delete id="deleteSharedFilesByName">
+        delete from fjqydb.shared_files where fileName=#{fileName}
+    </delete>
+</mapper>

+ 17 - 0
zkqy-fujian-amichi/src/test/java/com/zkqy/amichi/Test01.java

@@ -0,0 +1,17 @@
+package com.zkqy.amichi;
+
+import com.zkqy.amichi.service.ISharedFileService;
+import com.zkqy.common.core.domain.AjaxResult;
+import org.junit.jupiter.api.Test;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+
+import javax.annotation.Resource;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+
+//@SpringBootTest(classes = ZkqyApplication.class)
+public class Test01 {
+
+
+}

+ 1 - 1
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/impl/runbpm/chemicalfiber/WrappingNode.java

@@ -106,7 +106,7 @@ public class WrappingNode implements IRunBPMService {
 
 
                             CommonEntity commonEntity6 = new CommonEntity();
-                            commonEntity6.getBasicMap().put("tableName","details_of_the_refueling_plan");
+                            commonEntity6.getBasicMap().put("tableName","details_of_the_refueling_plan_spinning");
                             commonEntity6.getConditionMap().put("product_id",id);
                             commonEntity6.getConditionMap().put("mac_id",s);
                             commonEntity6.getCommMap().put("plan_status","3");

+ 52 - 0
zkqy-ui/src/api/amichi/sharedFile/files.js

@@ -0,0 +1,52 @@
+import request from '@/utils/request'
+
+// 查询共享文件列表
+export function listFiles(query) {
+  return request({
+    url: '/SharedFile/files/list',
+    method: 'get',
+    params: query
+  })
+}
+
+export function tbwj(query) {
+  return request({
+    url: '/SharedFile/files/play',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询共享文件详细
+export function getFiles(id) {
+  return request({
+    url: '/SharedFile/files/' + id,
+    method: 'get'
+  })
+}
+
+// 新增共享文件
+export function addFiles(data) {
+  return request({
+    url: '/SharedFile/files',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改共享文件
+export function updateFiles(data) {
+  return request({
+    url: '/SharedFile/files',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除共享文件
+export function delFiles(id) {
+  return request({
+    url: '/SharedFile/files/' + id,
+    method: 'delete'
+  })
+}

BIN
zkqy-ui/src/assets/qy/image.png


+ 508 - 0
zkqy-ui/src/views/amichi/qualityinspectioninformation/bp_inspection/QualityStatement.vue

@@ -0,0 +1,508 @@
+<template>
+  <div class="app-container">
+  <div class="quality-report-dialog">
+    <div class="dialog-header">
+      <div class="company-logo">
+        <!-- <span class="back-button" @click="goBack">返回</span> -->
+        <img src="@/assets/qy/image.png" alt="公司logo">
+      </div>
+      <div class="company-title">铨一电源科技有限公司</div>
+      <h2 class="report-title">白 胚 检 验 质 量 月 报 表</h2>
+      <div class="report-info">
+        <span style="font-size: 18px">{{ masterInfo.reportDate }} </span>
+      </div>
+    </div>
+    <div class="scroll-controls">
+      <div class="scroll-switch">
+        <span>滚动展示</span>
+        <label class="switch">
+          <input type="checkbox" v-model="isScrolling" @change="handleScrollChange">
+          <span class="slider"></span>
+        </label>
+      </div>
+      <div class="display-count" v-if="isScrolling">
+        <span>显示行数:</span>
+        <select v-model="displayRows" @change="handleRowsChange">
+          <option value="3">3行</option>
+          <option value="4">4行</option>
+          <option value="5">5行</option>
+          <option value="10">10行</option>
+        </select>
+      </div>
+    </div>
+
+    <div class="table-container" :style="tableStyle" @mouseenter="pauseScroll" @mouseleave="resumeScroll">
+      <table>
+        <thead>
+        <tr >
+<!--          <th>序号</th>-->
+          <th>订单号</th>
+          <th>型号/名称</th>
+          <th>不合格原因</th>
+          <th>不合格数</th>
+          <th>处理情况</th>
+          <th>工号</th>
+          <th>检验日期</th>
+        </tr>
+        </thead>
+        <tbody ref="tbody">
+        <tr v-for="(item,index) in displayData" :key="item.id" v-loading="loading">
+<!--          <td>{{ index+1 }}</td>-->
+          <td>{{ item.orderNumber }}</td>
+          <td>{{ item.modelName }}</td>
+          <td>{{ item.causeOfNonconformity }}</td>
+          <td>{{ item.disqualificationNumber }}</td>
+          <td>{{ item.handlingSituation }}</td>
+          <td>{{ item.jobNumber }}</td>
+          <td>{{ item.dateOfInspection }}</td>
+        </tr>
+        </tbody>
+      </table>
+    </div>
+
+    <!-- 添加底部统计信息 -->
+    <div class="summary-section">
+      <table class="summary-table">
+        <tr>
+          <td style="width: 18.56%;" class="ct">一次不合格数</td>
+          <td style="width: 25.6%;"><span>{{ masterInfo.bpNumberOfFailures }}</span></td>
+          <td style="width: 26%;" class="ct">废品/退换货数量</td>
+          <td><span>{{ masterInfo.bpScrapQuantity }} </span></td>
+        </tr>
+        <tr>
+          <td class="ct">本月总数</td>
+          <td><span>{{ masterInfo.bpTotalForTheMonth }}</span></td>
+          <td class="ct">本月合格率</td>
+          <td><span>{{ masterInfo.bpPassRateThisMonth }}</span></td>
+        </tr>
+      </table>
+    </div>
+    <!-- 添加底部签名 -->
+    <div class="signature-section">
+      <div class="signature-item">
+        <span>{{ masterInfo.inspector }}</span>
+        <span>{{masterInfo.examineDate}}</span>
+      </div>
+      <div class="signature-item">
+        <span>{{ masterInfo.examine }}</span>
+        <span>{{masterInfo.inspectorDate}}</span>
+      </div>
+    </div>
+  </div>
+  </div>
+</template>
+
+<script>
+import {
+  getQualityinspectioninformation,
+  listQualityinspectioninformation
+} from "@/api/amichi/qualityinspectioninformation/qualityinspectioninformation";
+
+
+import {listInspection} from "@/api/amichi/qualityinspectioninformation/inspection";
+
+export default {
+  name: 'TcCom',
+  data () {
+    return {
+      loading:false,
+      tableData: [
+
+      ],
+      isScrolling: false, // 控制是否滚动的开关
+      scrollData: [], // 用于滚动的数据
+      timer: null,
+      currentIndex: 0,
+      displayRows: 3, // 默认显示3行
+      isPaused: false, // 添加暂停状态标记
+      masterInfo:{
+        id:null,
+        manufacturingProcess:null,
+        inspector:null,
+        examine:null,
+        bpNumberOfFailures:null,
+        bpScrapQuantity:null,
+        bpTotalForTheMonth:null,
+        bpPassRateThisMonth:null,
+        reportDate:null,
+        examineDate:null,
+        inspectorDate:null
+      }
+    }
+  },
+
+  computed: {
+    displayData () {
+      return this.isScrolling ? this.scrollData : this.tableData
+    },
+    tableStyle () {
+      if (this.isScrolling) {
+        return {
+          height: `${this.displayRows * 40}px`,
+          overflow: 'hidden'
+        }
+      } else {
+        // 非滚动展示时,如果数据超过10行则显示滚动条
+        return {
+          maxHeight: '400px', // 设置一个较大的最大高度
+          overflowY: 'auto', // 只允许垂直方向滚动
+          overflowX: 'hidden' // 禁止水平方向滚动
+        }
+      }
+    }
+  },
+  methods: {
+    handleScrollChange () {
+      if (this.isScrolling) {
+        this.scrollData = [...this.tableData, ...this.tableData]
+        this.isPaused = false // 重置暂停状态
+        this.$nextTick(() => {
+          this.$refs.tbody.style.transform = 'translateY(0)'
+          this.$refs.tbody.style.transition = 'none'
+          this.startScroll()
+        })
+      } else {
+        this.stopScroll()
+        this.isPaused = false // 重置暂停状态
+        if (this.$refs.tbody) {
+          this.$refs.tbody.style.transform = 'translateY(0)'
+          this.$refs.tbody.style.transition = 'none'
+        }
+      }
+    },
+    startScroll () {
+      this.currentIndex = 0
+      this.timer = setInterval(() => {
+        this.currentIndex++
+        this.$refs.tbody.style.transition = 'transform 0.5s'
+        this.$refs.tbody.style.transform = `translateY(-${this.currentIndex * 40}px)`
+
+        if (this.currentIndex >= this.tableData.length) {
+          setTimeout(() => {
+            this.$refs.tbody.style.transition = 'none'
+            this.currentIndex = 0
+            this.$refs.tbody.style.transform = 'translateY(0)'
+          }, 500)
+        }
+      }, 2000)
+    },
+    stopScroll () {
+      if (this.timer) {
+        clearInterval(this.timer)
+        this.timer = null
+      }
+    },
+    goBack () {
+      this.$router.go(-1)
+    },
+    handleRowsChange () {
+      // if (!this.isPaused) { // 只有在非暂停状态下才重启滚动
+      //   this.stopScroll()
+      //   this.startScroll()
+      // }
+      if (!this.isPaused) {
+        this.stopScroll()
+        // 重置位置到第一条
+        this.currentIndex = 0
+        if (this.$refs.tbody) {
+          this.$refs.tbody.style.transition = 'none'
+          this.$refs.tbody.style.transform = 'translate3d(0, 0, 0)'
+        }
+        // 延迟启动滚动,确保重置生效
+        this.$nextTick(() => {
+          this.startScroll()
+        })
+      }
+    },
+    pauseScroll () {
+      if (this.isScrolling && !this.isPaused) {
+        this.isPaused = true
+        this.stopScroll()
+      }
+    },
+    resumeScroll () {
+      if (this.isScrolling && this.isPaused) {
+        this.isPaused = false
+        this.startScroll()
+      }
+    },
+    checkMasterInfo () {
+      this.masterInfo.isEnablePaging=false;
+      getQualityinspectioninformation(this.masterInfo.id).then(response => {
+        this.masterInfo = response.data;
+      });
+      this.loading=true
+      listInspection({"fid":this.masterInfo.id,"isEnablePaging":"false"}).then(response => {
+        this.tableData = response.rows;
+        this.loading = false;
+      });
+    }
+  },
+  created () {
+    // 移除这里的初始化,改为在开关打开时初始化
+    this.masterInfo.id =this.$route.query.id;
+     this.checkMasterInfo();
+  },
+  mounted () {
+    // 移除这里的自动开始滚动
+  },
+  beforeDestroy () {
+    this.stopScroll()
+  }
+}
+</script>
+
+
+<style scoped>
+.quality-report-dialog {
+  width: 100%;
+  max-width: 1200px;
+  margin: 0 auto;
+  padding: 60px;
+  background: #fff;
+  position: relative;
+  border: 1px solid black;
+}
+
+.back-button {
+  position: absolute;
+  left: 0;
+  top: -25px;
+  padding: 5px 15px;
+  background-color: #409EFF;
+  color: white;
+  border-radius: 4px;
+  cursor: pointer;
+  font-size: 14px;
+}
+
+.back-button:hover {
+  background-color: #66b1ff;
+}
+
+.dialog-header {
+  text-align: center;
+  margin-bottom: 20px;
+  position: relative;
+}
+
+.company-logo {
+  position: absolute;
+  left: 0;
+  top: 8px;
+}
+
+.company-logo img {
+  width: 120px;
+  height: auto;
+}
+
+.company-title {
+  font-size: 30px;
+  text-align: center;
+  font-weight: bold;
+  margin: 0 auto;
+  padding: 10px 0;
+}
+
+.report-title {
+  font-size: 20px;
+  margin: 15px 0;
+}
+
+.report-info {
+  text-align: right;
+  margin: 10px 0;
+}
+
+.table-container {
+  width: 100%;
+  position: relative;
+  border: 1px solid #ddd;
+  transition: height 0.3s;
+  cursor: default;
+  background: #fff;
+  display: flex;
+  flex-direction: column;
+  overflow: hidden;
+}
+
+table {
+  width: 100%;
+  border-collapse: separate;
+  border-spacing: 0;
+  background: #fff;
+  flex: 1;
+}
+
+thead {
+  background: #f5f5f5;
+  position: sticky;
+  top: 0;
+  z-index: 10;
+  width: 100%;
+}
+
+tbody {
+  position: relative;
+  background: #fff;
+  transform-origin: 0 0;
+}
+
+th, td {
+  border: 1px solid #ddd;
+  background: #fff;
+  position: relative;
+  z-index: 1;
+  padding: 8px;
+  text-align: center;
+  white-space: nowrap;
+}
+
+th {
+  background: #f5f5f5;
+}
+
+tr {
+  height: 40px;
+  /* line-height: 40px; */
+}
+
+/* 设置列宽 */
+th:nth-child(1), td:nth-child(1) { width: 5%; } /* 序号 */
+th:nth-child(2), td:nth-child(2) { width: 10%; } /* 订单号/数量 */
+th:nth-child(3), td:nth-child(3) { width: 25%; } /* 型号/名称 */
+th:nth-child(4), td:nth-child(4) { width: 8%; } /* 数量 */
+th:nth-child(5), td:nth-child(5) { width: 22%; } /* 不合格原因 */
+th:nth-child(6), td:nth-child(6) { width: 10%; } /* 不合格数 */
+th:nth-child(7), td:nth-child(7) { width: 10%; } /* 处理情况 */
+th:nth-child(8), td:nth-child(8) { width: 10%; } /* 检验日期 */
+
+/* 美化滚动条样式 */
+.table-container::-webkit-scrollbar {
+  width: 6px;
+  height: 0; /* 隐藏水平滚动条 */
+}
+
+.table-container::-webkit-scrollbar-thumb {
+  background-color: #888;
+  border-radius: 3px;
+}
+
+.table-container::-webkit-scrollbar-track {
+  background-color: #f1f1f1;
+}
+
+.summary-section {
+  margin-top: 20px;
+}
+
+.summary-table {
+  width: 100%;
+  border-collapse: collapse;
+}
+
+.summary-table td {
+  border: 1px solid #ddd;
+  padding: 8px;
+  text-align: center;
+}
+
+.ct {
+  text-align: center;
+  font-weight: bold;
+  background-color: #F5F5F5;
+}
+
+.signature-section {
+  margin-top: 30px;
+  display: flex;
+  justify-content: space-between;
+  padding: 0 50px;
+}
+
+.signature-item {
+  display: flex;
+  gap: 20px;
+}
+
+.signature-item span {
+  font-size: 18px;
+}
+
+.scroll-controls {
+  display: flex;
+  align-items: center;
+  gap: 20px;
+  margin-bottom: 10px;
+}
+
+.scroll-switch {
+  display: flex;
+  align-items: center;
+  gap: 10px;
+}
+
+/* 开关样式 */
+.switch {
+  position: relative;
+  display: inline-block;
+  width: 40px;
+  height: 20px;
+}
+
+.switch input {
+  opacity: 0;
+  width: 0;
+  height: 0;
+}
+
+.slider {
+  position: absolute;
+  cursor: pointer;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background-color: #ccc;
+  transition: .4s;
+  border-radius: 20px;
+}
+
+.slider:before {
+  position: absolute;
+  content: "";
+  height: 16px;
+  width: 16px;
+  left: 2px;
+  bottom: 2px;
+  background-color: white;
+  transition: .4s;
+  border-radius: 50%;
+}
+
+input:checked + .slider {
+  background-color: #409EFF;
+}
+
+input:checked + .slider:before {
+  transform: translateX(20px);
+}
+
+.display-count {
+  display: flex;
+  align-items: center;
+  gap: 10px;
+}
+
+.display-count select {
+  padding: 4px 8px;
+  border-radius: 4px;
+  border: 1px solid #ddd;
+  outline: none;
+}
+
+.display-count select:focus {
+  border-color: #409EFF;
+}
+</style>

+ 41 - 38
zkqy-ui/src/views/amichi/qualityinspectioninformation/bp_inspection/index.vue

@@ -64,48 +64,51 @@
     </el-form>
 
     <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5">
-        <el-button
-          type="primary"
-          plain
-          icon="el-icon-plus"
-          size="mini"
-          @click="handleAdd"
-          v-hasPermi="['system:inspection:add']"
-        >新增</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="success"
-          plain
-          icon="el-icon-edit"
-          size="mini"
-          :disabled="single"
-          @click="handleUpdate"
-          v-hasPermi="['system:inspection:edit']"
-        >修改</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-delete"
-          size="mini"
-          :disabled="multiple"
-          @click="handleDelete"
-          v-hasPermi="['system:inspection:remove']"
-        >删除</el-button>
-      </el-col>
 <!--      <el-col :span="1.5">-->
 <!--        <el-button-->
-<!--          type="warning"-->
+<!--          type="primary"-->
+<!--          plain-->
+<!--          icon="el-icon-plus"-->
+<!--          size="mini"-->
+<!--          @click="handleAdd"-->
+
+<!--        >新增</el-button>-->
+<!--&lt;!&ndash;        v-hasPermi="['system:inspection:add']"&ndash;&gt;-->
+<!--      </el-col>-->
+<!--      <el-col :span="1.5">-->
+<!--        <el-button-->
+<!--          type="success"-->
 <!--          plain-->
-<!--          icon="el-icon-download"-->
+<!--          icon="el-icon-edit"-->
 <!--          size="mini"-->
-<!--          @click="handleExport"-->
-<!--          v-hasPermi="['system:inspection:export']"-->
-<!--        >导出</el-button>-->
+<!--          :disabled="single"-->
+<!--          @click="handleUpdate"-->
+
+<!--        >修改</el-button>-->
+<!--&lt;!&ndash;        v-hasPermi="['system:inspection:edit']"&ndash;&gt;-->
+<!--      </el-col>-->
+<!--      <el-col :span="1.5">-->
+<!--        <el-button-->
+<!--          type="danger"-->
+<!--          plain-->
+<!--          icon="el-icon-delete"-->
+<!--          size="mini"-->
+<!--          :disabled="multiple"-->
+<!--          @click="handleDelete"-->
+
+<!--        >删除</el-button>-->
+<!--&lt;!&ndash;        v-hasPermi="['system:inspection:remove']"&ndash;&gt;-->
 <!--      </el-col>-->
+<!--&lt;!&ndash;      <el-col :span="1.5">&ndash;&gt;-->
+<!--&lt;!&ndash;        <el-button&ndash;&gt;-->
+<!--&lt;!&ndash;          type="warning"&ndash;&gt;-->
+<!--&lt;!&ndash;          plain&ndash;&gt;-->
+<!--&lt;!&ndash;          icon="el-icon-download"&ndash;&gt;-->
+<!--&lt;!&ndash;          size="mini"&ndash;&gt;-->
+<!--&lt;!&ndash;          @click="handleExport"&ndash;&gt;-->
+<!--&lt;!&ndash;          v-hasPermi="['system:inspection:export']"&ndash;&gt;-->
+<!--&lt;!&ndash;        >导出</el-button>&ndash;&gt;-->
+<!--&lt;!&ndash;      </el-col>&ndash;&gt;-->
       <el-col :span="1.5">
         <el-button
           type="primary"
@@ -119,7 +122,7 @@
     </el-row>
 
     <el-table v-loading="loading" :data="inspectionList" style="margin-top: 20px" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
+<!--      <el-table-column type="selection" width="55" align="center" />-->
 <!--      <el-table-column label="主键id" align="center" prop="id" />-->
       <el-table-column label="订单号" align="center" prop="orderNumber" />
       <el-table-column label="型号名称" align="center" prop="modelName" />

+ 506 - 0
zkqy-ui/src/views/amichi/qualityinspectioninformation/bp_leavefactory/QualityStatement.vue

@@ -0,0 +1,506 @@
+<template>
+  <div class="app-container">
+  <div class="quality-report-dialog">
+    <div class="dialog-header">
+      <div class="company-logo">
+        <!-- <span class="back-button" @click="goBack">返回</span> -->
+        <img src="@/assets/qy/image.png" alt="公司logo">
+      </div>
+      <div class="company-title">铨一电源科技有限公司</div>
+      <h2 class="report-title">出厂 质 量 月 报 表</h2>
+      <div class="report-info">
+        <span style="font-size: 18px">{{ masterInfo.reportDate }} </span>
+      </div>
+    </div>
+    <div class="scroll-controls">
+      <div class="scroll-switch">
+        <span>滚动展示</span>
+        <label class="switch">
+          <input type="checkbox" v-model="isScrolling" @change="handleScrollChange">
+          <span class="slider"></span>
+        </label>
+      </div>
+      <div class="display-count" v-if="isScrolling">
+        <span>显示行数:</span>
+        <select v-model="displayRows" @change="handleRowsChange">
+          <option value="3">3行</option>
+          <option value="4">4行</option>
+          <option value="5">5行</option>
+          <option value="10">10行</option>
+        </select>
+      </div>
+    </div>
+
+    <div class="table-container" :style="tableStyle" @mouseenter="pauseScroll" @mouseleave="resumeScroll">
+      <table>
+        <thead>
+        <tr >
+<!--          <th>序号</th>-->
+          <th>订单号</th>
+          <th>型号名称</th>
+          <th>总数</th>
+          <th>不合格原因</th>
+          <th>不合格数量</th>
+          <th>处理情况</th>
+          <th>检验日期</th>
+        </tr>
+        </thead>
+        <tbody ref="tbody">
+        <tr v-for="(item,index) in displayData" :key="item.id" v-loading="loading">
+<!--          <td>{{ index+1 }}</td>-->
+          <td>{{ item.orderNumber }}</td>
+          <td>{{ item.modelName }}</td>
+          <td>{{ item.modelName }}</td>
+          <td>{{ item.causeOfNonconformity }}</td>
+          <td>{{ item.disqualificationNumber }}</td>
+          <td>{{ item.jobNumber }}</td>
+          <td>{{ item.dateOfInspection }}</td>
+        </tr>
+        </tbody>
+      </table>
+    </div>
+
+    <!-- 添加底部统计信息 -->
+    <div class="summary-section">
+      <table class="summary-table">
+        <tr>
+          <td style="width: 18.56%;" class="ct">一次不合格批次</td>
+          <td style="width: 25.6%;"><span>{{ masterInfo.ccNumberOfFailures }}</span></td>
+          <td style="width: 26%;" class="ct">废品/退货总数量</td>
+          <td><span>{{ masterInfo.ccScrapQuantity }} </span></td>
+        </tr>
+        <tr>
+          <td class="ct">报检总批次</td>
+          <td><span>{{ masterInfo.ccTotalForTheMonth }}</span></td>
+          <td class="ct">本月合格率(批次)</td>
+          <td><span>{{ masterInfo.ccPassRateThisMonth }}</span></td>
+        </tr>
+      </table>
+    </div>
+
+    <!-- 添加底部签名 -->
+    <div class="signature-section">
+      <div class="signature-item">
+        <span>{{ masterInfo.inspector }}</span>
+        <span>{{masterInfo.examineDate}}</span>
+      </div>
+      <div class="signature-item">
+        <span>{{ masterInfo.examine }}</span>
+        <span>{{masterInfo.inspectorDate}}</span>
+      </div>
+    </div>
+  </div>
+  </div>
+</template>
+
+<script>
+import {
+  getQualityinspectioninformation,
+  listQualityinspectioninformation
+} from "@/api/amichi/qualityinspectioninformation/qualityinspectioninformation";
+import {listBpleavefactory} from "@/api/amichi/qualityinspectioninformation/bpleavefactory";
+
+export default {
+  name: 'TcCom',
+  data () {
+    return {
+      loading:false,
+      tableData: [
+
+      ],
+      isScrolling: false, // 控制是否滚动的开关
+      scrollData: [], // 用于滚动的数据
+      timer: null,
+      currentIndex: 0,
+      displayRows: 3, // 默认显示3行
+      isPaused: false, // 添加暂停状态标记
+      masterInfo:{
+        id:null,
+        manufacturingProcess:null,
+        inspector:null,
+        examine:null,
+        ccNumberOfFailures:null,
+        ccScrapQuantity:null,
+        ccTotalForTheMonth:null,
+        ccPassRateThisMonth:null,
+        reportDate:null,
+        examineDate:null,
+        inspectorDate:null
+      }
+    }
+  },
+  computed: {
+    displayData () {
+      return this.isScrolling ? this.scrollData : this.tableData
+    },
+    tableStyle () {
+      if (this.isScrolling) {
+        return {
+          height: `${this.displayRows * 40}px`,
+          overflow: 'hidden'
+        }
+      } else {
+        // 非滚动展示时,如果数据超过10行则显示滚动条
+        return {
+          maxHeight: '400px', // 设置一个较大的最大高度
+          overflowY: 'auto', // 只允许垂直方向滚动
+          overflowX: 'hidden' // 禁止水平方向滚动
+        }
+      }
+    }
+  },
+  methods: {
+    handleScrollChange () {
+      if (this.isScrolling) {
+        this.scrollData = [...this.tableData, ...this.tableData]
+        this.isPaused = false // 重置暂停状态
+        this.$nextTick(() => {
+          this.$refs.tbody.style.transform = 'translateY(0)'
+          this.$refs.tbody.style.transition = 'none'
+          this.startScroll()
+        })
+      } else {
+        this.stopScroll()
+        this.isPaused = false // 重置暂停状态
+        if (this.$refs.tbody) {
+          this.$refs.tbody.style.transform = 'translateY(0)'
+          this.$refs.tbody.style.transition = 'none'
+        }
+      }
+    },
+    startScroll () {
+      this.currentIndex = 0
+      this.timer = setInterval(() => {
+        this.currentIndex++
+        this.$refs.tbody.style.transition = 'transform 0.5s'
+        this.$refs.tbody.style.transform = `translateY(-${this.currentIndex * 40}px)`
+
+        if (this.currentIndex >= this.tableData.length) {
+          setTimeout(() => {
+            this.$refs.tbody.style.transition = 'none'
+            this.currentIndex = 0
+            this.$refs.tbody.style.transform = 'translateY(0)'
+          }, 500)
+        }
+      }, 2000)
+    },
+    stopScroll () {
+      if (this.timer) {
+        clearInterval(this.timer)
+        this.timer = null
+      }
+    },
+    goBack () {
+      this.$router.go(-1)
+    },
+    handleRowsChange () {
+      // if (!this.isPaused) { // 只有在非暂停状态下才重启滚动
+      //   this.stopScroll()
+      //   this.startScroll()
+      // }
+      if (!this.isPaused) {
+        this.stopScroll()
+        // 重置位置到第一条
+        this.currentIndex = 0
+        if (this.$refs.tbody) {
+          this.$refs.tbody.style.transition = 'none'
+          this.$refs.tbody.style.transform = 'translate3d(0, 0, 0)'
+        }
+        // 延迟启动滚动,确保重置生效
+        this.$nextTick(() => {
+          this.startScroll()
+        })
+      }
+    },
+    pauseScroll () {
+      if (this.isScrolling && !this.isPaused) {
+        this.isPaused = true
+        this.stopScroll()
+      }
+    },
+    resumeScroll () {
+      if (this.isScrolling && this.isPaused) {
+        this.isPaused = false
+        this.startScroll()
+      }
+    },
+    checkMasterInfo () {
+      this.masterInfo.isEnablePaging=false;
+      getQualityinspectioninformation(this.masterInfo.id).then(response => {
+        this.masterInfo = response.data;
+      });
+      this.loading=true
+      listBpleavefactory({"fid":this.masterInfo.id,"isEnablePaging":"false"}).then(response => {
+        this.tableData = response.rows;
+        this.loading = false;
+      });
+    }
+  },
+  created () {
+    // 移除这里的初始化,改为在开关打开时初始化
+    this.masterInfo.id =this.$route.query.id;
+     this.checkMasterInfo();
+  },
+  mounted () {
+    // 移除这里的自动开始滚动
+  },
+  beforeDestroy () {
+    this.stopScroll()
+  }
+}
+</script>
+
+
+<style scoped>
+.quality-report-dialog {
+  width: 100%;
+  max-width: 1200px;
+  margin: 0 auto;
+  padding: 60px;
+  background: #fff;
+  position: relative;
+  border: 1px solid black;
+}
+
+.back-button {
+  position: absolute;
+  left: 0;
+  top: -25px;
+  padding: 5px 15px;
+  background-color: #409EFF;
+  color: white;
+  border-radius: 4px;
+  cursor: pointer;
+  font-size: 14px;
+}
+
+.back-button:hover {
+  background-color: #66b1ff;
+}
+
+.dialog-header {
+  text-align: center;
+  margin-bottom: 20px;
+  position: relative;
+}
+
+.company-logo {
+  position: absolute;
+  left: 0;
+  top: 8px;
+}
+
+.company-logo img {
+  width: 120px;
+  height: auto;
+}
+
+.company-title {
+  font-size: 30px;
+  text-align: center;
+  font-weight: bold;
+  margin: 0 auto;
+  padding: 10px 0;
+}
+
+.report-title {
+  font-size: 20px;
+  margin: 15px 0;
+}
+
+.report-info {
+  text-align: right;
+  margin: 10px 0;
+}
+
+.table-container {
+  width: 100%;
+  position: relative;
+  border: 1px solid #ddd;
+  transition: height 0.3s;
+  cursor: default;
+  background: #fff;
+  display: flex;
+  flex-direction: column;
+  overflow: hidden;
+}
+
+table {
+  width: 100%;
+  border-collapse: separate;
+  border-spacing: 0;
+  background: #fff;
+  flex: 1;
+}
+
+thead {
+  background: #f5f5f5;
+  position: sticky;
+  top: 0;
+  z-index: 10;
+  width: 100%;
+}
+
+tbody {
+  position: relative;
+  background: #fff;
+  transform-origin: 0 0;
+}
+
+th, td {
+  border: 1px solid #ddd;
+  background: #fff;
+  position: relative;
+  z-index: 1;
+  padding: 8px;
+  text-align: center;
+  white-space: nowrap;
+}
+
+th {
+  background: #f5f5f5;
+}
+
+tr {
+  height: 40px;
+  /* line-height: 40px; */
+}
+
+/* 设置列宽 */
+th:nth-child(1), td:nth-child(1) { width: 5%; } /* 序号 */
+th:nth-child(2), td:nth-child(2) { width: 10%; } /* 订单号/数量 */
+th:nth-child(3), td:nth-child(3) { width: 25%; } /* 型号/名称 */
+th:nth-child(4), td:nth-child(4) { width: 8%; } /* 数量 */
+th:nth-child(5), td:nth-child(5) { width: 22%; } /* 不合格原因 */
+th:nth-child(6), td:nth-child(6) { width: 10%; } /* 不合格数 */
+th:nth-child(7), td:nth-child(7) { width: 10%; } /* 处理情况 */
+th:nth-child(8), td:nth-child(8) { width: 10%; } /* 检验日期 */
+
+/* 美化滚动条样式 */
+.table-container::-webkit-scrollbar {
+  width: 6px;
+  height: 0; /* 隐藏水平滚动条 */
+}
+
+.table-container::-webkit-scrollbar-thumb {
+  background-color: #888;
+  border-radius: 3px;
+}
+
+.table-container::-webkit-scrollbar-track {
+  background-color: #f1f1f1;
+}
+
+.summary-section {
+  margin-top: 20px;
+}
+
+.summary-table {
+  width: 100%;
+  border-collapse: collapse;
+}
+
+.summary-table td {
+  border: 1px solid #ddd;
+  padding: 8px;
+  text-align: center;
+}
+
+.ct {
+  text-align: center;
+  font-weight: bold;
+  background-color: #F5F5F5;
+}
+
+.signature-section {
+  margin-top: 30px;
+  display: flex;
+  justify-content: space-between;
+  padding: 0 50px;
+}
+
+.signature-item {
+  display: flex;
+  gap: 20px;
+}
+
+.signature-item span {
+  font-size: 18px;
+}
+
+.scroll-controls {
+  display: flex;
+  align-items: center;
+  gap: 20px;
+  margin-bottom: 10px;
+}
+
+.scroll-switch {
+  display: flex;
+  align-items: center;
+  gap: 10px;
+}
+
+/* 开关样式 */
+.switch {
+  position: relative;
+  display: inline-block;
+  width: 40px;
+  height: 20px;
+}
+
+.switch input {
+  opacity: 0;
+  width: 0;
+  height: 0;
+}
+
+.slider {
+  position: absolute;
+  cursor: pointer;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background-color: #ccc;
+  transition: .4s;
+  border-radius: 20px;
+}
+
+.slider:before {
+  position: absolute;
+  content: "";
+  height: 16px;
+  width: 16px;
+  left: 2px;
+  bottom: 2px;
+  background-color: white;
+  transition: .4s;
+  border-radius: 50%;
+}
+
+input:checked + .slider {
+  background-color: #409EFF;
+}
+
+input:checked + .slider:before {
+  transform: translateX(20px);
+}
+
+.display-count {
+  display: flex;
+  align-items: center;
+  gap: 10px;
+}
+
+.display-count select {
+  padding: 4px 8px;
+  border-radius: 4px;
+  border: 1px solid #ddd;
+  outline: none;
+}
+
+.display-count select:focus {
+  border-color: #409EFF;
+}
+</style>

+ 42 - 39
zkqy-ui/src/views/amichi/qualityinspectioninformation/bp_leavefactory/index.vue

@@ -64,48 +64,51 @@
     </el-form>
 
     <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5">
-        <el-button
-          type="primary"
-          plain
-          icon="el-icon-plus"
-          size="mini"
-          @click="handleAdd"
-          v-hasPermi="['bpleavefactory:bpleavefactory:add']"
-        >新增</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="success"
-          plain
-          icon="el-icon-edit"
-          size="mini"
-          :disabled="single"
-          @click="handleUpdate"
-          v-hasPermi="['bpleavefactory:bpleavefactory:edit']"
-        >修改</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-delete"
-          size="mini"
-          :disabled="multiple"
-          @click="handleDelete"
-          v-hasPermi="['bpleavefactory:bpleavefactory:remove']"
-        >删除</el-button>
-      </el-col>
 <!--      <el-col :span="1.5">-->
 <!--        <el-button-->
-<!--          type="warning"-->
+<!--          type="primary"-->
+<!--          plain-->
+<!--          icon="el-icon-plus"-->
+<!--          size="mini"-->
+<!--          @click="handleAdd"-->
+
+<!--        >新增</el-button>-->
+<!--&lt;!&ndash;        v-hasPermi="['bpleavefactory:bpleavefactory:add']"&ndash;&gt;-->
+<!--      </el-col>-->
+<!--      <el-col :span="1.5">-->
+<!--        <el-button-->
+<!--          type="success"-->
 <!--          plain-->
-<!--          icon="el-icon-download"-->
+<!--          icon="el-icon-edit"-->
 <!--          size="mini"-->
-<!--          @click="handleExport"-->
-<!--          v-hasPermi="['bpleavefactory:bpleavefactory:export']"-->
-<!--        >导出</el-button>-->
+<!--          :disabled="single"-->
+<!--          @click="handleUpdate"-->
+
+<!--        >修改</el-button>-->
+<!--&lt;!&ndash;        v-hasPermi="['bpleavefactory:bpleavefactory:edit']"&ndash;&gt;-->
+<!--      </el-col>-->
+<!--      <el-col :span="1.5">-->
+<!--        <el-button-->
+<!--          type="danger"-->
+<!--          plain-->
+<!--          icon="el-icon-delete"-->
+<!--          size="mini"-->
+<!--          :disabled="multiple"-->
+<!--          @click="handleDelete"-->
+
+<!--        >删除</el-button>-->
+<!--&lt;!&ndash;        v-hasPermi="['bpleavefactory:bpleavefactory:remove']"&ndash;&gt;-->
 <!--      </el-col>-->
+<!--&lt;!&ndash;      <el-col :span="1.5">&ndash;&gt;-->
+<!--&lt;!&ndash;        <el-button&ndash;&gt;-->
+<!--&lt;!&ndash;          type="warning"&ndash;&gt;-->
+<!--&lt;!&ndash;          plain&ndash;&gt;-->
+<!--&lt;!&ndash;          icon="el-icon-download"&ndash;&gt;-->
+<!--&lt;!&ndash;          size="mini"&ndash;&gt;-->
+<!--&lt;!&ndash;          @click="handleExport"&ndash;&gt;-->
+<!--&lt;!&ndash;          v-hasPermi="['bpleavefactory:bpleavefactory:export']"&ndash;&gt;-->
+<!--&lt;!&ndash;        >导出</el-button>&ndash;&gt;-->
+<!--&lt;!&ndash;      </el-col>&ndash;&gt;-->
       <el-col :span="1.5">
         <el-button
           type="primary"
@@ -119,8 +122,8 @@
     </el-row>
 
     <el-table v-loading="loading" :data="bpleavefactoryList" style="margin-top: 20px" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="主键id" align="center" prop="id" />
+<!--      <el-table-column type="selection" width="55" align="center" />-->
+<!--      <el-table-column label="主键id" align="center" prop="id" />-->
       <el-table-column label="订单号" align="center" prop="orderNumber" />
       <el-table-column label="型号名称" align="center" prop="modelName" />
       <el-table-column label="总数" align="center" prop="causeOfNonconformity" />

+ 40 - 6
zkqy-ui/src/views/amichi/qualityinspectioninformation/index.vue

@@ -40,6 +40,7 @@
     </el-form>
 
     <el-row :gutter="10" class="mb8">
+      <!--          v-hasPermi="['qualityinspectioninformation:qualityinspectioninformation:add']"-->
       <el-col :span="1.5">
         <el-button
           type="primary"
@@ -47,7 +48,7 @@
           icon="el-icon-plus"
           size="mini"
           @click="handleAdd"
-          v-hasPermi="['qualityinspectioninformation:qualityinspectioninformation:add']"
+
         >新增</el-button>
       </el-col>
       <el-col :span="1.5">
@@ -58,9 +59,10 @@
           size="mini"
           :disabled="single"
           @click="handleUpdate"
-          v-hasPermi="['qualityinspectioninformation:qualityinspectioninformation:edit']"
+
         >修改</el-button>
       </el-col>
+      <!--          v-hasPermi="['qualityinspectioninformation:qualityinspectioninformation:remove']"-->
       <el-col :span="1.5">
         <el-button
           type="danger"
@@ -69,9 +71,10 @@
           size="mini"
           :disabled="multiple"
           @click="handleDelete"
-          v-hasPermi="['qualityinspectioninformation:qualityinspectioninformation:remove']"
+
         >删除</el-button>
       </el-col>
+      <!--          v-hasPermi="['qualityinspectioninformation:qualityinspectioninformation:edit']"-->
 <!--      <el-col :span="1.5">-->
 <!--        <el-button-->
 <!--          type="warning"-->
@@ -89,8 +92,8 @@
           icon="el-icon-download"
           size="mini"
           @click="handleImport"
-          v-hasPermi="['qualityinspectioninformation:qualityinspectioninformation:export']"
         >导入</el-button>
+        <!--          v-hasPermi="['qualityinspectioninformation:qualityinspectioninformation:export']"-->
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
 
@@ -147,6 +150,8 @@
               <el-dropdown-item  icon="el-icon-edit"  command="handleUpdate">修改</el-dropdown-item>
               <el-dropdown-item  icon="el-icon-delete" command="handleDelete">删除</el-dropdown-item>
               <el-dropdown-item  icon="el-icon-document" command="handleDetail">明细</el-dropdown-item>
+              <el-dropdown-item  icon="el-icon-document" command="handleCatDetail">报告展示</el-dropdown-item>
+
             </el-dropdown-menu>
           </el-dropdown>
         </template>
@@ -318,7 +323,7 @@ export default {
       if (process === '出厂检验') {
         columns.push(
           { label: '一次不合格数', align: 'center', prop: 'ccNumberOfFailures' },
-          { label: '废数量', align: 'center', prop: 'ccScrapQuantity' },
+          { label: '废品/退换货数量', align: 'center', prop: 'ccScrapQuantity' },
           { label: '本月总数', align: 'center', prop: 'ccTotalForTheMonth' },
           { label: '本月合格率', align: 'center', prop: 'ccPassRateThisMonth' }
         );
@@ -339,6 +344,8 @@ export default {
           break;
         case "handleDetail":
           this.handleDetail(row);
+        case "handleCatDetail":
+          this.handleCatDetail(row);
           break;
         default:
           break;
@@ -371,7 +378,34 @@ export default {
           }
         });
       }
-
+    },
+    handleCatDetail(row){
+      console.log("查看明细")
+      if(row.manufacturingProcess=="来料检验"){
+        //完整写法
+        this.$router.push({
+          path: '/amichi/qualityContro/amichi/qualityinspectioninformation/jl_inspection/QualityStatement.vue',
+          query: {
+            "id": row.id,
+          }
+        });
+      }else if(row.manufacturingProcess=="白胚检验"){
+        //完整写法
+        this.$router.push({
+          path: '/amichi/qualityContro/amichi/qualityinspectioninformation/bp_inspection/QualityStatement.vue',
+          query: {
+            "id": row.id,
+          }
+        });
+      }else if(row.manufacturingProcess=="出厂检验"){
+        //完整写法
+        this.$router.push({
+          path: '/amichi/qualityContro/amichi/qualityinspectioninformation/bp_leavefactory/QualityStatement.vue',
+          query: {
+            "id": row.id,
+          }
+        });
+      }
     },
     /** 查询质检信息列表 */
     getList() {

+ 506 - 0
zkqy-ui/src/views/amichi/qualityinspectioninformation/jl_inspection/QualityStatement.vue

@@ -0,0 +1,506 @@
+<template>
+  <div class="app-container">
+  <div class="quality-report-dialog">
+    <div class="dialog-header">
+      <div class="company-logo">
+        <!-- <span class="back-button" @click="goBack">返回</span> -->
+        <img src="@/assets/qy/image.png" alt="公司logo">
+      </div>
+      <div class="company-title">铨一电源科技有限公司</div>
+      <h2 class="report-title">进 料 质 量 月 报 表</h2>
+      <div class="report-info">
+        <span style="font-size: 18px">{{ masterInfo.reportDate }} </span>
+      </div>
+    </div>
+    <div class="scroll-controls">
+      <div class="scroll-switch">
+        <span>滚动展示</span>
+        <label class="switch">
+          <input type="checkbox" v-model="isScrolling" @change="handleScrollChange">
+          <span class="slider"></span>
+        </label>
+      </div>
+      <div class="display-count" v-if="isScrolling">
+        <span>显示行数:</span>
+        <select v-model="displayRows" @change="handleRowsChange">
+          <option value="3">3行</option>
+          <option value="4">4行</option>
+          <option value="5">5行</option>
+          <option value="10">10行</option>
+        </select>
+      </div>
+    </div>
+
+    <div class="table-container" :style="tableStyle" @mouseenter="pauseScroll" @mouseleave="resumeScroll">
+      <table>
+        <thead>
+        <tr >
+<!--          <th>序号</th>-->
+          <th>订单号/数量</th>
+          <th>型号/名称</th>
+          <th>数量</th>
+          <th>不合格原因</th>
+          <th>不合格数</th>
+          <th>处理情况</th>
+          <th>检验日期</th>
+        </tr>
+        </thead>
+        <tbody ref="tbody">
+        <tr v-for="(item,index) in displayData" :key="item.id" v-loading="loading">
+<!--          <td>{{ index+1 }}</td>-->
+          <td>{{ item.orderNumber }}</td>
+          <td>{{ item.modelName }}</td>
+          <td>{{ item.quantity }}</td>
+          <td>{{ item.causeOfNonconformity }}</td>
+          <td>{{ item.disqualificationNumber }}</td>
+          <td>{{ item.handlingSituation }}</td>
+          <td>{{ item.dateOfInspection }}</td>
+        </tr>
+        </tbody>
+      </table>
+    </div>
+
+    <!-- 添加底部统计信息 -->
+    <div class="summary-section">
+      <table class="summary-table">
+        <tr>
+          <td style="width: 18.56%;" class="ct">一次不合格批次</td>
+          <td style="width: 25.6%;"><span>{{ masterInfo.jlOneFailedBatch }}</span></td>
+          <td style="width: 26%;" class="ct">废品/退货总数量</td>
+          <td><span>{{ masterInfo.jlQuantityOfRejectsReturns }} </span></td>
+        </tr>
+        <tr>
+          <td class="ct">报检总批次</td>
+          <td><span>{{ masterInfo.jlTotalBatchForInspection }}</span></td>
+          <td class="ct">本月合格率(批次)</td>
+          <td><span>{{ masterInfo.jlQualifiedRateOfTheMonth }}</span></td>
+        </tr>
+      </table>
+    </div>
+
+    <!-- 添加底部签名 -->
+    <div class="signature-section">
+      <div class="signature-item">
+        <span>{{ masterInfo.inspector }}</span>
+        <span>{{masterInfo.examineDate}}</span>
+      </div>
+      <div class="signature-item">
+        <span>{{ masterInfo.examine }}</span>
+        <span>{{masterInfo.inspectorDate}}</span>
+      </div>
+    </div>
+  </div>
+  </div>
+</template>
+
+<script>
+import {
+  getQualityinspectioninformation,
+  listQualityinspectioninformation
+} from "@/api/amichi/qualityinspectioninformation/qualityinspectioninformation";
+import {listInspection} from "@/api/amichi/qualityinspectioninformation/jlinspection";
+
+export default {
+  name: 'TcCom',
+  data () {
+    return {
+      loading:false,
+      tableData: [
+
+      ],
+      isScrolling: false, // 控制是否滚动的开关
+      scrollData: [], // 用于滚动的数据
+      timer: null,
+      currentIndex: 0,
+      displayRows: 3, // 默认显示3行
+      isPaused: false, // 添加暂停状态标记
+      masterInfo:{
+        id:null,
+        manufacturingProcess:null,
+        inspector:null,
+        examine:null,
+        jlOneFailedBatch:null,
+        jlTotalBatchForInspection:null,
+        jlQuantityOfRejectsReturns:null,
+        jlQualifiedRateOfTheMonth:null,
+        reportDate:null,
+        examineDate:null,
+        inspectorDate:null
+      }
+    }
+  },
+  computed: {
+    displayData () {
+      return this.isScrolling ? this.scrollData : this.tableData
+    },
+    tableStyle () {
+      if (this.isScrolling) {
+        return {
+          height: `${this.displayRows * 40}px`,
+          overflow: 'hidden'
+        }
+      } else {
+        // 非滚动展示时,如果数据超过10行则显示滚动条
+        return {
+          maxHeight: '400px', // 设置一个较大的最大高度
+          overflowY: 'auto', // 只允许垂直方向滚动
+          overflowX: 'hidden' // 禁止水平方向滚动
+        }
+      }
+    }
+  },
+  methods: {
+    handleScrollChange () {
+      if (this.isScrolling) {
+        this.scrollData = [...this.tableData, ...this.tableData]
+        this.isPaused = false // 重置暂停状态
+        this.$nextTick(() => {
+          this.$refs.tbody.style.transform = 'translateY(0)'
+          this.$refs.tbody.style.transition = 'none'
+          this.startScroll()
+        })
+      } else {
+        this.stopScroll()
+        this.isPaused = false // 重置暂停状态
+        if (this.$refs.tbody) {
+          this.$refs.tbody.style.transform = 'translateY(0)'
+          this.$refs.tbody.style.transition = 'none'
+        }
+      }
+    },
+    startScroll () {
+      this.currentIndex = 0
+      this.timer = setInterval(() => {
+        this.currentIndex++
+        this.$refs.tbody.style.transition = 'transform 0.5s'
+        this.$refs.tbody.style.transform = `translateY(-${this.currentIndex * 40}px)`
+
+        if (this.currentIndex >= this.tableData.length) {
+          setTimeout(() => {
+            this.$refs.tbody.style.transition = 'none'
+            this.currentIndex = 0
+            this.$refs.tbody.style.transform = 'translateY(0)'
+          }, 500)
+        }
+      }, 2000)
+    },
+    stopScroll () {
+      if (this.timer) {
+        clearInterval(this.timer)
+        this.timer = null
+      }
+    },
+    goBack () {
+      this.$router.go(-1)
+    },
+    handleRowsChange () {
+      // if (!this.isPaused) { // 只有在非暂停状态下才重启滚动
+      //   this.stopScroll()
+      //   this.startScroll()
+      // }
+      if (!this.isPaused) {
+        this.stopScroll()
+        // 重置位置到第一条
+        this.currentIndex = 0
+        if (this.$refs.tbody) {
+          this.$refs.tbody.style.transition = 'none'
+          this.$refs.tbody.style.transform = 'translate3d(0, 0, 0)'
+        }
+        // 延迟启动滚动,确保重置生效
+        this.$nextTick(() => {
+          this.startScroll()
+        })
+      }
+    },
+    pauseScroll () {
+      if (this.isScrolling && !this.isPaused) {
+        this.isPaused = true
+        this.stopScroll()
+      }
+    },
+    resumeScroll () {
+      if (this.isScrolling && this.isPaused) {
+        this.isPaused = false
+        this.startScroll()
+      }
+    },
+    checkMasterInfo () {
+      this.masterInfo.isEnablePaging=false;
+      getQualityinspectioninformation(this.masterInfo.id).then(response => {
+        this.masterInfo = response.data;
+      });
+      this.loading=true
+      listInspection({"fid":this.masterInfo.id,"isEnablePaging":"false"}).then(response => {
+        this.tableData = response.rows;
+        this.loading = false;
+      });
+    }
+  },
+  created () {
+    // 移除这里的初始化,改为在开关打开时初始化
+    this.masterInfo.id =this.$route.query.id;
+     this.checkMasterInfo();
+  },
+  mounted () {
+    // 移除这里的自动开始滚动
+  },
+  beforeDestroy () {
+    this.stopScroll()
+  }
+}
+</script>
+
+
+<style scoped>
+.quality-report-dialog {
+  width: 100%;
+  max-width: 1200px;
+  margin: 0 auto;
+  padding: 60px;
+  background: #fff;
+  position: relative;
+  border: 1px solid black;
+}
+
+.back-button {
+  position: absolute;
+  left: 0;
+  top: -25px;
+  padding: 5px 15px;
+  background-color: #409EFF;
+  color: white;
+  border-radius: 4px;
+  cursor: pointer;
+  font-size: 14px;
+}
+
+.back-button:hover {
+  background-color: #66b1ff;
+}
+
+.dialog-header {
+  text-align: center;
+  margin-bottom: 20px;
+  position: relative;
+}
+
+.company-logo {
+  position: absolute;
+  left: 0;
+  top: 8px;
+}
+
+.company-logo img {
+  width: 120px;
+  height: auto;
+}
+
+.company-title {
+  font-size: 30px;
+  text-align: center;
+  font-weight: bold;
+  margin: 0 auto;
+  padding: 10px 0;
+}
+
+.report-title {
+  font-size: 20px;
+  margin: 15px 0;
+}
+
+.report-info {
+  text-align: right;
+  margin: 10px 0;
+}
+
+.table-container {
+  width: 100%;
+  position: relative;
+  border: 1px solid #ddd;
+  transition: height 0.3s;
+  cursor: default;
+  background: #fff;
+  display: flex;
+  flex-direction: column;
+  overflow: hidden;
+}
+
+table {
+  width: 100%;
+  border-collapse: separate;
+  border-spacing: 0;
+  background: #fff;
+  flex: 1;
+}
+
+thead {
+  background: #f5f5f5;
+  position: sticky;
+  top: 0;
+  z-index: 10;
+  width: 100%;
+}
+
+tbody {
+  position: relative;
+  background: #fff;
+  transform-origin: 0 0;
+}
+
+th, td {
+  border: 1px solid #ddd;
+  background: #fff;
+  position: relative;
+  z-index: 1;
+  padding: 8px;
+  text-align: center;
+  white-space: nowrap;
+}
+
+th {
+  background: #f5f5f5;
+}
+
+tr {
+  height: 40px;
+  /* line-height: 40px; */
+}
+
+/* 设置列宽 */
+th:nth-child(1), td:nth-child(1) { width: 5%; } /* 序号 */
+th:nth-child(2), td:nth-child(2) { width: 10%; } /* 订单号/数量 */
+th:nth-child(3), td:nth-child(3) { width: 25%; } /* 型号/名称 */
+th:nth-child(4), td:nth-child(4) { width: 8%; } /* 数量 */
+th:nth-child(5), td:nth-child(5) { width: 22%; } /* 不合格原因 */
+th:nth-child(6), td:nth-child(6) { width: 10%; } /* 不合格数 */
+th:nth-child(7), td:nth-child(7) { width: 10%; } /* 处理情况 */
+th:nth-child(8), td:nth-child(8) { width: 10%; } /* 检验日期 */
+
+/* 美化滚动条样式 */
+.table-container::-webkit-scrollbar {
+  width: 6px;
+  height: 0; /* 隐藏水平滚动条 */
+}
+
+.table-container::-webkit-scrollbar-thumb {
+  background-color: #888;
+  border-radius: 3px;
+}
+
+.table-container::-webkit-scrollbar-track {
+  background-color: #f1f1f1;
+}
+
+.summary-section {
+  margin-top: 20px;
+}
+
+.summary-table {
+  width: 100%;
+  border-collapse: collapse;
+}
+
+.summary-table td {
+  border: 1px solid #ddd;
+  padding: 8px;
+  text-align: center;
+}
+
+.ct {
+  text-align: center;
+  font-weight: bold;
+  background-color: #F5F5F5;
+}
+
+.signature-section {
+  margin-top: 30px;
+  display: flex;
+  justify-content: space-between;
+  padding: 0 50px;
+}
+
+.signature-item {
+  display: flex;
+  gap: 20px;
+}
+
+.signature-item span {
+  font-size: 18px;
+}
+
+.scroll-controls {
+  display: flex;
+  align-items: center;
+  gap: 20px;
+  margin-bottom: 10px;
+}
+
+.scroll-switch {
+  display: flex;
+  align-items: center;
+  gap: 10px;
+}
+
+/* 开关样式 */
+.switch {
+  position: relative;
+  display: inline-block;
+  width: 40px;
+  height: 20px;
+}
+
+.switch input {
+  opacity: 0;
+  width: 0;
+  height: 0;
+}
+
+.slider {
+  position: absolute;
+  cursor: pointer;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background-color: #ccc;
+  transition: .4s;
+  border-radius: 20px;
+}
+
+.slider:before {
+  position: absolute;
+  content: "";
+  height: 16px;
+  width: 16px;
+  left: 2px;
+  bottom: 2px;
+  background-color: white;
+  transition: .4s;
+  border-radius: 50%;
+}
+
+input:checked + .slider {
+  background-color: #409EFF;
+}
+
+input:checked + .slider:before {
+  transform: translateX(20px);
+}
+
+.display-count {
+  display: flex;
+  align-items: center;
+  gap: 10px;
+}
+
+.display-count select {
+  padding: 4px 8px;
+  border-radius: 4px;
+  border: 1px solid #ddd;
+  outline: none;
+}
+
+.display-count select:focus {
+  border-color: #409EFF;
+}
+</style>

+ 35 - 32
zkqy-ui/src/views/amichi/qualityinspectioninformation/jl_inspection/index.vue

@@ -64,38 +64,41 @@
     </el-form>
 
     <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5">
-        <el-button
-          type="primary"
-          plain
-          icon="el-icon-plus"
-          size="mini"
-          @click="handleAdd"
-          v-hasPermi="['jl_inspection:inspection:add']"
-        >新增</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="success"
-          plain
-          icon="el-icon-edit"
-          size="mini"
-          :disabled="single"
-          @click="handleUpdate"
-          v-hasPermi="['jl_inspection:inspection:edit']"
-        >修改</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-delete"
-          size="mini"
-          :disabled="multiple"
-          @click="handleDelete"
-          v-hasPermi="['jl_inspection:inspection:remove']"
-        >删除</el-button>
-      </el-col>
+<!--      <el-col :span="1.5">-->
+<!--        <el-button-->
+<!--          type="primary"-->
+<!--          plain-->
+<!--          icon="el-icon-plus"-->
+<!--          size="mini"-->
+<!--          @click="handleAdd"-->
+
+<!--        >新增</el-button>-->
+<!--        &lt;!&ndash;          v-hasPermi="['jl_inspection:inspection:add']"&ndash;&gt;-->
+<!--      </el-col>-->
+<!--      <el-col :span="1.5">-->
+<!--        <el-button-->
+<!--          type="success"-->
+<!--          plain-->
+<!--          icon="el-icon-edit"-->
+<!--          size="mini"-->
+<!--          :disabled="single"-->
+<!--          @click="handleUpdate"-->
+
+<!--        >修改</el-button>-->
+<!--        &lt;!&ndash;          v-hasPermi="['jl_inspection:inspection:edit']"&ndash;&gt;-->
+<!--      </el-col>-->
+<!--      <el-col :span="1.5">-->
+<!--        <el-button-->
+<!--          type="danger"-->
+<!--          plain-->
+<!--          icon="el-icon-delete"-->
+<!--          size="mini"-->
+<!--          :disabled="multiple"-->
+<!--          @click="handleDelete"-->
+
+<!--        >删除</el-button>-->
+<!--        &lt;!&ndash;          v-hasPermi="['jl_inspection:inspection:remove']"&ndash;&gt;-->
+<!--      </el-col>-->
 <!--      <el-col :span="1.5">-->
 <!--        <el-button-->
 <!--          type="warning"-->

+ 299 - 0
zkqy-ui/src/views/amichi/qualityinspectioninformation/sharedFile/index.vue

@@ -0,0 +1,299 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="文件名" prop="fileName">
+        <el-input
+          v-model="queryParams.fileName"
+          placeholder="请输入文件名"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="文件大小" prop="fileSize">
+        <el-input
+          v-model="queryParams.fileSize"
+          placeholder="请输入文件大小"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+<!--      v-hasPermi="['SharedFile:files:add']"-->
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+
+        >新增</el-button>
+      </el-col>
+<!--      v-hasPermi="['SharedFile:files:edit']"-->
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+
+        >修改</el-button>
+      </el-col>
+<!--      v-hasPermi="['SharedFile:files:remove']"-->
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="tbwj"
+        >同步文件</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="filesList" @selection-change="handleSelectionChange" style="margin-top: 20px">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="主键" align="center" prop="id" />
+      <el-table-column label="文件名" align="center" prop="fileName" />
+<!--      <el-table-column label="文件路径" align="center" prop="filePath" />-->
+      <el-table-column label="文件大小" align="center" prop="fileSize" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-dropdown @command="(command)=>{handleCommand(command, scope.row)}">
+            <el-button type="warning">
+              操作<i class="el-icon-arrow-down el-icon--right"></i>
+            </el-button>
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item  icon="el-icon-edit"  command="handleUpdate">修改</el-dropdown-item>
+              <el-dropdown-item  icon="el-icon-delete" command="handleDelete">删除</el-dropdown-item>
+              <el-dropdown-item  icon="el-icon-edit" command="xz">下载</el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改共享文件对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="文件名" prop="fileName">
+          <el-input v-model="form.fileName" placeholder="请输入文件名" />
+        </el-form-item>
+<!--        <el-form-item label="文件路径" prop="filePath">-->
+<!--          <el-input v-model="form.filePath" type="textarea" placeholder="请输入内容" />-->
+<!--        </el-form-item>-->
+        <el-form-item label="文件大小" prop="fileSize">
+          <el-input v-model="form.fileSize" placeholder="请输入文件大小" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listFiles, getFiles, delFiles, addFiles, updateFiles,tbwj } from "@/api/amichi/sharedFile/files";
+
+export default {
+  name: "Files",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 共享文件表格数据
+      filesList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        fileName: null,
+        filePath: null,
+        fileSize: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    //下拉菜单点击事件
+    handleCommand(command, row) {
+      switch (command) {
+        case "handleUpdate":
+          this.handleUpdate(row)
+          break;
+        case "handleDelete":
+          this.handleDelete(row)
+          break;
+        case "xz":
+          this.xz(row);
+          break;
+        default:
+          break;
+      }
+    },
+    xz(row){
+// 这里放置下载逻辑
+      console.log('开始下载...');
+      // 示例:发起一个HTTP GET请求来获取文件
+      const link = document.createElement('a');
+      link.href = process.env.VUE_APP_BASE_API1+'SharedFile/files/download?fileName='+row.fileName; // 替换为你的文件URL
+      link.download = row.fileName; // 设置下载后的文件名
+      document.body.appendChild(link);
+      link.click();
+      document.body.removeChild(link);
+    },
+    tbwj(){
+      // this.loading = true;
+      tbwj().then(response => {
+        this.$modal.msgSuccess("同步成功");
+      });
+      this.getList();
+    },
+    /** 查询共享文件列表 */
+    getList() {
+      this.loading = true;
+      listFiles(this.queryParams).then(response => {
+        this.filesList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        fileName: null,
+        filePath: null,
+        fileSize: null,
+        createTime: null,
+        createBy: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加共享文件";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getFiles(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改共享文件";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateFiles(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addFiles(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除共享文件编号为"' + ids + '"的数据项?').then(function() {
+        return delFiles(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('SharedFile/files/export', {
+        ...this.queryParams
+      }, `files_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>

+ 1 - 1
zkqy-ui/src/views/login.vue

@@ -310,7 +310,7 @@ export default {
                 // uri: "?client_id=hmc&scope=basic&response_type=code&state=AB1357&redirect_uri=http://192.168.2.190:8066/oauth/callback",
                // uri:"?client_id=mestools&scope=basic&response_type=code&state=AB1357&redirect_uri=http://62.234.61.92:8055/oauth/callback",
                // uri:"?client_id=mestools&scope=basic&response_type=code&state=AB1357&redirect_uri=http://192.168.128.171:8066/oauth/callback",
-               //  uri:"?client_id=mestools&scope=basic&response_type=code&state=AB1357&redirect_uri=http://192.168.2.135:8066/oauth/callback",
+               // uri:"?client_id=mestools&scope=basic&response_type=code&state=AB1357&redirect_uri=http://192.168.2.135:8066/oauth/callback",
              uri:"?client_id=hmc&scope=basic&response_type=code&state=AB1357&redirect_uri=http://192.168.110.83:8066/oauth/callback",
              // uri:"?client_id=hmc&scope=basic&response_type=code&state=AB1357&redirect_uri=http://192.168.110.83:8066/oauth/callback",
             // uri:"?client_id=hmc&scope=basic&response_type=code&state=AB1357&redirect_uri=http://172.20.10.5:8066/oauth/callback",