Merge branch 'feature/group_type' into dev

master
liuweiwen 5 years ago
commit 2d060e6e72

@ -1830,7 +1830,7 @@ function getCompanyList() {
//上游cp对账单导出 //上游cp对账单导出
function excelUpStreamTemplate($data, $all_sum_money, $all_pay_amount, $big_all_sum_money) { function excelUpStreamTemplate($data, $all_sum_money, $all_pay_amount, $big_all_sum_money) {
header("Content-type: text/html; charset=gb2312"); header("Content-type: text/html; charset=utf-8");
error_reporting(E_ALL); error_reporting(E_ALL);
ini_set('display_errors', TRUE); ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE); ini_set('display_startup_errors', TRUE);
@ -1901,10 +1901,15 @@ function excelUpStreamTemplate($data, $all_sum_money, $all_pay_amount, $big_all_
$objPHPExcel->getActiveSheet()->setCellValue("J" . ($line+3), $data['pay_company']['bank_account']); $objPHPExcel->getActiveSheet()->setCellValue("J" . ($line+3), $data['pay_company']['bank_account']);
$objPHPExcel->getActiveSheet()->setCellValue("J" . ($line+4), $data['pay_company']['opening_bank']); $objPHPExcel->getActiveSheet()->setCellValue("J" . ($line+4), $data['pay_company']['opening_bank']);
$statement_begin_time = date('Y.m.d', $data['statement_begin_time']);//对账开始时间
$statement_end_time = date('Y.m.d',$data['statement_end_time']);//对账截止时间
$fileName = "{$data['second_party_info']['partner']}&{$data['first_party_info']['partner']}-对账单{$statement_begin_time}-{$statement_end_time}";
ob_end_clean();//清除缓冲区,避免乱码 ob_end_clean();//清除缓冲区,避免乱码
header('pragma:public'); header('pragma:public');
header('Content-type:application/vnd.ms-excel;charset=utf-8;name="上游结算单.xls"'); header('Content-type:application/vnd.ms-excel;charset=utf-8;name="' . $fileName .'".xls');
header("Content-Disposition:attachment;filename=上游结算单.xls");//attachment新窗口打印inline本窗口打印 header("Content-Disposition:attachment;filename={$fileName}.xls");//attachment新窗口打印inline本窗口打印
$objWriter = \PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); $objWriter = \PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save('php://output'); $objWriter->save('php://output');
exit; exit;
@ -1929,8 +1934,8 @@ function excelDownStreamTemplate($data, $all_sum_money, $all_pay_amount, $big_al
//设置模板文件 //设置模板文件
$objPHPExcel = $objReader->load("Public/Admin/excel/down_stream.xls"); $objPHPExcel = $objReader->load("Public/Admin/excel/down_stream.xls");
$statement_begin_time = set_show_time($data['statement_begin_time']);//对账开始时间 $statement_begin_time = date('Y.m.d', $data['statement_begin_time']);//对账开始时间
$statement_end_time = set_show_time($data['statement_end_time']);//对账截止时间 $statement_end_time = date('Y.m.d',$data['statement_end_time']);//对账截止时间
$objPHPExcel->getActiveSheet()->setCellValue('A1', "《 {$data['company_name']} 》结算单 $objPHPExcel->getActiveSheet()->setCellValue('A1', "《 {$data['company_name']} 》结算单
{$statement_begin_time}-{$statement_end_time}"); {$statement_begin_time}-{$statement_end_time}");
@ -1983,11 +1988,12 @@ function excelDownStreamTemplate($data, $all_sum_money, $all_pay_amount, $big_al
$objPHPExcel->getActiveSheet()->setCellValue('E'.($line+9), $data['second_party_info']['bank_account']);//银行账号 $objPHPExcel->getActiveSheet()->setCellValue('E'.($line+9), $data['second_party_info']['bank_account']);//银行账号
$objPHPExcel->getActiveSheet()->setCellValue('E'.($line+10), $data['second_party_info']['opening_bank']);//开户行 $objPHPExcel->getActiveSheet()->setCellValue('E'.($line+10), $data['second_party_info']['opening_bank']);//开户行
$filename = '下游结算单'; $fileName = "{$data['second_party_info']['partner']}&{$data['first_party_info']['jfCompany']}-对账单{$statement_begin_time}-{$statement_end_time}";
// dd($fileName);
ob_end_clean();//清除缓冲区,避免乱码 ob_end_clean();//清除缓冲区,避免乱码
header('pragma:public'); header('pragma:public');
header('Content-type:application/vnd.ms-excel;charset=utf-8;name="15415.xls"'); header('Content-type:application/vnd.ms-excel;charset=utf-8;name="' . $fileName .'".xls');
header("Content-Disposition:attachment;filename=$filename.xls");//attachment新窗口打印inline本窗口打印 header("Content-Disposition:attachment;filename={$fileName}.xls");//attachment新窗口打印inline本窗口打印
$objWriter = \PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); $objWriter = \PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save('php://output'); $objWriter->save('php://output');
exit; exit;

Loading…
Cancel
Save