|
|
@@ -590,9 +590,13 @@ html;
|
|
|
if (!$asn || strlen(request("asn"))<13)$this->error("非法ASN单号");
|
|
|
$query = Store::query()->whereIn("asn_code",$asn);
|
|
|
if ($owner)$query->where("owner_id",$owner);
|
|
|
- $store = $query->with("storeItems")->first();
|
|
|
- if (!$store)$this->error("无此ASN单号");
|
|
|
- $this->success($store->storeItems);
|
|
|
+ $stores = $query->with("storeItems")->get();
|
|
|
+ if (!$stores)$this->error("无此ASN单号");
|
|
|
+ $items = [];
|
|
|
+ $stores->each(function ($store)use(&$items){
|
|
|
+ if ($store->storeItems)$items = array_merge($items,$store->storeItems->toArray());
|
|
|
+ });
|
|
|
+ $this->success($items);
|
|
|
}
|
|
|
|
|
|
/**
|