Browse Source

出入库明细报表暂存

wufeng 2 years ago
parent
commit
1870daca66
1 changed files with 7 additions and 4 deletions
  1. 7 4
      app/admin/controller/Report.php

+ 7 - 4
app/admin/controller/Report.php

@@ -1314,9 +1314,9 @@ class Report extends Base
 
     }
 
-    //【八、结算报表】_列表
+    //【八、结算报表】_列表(暂不做)
 
-    //【八、结算报表】_导出
+    //【八、结算报表】_导出(暂不做)
 
     //【九、出入库明细报表】_列表
     public function GoodLogList()
@@ -1350,7 +1350,7 @@ class Report extends Base
 
         if (!$val_params->check($param)) return error_show(1004, $val_params->getError());
 
-//        $where = [['s.is_del', '=', 0], ['gp.exam_status', '=', 8]]; //exam_status==8 下线成功
+//        $where = [['gl.action_type', '=', 'CGD']];
 //        if ($param['start_date'] != '' && $param['end_date'] != '') $where[] = ['gp.updatetime', 'between', [$param['start_date'] . ' 00:00:00', $param['end_date'] . ' 23:59:59']];
 //        if ($param['creater'] != '') $where[] = ['gb.creater', 'like', '%' . $param['creater'] . '%'];
 //        if ($param['supplier_name'] != '') $where[] = ['s.name', 'like', '%' . $param['supplier_name'] . '%'];
@@ -1358,9 +1358,12 @@ class Report extends Base
 
         $list = Db::name('good_log')
             ->alias('gl')
-            ->field('"" 创建人,"" 创建人公司,"" 创建人部门,"" 创建时间,"" 单据状态,"" 采购单号,"" 出入库类型,"" 商品名称,"" 产品编码,"" 出入库数量,"" 出入库日期,"" 维护人员,"" 发起人,"" 库房性质,"" 库房公司,"" 库房名称')
+            ->field('"" 创建人,"" 创建人公司,"" 创建人部门,"" 创建时间,"" 单据状态,"" 采购单号,gl.type 出入库类型,gb.good_name 商品名称,gb.spuCode 产品编码,gl.stock 出入库数量,gl.addtime 出入库日期,"" 维护人员,"" 发起人,wi.wsm_type 库房性质,s.name 库房公司,wi.name 库房名称')
 //            ->where($where)
             ->leftJoin('good_stock gs', 'gs.id=gl.stock_id AND gs.is_del=0')
+            ->leftJoin('good_basic gb', 'gb.spuCode=gs.spuCode AND gb.is_del=0')
+            ->leftJoin('warehouse_info wi', 'wi.wsm_code=gs.wsm_code AND wi.is_del=0')
+            ->leftJoin('supplier s', 's.code=wi.supplierNo AND s.is_del=0')
 //            ->leftJoin('supplier s', 's.code=gb.supplierNo AND s.is_del=0')
             ->select()
             ->toArray();