caipin 5 년 전
부모
커밋
4e68e224a2
1개의 변경된 파일7개의 추가작업 그리고 6개의 파일을 삭제
  1. 7 6
      protected/class/receipt.func.php

+ 7 - 6
protected/class/receipt.func.php

@@ -1725,17 +1725,18 @@ function excelRCData($summaryData,$aiAllList,$year){
 	$obj = new PHPExcel ();
 	
 	//表头计算
-	$cellCount=$last=0;$sectionCount=array();
+	$cellCount=0;$sectionCount=array();$last=7;
 	foreach ($aiAllList as $key=>$value){
 		//栏目细则个数
-		$sectionCount[$key]=count($value)+1;
-		$cellCount+=$sectionCount[$key];
+		//$sectionCount[$key]=count($value)+1;
+		$cellCount+=count($value)+1;
 		
-		$sectionCount[$key]=$sectionCount[$key]+7;
-		$last=$sectionCount[$key];
+		$sectionCount[$key]=array($last,count($value)+1+$last);
+		$last=count($value)+1+$last;
 	}
 	$cellCount=$cellCount+7;
-	
+	echo $cellCount;
+	print_r($sectionCount);
 	
 	//设置宽高
 	$colNum=1;$maxCol='ZZ';