Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
meibuyu-rpc
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
without authentication
meibuyu-rpc
Commits
07c9648b
Commit
07c9648b
authored
Jun 24, 2020
by
王源
🎧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化excel导入
parent
462e1ea9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
ExcelImporter.php
src/Tools/ExcelImporter.php
+4
-1
No files found.
src/Tools/ExcelImporter.php
View file @
07c9648b
...
@@ -124,6 +124,9 @@ class ExcelImporter
...
@@ -124,6 +124,9 @@ class ExcelImporter
public
function
checkRequire
(
$requires
,
&
$errorCount
)
public
function
checkRequire
(
$requires
,
&
$errorCount
)
{
{
foreach
(
$requires
as
$k
=>
$v
)
{
foreach
(
$requires
as
$k
=>
$v
)
{
if
(
$v
==
'0'
)
{
continue
;
}
if
(
!
$v
||
$v
===
''
)
{
if
(
!
$v
||
$v
===
''
)
{
$this
->
setErrorMessage
(
$k
.
"不能为空"
,
$errorCount
);
$this
->
setErrorMessage
(
$k
.
"不能为空"
,
$errorCount
);
return
false
;
return
false
;
...
@@ -141,7 +144,7 @@ class ExcelImporter
...
@@ -141,7 +144,7 @@ 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
===
''
)
{
if
(
!
$v
||
$v
===
''
||
$v
==
'0'
)
{
continue
;
continue
;
}
else
{
}
else
{
if
(
!
is_numeric
(
$v
))
{
if
(
!
is_numeric
(
$v
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment