From a2d68a2752ffddc3371f18f30987a76a0637f144 Mon Sep 17 00:00:00 2001 From: zyx Date: Thu, 1 Oct 2020 19:50:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B1=87=E6=80=BB=E7=8A=B6=E6=80=81=E7=9A=84?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...regateFinanceStatementController.class.php | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/Application/Admin/Controller/AggregateFinanceStatementController.class.php b/Application/Admin/Controller/AggregateFinanceStatementController.class.php index 74a1b5337..7f72a3510 100644 --- a/Application/Admin/Controller/AggregateFinanceStatementController.class.php +++ b/Application/Admin/Controller/AggregateFinanceStatementController.class.php @@ -163,9 +163,9 @@ class AggregateFinanceStatementController extends ThinkController if ($company_info['collection'] == 1) { $pay_company_id = 0; $this->assign('first_channel_id',$id); - $this->assign('second_company_id',$company_info['second_company_id']); + $this->assign('second_company_id',$id); } else if ($company_info['collection'] == 2) { - $this->assign('first_channel_id',$company_info['first_company_id']); + $this->assign('first_channel_id',$id); $this->assign('second_company_id',$id); $pay_company_id = 1; } @@ -230,11 +230,15 @@ class AggregateFinanceStatementController extends ThinkController public function getCompanyList() { $id = $_REQUEST['id']; - $cpCompany = M("aggregate_statement","tab_")->field("id,second_party_info")->where("id={$id}")->find(); + $cpCompany = M("aggregate_statement","tab_")->field("id,first_party_info,second_party_info")->where("id={$id}")->find(); $data = array(); - $data['ptCompany']= M("CompanyInfo","tab_")->field('id,partner')->select(); - $data['cpCompany']= [[ +// $data['ptCompany']= M("CompanyInfo","tab_")->field('id,partner')->select(); + $data['ptCompany']=[[ + "id"=> $cpCompany['id'], + "partner"=>json_decode($cpCompany['first_party_info'],true)['partner'] + ]]; + $data['cpCompany']= [[ "id"=> $cpCompany['id'], "partner"=>json_decode($cpCompany['second_party_info'],true)['partner'] ]]; @@ -245,7 +249,10 @@ class AggregateFinanceStatementController extends ThinkController $CompanyId = $_REQUEST['company_id']; $company_type = $_REQUEST['company_type']; if($company_type == 'pt'){ - $info = M("CompanyInfo","tab_")->field("id,partner,link_man,link_phone,address,company_tax_no,payee_name,bank_account,opening_bank")->where("id = '{$CompanyId}'")->find(); +// $info = M("CompanyInfo","tab_")->field("id,partner,link_man,link_phone,address,company_tax_no,payee_name,bank_account,opening_bank")->where("id = '{$CompanyId}'")->find(); + + $cpCompany = M("aggregate_statement","tab_")->field("channel_id id,first_party_info,channel_id")->where("id={$CompanyId}")->find(); + $info = json_decode($cpCompany['first_party_info'],true); }else{ $cpCompany = M("aggregate_statement","tab_")->field("channel_id id,second_party_info,channel_id")->where("id={$CompanyId}")->find();