From 563ea85abdaa4711e8bcd2b3c7af903b809955a8 Mon Sep 17 00:00:00 2001 From: zhangsiqi <2825463979@qq.com> Date: Mon, 3 Jun 2024 16:01:42 +0800 Subject: [PATCH] =?UTF-8?q?[feat]=E5=B7=A5=E7=A8=8B=E7=AE=A1=E7=90=86:?= =?UTF-8?q?=E4=BF=AE=E8=AF=A5BOM=E4=BF=A1=E6=81=AF=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E7=89=A9=E6=96=99=E6=98=BE=E7=A4=BA=E5=BC=82=E5=B8=B8=EF=BC=8C?= =?UTF-8?q?=E5=B7=A5=E7=A8=8B=E5=91=98=E9=BB=98=E8=AE=A4=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=B8=BA=E6=9C=AC=E4=BA=BA=EF=BC=8C=E7=94=A8=E9=87=8F=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E4=B8=BA=E5=BF=85=E5=A1=AB=E9=A1=B9=EF=BC=8C=E6=8D=9F?= =?UTF-8?q?=E8=80=97=E7=8E=87=E9=BB=98=E8=AE=A4=E6=98=BE=E7=A4=BA%?= =?UTF-8?q?=EF=BC=8CBOM=E4=B8=8B=E7=9A=84=E4=B8=80=E9=98=B6BOM=E7=89=A9?= =?UTF-8?q?=E6=96=99=E9=9C=80=E9=99=90=E5=88=B6=E4=B8=80=E4=B8=AA=E7=89=A9?= =?UTF-8?q?=E6=96=99=E5=8F=AA=E8=83=BD=E6=B7=BB=E5=8A=A0=E4=B8=80=E6=AC=A1?= =?UTF-8?q?=EF=BC=8C=E4=B8=8D=E8=83=BD=E5=A4=9A=E6=AC=A1=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=EF=BC=8C=E4=B8=8D=E8=83=BD=E4=BB=A5=E5=8E=9F=E6=96=99=E9=98=B6?= =?UTF-8?q?=E5=B1=82=E5=81=9ABOM=E7=89=A9=E6=96=99=E4=B8=BB=E4=BD=93?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../erp/controller/ErpBomController.java | 4 +- .../java/com/ruoyi/erp/domain/ErpBom.java | 36 +-- .../erp/service/impl/ErpBomServiceImpl.java | 11 +- .../service/impl/ErpMaterialServiceImpl.java | 2 +- .../resources/mapper/erp/ErpBomMapper.xml | 199 +++++++------- .../main/resources/templates/erp/bom/add.html | 90 +++++-- .../main/resources/templates/erp/bom/bom.html | 45 ++-- .../resources/templates/erp/bom/detail.html | 33 +-- .../resources/templates/erp/bom/edit.html | 45 +++- .../templates/erp/bom/taskGcjlVerify.html | 249 +----------------- .../templates/erp/bom/taskGczgVerify.html | 10 +- .../templates/erp/bom/taskModifyApply.html | 28 +- .../templates/erp/bom/taskYfzjVerify.html | 16 +- 13 files changed, 306 insertions(+), 462 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpBomController.java b/ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpBomController.java index 28449108..e261c18b 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpBomController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpBomController.java @@ -78,7 +78,7 @@ public class ErpBomController extends BaseController @RequiresPermissions("erp:bom:list") @PostMapping("/list") @ResponseBody - public TableDataInfo list(ErpBomVo erpBomVo) + public TableDataInfo list(ErpBomVo erpBomVo,HttpServletRequest request) { SysUser curUser = ShiroUtils.getSysUser(); Long userId = curUser.getUserId(); @@ -87,6 +87,8 @@ public class ErpBomController extends BaseController startPage(); List list = erpBomService.selectErpBomList(erpBomVo); return getDataTable(list); + + } /** 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 b2173d93..320c4e05 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 @@ -56,14 +56,12 @@ public class ErpBom extends BaseEntity @Excel(name = "描述",sort = 4) private String describe; - private String warehouseDept; - /** 用量 */ @Excel(name = "用量",sort = 8) private Long useNum; /** 损耗率 */ - private BigDecimal lossRate; + private String lossRate; /** 父级id */ private Long parentId; @@ -75,6 +73,9 @@ public class ErpBom extends BaseEntity /** 排序 */ private Long sortNo; + @Excel(name = "工程员",sort = 9) + private String engineer; + /** 审核状态 */ private String auditStatus; @@ -114,6 +115,9 @@ public class ErpBom extends BaseEntity /** bom信息 */ private List erpBomList; + + + public void setId(Long id) { this.id = id; @@ -196,14 +200,6 @@ public class ErpBom extends BaseEntity return unit; } - public String getWarehouseDept() { - return warehouseDept; - } - - public void setWarehouseDept(String warehouseDept) { - this.warehouseDept = warehouseDept; - } - public void setBrand(String brand) { this.brand = brand; @@ -227,21 +223,30 @@ public class ErpBom extends BaseEntity this.useNum = useNum; } - public Long getUseNum() + public String getEngineer() { + return engineer; + } + + public void setEngineer(String engineer) { + this.engineer = engineer; + } + + public Long getUseNum() { return useNum; } - public void setLossRate(BigDecimal lossRate) + public void setLossRate(String lossRate) { this.lossRate = lossRate; } - public BigDecimal getLossRate() + public String getLossRate() { return lossRate; } - public void setParentId(Long parentId) + public void setParentId(Long parentId) { + this.parentId = parentId; } @@ -398,6 +403,7 @@ public class ErpBom extends BaseEntity ", unit='" + unit + '\'' + ", brand='" + brand + '\'' + ", describe='" + describe + '\'' + + ", engineer='" + engineer + '\'' + ", useNum=" + useNum + ", lossRate=" + lossRate + ", parentId=" + parentId + diff --git a/ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpBomServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpBomServiceImpl.java index c4c2b052..0f8e807c 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpBomServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpBomServiceImpl.java @@ -31,8 +31,10 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import javax.servlet.http.HttpServletRequest; import java.math.BigDecimal; import java.util.*; +import java.util.regex.Pattern; /** * bomService业务层处理 @@ -190,6 +192,9 @@ private ISysAttachService attachService; if(CollectionUtils.isNotEmpty(subLevelList)){ for (ErpBom sub: subLevelList) { Long level1 = level+1; + if(level1 >= 8){ + break; + } sub.setLevel(level1); resultList.add(sub); String materialNo1 = sub.getMaterialNo(); @@ -406,7 +411,7 @@ private ISysAttachService attachService; ErpBomImportVo bomImportVo = bomImportVos.get(i); String materialNo = bomImportVo.getMaterialNo(); Long useNum = bomImportVo.getUseNum(); - BigDecimal lossRate = bomImportVo.getLossRate(); + Double lossRate = bomImportVo.getLossRate(); String remark = bomImportVo.getRemark(); ErpMaterialVo erpMaterialVo = materialMapper.selectErpMaterialByMaterialNo(materialNo); try @@ -467,7 +472,7 @@ private ISysAttachService attachService; subBom.setBrand(erpMaterialVo.getBrand()); subBom.setDescribe(erpMaterialVo.getDescribe()); subBom.setUseNum(useNum); - subBom.setLossRate(lossRate); + subBom.setLossRate(String.valueOf(lossRate)); subBom.setParentId(parentId); subBom.setLevel(1L); subBom.setSortNo(i+0L); @@ -644,7 +649,7 @@ private ISysAttachService attachService; private void buildAuthority(SysUser user, Map variables) { Set roleKeys = roleService.selectRoleKeys(user.getUserId()); // 角色不同审核人不同 - if(roleKeys.contains("yfzjRole")){ + if(roleKeys.contains("yfzjRole") || roleKeys.contains("admin")){ variables.put("authority",4); }else if(roleKeys.contains("gczgRole")){ variables.put("authority",3); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpMaterialServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpMaterialServiceImpl.java index 50ac90cd..9b6bbb6b 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpMaterialServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpMaterialServiceImpl.java @@ -396,7 +396,7 @@ public class ErpMaterialServiceImpl implements IErpMaterialService private void buildAuthority(SysUser user, Map variables) { Set roleKeys = roleService.selectRoleKeys(user.getUserId()); // 角色不同审核人不同 - if(roleKeys.contains("yfzjRole")){ + if(roleKeys.contains("yfzjRole") || roleKeys.contains("admin")){ variables.put("authority",4); }else if(roleKeys.contains("gczgRole")){ variables.put("authority",3); diff --git a/ruoyi-admin/src/main/resources/mapper/erp/ErpBomMapper.xml b/ruoyi-admin/src/main/resources/mapper/erp/ErpBomMapper.xml index 6b1c76ce..cb98740d 100644 --- a/ruoyi-admin/src/main/resources/mapper/erp/ErpBomMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/erp/ErpBomMapper.xml @@ -4,37 +4,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -42,47 +43,47 @@ 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`, - 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 + 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 select bom_no, id, create_by, create_time, update_by, update_time, remark, material_no, material_name, material_type, process_method, unit, - brand, `describe`, use_num, loss_rate, parent_id, `level`, + brand, `describe`,engineer,use_num, loss_rate, parent_id, `level`, sort_no, audit_status, use_status from erp_bom where bom_no != "" ORDER BY id DESC; - + 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.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, + file.url as photo_url,cate.name as material_type_name from erp_bom as erp + left join ( + select id,material_no,material_name from erp_material + ) erp_material + on erp.material_no = erp_material.material_no + left join( + select dict_value,dict_label from sys_dict_data + where dict_type = 'processType' + ) processDict + on erp.instance_type = processDict.dict_value + left join ( + select code,name from sys_category + where parent_id in( + select id from sys_category + where parent_id = (select id from sys_category where code = 'materialType') ) + ) cate + on erp.material_type = cate.code + left join ( + select att.rel_id,file.url,min(file.create_time) as create_time from sys_attach as att + left join sys_attach_file as file + on att.id = file.attach_id + where att.source_type = 'erpMaterial' and att.source_sub_type = 'photo' + group by att.rel_id + ) file + on erp_material.id = file.rel_id where erp.material_no = #{materialNo} \ No newline at end of file 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 6584813b..b55bab09 100644 --- a/ruoyi-admin/src/main/resources/templates/erp/bom/add.html +++ b/ruoyi-admin/src/main/resources/templates/erp/bom/add.html @@ -72,7 +72,7 @@
- +
@@ -100,7 +100,7 @@ var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; var bomLevelSelectDatas = [[${@dict.getTypeSelect('bomLevel')}]]; var processMethodDatas = [[${@dict.getType('processMethod')}]]; - var userName = [[${@permission.getPrincipalProperty('userName')}]]; + var loginName = [[${@permission.getPrincipalProperty('loginName')}]]; $("#form-bom-add").validate({ onkeyup: false, rules:{ @@ -119,12 +119,26 @@ return $.validate.unique(data); } } + }, + materialType:function (){ + //物料类型不能是原料 + var materialType = $("#selectMaterialType").text(); + if(materialType.contains('yl') || materialType.contains('fl') ){ + return false; + }else{ + return true; + } + } + }, messages: { "materialNo": { remote: "料号已经存在", }, + "materialType": { + remote: "Bom物料类型不能是原料", + } }, focusCleanup: true }); @@ -266,6 +280,7 @@ title: '用量', editable : { type : 'text', + //默认text title : '用量', mode:'inline', validate : function(value) { @@ -279,29 +294,46 @@ return "输入数值不能小于0"; } } - } + }, }, { field: 'lossRate', align: 'center', title: '损耗率(%)', editable : { - type : 'text', - title : '损耗率(%)', - mode:'inline', - validate : function(value) { + editor: { + defaultValue: '%', + title: '损耗率(%)', + mode: 'inline', + type: 'text', + // 编辑时同样附带百分比符号 + formatter: function (value) { + return value + '%'; + }, + // 编辑后去除百分比符号 + custom_getter: function (value) { + return value.replace('%', ''); + } + }, + validate : function (value) { if (!value) { return '损耗率不能为空'; } if (isNaN(value)) { return '损耗率必须为数字'; - }else if(value >100){ + } else if (value > 100) { return "输入数值不能大100" - }else if(value < 0){ + } else if (value < 0) { return "输入数值不能小于0"; } } - } + }, + formatter: function (value,row,index){ + if(value == null){ + return "%"; + } + return value + "%"; + }, }, { field: 'processMethod', @@ -328,27 +360,29 @@ }] }; $.table.init(options); - $.ajax({ - url: ctx + 'erp/material/getEngineerList', - type: 'get', - success: function (res) { - if (res.rows.length > 0) { - var usertData = res.rows; - for (let i in usertData) { - $("select[name='businessMembers']").append( - ""); - } - } else { - $.modal.msgError(res.msg); - } - } - }); - $("form-bom-add input[name='businessMembers']").val(userName); + // $.ajax({ + // url: ctx + 'erp/material/getEngineerList', + // type: 'get', + // success: function (res) { + // if (res.rows.length > 0) { + // var usertData = res.rows; + // for (let i in usertData) { + // $("#form-bom-add select[name='engineer']").append( + // ""); + // } + // } else { + // $.modal.msgError(res.msg); + // } + // } + // }); + $("form-bom-add input[name='engineer']").val(loginName); + $("form-bom-add input[name='engineer']").text(userName); }); function materilalSelect(data) { var materialType1 = data.materialType.indexOf('yl'); - if(materialType1 != -1){ - $.modal.msgError("原料不能作为BOM主体"); + var materialType2 = data.materialType.indexOf('fl'); + if(materialType1 != -1 && materialType2 != -1){ + $.modal.msgError("原料、辅料不能作为BOM主体"); $("#materialNo").val(''); $("input[materialName]").val(''); return; diff --git a/ruoyi-admin/src/main/resources/templates/erp/bom/bom.html b/ruoyi-admin/src/main/resources/templates/erp/bom/bom.html index 19e59642..a94fe43e 100644 --- a/ruoyi-admin/src/main/resources/templates/erp/bom/bom.html +++ b/ruoyi-admin/src/main/resources/templates/erp/bom/bom.html @@ -50,7 +50,7 @@
  • -
  • @@ -106,7 +106,7 @@ var useStatusDatas = [[${@dict.getType('useStatus')}]]; var userName = [[${@permission.getPrincipalProperty('userName')}]]; var currentUser = [[${currentUser}]]; - var loginName = [[${@permission.getPrincipalProperty('loginName')}]];; + var loginName = [[${@permission.getPrincipalProperty('loginName')}]]; var prefix = ctx + "erp/bom"; $(function() { $.ajax({ @@ -116,8 +116,8 @@ if (res.rows.length > 0) { var usertData = res.rows; for (let i in usertData) { - $("select[name='businessMembers']").append( - ""); + $("select[name='engineer']").append( + ""); } } else { $.modal.msgError(res.msg); @@ -154,7 +154,7 @@ initOneLevelTable(index,row,$detail); // 多阶 initAllLevelTable(index,row,$detail); - $.table.bootstrapTable('resetView'); + // $.table.bootstrapTable('resetView'); }, columns: [{ checkbox: true @@ -217,7 +217,7 @@ return $.table.selectDictLabel(useStatusDatas, value); } }, - {title: '工程员',field: 'businessMembers', sortable: true,}, + {title: '工程员',field: 'engineer', sortable: true,}, {title: 'bom号',field: 'bomNo', sortable: true,}, {title: '关联料号',field: 'materialNo', sortable: true,}, { @@ -303,7 +303,7 @@ // 有待办人展示审批按钮, if (row.todoUserId) { var todoUserIdList = row.todoUserId.split(","); - if(todoUserIdList.includes(loginName)){ + if(todoUserIdList.includes(loginName) || todoUserIdList.includes("admin")){ var nodeName = row.taskName=='驳回调整'?' 调整申请':' 审批'; actions.push(' '+nodeName+' '); } @@ -348,7 +348,7 @@ if (value == null || value == ''){ return '/'; }else{ - return value + return value; } } }, @@ -366,7 +366,7 @@ if (value == null || value == ''){ return '/'; }else{ - return value + return value; } } }, @@ -377,7 +377,7 @@ if (value == null || value == ''){ return '/'; }else{ - return value + return value; } } }, @@ -395,7 +395,7 @@ if (value == null || value == ''){ return '/'; }else{ - return value + return value; } } }, @@ -407,7 +407,7 @@ if (value == null || value == ''){ return '/'; }else{ - return value + return value; } } }, @@ -418,7 +418,7 @@ if (value == null || value == ''){ return '/'; }else{ - return value + return value; } } }, @@ -429,7 +429,7 @@ if (value == null || value == ''){ return '/'; }else{ - return value + return value; } } }, @@ -438,10 +438,9 @@ title: '损耗率', formatter: function (value,row,index){ if (value == null || value == ''){ - return '/'; - }else{ - return value + return "%"; } + return value + "%"; } }, { @@ -580,10 +579,9 @@ title: '损耗率', formatter: function (value,row,index){ if (value == null || value == ''){ - return '/'; - }else{ - return value + "%"; + return "/"; } + return value + "%"; } }, { @@ -736,12 +734,7 @@ field: 'lossRate', title: '损耗率(%)', formatter:function (value,row,index){ - if (value == null || value == ''){ - return '/'; - }else{ - return value; - } - + return value + '%'; } }, { diff --git a/ruoyi-admin/src/main/resources/templates/erp/bom/detail.html b/ruoyi-admin/src/main/resources/templates/erp/bom/detail.html index fd4888d2..8bad9831 100644 --- a/ruoyi-admin/src/main/resources/templates/erp/bom/detail.html +++ b/ruoyi-admin/src/main/resources/templates/erp/bom/detail.html @@ -7,7 +7,7 @@
    -
    +
    @@ -67,7 +67,7 @@
    - +
    @@ -90,16 +90,16 @@ \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/erp/bom/taskGcjlVerify.html b/ruoyi-admin/src/main/resources/templates/erp/bom/taskGcjlVerify.html index a2c77e90..3f6c64d3 100644 --- a/ruoyi-admin/src/main/resources/templates/erp/bom/taskGcjlVerify.html +++ b/ruoyi-admin/src/main/resources/templates/erp/bom/taskGcjlVerify.html @@ -90,11 +90,9 @@
    - +
    - +
    @@ -128,16 +126,22 @@
    -
    +
    +
    +
    +
    +
    +
    + @@ -246,242 +250,9 @@ }, } }); - var erpBom = [[${formData}]]; - $(function() { - $.ajax({ - url: ctx + 'erp/material/getEngineerList', - type: 'get', - success: function (res) { - if (res.rows.length > 0) { - var usertData = res.rows; - for (let i in usertData) { - $("select[name='businessMembers']").append( - ""); - } - } else { - $.modal.msgError(res.msg); - } - } - }); - }) var prefix = ctx + "erp/bom"; - $("#form-edit").validate({ - focusCleanup: true - }); - $(function() { - $.ajax({ - url: ctx + 'erp/material/getEngineerList', - type: 'get', - success: function (res) { - if (res.rows.length > 0) { - var usertData = res.rows; - for (let i in usertData) { - $("select[name='businessMembers']").append( - ""); - } - $("select[name='businessMembers']").val(erpBom.businessMembers); - } else { - $.modal.msgError(res.msg); - } - } - }); - var options = { - url: prefix + "/list", - createUrl: prefix + "/add", - updateUrl: prefix + "/edit/{id}", - removeUrl: prefix + "/remove", - detailUrl: prefix + "/detail/{id}", - cancelUrl: prefix + "/cancel/{id}", - restoreUrl: prefix + "/restore/{id}", - exportUrl: prefix + "/export", - importUrl: prefix + "/importData", - importTemplateUrl: prefix + "/importTemplate", - pageList: [5, 10, 25, 50], - pageSize: 10, - sortable: true, // 是否启用排序 - sortStable: true, // 设置为 true 将获得稳定的排序 - modalName: "bom", - detailView: true, - fixedColumns: true, // 启用冻结列 - rightFixedColumns:1, - fixedRightNumber: 1, // 冻结右列个数 - height: $(window).height() - 100, - //指定父id列 - onExpandRow : function(index, row, $detail) { - $detail.html('

    一阶

    ' + - '

    多阶

    ' - ).find('table'); - // 一阶 - initOneLevelTable(index,row,$detail); - // 多阶 - initAllLevelTable(index,row,$detail); - $.table.bootstrapTable('resetView'); - }, - columns: [{ - checkbox: true - }, - {title: '主键ID',field: 'id'}, - { title: '流程实例ID',field: 'instanceId',visible: false}, - { title: '流程提交实例ID',field: 'submitInstanceId',visible: false}, - {title: '流程作废实例ID', field: 'cancelInstanceId',visible: false}, - { title: '流程恢复实例ID',field: 'restoreInstanceId',visible: false}, - { title: '流程实例类型',field: 'instanceTypeName', visible: false}, - { - field: 'applyUser', - title: '申请人ID', - visible: false - }, - { - field: 'applyUserName', - title: '申请人', - formatter: function(value, row, index) { - return '' + (value ? value : "-") + ''; - } - }, - { - field: 'applyTime', - title: '申请时间', - sortable: true, - }, - { - field: 'taskId', - title: '当前任务ID', - visible: false, + $("#form-edit").validate({focusCleanup: true}); - }, - { - field: 'todoUserId', - title: '待办用户ID', - visible: false, - }, - { - field: 'taskName', - title: '当前任务名称', - align: 'center', - formatter: function(value, row, index) { - return '' + value + ''; - } - }, - { - field: 'auditStatus', - title: '审核状态', - sortable: true, - formatter: function(value, row, index) { - return $.table.selectDictLabel(auditStatusDatas, value); - } - }, - { - field: 'useStatus', - title: '使用状态', - sortable: true, - formatter: function(value, row, index) { - return $.table.selectDictLabel(useStatusDatas, value); - } - }, - {title: '工程员',field: 'businessMembers', sortable: true,}, - {title: 'bom号',field: 'bomNo', sortable: true,}, - {title: '关联料号',field: 'materialNo', sortable: true,}, - { - field: 'photoUrl', - title: '图片', - formatter: function(value, row, index) { - return $.table.imageView(value); - } - }, - { title: '物料名称',field: 'materialName', sortable: true,}, - { - field: 'materialType', - title: '物料类型', - sortable: true, - formatter: function(value, row, index) { - return $.table.selectCategoryLabel(materialTypeDatas, value); - } - }, - { - field: 'processMethod', - title: '半成品类型', - sortable: true, - formatter: function(value, row, index) { - return $.table.selectDictLabel(processMethodDatas, value); - } - }, - { - field: 'unit', - title: '单位', - sortable: true, - }, - { title: '品牌',field: 'brand', sortable: true,}, - {title: '描述',field: 'describe', sortable: true,}, - {title: '用量',field: 'useNum', sortable: true,}, - {title: '损耗率',field: 'lossRate', sortable: true, - formatter:function (value,row,index){ - if (value == null || value == ''){ - return '/'; - }else{ - return value + "%"; - } - } - }, - { - field: 'parentId', - title: '父级id', - visible:false - }, - { - field: 'level', - title: '层级', - visible:false, - formatter: function(value, row, index) { - return $.table.selectDictLabel(levelDatas, value); - } - }, - { - field: 'sortNo', - title: '排序', - visible: false - }, - { - title: '操作', - align: 'center', - formatter: function(value, row, index) { - var actions = []; - // 审核状态-审核通过 使用状态-是 未发起作废流程 - if(row.auditStatus=="1" && row.useStatus=="1" && !row.cancelInstanceId){ - // 作废 - actions.push(' 作废'); - // 编辑 - actions.push(' 编辑 '); - }else{ - actions.push(' 编辑 '); - } - // 已作废 - if(row.useStatus=="2" && !row.restoreInstanceId){ - // 恢复 - actions.push(' 恢复 '); - } - // 有流程实例id - if (row.instanceId) { - // 有待办人展示审批按钮, - if (row.todoUserId) { - var todoUserIdList = row.todoUserId.split(","); - if(todoUserIdList.includes(loginName)){ - var nodeName = row.taskName=='驳回调整'?' 调整申请':' 审批'; - actions.push(' '+nodeName+' '); - } - } - // 审批历史 - actions.push(' 审批历史 '); - // 进度查看 - actions.push(' 进度查看 '); - } - // 详情 - actions.push(' 详情 '); - return actions.join(''); - } - }] - }; - $.table.init(options); - }); function submitHandler() { if ($.validate.form()) { var materialType = $('#selectMaterialType').select2('val'); diff --git a/ruoyi-admin/src/main/resources/templates/erp/bom/taskGczgVerify.html b/ruoyi-admin/src/main/resources/templates/erp/bom/taskGczgVerify.html index 186a2d04..2b9d8670 100644 --- a/ruoyi-admin/src/main/resources/templates/erp/bom/taskGczgVerify.html +++ b/ruoyi-admin/src/main/resources/templates/erp/bom/taskGczgVerify.html @@ -100,7 +100,7 @@
    - +
    @@ -134,16 +134,22 @@
    -
    +
    +
    +
    +
    +
    +
    + diff --git a/ruoyi-admin/src/main/resources/templates/erp/bom/taskModifyApply.html b/ruoyi-admin/src/main/resources/templates/erp/bom/taskModifyApply.html index fa36751c..6b70d474 100644 --- a/ruoyi-admin/src/main/resources/templates/erp/bom/taskModifyApply.html +++ b/ruoyi-admin/src/main/resources/templates/erp/bom/taskModifyApply.html @@ -93,7 +93,7 @@
    - +
    @@ -116,7 +116,7 @@

    -
    +
    +
    +
    +
    +
    +
    @@ -237,7 +242,6 @@ }, } }) - var erpBom = [[${formData.erpBom}]]; var prefix = ctx + "erp/bom"; $("#form-edit").validate({ onkeyup: false, @@ -257,24 +261,6 @@ }, focusCleanup: true }); - $(function() { - $.ajax({ - url: ctx + 'erp/material/getEngineerList', - type: 'get', - success: function (res) { - if (res.rows.length > 0) { - var usertData = res.rows; - for (let i in usertData) { - $("select[name='businessMembers']").append( - ""); - } - $("select[name='businessMembers']").val(erpBom.businessMembers); - } else { - $.modal.msgError(res.msg); - } - } - }); - }) function submitHandler() { if ($.validate.form()) { var materialType = $('#selectMaterialType').select2('val'); diff --git a/ruoyi-admin/src/main/resources/templates/erp/bom/taskYfzjVerify.html b/ruoyi-admin/src/main/resources/templates/erp/bom/taskYfzjVerify.html index 636f6fa6..e9d5776c 100644 --- a/ruoyi-admin/src/main/resources/templates/erp/bom/taskYfzjVerify.html +++ b/ruoyi-admin/src/main/resources/templates/erp/bom/taskYfzjVerify.html @@ -89,7 +89,7 @@
    - +
    @@ -123,12 +123,18 @@
    -
    +
    +
    +
    +
    +
    +
    +
    @@ -136,9 +142,7 @@ -