|
@@ -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,
|