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
0b98a151
authored
Jul 26, 2022
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
供应商名称
parent
1754e2bb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
17 deletions
app/Http/Validators/SupplierValidator.php
app/Http/Validators/SupplierValidator.php
View file @
0b98a151
...
@@ -32,23 +32,21 @@ class SupplierValidator
...
@@ -32,23 +32,21 @@ class SupplierValidator
return
'供应商名称不能为空'
;
return
'供应商名称不能为空'
;
}
}
if
(
$validateData
[
'supplier_name'
])
{
//新增的时候要先去检验下一体化的数据,如果是实体黑名单用户,那么就不允许新增
//新增的时候要先去检验下一体化的数据,如果是实体黑名单用户,那么就不允许新增
$regionType
=
$validateData
[
'region'
]
==
SupplierChannelModel
::
REGION_CN
?
1
:
2
;
$regionType
=
$validateData
[
'region'
]
==
SupplierChannelModel
::
REGION_CN
?
1
:
2
;
//还要校验提交上来的公司是否有合法信息
//还要校验提交上来的公司是否有合法信息
$unitedCompanyInfo
=
(
new
CompanyService
())
->
getUnitedCompanyInfo
(
$validateData
[
'supplier_name'
],
$unitedCompanyInfo
=
(
new
CompanyService
())
->
getUnitedCompanyInfo
(
$validateData
[
'supplier_name'
],
$validateData
[
'tax_number'
],
$validateData
[
'tax_number'
],
$regionType
);
$regionType
);
$unitedInfo
=
$unitedCompanyInfo
[
'united_company_info'
];
$unitedInfo
=
$unitedCompanyInfo
[
'united_company_info'
];
if
(
$unitedInfo
&&
$isAdd
)
{
if
(
$unitedInfo
&&
$isAdd
)
{
if
(
$unitedInfo
[
'is_entity'
]
==
1
)
{
if
(
$unitedInfo
[
'is_entity'
]
==
1
)
{
return
'该供应商已经被一体化系统加入黑名单,不能新增'
;
return
'该供应商已经被一体化系统加入黑名单,不能新增'
;
}
}
if
(
$unitedInfo
[
'company_category'
]
!=
''
)
{
if
(
$unitedInfo
[
'company_category'
]
!=
''
)
{
if
(
$unitedInfo
[
'company_category'
]
!=
'普通供应商'
)
{
if
(
$unitedInfo
[
'company_category'
]
!=
'普通供应商'
)
{
return
'该供应商已经被一体化系统加入黑名单,不能新增'
;
return
'该供应商已经被一体化系统加入黑名单,不能新增'
;
}
}
}
}
}
}
}
...
@@ -133,7 +131,7 @@ class SupplierValidator
...
@@ -133,7 +131,7 @@ class SupplierValidator
if
(
!
$isAdd
)
{
if
(
!
$isAdd
)
{
$supplier
=
SupplierChannelModel
::
where
(
'supplier_id'
,
$validateData
[
'supplier_id'
])
$supplier
=
SupplierChannelModel
::
where
(
'supplier_id'
,
$validateData
[
'supplier_id'
])
->
first
()
->
toArray
();
->
first
()
->
toArray
();
if
(
$supplier
[
'create_time'
]
<
Carbon
::
createFromDate
(
2022
,
6
,
30
)
->
timestamp
)
{
if
(
$supplier
[
'create_time'
]
<
Carbon
::
createFromDate
(
2022
,
6
,
30
)
->
timestamp
)
{
$rules
[
'registered_capital'
]
=
''
;
$rules
[
'registered_capital'
]
=
''
;
}
}
}
}
...
...
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