From 9428b1dddd95783b9ad003cc5ee22123cdcf1595 Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Thu, 23 May 2024 14:51:15 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=E5=93=81=E8=B4=A8=E7=AE=A1=E7=90=86:=20?= =?UTF-8?q?=E5=93=81=E8=B4=A8=E5=8D=95=20=E4=BF=AE=E6=94=B9=E5=93=81?= =?UTF-8?q?=E8=B4=A8=E5=8D=95=E6=8A=A5=E5=91=8A=E4=B8=8D=E5=90=88=E6=A0=BC?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E5=89=8D=E7=AB=AF=E4=B8=8B=E6=8B=89=E6=A1=86?= =?UTF-8?q?=E9=80=BB=E8=BE=91=EF=BC=8C=E5=AE=9E=E7=8E=B0=E8=83=BD=E5=A4=9F?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E4=B8=8D=E8=89=AF=E5=88=86=E7=B1=BB=E5=92=8C?= =?UTF-8?q?=E4=B8=8D=E8=89=AF=E7=AD=89=E7=BA=A7=E7=9A=84=E5=80=BC=EF=BC=8C?= =?UTF-8?q?=E5=B9=B6=E4=BC=A0=E9=80=92=E7=BB=99=E5=90=8E=E7=AB=AF=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0Ok=E5=85=81=E6=94=B6=E6=95=B0=E5=92=8C?= =?UTF-8?q?=E7=89=B9=E9=87=87/=E8=AE=A9=E6=AD=A5=E6=95=B0=E4=B8=BA?= =?UTF-8?q?=E5=BF=85=E5=A1=AB=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../qualityOrder/qualityOrderReport.html | 109 +++++++++++------- 1 file changed, 65 insertions(+), 44 deletions(-) diff --git a/ruoyi-admin/src/main/resources/templates/quality/qualityOrder/qualityOrderReport.html b/ruoyi-admin/src/main/resources/templates/quality/qualityOrder/qualityOrderReport.html index cca0cb1d..6e7d29d5 100644 --- a/ruoyi-admin/src/main/resources/templates/quality/qualityOrder/qualityOrderReport.html +++ b/ruoyi-admin/src/main/resources/templates/quality/qualityOrder/qualityOrderReport.html @@ -39,8 +39,8 @@

合格数

- - + +
@@ -49,8 +49,8 @@
- - + +
@@ -102,7 +102,7 @@ var processBadClassificationDatas = [[${@dict.getType('process_bad_classification')}]]; var processBadGradeDatas = [[${@dict.getType('process_bad_grade')}]]; - + var $table = $("#bootstrap-unqualified-table"); var prefix = ctx + "quality/qualityOrder"; $("#form-qualityOrderReport-edit").validate({ focusCleanup: true @@ -188,22 +188,18 @@ field: 'qualityOrderReportId', visible: false }, - { - title: '不良分类', - field: 'processBadClassification', - formatter: function(index, row, value) { - return dictToSelectWithEvent(processBadClassificationDatas, value, "processBadClassification", "bootstrap-unqualified-table"); + + {title: '不良分类',field: 'processBadClassification', + formatter:function (value, row, index) { + return processBadClassificationFormatter(value,row,index); } }, - { - title: '不良等级', - field: 'processBadGrade', - formatter: function(index, row, value) { - return dictToSelectWithEvent(processBadGradeDatas, value, "processBadGrade", "bootstrap-unqualified-table"); - } + {title: '不良等级',field: 'processBadGrade', + formatter:function (value, row, index) { + return processBadGradeFormatter(value,row,index); + } }, - { title: '数量', field: 'processBadNum', @@ -228,20 +224,7 @@ ] }; $.table.init(options); - - // 添加全局事件处理器 - window.updateTableRow = function(tableId, element) { - var $table = $("#" + tableId); - var rowIndex = $($element).closest('tr[data-index]').data('index'); - var fieldName = $(element).attr('name'); - var newValue = $(element).val(); - - // 直接更新Bootstrap Table的数据源 - var data = $table.bootstrapTable('getData'); - data[rowIndex][fieldName] = newValue; - $table.bootstrapTable('load', data); - }; - }) + }); // 逻辑删除不合格数前端的一行数据 @@ -255,22 +238,60 @@ } - // 数据字典转下拉框,并添加事件监听 - function dictToSelectWithEvent(datas, value, name, tableId) { - var selectHtml = $("'; + + // 添加默认选项 + selectHtml += ''; + + processBadClassificationDatas.forEach(function (child) { + selectHtml += ''; }); - $.each(datas, function(index, dict) { - $("