lvhao 1 deň pred
rodič
commit
19c686f3fb

+ 0 - 129
core/CoreApp/controllers/Zzququeu9.php

@@ -75,8 +75,6 @@ class Zzququeu9 extends Start_Controller {
                $this->_wxxs($arg_array);
           }elseif($arg == 'gcbh_index'){
                $this->_gcbh_index();
-          }elseif($arg == 'gcbh_hz_excel'){
-               $this->_gcbh_hz_excel();
           }elseif($arg == 'gcbhexcel'){
                $this->_gcbhexcel();
           }else
@@ -1258,133 +1256,6 @@ class Zzququeu9 extends Start_Controller {
 
     }
 
-    public function _gcbh_hz_excel(){
-        $post = $this->input->post(NULL, TRUE); $params = $this->input->get();
-        $where = " type = 10 ";
-        if(!empty($params['order_no'])){
-          $where .= " and  order_no =  '".$params['order_no']."' ";
-        } 
-        if(!empty($params['timetk'])){
-          $where .= " and create_time >  ".strtotime($params['timetk'])." ";
-        }       
-        if(!empty($params['timetj'])){
-          $where .= "and create_time <  ".strtotime($params['timetj'])." ";
-        }    
-        if(!empty($params['status'])){
-                $status = $params['status'];
-               if($status == 1){
-                    $where .= " and dc_status = 0 ";
-               }elseif($status == 2){
-                    $where .= " and dc_status = -1  ";
-               }elseif($status == 3){
-                    $where .= " and dc_status = -2  ";
-               }elseif($status == 4){
-                    $where .= " and dc_status = -3  ";
-               }elseif($status == 5){
-                    $where .= " and dc_status < 3  ";
-               }
-        }
-        
-          $info_list = $this->zzquque_u9->find_all($where,'*','id desc');
-          
-          $type_list = $this->zzquque_u9->getType();
-          $list = [];
-          foreach($info_list as $k=>$v){
-               $dc_no = $v['dc_no'];
-               $error_str = "";
-               $error_json ="";
-               if($v['dc_status'] == -1){
-                    $error = $this->zzququeu9_logs->find_all("oid = ".$v['id']." and one_type = 1 and two_type = 1 ","*",'id desc',0,1);
-                    $error_json = $error[0]['ret_data'];
-                    if($error[0]['apply_api']=='lpck'){
-                         $ret_data = json_decode($error[0]['ret_data'],true);
-                         $apply_data = json_decode($error[0]['apply_data'],true);
-                         if(isset($ret_data["ResMsg"])){
-                              if(empty($apply_data['0'])){
-                                   $error_str = $ret_data["ResMsg"];
-                              }else{
-                                   $error_str = $ret_data["ResMsg"]."【". $apply_data[0]['EntityCode']."】";
-                              }
-                              
-                         }else{
-                              $error_str = "料品同步失败";
-                         }
-                    }else{
-
-                         $ret_data = json_decode($error[0]['ret_data'],true);
-                         if(isset($ret_data[0]["ResMsg"])){
-                              $error_str = $ret_data[0]["ResMsg"];
-                         }elseif(isset($ret_data['msg'])){
-                              $error_str = $ret_data['msg'];
-                         }else{
-                              $error_str = "料品同步失败";
-                         }
-                    }
-                    
-               }
-               
-              
-              
-
-               $list[] = [
-                    'id'=>$v['id'],
-                    'order_no'=>$v['order_no'],
-                    'type'=>isset($type_list[$v['type']])?$type_list[$v['type']]:"异常",
-                    'dc_no'=> $dc_no,
-                    'error'=>$error_str,
-                    'error_json'=>$error_json,
-                    //'bzsh_no'=>$bzsh_no,
-                    
-                    'create_time'=>date("Y-m-d H:i:s",$v['create_time']),
-               ];
-          }
-
-
-        $filename = date("Y-m-d")."u9小单导出.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><td>错误信息</td><td>错误json</td></tr>";
-		foreach ($list as $key=>$value) 
-		{ 
-			
-		    $str .= "<tr>";
-			$str .= "<td>". $value['id']. "</td>";
-			$str .= "<td>". $value['order_no']. "</td>";	
-			$str .= "<td>". $value['type']. "</td>";	
-			$str .= "<td>". $value['dc_no']. "</td>";
-			 $str .= "<td>". $value['create_time']. "</td>";
-			$str .= "<td>". $value['error']. "</td>";
-			$str .= "<td>". $value['error_json']. "</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); 
-    }
-
     public function _gcbhexcel(){
           
 

+ 1 - 17
template/erp/zzququeu9gcbh.html

@@ -52,7 +52,6 @@
                 
                 <!-- <a href="javascript:void(0);" style="font-size: 15px;" class="check">删 除</a> -->
                 <a href="javascript:void(0);" style="font-size: 15px;background-color: #f39c12;" onclick="excelexport()">按条件导出</a>
-                <a href="javascript:void(0);" style="font-size: 15px;background-color: #66cc11;" onclick="excelexporthz()">按条件导出(汇总)</a>
                 </div>
             
             <table class="datatitle data" border="0" style="border-collapse:collapse;">
@@ -214,22 +213,7 @@
             $(".lbwlxq").hide();
         });
     });
-    function excelexporthz(){
-        let url = "/zzququeu9/gcbh_hz_excel"
-        //timetk="+$("input[name='timetk']").val()+"&timetj="+$("input[name='timetj']").val();
-        let order_no = $("input[name='order_no']").val();
-        url += "?order_no="+order_no
-        let timetk = $("input[name='timetk']").val();
-        url += "&timetk="+timetk;
-        let timetj = $("input[name='timetj']").val()
-        url += "&timetj="+timetj;
-        let status = $(".select").val()
-        if(status){
-            url += "&status="+status;
-        }
-        
-        window.location.href = url
-    }
+    
 
     function excelexport(){
         let url = "/zzququeu9/gcbhexcel"