From 5bec0ba91c8b7293cfcde5fe4e1def910d786b7f Mon Sep 17 00:00:00 2001 From: zyx Date: Thu, 1 Oct 2020 19:37:59 +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 | 39 +++++++++++-------- .../createStatement.html | 6 ++- 2 files changed, 26 insertions(+), 19 deletions(-) diff --git a/Application/Admin/Controller/AggregateFinanceStatementController.class.php b/Application/Admin/Controller/AggregateFinanceStatementController.class.php index 00f678bb7..74a1b5337 100644 --- a/Application/Admin/Controller/AggregateFinanceStatementController.class.php +++ b/Application/Admin/Controller/AggregateFinanceStatementController.class.php @@ -11,7 +11,7 @@ class AggregateFinanceStatementController extends ThinkController "-4"=>"汇总审批拒绝", "-3"=>"撤销汇总", "-1"=>"审批拒绝", - "0"=>"未申请开票", + "0"=>"未审批", "1"=>"申请开票", "2"=>"审批同意", "3"=>"已开票", @@ -162,7 +162,11 @@ class AggregateFinanceStatementController extends ThinkController $this->setAggregateDetail(2,1,'申请开票',$id); 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']); } else if ($company_info['collection'] == 2) { + $this->assign('first_channel_id',$company_info['first_company_id']); + $this->assign('second_company_id',$id); $pay_company_id = 1; } // dump($pay_company_id);die(); @@ -170,8 +174,7 @@ class AggregateFinanceStatementController extends ThinkController $this->assign("pay_company_id",$pay_company_id); $this->assign('first_partner_type',$first_partner_type); - $this->assign('first_channel_id',$company_info['first_company_id']); - $this->assign('second_company_id',$company_info['second_company_id']); + $statement_info = json_decode($info['statement_info'],true); $this->assign('company_info',$company_info); @@ -212,6 +215,7 @@ class AggregateFinanceStatementController extends ThinkController "verify_status"=>$verify_status, "create_time"=>time() ); + $id = $_REQUEST['statement_id']; $res = M("aggregate_statement","tab_")->where("id = '{$id}'")->save($adddata); if($res !== false){ @@ -226,7 +230,7 @@ class AggregateFinanceStatementController extends ThinkController public function getCompanyList() { $id = $_REQUEST['id']; - $cpCompany = M("aggregate_statement","tab_")->field("channel_id id,second_party_info")->where("id={$id}")->find(); + $cpCompany = M("aggregate_statement","tab_")->field("id,second_party_info")->where("id={$id}")->find(); $data = array(); $data['ptCompany']= M("CompanyInfo","tab_")->field('id,partner')->select(); @@ -243,10 +247,11 @@ class AggregateFinanceStatementController extends ThinkController 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(); }else{ - $cpCompany = M("aggregate_statement","tab_")->field("channel_id id,second_party_info,channel_id")->where("channel_id={$CompanyId}")->find(); + $cpCompany = M("aggregate_statement","tab_")->field("channel_id id,second_party_info,channel_id")->where("id={$CompanyId}")->find(); + $info = json_decode($cpCompany['second_party_info'],true); - $relation = M("company_relation","tab_")->where("first_company_id={$cpCompany['channel_id']} or second_company_id = {$cpCompany['channel_id']}")->find(); +// $relation = M("company_relation","tab_")->where("(first_company_id={$cpCompany['channel_id']} and first_company_type=3) or (second_company_id = {$cpCompany['channel_id']} and first_company_type=3)")->find(); // $info['link_man'] = $info['connection_person']; // $info['link_phone'] = $info['phone']; // $info['address'] = $info['send_address']; @@ -257,17 +262,17 @@ class AggregateFinanceStatementController extends ThinkController // $info['company_tax_no'] = $info['tax_identification_number']; } - $info['invoice_item'] = "信息技术服务费"; - $info['invoice_type'] = "增值税专用发票"; - - if ($relation['invoice_type'] == 1) { - $info['invoice_type'] = "专票"; - } else if($relation['invoice_type'] == 2) { - $info['invoice_type'] = "普票"; - } - if($relation['invoice_content']) { - $info['invoice_item'] = $relation['invoice_content']; - } +// $info['invoice_item'] = "信息技术服务费"; +// $info['invoice_type'] = "增值税专用发票"; +// +// if ($relation['invoice_type'] == 1) { +// $info['invoice_type'] = "专票"; +// } else if($relation['invoice_type'] == 2) { +// $info['invoice_type'] = "普票"; +// } +// if($relation['invoice_content']) { +// $info['invoice_item'] = $relation['invoice_content']; +// } if(empty($info)){ $this->ajaxReturn(array("error"=>"no find","code"=>2000)); diff --git a/Application/Admin/View/AggregateFinanceStatement/createStatement.html b/Application/Admin/View/AggregateFinanceStatement/createStatement.html index cd9724958..75a4280e7 100644 --- a/Application/Admin/View/AggregateFinanceStatement/createStatement.html +++ b/Application/Admin/View/AggregateFinanceStatement/createStatement.html @@ -627,7 +627,9 @@ }else{ company_type = "cp"; } + console.log(comid) PUBLIC.postData(url,{company_id:comid,company_type:company_type},function(data){ + DATAOBJ.second_part_company = data.success.partner; DATAOBJ.second_party_info = data.success; data.success.type = "second_party_info"; @@ -865,7 +867,7 @@ EVENT.changeStatementType(); } var pay_company_id = "{$pay_company_id}"; - console.log(pay_company_id) + // $("#second_partner_id").val(second_company_id); $('#statement_type').find('option[value='+pay_company_id+']').prop('selected',true); $("#statement_type").change(); @@ -897,7 +899,7 @@ showStatementList(flag){ if(flag){ var data = {list:DATAOBJ.statement_info,count:DATAOBJ.statement_count,fine:DATAOBJ.fine}; - console.log(DATAOBJ); + $("#statementInit").addClass("hidebox"); var tpl =$("#statementTpl").html(); var html = juicer(tpl, data);