Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
liexin_supplier
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1b3d7409
authored
Jun 23, 2022
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
临时处理数据
parent
60ff9016
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
app/Http/Controllers/Api/SupplierApiController.php
app/Http/Controllers/Api/SupplierApiController.php
View file @
1b3d7409
...
...
@@ -295,8 +295,12 @@ class SupplierApiController extends Controller
//如果是编辑操作,则要忽略非当前
if
(
$supplierId
)
{
if
(
in_array
(
$supplierId
,
[
195
,
12263
]))
{
$this
->
response
(
0
,
'供应商名称合理'
);
}
$originSupplierName
=
$model
->
where
(
'supplier_id'
,
$supplierId
)
->
value
(
'supplier_name'
);
$existedSupplierName
=
$model
->
where
(
'supplier_name'
,
$supplierName
)
->
where
(
'supplier_name'
,
'!='
,
$originSupplierName
)
$existedSupplierName
=
$model
->
where
(
'supplier_name'
,
$supplierName
)
->
where
(
'supplier_name'
,
'!='
,
$originSupplierName
)
->
value
(
'supplier_name'
);
if
(
$supplierName
!==
$existedSupplierName
)
{
$supplierName
=
$model
->
where
(
'supplier_name'
,
'like'
,
...
...
@@ -304,8 +308,8 @@ class SupplierApiController extends Controller
if
(
!
empty
(
$supplierName
))
{
$this
->
response
(
-
2
,
'存在类似的供应商名称'
,
$supplierName
);
}
}
else
{
$this
->
response
(
-
1
,
'该供应商名称已经存在'
);
}
else
{
$this
->
response
(
-
1
,
'该供应商名称已经存在'
);
}
}
else
{
$existedSupplierName
=
$model
->
where
(
'supplier_name'
,
$supplierName
)
...
...
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