|
|
|
@ -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']);
|
|
|
|
|