From b8ddd204ac4cc8df50dfa6797f6df0e1e849456e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=80=A1=E8=93=89?= <377046077@qq.com> Date: Fri, 17 Oct 2025 14:51:48 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bas/BasProduct/domain/BasProduct.java | 88 +-- .../service/impl/BasProductServiceImpl.java | 8 + ruoyi-ui/src/views/bas/basProduct/index.vue | 567 ++++-------------- 3 files changed, 166 insertions(+), 497 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/bas/BasProduct/domain/BasProduct.java b/ruoyi-admin/src/main/java/com/ruoyi/bas/BasProduct/domain/BasProduct.java index 44f87b2..a472695 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/bas/BasProduct/domain/BasProduct.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/bas/BasProduct/domain/BasProduct.java @@ -31,47 +31,47 @@ public class BasProduct extends BaseEntity private String productId; /** 产品分类 */ - @Excel(name = "产品分类") + @Excel(name = "常用编码") private String parentId; /** 品号描述 */ - @Excel(name = "品号描述") + @Excel(name = "单价") private String price; /** 英文描述 */ - @Excel(name = "英文描述") + @Excel(name = "图号") private String cargoNo; /** 图号 */ - @Excel(name = "图号") + @Excel(name = "单位") private String unit; /** 规格 */ - @Excel(name = "规格") + @Excel(name = "规格型号") private String spec; /** 型号 */ - @Excel(name = "型号") + @Excel(name = "物料状态") private String spare1; /** 单件净重 */ - @Excel(name = "单件净重") + @Excel(name = "是否系统项",dictType = "sys_yes_no") private String spare2; /** 颜色 */ - @Excel(name = "颜色") + @Excel(name = "创建时间") private String spare3; /** 序列号 */ - @Excel(name = "序列号") + @Excel(name = "创建用户") private String spare4; /** 电压 */ - @Excel(name = "电压") + @Excel(name = "库存上限") private String spare5; /** 功率 */ - @Excel(name = "功率") + @Excel(name = "库存下限") private String spare6; /** 物料名称 */ @@ -79,135 +79,135 @@ public class BasProduct extends BaseEntity private String productName; /** 相位 */ - @Excel(name = "相位") + @Excel(name = "启用标识",dictType = "sys_yes_no") private String spare7; /** 毛重 */ - @Excel(name = "毛重") +// @Excel(name = "毛重") private String spare8; /** NC号 */ - @Excel(name = "NC号") +// @Excel(name = "NC号") private String spare9; /** 电源线 */ - @Excel(name = "电源线") +// @Excel(name = "电源线") private String spare10; /** 插头 */ - @Excel(name = "插头") +// @Excel(name = "插头") private String spare11; /** 接嘴 */ - @Excel(name = "接嘴") +// @Excel(name = "接嘴") private String spare12; /** 快捷码 */ - @Excel(name = "快捷码") +// @Excel(name = "快捷码") private String spare13; /** 库存单位编号 */ - @Excel(name = "库存单位编号") +// @Excel(name = "库存单位编号") private String spare14; /** 库存单位名称 */ - @Excel(name = "库存单位名称") +// @Excel(name = "库存单位名称") private String spare15; /** 品号群组 */ - @Excel(name = "品号群组") +// @Excel(name = "品号群组") private String spare16; /** 归类品 */ - @Excel(name = "归类品") +// @Excel(name = "归类品") private String spare17; /** 计量体系 */ - @Excel(name = "计量体系") +// @Excel(name = "计量体系") private String spare18; /** 群组名称 */ - @Excel(name = "群组名称") +// @Excel(name = "群组名称") private String spare19; /** 批号管理 */ - @Excel(name = "批号管理") +// @Excel(name = "批号管理") private String spare20; /** 状态 */ - @Excel(name = "状态") +// @Excel(name = "状态") private String spare21; /** 产品大类 */ - @Excel(name = "产品大类") +// @Excel(name = "产品大类") private String spare22; /** 产品二类 */ - @Excel(name = "产品二类") +// @Excel(name = "产品二类") private String spare23; /** 产品线/产品系列(组码) */ - @Excel(name = "产品线/产品系列", readConverterExp = "组=码") +// @Excel(name = "产品线/产品系列", readConverterExp = "组=码") private String spare24; /** BOM状态(组码) */ - @Excel(name = "BOM状态", readConverterExp = "组=码") +// @Excel(name = "BOM状态", readConverterExp = "组=码") private String spare25; /** 产品定位(组码) */ - @Excel(name = "产品定位", readConverterExp = "组=码") +// @Excel(name = "产品定位", readConverterExp = "组=码") private String spare26; /** 电脑板型号(组码) */ - @Excel(name = "电脑板型号", readConverterExp = "组=码") +// @Excel(name = "电脑板型号", readConverterExp = "组=码") private String spare27; /** 非标要求 */ - @Excel(name = "非标要求") +// @Excel(name = "非标要求") private String spare28; /** 品牌(组码) */ - @Excel(name = "品牌", readConverterExp = "组=码") +// @Excel(name = "品牌", readConverterExp = "组=码") private String spare29; /** 非标颜色 */ - @Excel(name = "非标颜色") +// @Excel(name = "非标颜色") private String spare30; /** 主颜色 */ - @Excel(name = "主颜色") +// @Excel(name = "主颜色") private String spare31; /** 辅助颜色 */ - @Excel(name = "辅助颜色") +// @Excel(name = "辅助颜色") private String spare32; /** 是否标准款(组码) */ - @Excel(name = "是否标准款", readConverterExp = "组=码") +// @Excel(name = "是否标准款", readConverterExp = "组=码") private String spare33; /** 包装方式 */ - @Excel(name = "包装方式") +// @Excel(name = "包装方式") private String spare34; /** 主要包装方式 */ - @Excel(name = "主要包装方式") +// @Excel(name = "主要包装方式") private String spare35; /** 长 */ - @Excel(name = "长") +// @Excel(name = "长") private String spare36; /** 宽 */ - @Excel(name = "宽") +// @Excel(name = "宽") private String spare37; /** 高 */ - @Excel(name = "高") +// @Excel(name = "高") private String spare38; /** 包装材积 */ - @Excel(name = "包装材积") +// @Excel(name = "包装材积") private String spare39; diff --git a/ruoyi-admin/src/main/java/com/ruoyi/bas/BasProduct/service/impl/BasProductServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/bas/BasProduct/service/impl/BasProductServiceImpl.java index 83b91d8..a96606b 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/bas/BasProduct/service/impl/BasProductServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/bas/BasProduct/service/impl/BasProductServiceImpl.java @@ -1,6 +1,10 @@ package com.ruoyi.bas.BasProduct.service.impl; +import java.util.Date; import java.util.List; + +import cn.hutool.core.date.DateUtil; +import com.ruoyi.common.utils.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.bas.BasProduct.mapper.BasProductMapper; @@ -65,6 +69,10 @@ public class BasProductServiceImpl implements IBasProductService public int insertBasProduct(BasProduct basProduct) { basProduct.setProductGuid(basProduct.getProductId()); + basProduct.setSpare3(DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss")); + //获取当前系统登录用户名 + String username = SecurityUtils.getUsername(); + basProduct.setSpare4(username); return basProductMapper.insertBasProduct(basProduct); } diff --git a/ruoyi-ui/src/views/bas/basProduct/index.vue b/ruoyi-ui/src/views/bas/basProduct/index.vue index a5516fc..ff87d4d 100644 --- a/ruoyi-ui/src/views/bas/basProduct/index.vue +++ b/ruoyi-ui/src/views/bas/basProduct/index.vue @@ -9,6 +9,14 @@ @keyup.enter.native="handleQuery" /> + + + @@ -25,30 +33,30 @@ - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + @@ -97,14 +105,7 @@ - - - + @@ -121,254 +122,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 搜索 重置 @@ -424,54 +178,29 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + +