Commit b6d76169 by 杨树贤

注销判断

parent 80fde41d
...@@ -89,8 +89,11 @@ class CommonApiController extends Controller ...@@ -89,8 +89,11 @@ class CommonApiController extends Controller
if (in_array($region, config('field.NeedCheckCompanyRegion'))) { if (in_array($region, config('field.NeedCheckCompanyRegion'))) {
$regionType = $region == SupplierChannelModel::REGION_CN ? 1 : 2; $regionType = $region == SupplierChannelModel::REGION_CN ? 1 : 2;
$company = (new CompanyService())->getCompanyInfo($supplierName, $taxNumber, $regionType); $company = (new CompanyService())->getCompanyInfo($supplierName, $taxNumber, $regionType);
if (isset($company['regStatus']) && $company['regStatus'] == '注销') {
$this->response(-1, '该公司已经注销,不能进行录入');
}
if (!$company) { if (!$company) {
$this->response(-1, '获取不到公司'); $this->response(-1, '验证失败,公司未进行工商注册');
} }
} else { } else {
$this->response(-2, '供应商跳过天眼查校验'); $this->response(-2, '供应商跳过天眼查校验');
......
...@@ -77,6 +77,7 @@ class CompanyService ...@@ -77,6 +77,7 @@ class CompanyService
'phone' => $companyInfo['tyc_info']['phone_number'], 'phone' => $companyInfo['tyc_info']['phone_number'],
'establishment_time' => $companyInfo['establishment_time'] ? date('Y-m-d', 'establishment_time' => $companyInfo['establishment_time'] ? date('Y-m-d',
$companyInfo['establishment_time']) : '', $companyInfo['establishment_time']) : '',
'regStatus' => !empty($companyInfo['regStatus'])?$companyInfo['regStatus']:'',
]; ];
} }
......
...@@ -488,8 +488,8 @@ ...@@ -488,8 +488,8 @@
}) })
} else { } else {
$('#supplier_name').next('#supplier_check_tip').find('p').text( $('#supplier_name').next('#supplier_check_tip').find('p').text(
'公司未进行工商注册'); res.err_msg);
layer.msg('验证失败,公司未进行工商注册', { layer.msg(res.err_msg, {
icon: 5 icon: 5
}) })
resetCompanyInfo(supplierName !== ''); resetCompanyInfo(supplierName !== '');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment