From 075c8010bff18d01027758d91103411c6d4287f6 Mon Sep 17 00:00:00 2001 From: zhangtq <2452618307@qq.com> Date: Wed, 22 Jan 2025 09:21:38 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=84=E4=BB=B7=E5=88=86=E5=80=BC=E6=9C=80?= =?UTF-8?q?=E5=A4=A7=E5=80=BC=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../outsourcerEvaluation/evaluationForm.html | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html index cbfc126..f1c1622 100644 --- a/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html +++ b/src/main/resources/static/pages/evaluate/outsourcerEvaluation/evaluationForm.html @@ -189,6 +189,29 @@ }); } }); + // 单元格普通编辑事件 + table.on('edit(baseTable)', function(obj){ + var value = obj.value // 得到修改后的值 + var data = obj.data // 得到所在行所有键值 + var field = obj.field; // 得到字段 + //判断修改的是当前行的第几个单元格 + let index = headerRows[2].findIndex(item => item.field === field); + //获取其对应的二级标题 用于计算 + let currentItem = headerRows[1][index]; + let standardScore = Number(currentItem.standardScore); + if (value > standardScore) { + layer.msg('输入值不能大于标准值'); + //清空当前单元格 + obj.update({ + [field]: '' + }); + return; + } + // // 更新数据中对应的字段 + let update = {}; + update[field] = value; + obj.update(update); + }); }