fix(product): 修复产品列表价格保留两位小数功能
- 在产品列表页面中,当修改价格时,确保价格值保留两位小数 - 使用 Number 类型转换,避免科学计数法表示的价格值master
parent
ef534b6069
commit
3e3fe5be8d
|
@ -387,7 +387,7 @@
|
||||||
$('.productTable .price-formmat').change('input', function () {
|
$('.productTable .price-formmat').change('input', function () {
|
||||||
let val = $(this).val()
|
let val = $(this).val()
|
||||||
let num = $(this).parent().parent().find('.quantity').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
|
let allPriceNumber = val * num
|
||||||
// if (getFlag()) {
|
// if (getFlag()) {
|
||||||
// allPriceNumber *= FOLD_ON_FOLD
|
// allPriceNumber *= FOLD_ON_FOLD
|
||||||
|
|
Loading…
Reference in New Issue