|
|
|
@ -72,6 +72,8 @@ class Import extends ImportModel |
|
|
|
|
{ |
|
|
|
|
// 读取excel文件内容 |
|
|
|
|
$execlData = $this->readExecl(); |
|
|
|
|
// var_dump($execlData); |
|
|
|
|
// exit(); |
|
|
|
|
// 验证导入的商品数量是否合法 |
|
|
|
|
$this->checkLimit($execlData); |
|
|
|
|
|
|
|
|
@ -331,11 +333,11 @@ class Import extends ImportModel |
|
|
|
|
// 去除标题数据 |
|
|
|
|
unset($original[1]); |
|
|
|
|
// 过滤空行和无效的内容 |
|
|
|
|
foreach ($original as $key => $row) { |
|
|
|
|
if (!is_numeric($row['A']) || empty($row['A'])) { |
|
|
|
|
unset($original[$key]); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// foreach ($original as $key => $row) { |
|
|
|
|
// if (!is_numeric($row['A']) || empty($row['A'])) { |
|
|
|
|
// unset($original[$key]); |
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
return $original; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|