Commit cd322132 by 杨树贤

欧美日韩不需要校验公司

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