Merge branch 'dev-cq' of http://192.168.0.56:3000/bonus/devicesmgt into dev-cq
This commit is contained in:
commit
3774b7b52e
147
README.md
147
README.md
|
|
@ -1,131 +1,28 @@
|
|||
<p align="center">
|
||||
<img alt="logo" src="https://oscimg.oschina.net/oscnet/up-b99b286755aef70355a7084753f89cdb7c9.png">
|
||||
</p>
|
||||
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">RuoYi v3.6.3</h1>
|
||||
<h4 align="center">基于 Vue/Element UI 和 Spring Boot/Spring Cloud & Alibaba 前后端分离的分布式微服务架构</h4>
|
||||
<p align="center">
|
||||
<a href="https://gitee.com/y_project/RuoYi-Cloud/stargazers"><img src="https://gitee.com/y_project/RuoYi-Cloud/badge/star.svg?theme=dark"></a>
|
||||
<a href="https://gitee.com/y_project/RuoYi-Cloud"><img src="https://img.shields.io/badge/RuoYi-v3.6.3-brightgreen.svg"></a>
|
||||
<a href="https://gitee.com/y_project/RuoYi-Cloud/blob/master/LICENSE"><img src="https://img.shields.io/github/license/mashape/apistatus.svg"></a>
|
||||
</p>
|
||||
|
||||
## 平台简介
|
||||
|
||||
若依是一套全部开源的快速开发平台,毫无保留给个人及企业免费使用。
|
||||
|
||||
* 采用前后端分离的模式,微服务版本前端(基于 [RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue))。
|
||||
* 后端采用Spring Boot、Spring Cloud & Alibaba。
|
||||
* 注册中心、配置中心选型Nacos,权限认证使用Redis。
|
||||
* 流量控制框架选型Sentinel,分布式事务选型Seata。
|
||||
* 提供了技术栈([Vue3](https://v3.cn.vuejs.org) [Element Plus](https://element-plus.org/zh-CN) [Vite](https://cn.vitejs.dev))版本[RuoYi-Cloud-Vue3](https://github.com/yangzongzhuan/RuoYi-Cloud-Vue3),保持同步更新。
|
||||
* 如需不分离应用,请移步 [RuoYi](https://gitee.com/y_project/RuoYi),如需分离应用,请移步 [RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue)
|
||||
* 阿里云折扣场:[点我进入](http://aly.ruoyi.vip),腾讯云秒杀场:[点我进入](http://txy.ruoyi.vip)
|
||||
* 阿里云优惠券:[点我领取](https://www.aliyun.com/minisite/goods?userCode=brki8iof&share_source=copy_link),腾讯云优惠券:[点我领取](https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console)
|
||||
|
||||
#### 友情链接 [若依/RuoYi-Cloud](https://gitee.com/zhangmrit/ruoyi-cloud) Ant Design版本。
|
||||
|
||||
## 系统模块
|
||||
|
||||
~~~
|
||||
com.ruoyi
|
||||
├── ruoyi-ui // 前端框架 [80]
|
||||
├── ruoyi-gateway // 网关模块 [8080]
|
||||
├── ruoyi-auth // 认证中心 [9200]
|
||||
├── ruoyi-api // 接口模块
|
||||
│ └── ruoyi-api-system // 系统接口
|
||||
├── ruoyi-common // 通用模块
|
||||
│ └── ruoyi-common-core // 核心模块
|
||||
│ └── ruoyi-common-datascope // 权限范围
|
||||
│ └── ruoyi-common-datasource // 多数据源
|
||||
│ └── ruoyi-common-log // 日志记录
|
||||
│ └── ruoyi-common-redis // 缓存服务
|
||||
│ └── ruoyi-common-seata // 分布式事务
|
||||
│ └── ruoyi-common-security // 安全模块
|
||||
│ └── ruoyi-common-swagger // 系统接口
|
||||
├── ruoyi-modules // 业务模块
|
||||
│ └── ruoyi-system // 系统模块 [9201]
|
||||
│ └── ruoyi-gen // 代码生成 [9202]
|
||||
│ └── ruoyi-job // 定时任务 [9203]
|
||||
│ └── ruoyi-file // 文件服务 [9300]
|
||||
├── ruoyi-visual // 图形化管理模块
|
||||
│ └── ruoyi-visual-monitor // 监控中心 [9100]
|
||||
com.bonus
|
||||
├── sgzb-ui // 前端框架 [80]
|
||||
├── sgzb-gateway // 网关模块 [8080]
|
||||
├── sgzb-auth // 认证中心 [9200]
|
||||
├── sgzb-api // 接口模块
|
||||
│ └── sgzb-api-system // 系统接口
|
||||
├── sgzb-common // 通用模块
|
||||
│ └── sgzb-common-core // 核心模块
|
||||
│ └── sgzb-common-datascope // 权限范围
|
||||
│ └── sgzb-common-datasource // 多数据源
|
||||
│ └── sgzb-common-log // 日志记录
|
||||
│ └── sgzb-common-redis // 缓存服务
|
||||
│ └── sgzb-common-seata // 分布式事务
|
||||
│ └── sgzb-common-security // 安全模块
|
||||
│ └── sgzb-common-swagger // 系统接口
|
||||
├── sgzb-modules // 业务模块
|
||||
│ └── sgzb-system // 系统模块 [9201]
|
||||
│ └── sgzb-gen // 代码生成 [9202]
|
||||
│ └── sgzb-job // 定时任务 [9203]
|
||||
│ └── sgzb-file // 文件服务 [9300]
|
||||
├── sgzb-visual // 图形化管理模块
|
||||
│ └── sgzb-visual-monitor // 监控中心 [9100]
|
||||
├──pom.xml // 公共依赖
|
||||
~~~
|
||||
|
||||
## 架构图
|
||||
|
||||
<img src="https://oscimg.oschina.net/oscnet/up-82e9722ecb846786405a904bafcf19f73f3.png"/>
|
||||
|
||||
## 内置功能
|
||||
|
||||
1. 用户管理:用户是系统操作者,该功能主要完成系统用户配置。
|
||||
2. 部门管理:配置系统组织机构(公司、部门、小组),树结构展现支持数据权限。
|
||||
3. 岗位管理:配置系统用户所属担任职务。
|
||||
4. 菜单管理:配置系统菜单,操作权限,按钮权限标识等。
|
||||
5. 角色管理:角色菜单权限分配、设置角色按机构进行数据范围权限划分。
|
||||
6. 字典管理:对系统中经常使用的一些较为固定的数据进行维护。
|
||||
7. 参数管理:对系统动态配置常用参数。
|
||||
8. 通知公告:系统通知公告信息发布维护。
|
||||
9. 操作日志:系统正常操作日志记录和查询;系统异常信息日志记录和查询。
|
||||
10. 登录日志:系统登录日志记录查询包含登录异常。
|
||||
11. 在线用户:当前系统中活跃用户状态监控。
|
||||
12. 定时任务:在线(添加、修改、删除)任务调度包含执行结果日志。
|
||||
13. 代码生成:前后端代码的生成(java、html、xml、sql)支持CRUD下载 。
|
||||
14. 系统接口:根据业务代码自动生成相关的api接口文档。
|
||||
15. 服务监控:监视当前系统CPU、内存、磁盘、堆栈等相关信息。
|
||||
16. 在线构建器:拖动表单元素生成相应的HTML代码。
|
||||
17. 连接池监视:监视当前系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈。
|
||||
|
||||
## 在线体验
|
||||
|
||||
- admin/admin123
|
||||
- 陆陆续续收到一些打赏,为了更好的体验已用于演示服务器升级。谢谢各位小伙伴。
|
||||
|
||||
演示地址:http://ruoyi.vip
|
||||
文档地址:http://doc.ruoyi.vip
|
||||
|
||||
## 演示图
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/cd1f90be5f2684f4560c9519c0f2a232ee8.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/1cbcf0e6f257c7d3a063c0e3f2ff989e4b3.jpg"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-8074972883b5ba0622e13246738ebba237a.png"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-9f88719cdfca9af2e58b352a20e23d43b12.png"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-39bf2584ec3a529b0d5a3b70d15c9b37646.png"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-4148b24f58660a9dc347761e4cf6162f28f.png"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-b2d62ceb95d2dd9b3fbe157bb70d26001e9.png"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-d67451d308b7a79ad6819723396f7c3d77a.png"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/5e8c387724954459291aafd5eb52b456f53.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/644e78da53c2e92a95dfda4f76e6d117c4b.jpg"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-8370a0d02977eebf6dbf854c8450293c937.png"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-49003ed83f60f633e7153609a53a2b644f7.png"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-d4fe726319ece268d4746602c39cffc0621.png"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-c195234bbcd30be6927f037a6755e6ab69c.png"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-ece3fd37a3d4bb75a3926e905a3c5629055.png"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-92ffb7f3835855cff100fa0f754a6be0d99.png"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-ff9e3066561574aca73005c5730c6a41f15.png"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-5e4daac0bb59612c5038448acbcef235e3a.png"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
## 若依微服务交流群
|
||||
|
||||
QQ群: [](https://jq.qq.com/?_wv=1027&k=yqInfq0S) [](https://jq.qq.com/?_wv=1027&k=Oy1mb3p8) [](https://jq.qq.com/?_wv=1027&k=rvxkJtXK) [](https://jq.qq.com/?_wv=1027&k=0Ck3PvTe) [](https://jq.qq.com/?_wv=1027&k=FnHHP4TT) [](https://jq.qq.com/?_wv=1027&k=qdT1Ojpz) [](https://jq.qq.com/?_wv=1027&k=nw3OiyXs) [](https://jq.qq.com/?_wv=1027&k=kiU5WDls) [](https://jq.qq.com/?_wv=1027&k=MtBy6YfT) [](https://jq.qq.com/?_wv=1027&k=FqImHgH2) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=G4jZ4EtdT50PhnMBudTnEwgonxkXOscJ&authKey=FkGHYfoTKlGE6wHdKdjH9bVoOgQjtLP9WM%2Fj7pqGY1msoqw9uxDiBo39E2mLgzYg&noverify=0&group_code=128355254) 点击按钮入群。
|
||||
|
|
@ -3,6 +3,8 @@ package com.bonus.sgzb.material.controller;
|
|||
import com.bonus.sgzb.common.core.web.controller.BaseController;
|
||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.sgzb.common.core.web.page.TableDataInfo;
|
||||
import com.bonus.sgzb.common.log.annotation.Log;
|
||||
import com.bonus.sgzb.common.log.enums.BusinessType;
|
||||
import com.bonus.sgzb.material.domain.PutInStorageBean;
|
||||
import com.bonus.sgzb.material.domain.SavePutInfoDto;
|
||||
import com.bonus.sgzb.material.service.InventoryAndWarehousingService;
|
||||
|
|
@ -46,6 +48,7 @@ public class InventoryAndWarehousingController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "新增入库盘点")
|
||||
@PostMapping("/addList")
|
||||
@Log(title = "盘点入库操作", businessType = BusinessType.MATERIAL)
|
||||
public AjaxResult savePutInfo(@RequestBody SavePutInfoDto dto) {
|
||||
return inventoryAndWarehousingService.savePutInfo(dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
|
|||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
|
|
@ -117,6 +118,18 @@ public class PurchaseMacodeInfo extends BaseEntity
|
|||
@ApiModelProperty(value = "单位名称")
|
||||
private String unitName;
|
||||
|
||||
/** 审核员用户id */
|
||||
@ApiModelProperty(value = "审核员用户id")
|
||||
private List<String> userIds;
|
||||
|
||||
public List<String> getUserIds() {
|
||||
return userIds;
|
||||
}
|
||||
|
||||
public void setUserIds(List<String> userIds) {
|
||||
this.userIds = userIds;
|
||||
}
|
||||
|
||||
/**
|
||||
* 类型管理方式
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ package com.bonus.sgzb.material.domain;
|
|||
import com.bonus.sgzb.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author 10488
|
||||
* 修试入库详细
|
||||
|
|
@ -65,4 +67,7 @@ public class RepairTestInputDetailVo {
|
|||
/** 状态*/
|
||||
@Excel(name = "状态")
|
||||
private String status;
|
||||
|
||||
/** 修试管理入库审核人员*/
|
||||
private List<String> userIds;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -282,4 +282,6 @@ public interface PurchaseMacodeInfoMapper {
|
|||
int updateMaTypeNum(MachinePart wholeSetDetail);
|
||||
|
||||
List<PurchaseMacodeInfo> selectPurchaseMacodeInfoListDetails(PurchaseMacodeInfo purchaseMacodeInfo);
|
||||
|
||||
List<String> selectKeepUser(Integer typeId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.bonus.sgzb.material.service.impl;
|
|||
|
||||
import com.bonus.sgzb.common.core.exception.ServiceException;
|
||||
import com.bonus.sgzb.common.core.utils.DateUtils;
|
||||
import com.bonus.sgzb.common.core.utils.StringUtils;
|
||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
||||
import com.bonus.sgzb.material.config.ExceptionEnum;
|
||||
|
|
@ -88,11 +89,22 @@ public class InventoryAndWarehousingServiceImpl implements InventoryAndWarehousi
|
|||
}
|
||||
String code = genderBackCode();
|
||||
List<MachIneDto> machIneDtoList = dto.getMachIneDtoList();
|
||||
//判断提交表单中是否存在相同编码
|
||||
for (int i = 0; i < machIneDtoList.size() - 1; i++) {
|
||||
for (int j = i + 1; j < machIneDtoList.size(); j++) {
|
||||
if (machIneDtoList.get(i).getMaCode().equals(machIneDtoList.get(j).getMaCode())) {
|
||||
throw new ServiceException("列表中包含以下相同的设备编码,请修改后重新提交:" + machIneDtoList.get(i).getMaCode());
|
||||
}
|
||||
}
|
||||
}
|
||||
//判断提交中设备编码是否与库中相同
|
||||
if (CollectionUtils.isNotEmpty(machIneDtoList)) {
|
||||
for (MachIneDto machIneDto : machIneDtoList) {
|
||||
int count = selectByMaCode(machIneDto.getMaCode());
|
||||
if (count != 0) {
|
||||
throw new ServiceException("以下设备编码与库中数据存在重复,请修改后重新提交:" + machIneDto.getMaCode());
|
||||
if (StringUtils.isNotBlank(machIneDto.getMaCode())) {
|
||||
int count = selectByMaCode(machIneDto.getMaCode());
|
||||
if (count != 0) {
|
||||
throw new ServiceException("以下设备编码与库中数据存在重复,请修改后重新提交:" + machIneDto.getMaCode());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -427,7 +427,13 @@ public class PurchaseMacodeInfoServiceImpl implements IPurchaseMacodeInfoService
|
|||
*/
|
||||
@Override
|
||||
public List<PurchaseMacodeInfo> selectPutinDetails(PurchaseMacodeInfo purchaseMacodeInfo) {
|
||||
return purchaseMacodeInfoMapper.selectPutinDetails(purchaseMacodeInfo);
|
||||
List<PurchaseMacodeInfo> purchaseMacodeInfos = purchaseMacodeInfoMapper.selectPutinDetails(purchaseMacodeInfo);
|
||||
for (PurchaseMacodeInfo macodeInfo : purchaseMacodeInfos) {
|
||||
List<String> userIds = purchaseMacodeInfoMapper.selectKeepUser(macodeInfo.getTypeId().intValue());
|
||||
userIds.add("1");
|
||||
macodeInfo.setUserIds(userIds);
|
||||
}
|
||||
return purchaseMacodeInfos;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import com.bonus.sgzb.common.core.utils.StringUtils;
|
|||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
||||
import com.bonus.sgzb.material.domain.*;
|
||||
import com.bonus.sgzb.material.mapper.PurchaseMacodeInfoMapper;
|
||||
import com.bonus.sgzb.material.mapper.RepairTestInputMapper;
|
||||
import com.bonus.sgzb.material.mapper.TaskMapper;
|
||||
import com.bonus.sgzb.material.mapper.TmTaskAgreementMapper;
|
||||
|
|
@ -40,6 +41,9 @@ public class RepairTestInputServiceImpl implements RepairTestInputService {
|
|||
@Resource
|
||||
private TaskMapper taskMapper;
|
||||
|
||||
@Resource
|
||||
private PurchaseMacodeInfoMapper purchaseMacodeInfoMapper;
|
||||
|
||||
@Resource
|
||||
private TmTaskAgreementMapper agreementMapper;
|
||||
|
||||
|
|
@ -50,7 +54,13 @@ public class RepairTestInputServiceImpl implements RepairTestInputService {
|
|||
|
||||
@Override
|
||||
public List<RepairTestInputDetailVo> getRepairedDetailList(RepairTestInputDto dto) {
|
||||
return mapper.getRepairedDetailList(dto);
|
||||
List<RepairTestInputDetailVo> repairedDetailList = mapper.getRepairedDetailList(dto);
|
||||
for (RepairTestInputDetailVo repairTestInputDetailVo : repairedDetailList) {
|
||||
List<String> userIds = purchaseMacodeInfoMapper.selectKeepUser(repairTestInputDetailVo.getTypeId());
|
||||
userIds.add("1");
|
||||
repairTestInputDetailVo.setUserIds(userIds);
|
||||
}
|
||||
return repairedDetailList;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -540,6 +540,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
AND pcd.`status` != 3
|
||||
AND pcd.`status` != 5
|
||||
</select>
|
||||
<select id="selectKeepUser" resultType="java.lang.String">
|
||||
SELECT user_id FROM ma_type_keeper WHERE type_id = #{typeId}
|
||||
</select>
|
||||
|
||||
<update id="updateTypeByTypeId">
|
||||
update ma_type set num = #{num} where type_id = #{typeId}
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@
|
|||
)
|
||||
values (#{modelTitle,jdbcType=VARCHAR}, #{method,jdbcType=VARCHAR}, #{task,jdbcType=VARCHAR},
|
||||
#{typeId,jdbcType=INTEGER}, #{description,jdbcType=VARCHAR}, #{jsonResult,jdbcType=VARCHAR},
|
||||
#{time,jdbcType=TIMESTAMP}, #{creator,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}
|
||||
now(), #{creator,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
|
|
|||
|
|
@ -241,6 +241,7 @@
|
|||
v-model="codeForm.codePrefix"
|
||||
placeholder="请输入前缀"
|
||||
clearable
|
||||
maxlength="20"
|
||||
style="width: 220px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
|
@ -257,6 +258,7 @@
|
|||
v-model="codeForm.codeSuffixStart"
|
||||
clearable
|
||||
placeholder="请输入后缀范围起始值"
|
||||
maxlength="10"
|
||||
style="width: 185px"
|
||||
@change="
|
||||
changeSuffixStart(codeForm.codeSuffixStart)
|
||||
|
|
@ -273,6 +275,7 @@
|
|||
v-model="codeForm.codeSuffixEnd"
|
||||
clearable
|
||||
placeholder="请输入后缀范围结束值"
|
||||
maxlength="10"
|
||||
style="width: 185px"
|
||||
@change="changeSuffixEnd"
|
||||
/>
|
||||
|
|
@ -291,6 +294,7 @@
|
|||
placeholder="请输入单价"
|
||||
clearable
|
||||
:min="0"
|
||||
:max="999999999"
|
||||
:controls="false"
|
||||
style="width: 13vw"
|
||||
/>
|
||||
|
|
@ -456,6 +460,7 @@
|
|||
v-model="codeForm.checkMan"
|
||||
placeholder="请输入检验人"
|
||||
clearable
|
||||
maxlength="20"
|
||||
style="width: 220px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
|
@ -553,6 +558,7 @@
|
|||
<el-input
|
||||
v-model="row.maCode"
|
||||
placeholder="请输入设备编码"
|
||||
maxlength="30"
|
||||
@blur="handleMaCodeBlur(row)"
|
||||
></el-input>
|
||||
</template>
|
||||
|
|
@ -567,6 +573,7 @@
|
|||
<el-input
|
||||
v-model="row.outFacCode"
|
||||
placeholder="请输入出厂编码"
|
||||
maxlength="30"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -646,6 +653,7 @@
|
|||
:precision="2"
|
||||
placeholder="请输入单价"
|
||||
:min="0"
|
||||
:max="999999999"
|
||||
:controls="false"
|
||||
clearable
|
||||
style="width: 160px"
|
||||
|
|
@ -730,6 +738,7 @@
|
|||
clearable
|
||||
:controls="false"
|
||||
:min="1"
|
||||
:max="99"
|
||||
style="width: 10vw"
|
||||
/>
|
||||
</template>
|
||||
|
|
@ -754,6 +763,7 @@
|
|||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
clearable
|
||||
maxlength="100"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -983,7 +993,7 @@ export default {
|
|||
created() {
|
||||
this.getList()
|
||||
this.getTypeList()
|
||||
this.GetDeviceTypeTree()
|
||||
// this.GetDeviceTypeTree()
|
||||
this.supplierInfoList()
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -1137,16 +1147,17 @@ export default {
|
|||
this.codeForm.codeSuffixStart =
|
||||
this.codeForm.codeSuffixStart.replace(/[^\d]/g, '')
|
||||
}
|
||||
if (!this.codeForm.codeSuffixStart) {
|
||||
this.codeForm.codeSuffixEnd = ''
|
||||
if (isNaN(this.codeForm.codeSuffixStart) || this.codeForm.codeSuffixStart.includes('.')) {
|
||||
this.$message.error('后缀范围请输入整数类型')
|
||||
this.codeForm.codeSuffixStart = ''
|
||||
}
|
||||
},
|
||||
changeSuffixEnd() {
|
||||
if (!this.codeForm.codeSuffixStart) {
|
||||
this.$message.error('请输入后缀范围起始值')
|
||||
this.codeForm.codeSuffixEnd = ''
|
||||
} else if (isNaN(this.codeForm.codeSuffixEnd)) {
|
||||
this.$message.error('后缀范围请输入数字类型')
|
||||
} else if (isNaN(this.codeForm.codeSuffixEnd) || this.codeForm.codeSuffixEnd.includes('.')) {
|
||||
this.$message.error('后缀范围请输入整数类型')
|
||||
this.codeForm.codeSuffixEnd =
|
||||
this.codeForm.codeSuffixStart.replace(/[^\d]/g, '')
|
||||
} else {
|
||||
|
|
@ -1185,7 +1196,7 @@ export default {
|
|||
this.title = '数量盘点入库'
|
||||
this.resetCodeForm()
|
||||
this.getUnitData()
|
||||
this.GetDeviceTypeTree()
|
||||
this.GetDeviceTypeTree(this.isNumCheck)
|
||||
this.$nextTick(() => {
|
||||
this.$refs['codeForm'].clearValidate()
|
||||
})
|
||||
|
|
@ -1199,7 +1210,7 @@ export default {
|
|||
this.title = '编码盘点入库'
|
||||
this.resetCodeForm()
|
||||
this.getUnitData()
|
||||
this.GetDeviceTypeTree()
|
||||
this.GetDeviceTypeTree(this.isNumCheck)
|
||||
this.$nextTick(() => {
|
||||
this.$refs['codeForm'].clearValidate()
|
||||
})
|
||||
|
|
@ -1252,9 +1263,18 @@ export default {
|
|||
this.getList()
|
||||
})
|
||||
} else {
|
||||
// this.codeTableList 中只要有一个maCode为空, 则不允许提交
|
||||
this.requiredMaCode = this.codeTableList.some(
|
||||
(item) => !item.maCode,
|
||||
)
|
||||
// 过滤this.codeTableList中 如果有maCode是重复数据, 则不允许提交
|
||||
const maCodeList = this.codeTableList.map(
|
||||
(item) => item.maCode,
|
||||
)
|
||||
if (new Set(maCodeList).size !== maCodeList.length) {
|
||||
this.$message.error('设备编码不能重复')
|
||||
return
|
||||
}
|
||||
if (this.requiredMaCode) {
|
||||
this.$message.error('设备编码不能为空')
|
||||
return
|
||||
|
|
@ -1389,14 +1409,31 @@ export default {
|
|||
})
|
||||
},
|
||||
// 获取 设备树结构数据
|
||||
async GetDeviceTypeTree() {
|
||||
async GetDeviceTypeTree(type) {
|
||||
const params = {
|
||||
level: 4,
|
||||
}
|
||||
const res = await getDeviceTypeTree(params)
|
||||
console.log(res)
|
||||
if (type) {
|
||||
this.disableNodes(res.data, '1');
|
||||
} else {
|
||||
this.disableNodes(res.data, '0');
|
||||
}
|
||||
this.deviceTypeTree = res.data
|
||||
},
|
||||
// 递归禁用节点
|
||||
disableNodes(nodes, manageType, level = 1) {
|
||||
nodes.forEach(node => {
|
||||
node.level = level
|
||||
if (node.children) {
|
||||
this.disableNodes(node.children, manageType, level + 1);
|
||||
} else if (!node.children && node.level < 4) {
|
||||
node.disabled = true
|
||||
} else if(node.manageType && node.level == 4 && node.manageType != manageType) {
|
||||
node.disabled = true
|
||||
}
|
||||
});
|
||||
},
|
||||
/////// 设备类型树 切换
|
||||
deviceTypeChange(val) {
|
||||
console.log('🚀 ~ deviceTypeChange ~ val:', val)
|
||||
|
|
@ -1518,7 +1555,7 @@ export default {
|
|||
* -----------------------------------------------------------------------------------------------------------------------------
|
||||
*/
|
||||
/* 查看详情 */
|
||||
async queryDetails(row) {
|
||||
queryDetails(row) {
|
||||
this.sendParams.kindName = row.kindName
|
||||
this.dialogConfig.outerVisible = true
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue