From edcd341d33c144c04854af21f999bc7118e65ef8 Mon Sep 17 00:00:00 2001
From: zhangsiqi <2825463979@qq.com>
Date: Wed, 10 Jul 2024 20:32:56 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9Abom=E5=AE=A1?=
=?UTF-8?q?=E6=A0=B8=E4=BF=AE=E6=94=B9=E7=BB=8F=E7=90=86=E5=AE=A1=E6=A0=B8?=
=?UTF-8?q?=E5=8F=AF=E5=85=A8=E9=83=A8=E6=9D=83=E9=99=90=E3=80=82=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9=E5=AE=A1=E6=A0=B8=E9=A1=B5=E9=9D=A2=E8=B7=B3=E8=BD=AC?=
=?UTF-8?q?=E5=88=A4=E5=AE=9A=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 | 1 +
.../main/resources/templates/erp/bom/bom.html | 2 +-
.../resources/templates/erp/bom/detail.html | 22 ++++++++++++-------
.../resources/templates/erp/bom/edit.html | 2 +-
.../templates/erp/bom/taskGcjlVerify.html | 1 -
5 files changed, 17 insertions(+), 11 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 d4e04253..fa8a082f 100644
--- a/ruoyi-admin/src/main/resources/templates/erp/bom/add.html
+++ b/ruoyi-admin/src/main/resources/templates/erp/bom/add.html
@@ -168,6 +168,7 @@
"");
}
$("#selectEngineer").val(loginName);
+ $("input[name='engineer']").val(loginName);
} else {
$.modal.msgError(res.msg);
}
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 4f1b3307..af806cde 100644
--- a/ruoyi-admin/src/main/resources/templates/erp/bom/bom.html
+++ b/ruoyi-admin/src/main/resources/templates/erp/bom/bom.html
@@ -220,7 +220,7 @@
// 有待办人展示审批按钮,
if (row.todoUserId) {
var todoUserIdList = row.todoUserId.split(",");
- if(todoUserIdList.includes(loginName) || todoUserIdList.includes("admin")){
+ if(todoUserIdList.includes(loginName)){
var nodeName = row.taskName=='驳回调整'?' 调整申请':' 审批';
actions.push(' '+nodeName+' ');
}
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 abd9b705..17cf99c2 100644
--- a/ruoyi-admin/src/main/resources/templates/erp/bom/detail.html
+++ b/ruoyi-admin/src/main/resources/templates/erp/bom/detail.html
@@ -231,19 +231,19 @@
editable : {
editor: {
defaultValue: '%',
- title: '损耗率(%)',
- mode: 'inline',
+ title : '损耗率(%)',
+ mode:'inline',
type: 'text',
// 编辑时同样附带百分比符号
- formatter: function (value) {
+ formatter: function(value) {
return value + '%';
},
// 编辑后去除百分比符号
- custom_getter: function (value) {
+ custom_getter: function(value) {
return value.replace('%', '');
}
},
- validate : function (value) {
+ validate : function(value) {
if (!value) {
return '损耗率不能为空';
}
@@ -256,13 +256,19 @@
if (num < 0 || num > 100) {
return '损耗率必须大于等于0小于等于100';
}
- }
+ },
},
formatter: function (value,row,index){
- if(value == null){
+ if (value == null || value == ''){
return "%";
}
- return value + "%";
+ const regex = /(\d+(?:\.\d+)?)%/g; // 创建正则表达式,g标志表示全局匹配
+ const match = value.match(regex); // 使用match方法查找所有匹配
+ if (match) {
+ return value;
+ }else{
+ return value + "%";
+ }
},
},
{
diff --git a/ruoyi-admin/src/main/resources/templates/erp/bom/edit.html b/ruoyi-admin/src/main/resources/templates/erp/bom/edit.html
index 8b761f04..9c3b5c09 100644
--- a/ruoyi-admin/src/main/resources/templates/erp/bom/edit.html
+++ b/ruoyi-admin/src/main/resources/templates/erp/bom/edit.html
@@ -290,7 +290,7 @@
{
field: 'processMethod',
align: 'center',
- title: '半成品类型',
+ title: '加工方式',
formatter: function(value, row, index) {
return $.table.selectDictLabel(processMethodDatas, value);
}
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 826598d4..e8410fb7 100644
--- a/ruoyi-admin/src/main/resources/templates/erp/bom/taskGcjlVerify.html
+++ b/ruoyi-admin/src/main/resources/templates/erp/bom/taskGcjlVerify.html
@@ -263,7 +263,6 @@
$.operate.save(prefix + "/complete/" + taskId, $('#form-edit').serialize());
}
}
-