Procházet zdrojové kódy

新建调拨入库单接口优化

wufeng před 2 roky
rodič
revize
01d68f9de1
1 změnil soubory, kde provedl 4 přidání a 2 odebrání
  1. 4 2
      app/admin/controller/Allot.php

+ 4 - 2
app/admin/controller/Allot.php

@@ -113,6 +113,7 @@ class Allot extends BaseController
         return app_show(0,"获取成功",['count'=>$count,'list'=>$data]);
     }
     public function create(){
+
         $token =isset($this->post['token']) && $this->post['token'] !=="" ? trim($this->post['token']) :"";
     $wsm_out = isset($this->post['wsm_out']) && $this->post['wsm_out'] !=="" ? trim($this->post['wsm_out']) :"";
     if($wsm_out==""){
@@ -201,8 +202,9 @@ class Allot extends BaseController
                         ->join("good_stock c", "c.spuCode = b.spuCode", "left")
                         ->join("warehouse_info v","v.wsm_code=c.wsm_code","left")
                         ->join("supplier n","n.code=v.supplierNo","left")
-                        ->where(['c.wsm_code' => $wsm_out,"v.wsm_type"=>1, 'b.spuCode' => $value['spuCode'], 'b.is_del' => 0, 'a.is_del' => 0])->where("c.is_del=0 or c.is_del is null")
-                        ->field("b.spuCode,b.good_name,b.unit,c.wsm_code,c.usable_stock,c.good_type_code,c.wait_out_stock,c.wait_in_stock,n.name")->find();
+                        ->where(['c.wsm_code' => $wsm_out,"v.wsm_type"=>1, 'b.spuCode' => $value['spuCode'], 'b.is_del' => 0])->where("c.is_del=0 or c.is_del is null")
+                        ->field("b.spuCode,b.good_name,b.good_unit,c.wsm_code,c.usable_stock,c.good_type_code,c.wait_out_stock,c.wait_in_stock,n.name")->find();
+
                     if (empty($st)) {
                         Db::rollback();
                         return error_show(1003, "商品不能为空");