Browse Source

提交修改

lvhao 5 tháng trước cách đây
mục cha
commit
2c2236b9e8
2 tập tin đã thay đổi với 42 bổ sung3 xóa
  1. 23 0
      core/CoreApp/controllers/Zzququeu9.php
  2. 19 3
      template/erp/zzququeu9.html

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

@@ -42,6 +42,9 @@ class Zzququeu9 extends Start_Controller {
           elseif($arg == 'add'){
                $this->_add();
           }
+          elseif($arg == 'excel'){
+               $this->_excel();
+          }
           else
           {
                $this->_index();
@@ -570,4 +573,24 @@ class Zzququeu9 extends Start_Controller {
        
         
     }
+
+
+    public function _excel(){
+        $params = $this->input->get();
+        $where = "1 = 1";
+        if(!empty($params['order_no'])){
+          $where .= " order_no =  '".$params['order_no']."' ";
+        } 
+        if(!empty($params['timetk'])){
+          $where .= " create_time >  ".strtotime($params['timetk'])." ";
+        }       
+        if(!empty($params['timetj'])){
+          $where .= " create_time <  ".strtotime($params['timetj'])." ";
+        }    
+        if(!empty($params['status'])){
+          $where .= " status = ".$params['status'];
+        }
+        var_dump($where);
+
+    }
 }

+ 19 - 3
template/erp/zzququeu9.html

@@ -63,8 +63,8 @@
     
                 <a href="javascript:void(0);" class="btn btn-success" onclick="addData()">添 加</a>
                 
-                <!-- <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;" class="check">删 除</a> -->
+                <a href="javascript:void(0);" style="font-size: 15px;background-color: #f39c12;" onclick="excelexport()">按条件导出</a>
                 </div>
             
             <table class="datatitle data" border="0" style="border-collapse:collapse;">
@@ -234,8 +234,24 @@
             $(".lbwlxq").hide();
         });
     });
-
+    function excelexport(){
+        let url = "/zzququeu9/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
+    }
+
+     
     </script>
     <script type="text/javascript" src="{$theme}js/laydate.js"></script>
     <script type="text/javascript" src="{$theme}js/print.js?v=202007160001"></script>