Explorar o código

添加采购单权限

hu hao %!s(int64=5) %!d(string=hai) anos
pai
achega
1dfd08997c

+ 3 - 1
app/Http/Controllers/api/thirdPart/weixin/ProcurementController.php

@@ -141,7 +141,9 @@ class ProcurementController extends Controller
         $procurementDeliveries=ProcurementDeliverie::query()
             ->with('procurement.ownerMaterial.material')
             ->whereIn('status',[0,1])//1:待送货,2:送货中
-            ->whereIn('supplier_id',$supplier_ids)
+            ->whereHas('procurement',function (Builder $query)use($supplier_ids){
+                $query->whereIn('supplier_id',$supplier_ids);
+            })
             ->get();
         $procurementDeliveries=$procurementDeliveries->filter(function ($item){
             return isset($item->procurement);