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",