diff --git a/Application/Admin/Controller/AggregateFinanceStatementController.class.php b/Application/Admin/Controller/AggregateFinanceStatementController.class.php index 2abdd79cb..a473d930b 100644 --- a/Application/Admin/Controller/AggregateFinanceStatementController.class.php +++ b/Application/Admin/Controller/AggregateFinanceStatementController.class.php @@ -600,14 +600,14 @@ class AggregateFinanceStatementController extends ThinkController $objPHPExcel->getActiveSheet()->setCellValue('E'.($line+6), $data['second_party_info']['address']);//邮寄地址 //开票信息 - $invoice_data = "发票类型:".$data['second_party_info']['invoice_type']; - $invoice_data .= "\n发票抬头:".$data['second_party_info']['partner']; - $invoice_data .= "\n纳税人识别号:".$data['second_party_info']['company_tax_no']; + $invoice_data = "发票类型:".$data['pay_company']['invoice_type']; + $invoice_data .= "\n发票抬头:".$data['pay_company']['partner']; + $invoice_data .= "\n纳税人识别号:".$data['pay_company']['company_tax_no']; - $invoice_data .= "\n开户银行:".$data['second_party_info']['opening_bank']; - $invoice_data .= "\n开户账号:".$data['second_party_info']['payee_name']; - $invoice_data .= "\n开票内容:".$data['second_party_info']['invoice_item']; - $invoice_data .= "\n注册地址及电话:".$data['second_party_info']['register_address'].",".$data['second_party_info']['register_phone']; + $invoice_data .= "\n开户银行:".$data['pay_company']['opening_bank']; + $invoice_data .= "\n开户账号:".$data['pay_company']['bank_account']; + $invoice_data .= "\n开票内容:".$data['pay_company']['invoice_item']; + $invoice_data .= "\n注册地址及电话:".$data['pay_company']['register_address'].",".$data['second_party_info']['register_phone']; $objPHPExcel->getActiveSheet()->setCellValue('B'.($line+7), $invoice_data);//乙方 diff --git a/Application/Admin/Controller/AggregateRelationController.class.php b/Application/Admin/Controller/AggregateRelationController.class.php index 7dc8fa918..909e6e784 100644 --- a/Application/Admin/Controller/AggregateRelationController.class.php +++ b/Application/Admin/Controller/AggregateRelationController.class.php @@ -114,8 +114,8 @@ class AggregateRelationController extends AdminController unset($GetData['export']); addOperationLog(['op_type'=>3,'key'=>getNowDate(),"op_name"=>"导出",'url'=>U(CONTROLLER_NAME.'/'.ACTION_NAME,$GetData)]); data2csv($dbres,'公司绑定生效列表',array( - "first_company_name"=>"甲方公司类型", - "first_company_type"=>"甲方公司", + "first_company_name"=>"甲方公司", + "first_company_type"=>"甲方公司类型", "second_company_name"=>"乙方公司", "second_company_type"=>"乙方公司类型", "settlement_type"=>"结算周期", @@ -511,6 +511,18 @@ class AggregateRelationController extends AdminController (second_company_type ='{$p['second_company_type']}' and second_company_id = '{$p['second_company_id']}') "; } + + if ($y['first_company_type'] == 3) { + $company_info = json_decode($y['first_company_info'],true); + $company_info['invoice_item'] = $p['invoice_content']; + $p['first_company_info'] = json_encode($company_info); + + }else if ($y['second_company_type'] == 3) { + $company_info = json_decode($y['second_company_info'],true); + $company_info['invoice_item'] = $p['invoice_content']; + $p['second_company_info'] = json_encode($company_info); + } + $hasdb = $this->DBlogModel->where($where)->find(); if(!empty($hasdb)){ //覆盖 @@ -529,10 +541,17 @@ class AggregateRelationController extends AdminController $id = $params['id'] ?? 0; $id = intval($id); $map['id'] = $id; + $dbres = $this->DBModel->where($map)->find(); $this->assign('first_company_info',$this->getCompanyInfo($dbres['first_company_type'],$dbres['first_company_id'])); $this->assign('second_company_info',$this->getCompanyInfo($dbres['second_company_type'],$dbres['second_company_id'])); + $check_data = [688,689,690,691]; + + if(in_array($dbres['first_company_id'],$check_data)||in_array($dbres['second_company_id'],$check_data)) { + $this->assign('hav_check',1); + } + $dbres['first_company_type'] =$this->CompanyType[$dbres['first_company_type']]; $dbres['second_company_type'] =$this->CompanyType[$dbres['second_company_type']]; @@ -641,6 +660,12 @@ class AggregateRelationController extends AdminController $this->getAggegateCompanyInfo($id); //聚合下游 $companyInfo = $this->aggregateCompanyInfo; + + if($companyInfo['invoice_type'] == 1) { + $companyInfo['invoice_type'] = '专票'; + } else if($companyInfo['invoice_type'] == 2) { + $companyInfo['invoice_type'] = '普票'; + } } if(isset($companyInfo['company_belong'])){ $companyInfo['company_belong'] = getCompanyBlong($companyInfo['company_belong']); diff --git a/Application/Admin/View/AggregateRelation/addRelation.html b/Application/Admin/View/AggregateRelation/addRelation.html index 97770e130..656eadf4a 100644 --- a/Application/Admin/View/AggregateRelation/addRelation.html +++ b/Application/Admin/View/AggregateRelation/addRelation.html @@ -400,7 +400,7 @@ $(function(){ $('#invoice_type').find("option").each(function() { $(this).removeAttr("selected"); }); - console.log(invoice_type) + if (!invoice_type) { $('#invoice_type').removeAttr("disabled"); } else { diff --git a/Application/Admin/View/AggregateRelation/edit.html b/Application/Admin/View/AggregateRelation/edit.html index 96a3a7a87..f0913208b 100644 --- a/Application/Admin/View/AggregateRelation/edit.html +++ b/Application/Admin/View/AggregateRelation/edit.html @@ -151,7 +151,7 @@ *结算周期: - disabled> @@ -162,7 +162,7 @@ *开票类型: - disabled>