Browse Source

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

wugg 3 years ago
parent
commit
492ef1a2a3
1 changed files with 7 additions and 1 deletions
  1. 7 1
      app/admin/controller/Purch.php

+ 7 - 1
app/admin/controller/Purch.php

@@ -152,7 +152,13 @@ class Purch extends Base
         }
         //$var = Db::name('purchease_in')->where(['cgdNo'=>$data['cgdNo'],'is_del'=>0])->select();
         $dom = Db::name("purchease_diff")->where(['cgdNo'=>$data['cgdNo'],'is_del'=>0])->find();
-        $goon = Db::name('good')->where(['spuCode'=>$data['spuCode']])->find();
+        //$goon = Db::name('good')->where(['spuCode'=>$data['spuCode']])->find();
+        if($data['order_type']==3|| $data['order_type']==4){
+            $goon = Db::name("good_zixun")->where(["spuCode"=>$data['spuCode'],"is_del"=>0])->find();
+        }else {
+            $goon = Db::name('good_platform')->alias('a')->join('good b', 'b.spuCode=a.spuCode', 'left')
+                ->where(['a.skuCode' => $data['skuCode']])->find();
+        }
         if(empty($goon)){
             return error_show(1002,"未找到商品数据");
         }else{