method = "post"; $this->url = config("api.syrius.request.bin_location"); $this->data = [[ "binLocationId" => $locationId, //库位ID "warehouseId" => $warehouse->id, //仓库ID "warehouseName" => $warehouse->name,//仓库名 "attributes" => [ "shelfId" => $attribute->id, //架ID "shelfLayer" => $attribute->layer, //架层 "numOfLayer" => $attribute->num, //架层数 ], ]]; $this->response(); } /** * 获取库位 * * @param string|array $locationId * @param string $warehouseId * @param int $page * @param int $paginate */ public function getBinLocation($locationId, string $warehouseId, int $page = 0, int $paginate= 1) { if (!is_array($locationId))$locationId = [$locationId]; $this->method = "get"; $this->url = config("api.syrius.request.find_all_bin_location"); $this->data = [ "pageIndex" => $page, //页数 "pageSize" => $paginate, //行数 "warehouseId"=> $warehouseId, //仓库ID "binLocationIds"=> $locationId, //库位ID数组 ]; $this->response(); } /** * 删除库位 * * @param string|array $locationId * @param string $warehouseId */ public function delBinLocation($locationId, string $warehouseId) { if (!is_array($locationId))$locationId = [$locationId]; $this->method = "delete"; $this->url = config("api.syrius.request.delete_bin_location"); $this->data = [ "warehouseId" => $warehouseId, "binLocationIds" => $locationId ]; $this->response(); } }