diff --git a/js/aq_demand_plan/child/choose_tool_type_list.js b/js/aq_demand_plan/child/choose_tool_type_list.js index 03fc8e0..5066711 100644 --- a/js/aq_demand_plan/child/choose_tool_type_list.js +++ b/js/aq_demand_plan/child/choose_tool_type_list.js @@ -412,6 +412,12 @@ function importExcel() { } +function sanitizeNeedNum(value) { + let num = Number(value); + if (isNaN(num) || num <= 0) return ""; // 非法输入设为空 + return Math.floor(num); // 自动取整,去除小数 +} + function updateTableWithImportedData(data) { const tableData = table.cache.currentTableId || []; let updated = false;