From 0d1119a39fddd3f136636032086ecf891c6707e7 Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Tue, 29 Oct 2024 17:26:44 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=E5=B7=A5=E7=A8=8B=E7=AE=A1=E7=90=86=20bom?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=A1=B5=E9=9D=A2=EF=BC=9A=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E4=B8=80=E6=9D=A1=E7=89=A9=E6=96=99=E5=8A=A0=E4=B8=8A=E5=9E=8B?= =?UTF-8?q?=E5=8F=B7=E5=AD=97=E6=AE=B5=E3=80=81bom=E7=9A=84form=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E6=96=B0=E5=A2=9E=E5=9E=8B=E5=8F=B7=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=20bom=E5=AE=9E=E4=BD=93=E7=B1=BB=E6=96=B0=E5=A2=9E=E5=9E=8B?= =?UTF-8?q?=E5=8F=B7=E5=AD=97=E6=AE=B5=E5=92=8Cget=E3=80=81set=E6=96=B9?= =?UTF-8?q?=E6=B3=95=EF=BC=8C=E9=87=8D=E6=96=B0=E6=8E=92=E5=88=97=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E5=AD=97=E6=AE=B5=E7=9A=84=E9=A1=BA=E5=BA=8F=20bom?= =?UTF-8?q?=E7=9A=84mapper.xml=E5=B1=82=E7=9A=84=E6=89=80=E6=9C=89?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=96=B9=E6=B3=95=E3=80=81=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E3=80=81=E6=96=B0=E5=A2=9E=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E9=83=BD=E5=8A=A0=E4=B8=8AmaterialModel=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/erp/domain/ErpBom.java | 23 ++++++++++++++--- .../resources/mapper/erp/ErpBomMapper.xml | 25 +++++++++++-------- .../main/resources/templates/erp/bom/add.html | 9 +++++++ 3 files changed, 43 insertions(+), 14 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/erp/domain/ErpBom.java b/ruoyi-admin/src/main/java/com/ruoyi/erp/domain/ErpBom.java index 790f6102..e2bc16eb 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/erp/domain/ErpBom.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/erp/domain/ErpBom.java @@ -34,7 +34,7 @@ public class ErpBom extends BaseEntity @Excel(name = "料号",sort = 3) private String materialNo; - @Excel(name = "图片",sort = 9) + @Excel(name = "图片",sort = 10) private String photoUrl; /** 物料名称 */ @Excel(name = "物料名称",sort = 4) @@ -44,16 +44,21 @@ public class ErpBom extends BaseEntity // @Excel(name="物料类型") private String materialType; + /** 加工方式 */ - @Excel(name = "半成品类型",sort = 7,dictType = "processMethod") + @Excel(name = "半成品类型",sort = 8,dictType = "processMethod") private String processMethod; /** 单位 */ - @Excel(name = "单位",sort = 8) + @Excel(name = "单位",sort = 9) private String unit; + /** 型号*/ + @Excel(name = "型号",sort = 6) + private String materialModel; + /** 品牌 */ - @Excel(name = "品牌",sort = 6) + @Excel(name = "品牌",sort = 7) private String brand; /** 描述 */ @@ -241,6 +246,15 @@ public class ErpBom extends BaseEntity return unit; } + + public String getMaterialModel() { + return materialModel; + } + + public void setMaterialModel(String materialModel) { + this.materialModel = materialModel; + } + public void setBrand(String brand) { this.brand = brand; @@ -454,6 +468,7 @@ public class ErpBom extends BaseEntity ", materialType='" + materialType + '\'' + ", processMethod='" + processMethod + '\'' + ", unit='" + unit + '\'' + + ", materialModel='" + materialModel + '\'' + ", brand='" + brand + '\'' + ", describe='" + describe + '\'' + ", engineer='" + engineer + '\'' + diff --git a/ruoyi-admin/src/main/resources/mapper/erp/ErpBomMapper.xml b/ruoyi-admin/src/main/resources/mapper/erp/ErpBomMapper.xml index 913f745f..0a6b655e 100644 --- a/ruoyi-admin/src/main/resources/mapper/erp/ErpBomMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/erp/ErpBomMapper.xml @@ -18,6 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -58,6 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -72,7 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select id, del_flag, create_by, create_time, update_by, update_time, remark, bom_no, - material_no, material_name, material_type, process_method, unit, brand, `describe`,warehouseDept, + material_no, material_name, material_type, process_method, unit, material_model, brand, `describe`,warehouseDept, engineer,use_num, loss_rate, parent_id, `level`, sort_no, audit_status, use_status, instance_id,instance_type,submit_instance_id,cancel_instance_id,restore_instance_id, apply_title,apply_user,apply_time from erp_bom @@ -81,7 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select erp.id, erp.del_flag, erp.create_by, erp.create_time, erp.update_by, erp.update_time , erp.remark,erp.bom_no,erp.material_no,erp.material_name, erp.audit_status, erp.use_status - , erp.material_type, erp.process_method,erp.unit, erp.brand, erp.`describe`,erp.warehouseDept,erp.engineer, + , erp.material_type, erp.process_method,erp.unit, erp.material_model, erp.brand, erp.`describe`,erp.warehouseDept,erp.engineer, erp.use_num,erp.loss_rate, erp.parent_id, erp.`level`, erp.sort_no, erp.instance_id, erp.instance_type, processDict.dict_label as instance_type_name, erp.submit_instance_id, erp.cancel_instance_id, erp.restore_instance_id,erp.apply_title,erp.apply_user,erp.apply_time @@ -155,7 +157,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select bom_no, id, create_by, create_time, update_by, update_time, remark, - material_no, material_name, material_type, process_method, unit, + material_no, material_name, material_type, process_method, unit, material_model, brand, `describe`,warehouseDept,engineer,use_num, loss_rate, parent_id, `level`, sort_no, audit_status, use_status from erp_bom where bom_no != "" ORDER BY id DESC; @@ -163,7 +165,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select erp.id, erp.del_flag, erp.create_by, erp.create_time, erp.update_by, erp.update_time, erp.remark,erp.bom_no, erp.material_no , erp.material_name, erp.audit_status, erp.use_status, - erp.material_type, erp.process_method, erp.unit, erp.brand, erp.describe,erp.warehouseDept, + erp.material_type, erp.process_method, erp.unit, erp.material_model, erp.brand, erp.describe,erp.warehouseDept, erp.use_num, erp.engineer, erp.loss_rate, erp.parent_id, erp.level, erp.sort_no,erp.instance_id,erp.instance_type, erp.submit_instance_id,erp.cancel_instance_id,erp.restore_instance_id,erp.apply_title, @@ -255,6 +257,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" material_type, process_method, unit, + material_model, brand, `describe`, warehouseDept, @@ -286,6 +289,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{materialType}, #{processMethod}, #{unit}, + #{materialModel}, #{brand}, #{describe}, #{warehouseDept}, @@ -321,6 +325,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" material_type = #{materialType}, process_method = #{processMethod}, unit = #{unit}, + material_model = #{materialModel}, brand = #{brand}, `describe` = #{describe}, warehouseDept = #{warehouseDept}, @@ -379,7 +384,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" insert into erp_bom( id, del_flag, create_by, create_time, update_by, update_time, remark, bom_no, material_no, - material_name, material_type, process_method, unit, brand, `describe`,warehouseDept, use_num, loss_rate, + material_name, material_type, process_method, unit, material_model, brand, `describe`,warehouseDept, use_num, loss_rate, parent_id, `level`, sort_no, audit_status, use_status) values ( #{item.id}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, @@ -418,7 +423,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select erp.id, erp.del_flag, erp.create_by, erp.create_time, erp.update_by, erp.update_time, erp.remark,erp.bom_no,erp.material_no,erp.material_name, erp.audit_status, erp.use_status, - erp.material_type, erp.process_method,erp.unit, erp.brand, erp.`describe`,erp.warehouseDept,erp.engineer, + erp.material_type, erp.process_method,erp.unit, erp.material_model, erp.brand, erp.`describe`,erp.warehouseDept,erp.engineer, erp.use_num,erp.loss_rate, erp.parent_id, erp.`level`, erp.sort_no, erp.instance_id, erp.instance_type, processDict.dict_label as instance_type_name, erp.submit_instance_id, erp.cancel_instance_id, erp.restore_instance_id,erp.apply_title,erp.apply_user,erp.apply_time, @@ -453,7 +458,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select erp.id, erp.del_flag, erp.create_by, erp.create_time, erp.update_by, erp.update_time, erp.remark,erp.bom_no,erp.material_no,erp.material_name, erp.audit_status, erp.use_status, - erp.material_type, erp.process_method,erp.unit, erp.brand, erp.`describe`,erp.warehouseDept,erp.engineer, + erp.material_type, erp.process_method,erp.unit, erp.material_model, erp.brand, erp.`describe`,erp.warehouseDept,erp.engineer, erp.use_num,erp.loss_rate, erp.parent_id, erp.`level`, erp.sort_no, erp.instance_id, erp.instance_type, processDict.dict_label as instance_type_name, erp.submit_instance_id, erp.cancel_instance_id, erp.restore_instance_id,erp.apply_title,erp.apply_user,erp.apply_time, @@ -492,7 +497,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select erp.id, erp.del_flag, erp.create_by, erp.create_time, erp.update_by, erp.update_time, erp.remark,erp.bom_no,erp.material_no,erp.material_name, erp.audit_status, erp.use_status, - erp.material_type, erp.process_method,erp.unit, erp.brand, erp.`describe`,erp.warehouseDept,erp.engineer, + erp.material_type, erp.process_method,erp.unit, erp.material_model, erp.brand, erp.`describe`,erp.warehouseDept,erp.engineer, erp.use_num,erp.loss_rate, erp.parent_id, erp.`level`, erp.sort_no, erp.instance_id, erp.instance_type, processDict.dict_label as instance_type_name, erp.submit_instance_id, erp.cancel_instance_id, erp.restore_instance_id,erp.apply_title,erp.apply_user,erp.apply_time, @@ -526,7 +531,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select erp.id, erp.del_flag, erp.create_by, erp.create_time, erp.update_by, erp.update_time, erp.remark,erp.bom_no,erp.material_no,erp.material_name, erp.audit_status, erp.use_status, - erp.material_type, erp.process_method,erp.unit, erp.brand, erp.`describe`,erp.warehouseDept,erp.engineer, + erp.material_type, erp.process_method,erp.unit, erp.material_model, erp.brand, erp.`describe`,erp.warehouseDept,erp.engineer, erp.use_num,erp.loss_rate, erp.parent_id, erp.`level`, erp.sort_no, erp.instance_id, erp.instance_type, processDict.dict_label as instance_type_name, erp.submit_instance_id, erp.cancel_instance_id, erp.restore_instance_id,erp.apply_title,erp.apply_user,erp.apply_time, @@ -560,7 +565,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select erp.id, erp.del_flag, erp.create_by, erp.create_time, erp.update_by, erp.update_time, erp.remark,erp.bom_no,erp.material_no,erp.material_name, erp.audit_status, erp.use_status, - erp.material_type, erp.process_method,erp.unit, erp.brand, erp.`describe`,erp.warehouseDept,erp.engineer, + erp.material_type, erp.process_method,erp.unit, erp.material_model, erp.brand, erp.`describe`,erp.warehouseDept,erp.engineer, erp.use_num,erp.loss_rate, erp.parent_id, erp.`level`, erp.sort_no, erp.instance_id, erp.instance_type, processDict.dict_label as instance_type_name, erp.submit_instance_id, erp.cancel_instance_id, erp.restore_instance_id,erp.apply_title,erp.apply_user,erp.apply_time, diff --git a/ruoyi-admin/src/main/resources/templates/erp/bom/add.html b/ruoyi-admin/src/main/resources/templates/erp/bom/add.html index 24c71144..2f0726a0 100644 --- a/ruoyi-admin/src/main/resources/templates/erp/bom/add.html +++ b/ruoyi-admin/src/main/resources/templates/erp/bom/add.html @@ -61,6 +61,12 @@ + + 型号: + + + + 品牌: @@ -402,6 +408,7 @@ $.table.init(options); }); + //bom 物料检测和赋值 function materilalSelect(data) { var materialType1 = data.materialType.indexOf('yl'); var materialType2 = data.materialType.indexOf('fl'); @@ -419,6 +426,7 @@ return; } $("input[name='brand']").val(data.brand); + $("input[name='materialModel']").val(data.materialModel); $("textarea[name='describe']").val(data.describe); $("#selectMaterialType").val([data.materialType]).trigger("change"); $("input[name='materialType']").val(data.materialType); @@ -505,6 +513,7 @@ describe: rowData.describe, processMethod: rowData.processMethod, unit: rowData.unit, + materialModel: rowData.materialModel, brand: rowData.brand, warehouseDept: rowData.warehouseDept, level: "1",