From bff0cebd688df19b9356ed3cc2898e49eebb72d9 Mon Sep 17 00:00:00 2001 From: zhangsiqi <2825463979@qq.com> Date: Sat, 1 Jun 2024 18:22:58 +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=E6=94=B9bom=E4=BF=A1=E6=81=AF=E3=80=82=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=85=A5=E5=BA=93=EF=BC=8C=E7=89=A9=E6=96=99=E6=96=99?= =?UTF-8?q?=E5=8F=B7=EF=BC=8C=E7=89=A9=E6=96=99=E5=90=8D=E7=A7=B0=EF=BC=8C?= =?UTF-8?q?=E7=89=A9=E6=96=99=E7=B1=BB=E5=9E=8B=EF=BC=8C=E5=8D=8A=E6=88=90?= =?UTF-8?q?=E5=93=81=E7=B1=BB=E5=9E=8B=EF=BC=8C=E6=8F=8F=E8=BF=B0=E4=B8=BA?= =?UTF-8?q?=E5=BF=85=E5=A1=AB=E9=A1=B9=EF=BC=8C=E6=B7=BB=E5=8A=A0=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=8A=80=E6=9C=AF=E5=9B=A2=E9=98=9F=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E3=80=82=E6=B7=BB=E5=8A=A0bom=E7=BB=84=E4=BB=B6=E7=89=A9?= =?UTF-8?q?=E6=96=99=E6=97=B6=E9=AA=8C=E8=AF=81=E6=98=AF=E5=90=A6=E5=B7=B2?= =?UTF-8?q?=E7=BB=8F=E6=B7=BB=E5=8A=A0=E8=BF=87=E8=AF=A5=E7=89=A9=E6=96=99?= =?UTF-8?q?=E4=B8=BA=E5=AD=90=E9=A1=B9,=E6=B7=BB=E5=8A=A0bom=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E7=89=A9=E6=96=99=E7=9A=84=E7=94=A8=E9=87=8F=E4=B8=BA?= =?UTF-8?q?=E5=BF=85=E5=A1=AB=E9=A1=B9=EF=BC=8C=E5=BF=85=E9=A1=BB=E5=A1=AB?= =?UTF-8?q?=E5=86=99=E6=95=B0=E5=AD=97=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/templates/erp/bom/add.html | 62 ++++++++++++------- .../main/resources/templates/erp/bom/bom.html | 10 ++- .../resources/templates/erp/bom/detail.html | 13 ++-- .../resources/templates/erp/bom/edit.html | 53 +++++++++++----- .../resources/templates/erp/bom/equals.html | 2 +- .../templates/erp/bom/taskGczgVerify.html | 24 +------ .../templates/erp/bom/taskModifyApply.html | 9 ++- .../templates/erp/bom/taskYfzjVerify.html | 37 +++-------- 8 files changed, 108 insertions(+), 102 deletions(-) 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 0309f324..6584813b 100644 --- a/ruoyi-admin/src/main/resources/templates/erp/bom/add.html +++ b/ruoyi-admin/src/main/resources/templates/erp/bom/add.html @@ -19,21 +19,17 @@
- +
- - +
+
- +
- +
@@ -106,7 +100,7 @@ var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; var bomLevelSelectDatas = [[${@dict.getTypeSelect('bomLevel')}]]; var processMethodDatas = [[${@dict.getType('processMethod')}]]; - + var userName = [[${@permission.getPrincipalProperty('userName')}]]; $("#form-bom-add").validate({ onkeyup: false, rules:{ @@ -276,10 +270,13 @@ mode:'inline', validate : function(value) { if (!value) { - return '损耗率不能为空'; + return '用量不能为空'; } if (isNaN(value)) { - return '损耗率必须为数字'; + return '用量必须为数字'; + } + if(value < 0){ + return "输入数值不能小于0"; } } } @@ -287,17 +284,17 @@ { field: 'lossRate', align: 'center', - title: '损耗率', + title: '损耗率(%)', editable : { type : 'text', - title : '损耗率', + title : '损耗率(%)', mode:'inline', validate : function(value) { if (!value) { - return '用量不能为空'; + return '损耗率不能为空'; } if (isNaN(value)) { - return '用量必须为数字'; + return '损耗率必须为数字'; }else if(value >100){ return "输入数值不能大100" }else if(value < 0){ @@ -320,11 +317,11 @@ title: '备注', editable : { type : 'text', - title : '损耗率', + title : '备注', mode:'inline', validate : function(value) { if (!value) { - return '用量不能为空'; + return '备注不能为空'; } } } @@ -346,6 +343,7 @@ } } }); + $("form-bom-add input[name='businessMembers']").val(userName); }); function materilalSelect(data) { var materialType1 = data.materialType.indexOf('yl'); @@ -369,6 +367,8 @@ var formData = $("#form-bom-add").serializeArray(); console.log("formData",formData); var tableData = $("#bootstrap-sub-table-1").bootstrapTable('getData'); + //是否重复料号添加 + console.log("tableData",JSON.stringify(tableData)) var rows = tableData.length; if(rows==0){ @@ -377,6 +377,16 @@ $("#selectUnit").attr("disabled","disabled"); $.modal.alertWarning("子表数据不能为空!"); }else{ + //物料的用量不能为空 + for(var i=0;i +