Commit f0d87da8 by 杨树贤

校验

parent 11696ef8
......@@ -72,7 +72,9 @@ class CommonApiController extends Controller
//请求天眼查校验接口
$supplierName = $request->get('supplier_name');
$taxNumber = $request->get('tax_number');
$company = (new CompanyService())->getCompanyInfo($supplierName, $taxNumber);
$region = $request->get('region');
$regionType = $region == 2 ? 1 : 2;
$company = (new CompanyService())->getCompanyInfo($supplierName, $taxNumber, $regionType);
if (!$company) {
$this->response(-1, '获取不到公司');
}
......
......@@ -278,6 +278,7 @@
$('#recheck_company_info').click(function () {
let supplierName = $('#supplier_name').val();
let taxNumber = $('#tax_number').val();
let region = $('#region').val();
admin.btnLoading('#recheck_company_info', '正在查验公司信息,请稍等...');
if (!supplierName && !taxNumber) {
layer.msg('请填写供应商名称或者税号后再进行查验', {icon: 5});
......@@ -285,7 +286,7 @@
return false;
}
$('#supplier_check_tip').remove();
let url = '/api/common/checkCompanyInfo?supplier_name=' + supplierName + '&tax_number=' + taxNumber;
let url = '/api/common/checkCompanyInfo?supplier_name=' + supplierName + '&tax_number=' + taxNumber + '&region=' + region;
$.ajax({
url: url,
type: 'GET',
......
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