wugg 2 жил өмнө
parent
commit
e07a362ce0

+ 1 - 0
app/admin/controller/Allot.php

@@ -430,6 +430,7 @@ class Allot extends Base
             return error_show(1002,"删除失败");
         }
     }
+    // 0 待发起流程 1 待入库方同意 2 待出库方发货 3待入库方验货 4待验货审核 5 调拨完成  6 调拨驳回
     public function status(){
         $id = isset($this->post['id']) && $this->post['id'] !=="" ? intval($this->post['id']) :"" ;
         if($id==""){

+ 12 - 12
app/admin/controller/Resign.php

@@ -148,16 +148,16 @@ class Resign extends Base
         }
         $supplier=Db::name("supplier")->where("code","=",$good['supplierNo'])->find();
         if($supplier==false)  return error_show(1004,"未找到供应商数据");
-        $bk= Db::name("purchease")->where([["spuCode","=",$good_code],["status","<>",2],["is_del","=",0]])->find();
-        if($bk!=false) return error_show(1004,"存在未完成备库单数据");
-        $cgd =Db::name("purchease_order")->where([["spuCode","=",$good_code],["status","in",[0,1]],["is_del","=",0]])->find();
-        if($cgd!=false) return error_show(1004,"存在未完成采购单数据");
+//        $bk= Db::name("purchease")->where([["spuCode","=",$good_code],["status","<>",2],["is_del","=",0]])->find();
+//        if($bk!=false) return error_show(1004,"存在未完成备库单数据");
+//        $cgd =Db::name("purchease_order")->where([["spuCode","=",$good_code],["status","in",[0,1]],["is_del","=",0]])->find();
+//        if($cgd!=false) return error_show(1004,"存在未完成采购单数据");
         //查验仓库库存数量
         $stock =Db::name("good_stock")->alias("a")->leftJoin("warehouse_info b","a.wsm_code=b.wsm_code")->where
         (["spuCode"=>$good_code, "a.is_del"=>0,"a.status"=>1,"b.companyNo"=>$good['companyNo']])->field("a.id,a.usable_stock,a.wait_out_stock")->find();
-        if(isset($stock['usable_stock'])&& $stock['usable_stock']!=0){
-            return error_show(1003,"库存数量为 {$stock['usable_stock']} 无法备库");
-        }
+//        if(isset($stock['usable_stock'])&& $stock['usable_stock']!=0){
+//            return error_show(1003,"库存数量为 {$stock['usable_stock']} 无法备库");
+//        }
         //校验数量
         $goodnake = Db::name("good_nake")
             ->field('id,min_num')
@@ -244,11 +244,11 @@ class Resign extends Base
             return error_show($data['code'],$data['message']);
         }
         //查验仓库库存数量
-        $stock =Db::name("good_stock")->alias("a")->leftJoin("warehouse_info b","a.wsm_code=b.wsm_code")->where
-        (["spuCode"=>$info['spuCode'], "a.is_del"=>0,"a.status"=>1,"b.companyNo"=>$info['companyNo']])->field("a.id,a.usable_stock,a.wait_out_stock")->find();
-        if(isset($stock['usable_stock'])&& $stock['usable_stock']!=0){
-            return error_show(1003,"库存数量为 {$stock['usable_stock']} 无法备库");
-        }
+//        $stock =Db::name("good_stock")->alias("a")->leftJoin("warehouse_info b","a.wsm_code=b.wsm_code")->where
+//        (["spuCode"=>$info['spuCode'], "a.is_del"=>0,"a.status"=>1,"b.companyNo"=>$info['companyNo']])->field("a.id,a.usable_stock,a.wait_out_stock")->find();
+//        if(isset($stock['usable_stock'])&& $stock['usable_stock']!=0){
+//            return error_show(1003,"库存数量为 {$stock['usable_stock']} 无法备库");
+//        }
         $userinfo = $data['data'];
         $bk_code=makeNo("BK");
         $info['bk_code']=$bk_code;