Commit 0042a95d by 杨树贤

自动填充成立时间

parent 0a415adc
...@@ -31,12 +31,16 @@ class CompanyService ...@@ -31,12 +31,16 @@ class CompanyService
$companyInfoList = array_get(array_get($result['data'], 'tycList'), 'company_info_list'); $companyInfoList = array_get(array_get($result['data'], 'tycList'), 'company_info_list');
if (!empty($companyInfoList)) { if (!empty($companyInfoList)) {
$companyInfo = $companyInfoList[0]; $companyInfo = $companyInfoList[0];
$companyInfo['establishment_time'] = $companyInfo['establishment_time'] ? substr($companyInfo['establishment_time'],
0, 10) : 0;
$company = [ $company = [
'supplier_name' => $companyInfo['com_name'] == $supplierName ? $companyInfo['com_name'] : $companyInfo['en_com_name'], 'supplier_name' => $companyInfo['com_name'] == $supplierName ? $companyInfo['com_name'] : $companyInfo['en_com_name'],
'registered_capital' => (int)$companyInfo['registered_capital'], 'registered_capital' => (int)$companyInfo['registered_capital'],
'supplier_address' => $companyInfo['com_address'], 'supplier_address' => $companyInfo['com_address'],
'tax_number' => $companyInfo['tyc_info']['tax_number'], 'tax_number' => $companyInfo['tyc_info']['tax_number'],
'phone' => $companyInfo['tyc_info']['phone_number'], 'phone' => $companyInfo['tyc_info']['phone_number'],
'establishment_time' => $companyInfo['establishment_time'] ? date('Y-m-d',
$companyInfo['establishment_time']) : '',
]; ];
} }
$unitedCompanyInfo['company'] = $company; $unitedCompanyInfo['company'] = $company;
......
...@@ -83,6 +83,7 @@ ...@@ -83,6 +83,7 @@
$('#phone').val(companyInfo.phone); $('#phone').val(companyInfo.phone);
$('#supplier_address').val(companyInfo.supplier_address); $('#supplier_address').val(companyInfo.supplier_address);
$('#registered_capital').val(companyInfo.registered_capital); $('#registered_capital').val(companyInfo.registered_capital);
$('#established_time').val(companyInfo.establishment_time);
layer.msg('校验公司信息通过,自动补全相关数据', {icon: 6}) layer.msg('校验公司信息通过,自动补全相关数据', {icon: 6})
if (!ignoreCompanyCheck) { if (!ignoreCompanyCheck) {
......
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