wugg 2 years ago
parent
commit
f7556a71a9
1 changed files with 14 additions and 11 deletions
  1. 14 11
      app/admin/controller/Purchin.php

+ 14 - 11
app/admin/controller/Purchin.php

@@ -187,17 +187,20 @@ class Purchin extends BaseController
         if($send_num>$cgdinfo['wsend_num']){
             return error_show(1009,"采购单剩余未发货数量不足");
         }
-        if($cgdinfo['order_type']==1||$cgdinfo['order_type']==2 ){
-            $goodinfo = Db::name("good_basic")->where(["spuCode"=>$cgdinfo['spuCode'],"is_del"=>0])->find();
-            if($goodinfo==false){
-                return error_show(1004,"商品数据未找到");
-            }
-            if($goodinfo['is_stock']==0){
-                $status=4;
-            }
-        } else {
-            $send_way = Db::name("good_zixun")->where(["spuCode" => $cgdinfo['spuCode'], "is_del" => 0])->value('send_way');
-            if ($send_way) $status = 4;
+//        if($cgdinfo['order_type']==1||$cgdinfo['order_type']==2 ){
+//            $goodinfo = Db::name("good_basic")->where(["spuCode"=>$cgdinfo['spuCode'],"is_del"=>0])->find();
+//            if($goodinfo==false){
+//                return error_show(1004,"商品数据未找到");
+//            }
+//            if($goodinfo['is_stock']==0){
+//                $status=4;
+//            }
+//        } else {
+//            $send_way = Db::name("good_zixun")->where(["spuCode" => $cgdinfo['spuCode'], "is_del" => 0])->value('send_way');
+//            if ($send_way) $status = 4;
+//        }
+        if($sendtype==2){
+            $status=4;
         }
         $orin = [
             "wsm_in_code"=>$wsm_in_code,