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
11663ccf
authored
Jul 11, 2022
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
附件问题
parent
8f47a49b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
17 deletions
app/Http/Validators/SupplierValidator.php
app/Http/Validators/SupplierValidator.php
View file @
11663ccf
...
...
@@ -123,15 +123,6 @@ class SupplierValidator
$errorMessageList
[]
=
'该供应商是代购供应商,不能修改为临时供应商'
;
}
/**
* --->>附件必填要求:
* 如果供应商类别为正式供应商,营业执照必须上传(结算币种为人民币);
* 如果供应商类别为临时供应商,营业执照必须上传(结算币种为人民币),品质保证协议不需要上传
* 必须上传品质保证协议才能成为正式供应商,没有上传品质保证协议只能为临时供应商(代理商跟原厂类型的供应商不需要上传品质保证协议)。
* 供应商类型为代理商的,需要上传代理证才能成为正式供应商,没有上传代理证的只能为临时供应商。
* 非国内的供应商,商业登记证不能为空
**/
//只有在提交供应商是正式的时候,才会去校验附件
//校验附件这块,新增和修改判断的逻辑不一样
...
...
@@ -147,8 +138,15 @@ class SupplierValidator
}
else
{
$attachmentFields
=
array_unique
(
$attachmentFields
);
//fixed.php FileNameMapping 可以知道所有对应关系
if
(
!
in_array
(
'business_license'
,
$attachmentFields
))
{
$errorMessageList
[]
=
'营业执照必须上传'
;
if
(
!
in_array
(
'business_license'
,
$attachmentFields
)
&&
$validateData
[
'region'
]
==
SupplierChannelModel
::
REGION_CN
)
{
$errorMessageList
[]
=
'国内供应商必须上传营业执照'
;
}
if
(
$validateData
[
'region'
]
!=
SupplierChannelModel
::
REGION_CN
)
{
if
(
!
in_array
(
'registration_certificate'
,
$attachmentFields
))
{
$errorMessageList
[]
=
'海外供应商必须上传商业登记证/PI'
;
}
}
// if (!in_array('billing_information', $attachmentFields) && $validateData['currency'] == 1) {
...
...
@@ -189,12 +187,6 @@ class SupplierValidator
}
}
// if ($validateData['region'] != 2) {
// if (!in_array('registration_certificate', $attachmentFields)) {
// $errorMessageList[] = '海外供应商必须上传商业登记证/PI';
// }
// }
}
...
...
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