Commit b6d76169 by 杨树贤

注销判断

parent 80fde41d
......@@ -89,8 +89,11 @@ class CommonApiController extends Controller
if (in_array($region, config('field.NeedCheckCompanyRegion'))) {
$regionType = $region == SupplierChannelModel::REGION_CN ? 1 : 2;
$company = (new CompanyService())->getCompanyInfo($supplierName, $taxNumber, $regionType);
if (isset($company['regStatus']) && $company['regStatus'] == '注销') {
$this->response(-1, '该公司已经注销,不能进行录入');
}
if (!$company) {
$this->response(-1, '获取不到公司');
$this->response(-1, '验证失败,公司未进行工商注册');
}
} else {
$this->response(-2, '供应商跳过天眼查校验');
......
......@@ -77,6 +77,7 @@ class CompanyService
'phone' => $companyInfo['tyc_info']['phone_number'],
'establishment_time' => $companyInfo['establishment_time'] ? date('Y-m-d',
$companyInfo['establishment_time']) : '',
'regStatus' => !empty($companyInfo['regStatus'])?$companyInfo['regStatus']:'',
];
}
......
......@@ -488,8 +488,8 @@
})
} else {
$('#supplier_name').next('#supplier_check_tip').find('p').text(
'公司未进行工商注册');
layer.msg('验证失败,公司未进行工商注册', {
res.err_msg);
layer.msg(res.err_msg, {
icon: 5
})
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