|
@@ -3152,12 +3152,87 @@ class Transfer extends Start_Controller {
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
- echo "<pre>";
|
|
|
|
|
- print_r($final_list);
|
|
|
|
|
- die;
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ $filename = date("Y-m-d")."操作部门库存是否存在.xls";
|
|
|
|
|
+ $str = "<html xmlns:x=\"urn:schemas-microsoft-com:office:excel\">
|
|
|
|
|
+ <head>
|
|
|
|
|
+ <!--[if gte mso 9]><xml>
|
|
|
|
|
+ <x:ExcelWorkbook>
|
|
|
|
|
+ <x:ExcelWorksheets>
|
|
|
|
|
+ <x:ExcelWorksheet>
|
|
|
|
|
+ <x:Name>EXCEL</x:Name>
|
|
|
|
|
+ <x:WorksheetOptions>
|
|
|
|
|
+ <x:Print>
|
|
|
|
|
+ <x:ValidPrinterInfo />
|
|
|
|
|
+ </x:Print>
|
|
|
|
|
+ </x:WorksheetOptions>
|
|
|
|
|
+ </x:ExcelWorksheet>
|
|
|
|
|
+ </x:ExcelWorksheets>
|
|
|
|
|
+ </x:ExcelWorkbook>
|
|
|
|
|
+ </xml>
|
|
|
|
|
+ <![endif]-->
|
|
|
|
|
+ </head><body>";
|
|
|
|
|
+ $str .= "<table border=1 style='font-family: Microsoft Yahei;font-size: 13px;'>";
|
|
|
|
|
+ $str .= "<tr><td>订单编号</td><td>品名</td><td>操作部门</td><td>扫入日期</td><td>扫出日期</td><td>是否出库</td></tr>";
|
|
|
|
|
+ foreach ($final_list as $key=>$value)
|
|
|
|
|
+ {
|
|
|
|
|
+ if(empty($value['number'])){
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ $str .= "<tr>";
|
|
|
|
|
+ $str .= "<td>". $value['number']. "</td>";
|
|
|
|
|
+ $str .= "<td>". $value['pm']. "</td>";
|
|
|
|
|
+
|
|
|
|
|
+ $tmp_czbm = '';
|
|
|
|
|
+ $tmp_srrq = '';
|
|
|
|
|
+ $tmp_scrq = '';
|
|
|
|
|
+ $tmp_is_out = '';
|
|
|
|
|
+ foreach ($value['transfer_list'] as $k=>$v)
|
|
|
|
|
+ {
|
|
|
|
|
+ $tmp_czbm .= $v['lx_show'].'<br/>';
|
|
|
|
|
+ $tmp_srrq .= date('Y-m-d H:i:s',$v['rk_time']).'<br/>';
|
|
|
|
|
+ $tmp_scrq .= date('Y-m-d H:i:s',$v['ck_time']).'<br/>';
|
|
|
|
|
+ if($v['is_over'] == 2){
|
|
|
|
|
+ $tmp_is_out .= '是<br/>';
|
|
|
|
|
+ }elseif($v['is_over'] == 1){
|
|
|
|
|
+ $tmp_is_out .= '否<br/>';
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $tmp_is_out .= '异常<br/>';
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ $tmp_czbm = trim($tmp_czbm,'<br/>');
|
|
|
|
|
+ $tmp_srrq = trim($tmp_srrq,'<br/>');
|
|
|
|
|
+ $tmp_scrq = trim($tmp_scrq,'<br/>');
|
|
|
|
|
+ $tmp_is_out = trim($tmp_is_out,'<br/>');
|
|
|
|
|
+ $str .= "<td>". $tmp_czbm. "</td>";
|
|
|
|
|
+ $str .= "<td>". $tmp_srrq. "</td>";
|
|
|
|
|
+ $str .= "<td>". $tmp_scrq. "</td>";
|
|
|
|
|
+ $str .= "<td>". $tmp_is_out. "</td>";
|
|
|
|
|
+
|
|
|
|
|
+ $str .= "</tr>";
|
|
|
|
|
+ }
|
|
|
|
|
+ $str .= "</table></body></html>";
|
|
|
|
|
+ header( "Content-Type: application/vnd.ms-excel; name='excel'" );
|
|
|
|
|
+ header( "Content-type: application/octet-stream" );
|
|
|
|
|
+ header( "Content-Disposition: attachment; filename=".$filename );
|
|
|
|
|
+ header( "Cache-Control: must-revalidate, post-check=0, pre-check=0" );
|
|
|
|
|
+ header( "Pragma: no-cache" );
|
|
|
|
|
+ header( "Expires: 0" );
|
|
|
|
|
+ exit($str);
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|