From 3e3fe5be8d0802b2db936001c92ec137cd300349 Mon Sep 17 00:00:00 2001 From: chenhao <852066789@qq.com> Date: Tue, 8 Jul 2025 14:31:49 +0800 Subject: [PATCH] =?UTF-8?q?fix(product):=20=E4=BF=AE=E5=A4=8D=E4=BA=A7?= =?UTF-8?q?=E5=93=81=E5=88=97=E8=A1=A8=E4=BB=B7=E6=A0=BC=E4=BF=9D=E7=95=99?= =?UTF-8?q?=E4=B8=A4=E4=BD=8D=E5=B0=8F=E6=95=B0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在产品列表页面中,当修改价格时,确保价格值保留两位小数 - 使用 Number 类型转换,避免科学计数法表示的价格值 --- .../src/main/resources/templates/layout/product-list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-admin/src/main/resources/templates/layout/product-list.html b/ruoyi-admin/src/main/resources/templates/layout/product-list.html index 70d8db36..b9d5d11a 100644 --- a/ruoyi-admin/src/main/resources/templates/layout/product-list.html +++ b/ruoyi-admin/src/main/resources/templates/layout/product-list.html @@ -387,7 +387,7 @@ $('.productTable .price-formmat').change('input', function () { let val = $(this).val() let num = $(this).parent().parent().find('.quantity').val() - $(this).parent().parent().find('.price').val(val.toFixed(2)) + $(this).parent().parent().find('.price').val(Number(val).toFixed(2)) let allPriceNumber = val * num // if (getFlag()) { // allPriceNumber *= FOLD_ON_FOLD