Merge branch 'ymf' of https://e.coding.net/g-cphe0354/yinshoukeguanliduan/management into dev
This commit is contained in:
commit
fa84f836ed
|
|
@ -12,7 +12,7 @@ export const formatPrice = (price,min=-Infinity, max = 100000000,returnIsArea=fa
|
|||
return 0
|
||||
}
|
||||
// 将价格转换为浮点数并保留两位小数
|
||||
const newval = parseFloat(price.toFixed(2))
|
||||
const newval = parseFloat((Math.floor(price * 100) / 100).toFixed(2))
|
||||
// 如果价格大于最大值,返回最大值
|
||||
if (newval > max) {
|
||||
return returnIsArea?{value:max,error:true}:max
|
||||
|
|
|
|||
Loading…
Reference in New Issue