diff --git a/Application/Admin/Controller/AggregateRelationController.class.php b/Application/Admin/Controller/AggregateRelationController.class.php index 7cd7c8a5a..5703b6540 100644 --- a/Application/Admin/Controller/AggregateRelationController.class.php +++ b/Application/Admin/Controller/AggregateRelationController.class.php @@ -400,6 +400,7 @@ class AggregateRelationController extends AdminController (second_company_type ='{$params['second_company_type']}' and second_company_id = '{$params['second_company_id']}') "; } + $params['first_company_info'] = $this->getCompanyInfo($params['first_company_type'],$params['first_company_id']); $params['first_company_info']['type'] = 'first_party_info'; $params['first_company_info'] = json_encode($params['first_company_info']); @@ -408,6 +409,25 @@ class AggregateRelationController extends AdminController $params['second_company_info']['type'] = 'second_party_info'; $params['second_company_info'] = json_encode($params['second_company_info']); + if(!$params['settlement_type']) { + $params['settlement_type'] = 0; + } + + if(!$params['invoice_type']) { + $params['invoice_type'] = 0; + } + + if ($params['first_company_type'] == 3) { + $company_info = json_decode($params['first_company_info'],true); + $company_info['invoice_item'] = $params['invoice_content']; + $params['first_company_info'] = json_encode($company_info); + + }else if ($params['second_company_type'] == 3) { + $company_info = json_decode($params['second_company_info'],true); + $company_info['invoice_item'] = $params['invoice_content']; + $params['second_company_info'] = json_encode($company_info); + } + $r_res = $this->DBModel->where($where)->find(); if(!empty($r_res)){ $this->error('当前合作方已有绑定关系'); diff --git a/Application/Admin/View/AggregateRelation/addRelation.html b/Application/Admin/View/AggregateRelation/addRelation.html index 656eadf4a..4bc8c5701 100644 --- a/Application/Admin/View/AggregateRelation/addRelation.html +++ b/Application/Admin/View/AggregateRelation/addRelation.html @@ -198,7 +198,7 @@