mirror of
https://gitee.com/hzchunfen/erp.git
synced 2025-12-01 22:50:44 +00:00
44 lines
933 B
PHP
44 lines
933 B
PHP
<?php
|
|
|
|
namespace App\Filters;
|
|
|
|
use App\Models\Goods;
|
|
use App\Models\GoodsSku;
|
|
|
|
class GoodsSkuLocationFilter extends Filters
|
|
{
|
|
public function date($value)
|
|
{
|
|
return $this->builder->where('date', $value);
|
|
}
|
|
|
|
public function goodsTitle($value)
|
|
{
|
|
$goodsId = Goods::query()->where('title', $value)->value('id');
|
|
|
|
return $this->builder->where('goods_id', $goodsId);
|
|
}
|
|
|
|
public function goodsCode($value)
|
|
{
|
|
$goodsId = Goods::query()->where('goods_code', $value)->value('id');
|
|
|
|
return $this->builder->where('goods_id', $goodsId);
|
|
}
|
|
|
|
public function externalSkuId($value)
|
|
{
|
|
return $this->builder->where('external_sku_id', $value);
|
|
}
|
|
|
|
public function location($value)
|
|
{
|
|
return $this->builder->where('location', $value);
|
|
}
|
|
|
|
public function status($value)
|
|
{
|
|
return $this->builder->where('status', $value);
|
|
}
|
|
}
|