Commit 92b4c105 authored by 王源's avatar 王源 🎧

修改数字判断

parent 62b50b0f
......@@ -141,9 +141,13 @@ class ExcelImporter
public function checkNumeric($data, &$errorCount)
{
foreach ($data as $k => $v) {
if (!is_numeric($v)) {
$this->setErrorMessage("{$k}只能是数字", $errorCount);
return false;
if (!$v || $v === '') {
continue;
} else {
if (!is_numeric($v)) {
$this->setErrorMessage("{$k}只能是数字", $errorCount);
return false;
}
}
}
return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment