fix(product): 修复产品列表价格保留两位小数功能

- 在产品列表页面中,当修改价格时,确保价格值保留两位小数
- 使用 Number 类型转换,避免科学计数法表示的价格值
master
chenhao 2025-07-08 14:31:49 +08:00
parent ef534b6069
commit 3e3fe5be8d
1 changed files with 1 additions and 1 deletions

View File

@ -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