Commit 07c9648b authored by 王源's avatar 王源 🎧

优化excel导入

parent 462e1ea9
......@@ -124,6 +124,9 @@ class ExcelImporter
public function checkRequire($requires, &$errorCount)
{
foreach ($requires as $k => $v) {
if ($v == '0') {
continue;
}
if (!$v || $v === '') {
$this->setErrorMessage($k . "不能为空", $errorCount);
return false;
......@@ -141,7 +144,7 @@ class ExcelImporter
public function checkNumeric($data, &$errorCount)
{
foreach ($data as $k => $v) {
if (!$v || $v === '') {
if (!$v || $v === '' || $v == '0') {
continue;
} else {
if (!is_numeric($v)) {
......
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