|
@@ -725,14 +725,20 @@ class Good extends Base
|
|
|
$wsmcode = Db::name("warehouse_info")->where(['companyNo'=>$companyNo,"is_del"=>0])->column("wsm_code");
|
|
|
$condition[]=["b.wsm_code","in",$wsmcode];
|
|
|
}
|
|
|
- $count = Db::name("good_log")->alias('a')
|
|
|
- ->join("good_stock b","b.id=a.id","left")->where($where)->count();
|
|
|
+ $count = Db::name("good_log")
|
|
|
+ ->alias('a')
|
|
|
+ ->join("good_stock b","b.id=a.id","left")
|
|
|
+ ->where($where)
|
|
|
+ ->count();
|
|
|
$total = ceil($count/$size);
|
|
|
$page = $total>=$page ? $page :$total;
|
|
|
- $list = Db::name("good_log")->alias('a')
|
|
|
+ $list = Db::name("good_log")
|
|
|
+ ->alias('a')
|
|
|
->join("good_stock b","b.id=a.stock_id","left")
|
|
|
- ->where($where)->page($page,$size)->order("a.addtime desc")
|
|
|
- ->field("a.action_name,a.type,a.stock_name,a.stock,a.action_type,b.spuCode,a.addtime,a.action_uid,b.wsm_code")
|
|
|
+ ->where($where)
|
|
|
+ ->page($page,$size)
|
|
|
+ ->order("a.addtime desc")
|
|
|
+ ->field("a.good_log_code,a.action_name,a.type,a.stock_name,a.stock,a.action_type,b.spuCode,a.addtime,a.action_uid,b.wsm_code")
|
|
|
->select()
|
|
|
->toArray();
|
|
|
$data=[];
|