wugg 2 years ago
parent
commit
392acfd103
1 changed files with 6 additions and 6 deletions
  1. 6 6
      app/admin/controller/Check.php

+ 6 - 6
app/admin/controller/Check.php

@@ -559,12 +559,12 @@ public function edit()
         if(empty($fo)){
             return error_show(1003,"未找到盘点信息");
         }
-        $list = Db::name("good_basic")->alias("b")
-            ->join("good_stock c","c.spuCode=b.spuCode","left")
-            ->join("good_stock_info d","c.id=d.stockid and d.balance_num>0","left")
-            ->where(['c.wsm_code'=>$fo['wsm_code'],"b.is_del"=>0,"c.is_del"=>0])->field("d.bnCode,b.spuCode'商品编码',
+        $list = Db::name("good_stock_info")->alias("d")
+            ->join("good_stock c","c.id=d.stockid and d.balance_num>0","left")
+            ->join("good b","c.spuCode=b.spuCode","left")
+            ->where(['c.wsm_code'=>$fo['wsm_code'],"b.is_del"=>0,"c.is_del"=>0])->field("d.bnCode '商品批次号',b.spuCode'商品编码',
             b.good_name '商品名称',b.craft_desc '商品描述',b.brand_id '品牌',b.good_unit '单位',b.supplierNo '供应商编码','' as '供应商名称','' as  '一级分类','' as '二级分类','' as  '三级分类',
-            b.addtime '新建时间',c.wsm_code '仓库编码','' as '仓库名称',c.usable_stock '可用总库存',d.balance_num 'bn库存数','' as '盘点库存'")
+            b.addtime '新建时间',c.wsm_code '仓库编码','' as '仓库名称',c.usable_stock '可用总库存',d.balance_num '批次库存数','' as '盘点库存'")
             ->select();
         $data=[];
         foreach ($list as $key=>$value){
@@ -608,7 +608,7 @@ public function edit()
         $insert=[];
         foreach ($data as $value){
             if($value["value0"]==""){
-                return error_show(1003,"商品编号不能为空");
+                return error_show(1003,"商品批次编号不能为空");
             }
             if($value["value14"]===""){
                 continue;