Parcourir la source

同步昨晚要求的添加的功能

longyi il y a 3 mois
Parent
commit
6230b8a88f
1 fichiers modifiés avec 41 ajouts et 6 suppressions
  1. 41 6
      core/CoreApp/controllers/Systemprint.php

+ 41 - 6
core/CoreApp/controllers/Systemprint.php

@@ -1972,7 +1972,7 @@ class Systemprint extends Start_Controller {
              //数据排序
             $order_str = ($print != 3)?"id desc":"printtime desc";
             //取得信息列表
-            $info_list = $this->fullorder->find_all($where.$wid,'shop,type,orderinfo,number,waybill,express,print,printnumber,library,printtime,shipremarks,ts',$order_str);
+            $info_list = $this->fullorder->find_all($where.$wid,'shop,type,orderinfo,number,waybill,express,print,printnumber,library,printtime,printtype,shipremarks,ts',$order_str);
 			 //格式化数据
             foreach ($info_list as $key=>$value) 
 		    {
@@ -2018,10 +2018,17 @@ class Systemprint extends Start_Controller {
 				{
 					$info_list[$key]['library'] = '<em class="c">已退库</em>';
 				}
+				if($value['printtype'] == 1){
+				    $info_list[$key]['printtype'] = '运单';
+				}elseif($value['printtype'] == 2){
+				     $info_list[$key]['printtype'] = '发货单';
+				}else{
+				     $info_list[$key]['printtype'] = '不打印单据';
+				}
 				//$info_list[$key]['shipremarks'] = str_replace(array('<','>'),array('&lt;','&gt;'),$value['shipremarks']);
             }
 			//取得信息列表
-            $info_listsmt = $this->fullordersmt->find_all($where.$wid,'shop,type,orderinfo,number,waybill,express,print,printnumber,library,printtime,shipremarks,ts',$order_str);
+            $info_listsmt = $this->fullordersmt->find_all($where.$wid,'shop,type,orderinfo,number,waybill,express,print,printnumber,library,printtime,printtype,shipremarks,ts',$order_str);
 			 //格式化数据
             foreach ($info_listsmt as $key=>$value) 
 		    {
@@ -2067,10 +2074,17 @@ class Systemprint extends Start_Controller {
 				{
 					$info_listsmt[$key]['library'] = '<em class="c">已退库</em>';
 				}
+				if($value['printtype'] == 1){
+				     $info_listsmt[$key]['printtype'] = '运单';
+				}elseif($value['printtype'] == 2){
+				     $info_listsmt[$key]['printtype'] = '发货单';
+				}else{
+				     $info_listsmt[$key]['printtype'] = '不打印单据';
+				}
 				//$info_list[$key]['shipremarks'] = str_replace(array('<','>'),array('&lt;','&gt;'),$value['shipremarks']);
             }
 			
-			 $info_listtt = $this->fullordertt->find_all($where.$wid,'shop,type,orderinfo,number,waybill,express,print,printnumber,library,printtime,shipremarks,ts',$order_str);
+			 $info_listtt = $this->fullordertt->find_all($where.$wid,'shop,type,orderinfo,number,waybill,express,print,printnumber,library,printtime,printtype,shipremarks,ts',$order_str);
 			 //格式化数据
             foreach ($info_listtt as $key=>$value) 
 		    {
@@ -2116,11 +2130,18 @@ class Systemprint extends Start_Controller {
 				{
 					$info_listtt[$key]['library'] = '<em class="c">已退库</em>';
 				}
+				if($value['printtype'] == 1){
+				     $info_listtt[$key]['printtype'] = '运单';
+				}elseif($value['printtype'] == 2){
+				     $info_listtt[$key]['printtype'] = '发货单';
+				}else{
+				     $info_listtt[$key]['printtype'] = '不打印单据';
+				}
 				//$info_list[$key]['shipremarks'] = str_replace(array('<','>'),array('&lt;','&gt;'),$value['shipremarks']);
             }
             
             
-             $info_listamz = $this->fullorderamz->find_all($where.$wid,'shop,type,orderinfo,number,waybill,express,print,printnumber,library,printtime,shipremarks,ts',$order_str);
+             $info_listamz = $this->fullorderamz->find_all($where.$wid,'shop,type,orderinfo,number,waybill,express,print,printnumber,library,printtime,printtype,shipremarks,ts',$order_str);
 			 //格式化数据
             foreach ($info_listamz as $key=>$value) 
 		    {
@@ -2166,6 +2187,13 @@ class Systemprint extends Start_Controller {
 				{
 					$info_listamz[$key]['library'] = '<em class="c">已退库</em>';
 				}
+				if($value['printtype'] == 1){
+				     $info_listamz[$key]['printtype'] = '运单';
+				}elseif($value['printtype'] == 2){
+				     $info_listamz[$key]['printtype'] = '发货单';
+				}else{
+				     $info_listamz[$key]['printtype'] = '不打印单据';
+				}
 				//$info_list[$key]['shipremarks'] = str_replace(array('<','>'),array('&lt;','&gt;'),$value['shipremarks']);
             }
             
@@ -2173,7 +2201,7 @@ class Systemprint extends Start_Controller {
             
             
             
-			 $info_listxw = $this->fullorderxw->find_all($where.$wid,'shop,type,orderinfo,number,waybill,express,print,printnumber,library,printtime,shipremarks,ts',$order_str);
+			 $info_listxw = $this->fullorderxw->find_all($where.$wid,'shop,type,orderinfo,number,waybill,express,print,printnumber,library,printtime,printtype,shipremarks,ts',$order_str);
 			 //格式化数据
             foreach ($info_listxw as $key=>$value) 
 		    {
@@ -2219,10 +2247,17 @@ class Systemprint extends Start_Controller {
 				{
 					$info_listxw[$key]['library'] = '<em class="c">已退库</em>';
 				}
+				if($value['printtype'] == 1){
+				     $info_listxw[$key]['printtype'] = '运单';
+				}elseif($value['printtype'] == 2){
+				     $info_listxw[$key]['printtype'] = '发货单';
+				}else{
+				     $info_listxw[$key]['printtype'] = '不打印单据';
+				}
 				//$info_list[$key]['shipremarks'] = str_replace(array('<','>'),array('&lt;','&gt;'),$value['shipremarks']);
             }
             $title = '订单出库-'.date('Ymd',time());
-            $titlename = "<table border=1><td>店铺名称</td><td>仓库</td><td>订单号</td><td>编号</td><td>运单号</td><td>快递</td><td>类型</td><td>打印次数</td><td>状态</td><td>打印时间</td><td>仓库品名</td><td>条数</td></table>";
+            $titlename = "<table border=1><td>店铺名称</td><td>仓库</td><td>订单号</td><td>编号</td><td>运单号</td><td>快递</td><td>类型</td><td>打印次数</td><td>打印类型</td><td>状态</td><td>打印时间</td><td>仓库品名</td><td>条数</td></table>";
 			$tail = "\n";
             $filename = $title.".xls";
             $this->excel->get_fz2(array_merge($info_list,$info_listamz,$info_listsmt,$info_listtt,$info_listxw),$titlename,$filename,$tail);