|
@@ -92,6 +92,8 @@ class Aatest extends Start_Controller {
|
|
|
//定义方法的调用规则 获取URI第二段值
|
|
//定义方法的调用规则 获取URI第二段值
|
|
|
public function _remap($arg,$arg_array)
|
|
public function _remap($arg,$arg_array)
|
|
|
{
|
|
{
|
|
|
|
|
+ $this->_cbtxcel();
|
|
|
|
|
+ die;
|
|
|
//测试 erp现在还在用的数据
|
|
//测试 erp现在还在用的数据
|
|
|
//
|
|
//
|
|
|
$list = $this->fullordersmt->find_all("print = 3","*","id desc",0,1000);
|
|
$list = $this->fullordersmt->find_all("print = 3","*","id desc",0,1000);
|
|
@@ -277,6 +279,51 @@ class Aatest extends Start_Controller {
|
|
|
exit('No direct script access allowed');
|
|
exit('No direct script access allowed');
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ private function _cbtxcel(){
|
|
|
|
|
+ $list = $this->db->form("fullordertt")->where("source` = 2 AND `express` = 83 AND `librarytime` >= 1763730574 AND `librarytime` <= 1763762974")->get()->result_array();
|
|
|
|
|
+
|
|
|
|
|
+ //生成excel
|
|
|
|
|
+ $filename = date("Y-m-d")."cbt导出.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>订单ID</td><td>订单编码</td><td>运单号</td><td>打印时间</td><td>出库时间</td></tr>";
|
|
|
|
|
+ foreach ($list as $key=>$value)
|
|
|
|
|
+ {
|
|
|
|
|
+
|
|
|
|
|
+ $str .= "<tr>";
|
|
|
|
|
+ $str .= "<td>". $value['orderinfo']. "</td>";
|
|
|
|
|
+ $str .= "<td>". $value['number']. "</td>";
|
|
|
|
|
+ $str .= "<td>". $value['waybill']. "</td>";
|
|
|
|
|
+ $str .= "<td>". date("Y-m-d H:i:s",$value['printtime']). "</td>";
|
|
|
|
|
+ $str .= "<td>". date("Y-m-d H:i:s",$value['librarytime']). "</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);
|
|
|
|
|
+ }
|
|
|
private function jiai($arg_array){
|
|
private function jiai($arg_array){
|
|
|
$key = "6amg!pnfrlbpnjgirv"; //加密所需要到的key
|
|
$key = "6amg!pnfrlbpnjgirv"; //加密所需要到的key
|
|
|
$iv = "6ook4k!2w94m6jtm";//加密所需要到的iv
|
|
$iv = "6ook4k!2w94m6jtm";//加密所需要到的iv
|