Sfoglia il codice sorgente

医废月统计导出Bug

zgg 3 mesi fa
parent
commit
b5edcb5aa4
1 ha cambiato i file con 6 aggiunte e 4 eliminazioni
  1. 6 4
      application/admin/controller/WasteStatistics.php

+ 6 - 4
application/admin/controller/WasteStatistics.php

@@ -1259,13 +1259,15 @@ class WasteStatistics extends Auth {
             $res.=' <th style="text-align: center;background: #ffffff;border-bottom: 1px solid #ddd;border-right: 1px solid #ddd">件数/包</th>
             <th style="text-align: center;background: #ffffff;border-bottom: 1px solid #ddd;border-right: 1px solid #ddd">重量kg</th>';
         }
-        if(isset($lists['list'])){
-            foreach ($lists['list'] as $k=>$v){
+        if(isset($lists[0]['list'])){
+            foreach ($lists as $k=>$v){
                 $res.='<tr style="background: #ffffff;">';
                 $kk = $k+1;
                 $res.='<td style="text-align: center;border-bottom: 1px solid #ddd;border-right: 1px solid #ddd">'.$kk.'</td>';
-                foreach ($v as $k1=>$v1){
-                    $res.='<td style="text-align: center;border-bottom: 1px solid #ddd;border-right: 1px solid #ddd">'.$v1.'</td>';
+                if(isset($v['list'])){
+                    foreach ($v['list'] as $k1=>$v1){
+                        $res.='<td style="text-align: center;border-bottom: 1px solid #ddd;border-right: 1px solid #ddd">'.$v1.'</td>';
+                    }
                 }
                 $res.='<td style="text-align: center;border-bottom: 1px solid #ddd;border-right: 1px solid #ddd"></td>';
                 $res.='</tr>';