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
cd322132
authored
Jul 04, 2022
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
欧美日韩不需要校验公司
parent
83a8662c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
7 deletions
app/Http/Controllers/Api/CommonApiController.php
app/Http/Controllers/Api/SupplierApiController.php
app/Http/Validators/SupplierValidator.php
resources/views/script/supplier/SupplierBaseScript.blade.php
app/Http/Controllers/Api/CommonApiController.php
View file @
cd322132
...
...
@@ -82,7 +82,7 @@ class CommonApiController extends Controller
$this
->
response
(
-
1
,
'获取不到公司'
);
}
}
else
{
$this
->
response
(
-
3
,
'供应商跳过天眼查校验'
);
$this
->
response
(
-
2
,
'供应商跳过天眼查校验'
);
}
$this
->
response
(
0
,
'ok'
,
$company
);
...
...
app/Http/Controllers/Api/SupplierApiController.php
View file @
cd322132
...
...
@@ -324,7 +324,7 @@ class SupplierApiController extends Controller
$this
->
response
(
-
2
,
'公司未进行工商注册,请修改后重新提交'
);
}
}
else
{
$this
->
response
(
-
3
,
'供应商跳过天眼查校验'
);
$this
->
response
(
-
2
,
'供应商跳过天眼查校验'
);
}
$this
->
response
(
0
,
'供应商名称合理'
,
$company
);
...
...
app/Http/Validators/SupplierValidator.php
View file @
cd322132
...
...
@@ -21,7 +21,7 @@ class SupplierValidator
$validateData
=
$this
->
transformRequestData
(
$validateData
);
//没有忽略校验的权限并且供应商地区属于内地和港台才会去校验天眼查
if
(
!
checkPerm
(
'IgnoreCompanyCheck'
)
&&
in_array
(
$validateData
[
'
supplier_group
'
],
if
(
!
checkPerm
(
'IgnoreCompanyCheck'
)
&&
in_array
(
$validateData
[
'
region
'
],
config
(
'field.NeedCheckCompanyRegion'
)))
{
$needCheckFlag
=
false
;
//新增的校验,然后修改的话,如果没有集团编码,并且是标准添加(非标准添加,即是特殊权限添加,不需要校验),也要去校验
...
...
resources/views/script/supplier/SupplierBaseScript.blade.php
View file @
cd322132
...
...
@@ -50,15 +50,16 @@
success
:
function
(
res
)
{
if
(
supplier_name
!==
''
||
tax_number
!==
''
)
{
if
(
res
.
err_code
!==
0
)
{
//当code=-2的时候,是公司信息校验有问题,但是如果有跳过检查权限,那么就什么都不处理
//当code=-2的时候,是公司信息校验有问题,但是如果有跳过检查权限
或者是非大陆港台地区的
,那么就什么都不处理
if
(
res
.
err_code
===
-
2
)
{
if
(
!
inArray
(
region
,
[
2
,
4
]))
{
return
;
}
if
(
!
ignoreCompanyCheck
)
{
layer
.
msg
(
res
.
err_msg
,
{
icon
:
5
});
self
.
next
(
'#supplier_check_tip'
).
find
(
'p'
).
text
(
res
.
err_msg
);
$
(
'#supplier_name'
).
prop
(
'disabled'
,
false
);
}
}
else
if
(
res
.
err_code
===
-
3
)
{
//跳过天眼查校验
}
else
{
//这个code代表供应商名称已经存在,自然要检测
layer
.
msg
(
res
.
err_msg
,
{
icon
:
5
});
...
...
@@ -289,7 +290,13 @@
let
supplierName
=
$
(
'#supplier_name'
).
val
();
let
taxNumber
=
$
(
'#tax_number'
).
val
();
let
region
=
$
(
'#region'
).
val
();
admin
.
btnLoading
(
'#recheck_company_info'
,
'正在查验公司信息,请稍等...'
);
if
(
!
inArray
(
region
,
[
2
,
4
]))
{
layer
.
msg
(
'该供应商地区不为国内或者港台,无法查验'
,
{
icon
:
5
});
admin
.
btnLoading
(
'#recheck_company_info'
,
false
);
return
;
}
if
(
!
supplierName
&&
!
taxNumber
)
{
layer
.
msg
(
'请填写供应商名称或者税号后再进行查验'
,
{
icon
:
5
});
admin
.
btnLoading
(
'#recheck_company_info'
,
false
);
...
...
@@ -321,7 +328,7 @@
layer
.
msg
(
'公司未进行工商注册'
,
{
icon
:
5
})
}
else
{
$
(
'#supplier_name'
).
next
(
'#supplier_check_tip'
).
find
(
'p'
).
text
(
'公司未进行工商注册,请修改后重新提交'
);
layer
.
msg
(
'验证失败,公司未进行工商注册
,请修改后重新提交
'
,
{
icon
:
5
})
layer
.
msg
(
'验证失败,公司未进行工商注册'
,
{
icon
:
5
})
resetCompanyInfo
(
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