Explorar el Código

Merge branch 'version1.5' of wugg/phpstock into master-online

wugg hace 2 años
padre
commit
74d2d74a91

+ 1 - 0
app/admin/controller/Consult.php

@@ -1452,6 +1452,7 @@ class Consult extends Base
 //        if(empty($user)||$user['code']!=0){
 //            return error_show(105,"用户数据不存在");
 //        }
+
 //        $createrid= isset($user["data"]['id']) ?  $user["data"]['id'] : "";
 //        $creater= isset($user["data"]['nickname']) ?  $user["data"]['nickname'] : "";
 //        $where[] = ["createrid","=",$createrid];

+ 11 - 5
app/admin/controller/Good.php

@@ -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=[];

+ 1 - 2
app/admin/controller/Purchin.php

@@ -755,8 +755,7 @@ class Purchin extends BaseController
                 Db::rollback();
                 return error_show(1002,"库存更新失败");
             }
-            $good_data[]=["stock_id"=>isset($good['id'])? $good['id']:Db::name("good_stock")->getLastInsID(),"type"=>1,
-                'stock'=>$info['wsm_num'],"stock_name"=>"usable_stock"];
+            $good_data[]=["stock_id"=>isset($good['id'])? $good['id']:Db::name("good_stock")->getLastInsID(),"type"=>1, 'stock'=>$info['wsm_num'],"stock_name"=>"usable_stock"];
             GoodLog::LogAdd($this->post['token'],$good_data,'RKD');
             $process=["order_code"=>$info['wsm_in_code'],"order_id"=>$info['id'],"order_status"=>$info['status'],"order_type"=>'RKD'];
             ProcessOrder::AddProcess($this->post['token'],$process);