优化新增点单智能推荐

This commit is contained in:
gyq
2025-10-23 11:25:20 +08:00
parent dae7ced23c
commit 99881f4d97
20 changed files with 955 additions and 257 deletions

View File

@@ -154,7 +154,7 @@ export function filterNumberInput(value, isIntegerOnly = false) {
let filtered = value.replace(/[^\d.]/g, "");
// 整数模式处理
if (isIntegerOnly) {
if (isIntegerOnly !== false) {
// 移除所有小数点
filtered = filtered.replace(/\./g, "");
@@ -167,8 +167,8 @@ export function filterNumberInput(value, isIntegerOnly = false) {
}
// 最小值限制
if (filtered === "0" || parseInt(filtered, 10) < 1) {
return "1";
if (filtered === isIntegerOnly || parseInt(filtered, 10) < isIntegerOnly) {
return isIntegerOnly;
}
return filtered;