Commit 92b4c105 authored by 王源's avatar 王源
Browse files

修改数字判断

parent 62b50b0f
Loading
Loading
Loading
Loading
+7 −3
Original line number Original line Diff line number Diff line
@@ -141,11 +141,15 @@ class ExcelImporter
    public function checkNumeric($data, &$errorCount)
    public function checkNumeric($data, &$errorCount)
    {
    {
        foreach ($data as $k => $v) {
        foreach ($data as $k => $v) {
            if (!$v || $v === '') {
                continue;
            } else {
                if (!is_numeric($v)) {
                if (!is_numeric($v)) {
                    $this->setErrorMessage("{$k}只能是数字", $errorCount);
                    $this->setErrorMessage("{$k}只能是数字", $errorCount);
                    return false;
                    return false;
                }
                }
            }
            }
        }
        return true;
        return true;
    }
    }