修改商品分组报价查询
This commit is contained in:
parent
6cdf2b1e09
commit
850f361b63
@ -43,7 +43,11 @@ class StoreProductGroupPriceLists extends BaseAdminDataLists implements ListsSea
|
|||||||
*/
|
*/
|
||||||
public function lists(): array
|
public function lists(): array
|
||||||
{
|
{
|
||||||
return StoreProduct::where($this->searchWhere)->limit($this->limitOffset, $this->limitLength)
|
$query = StoreProduct::field('id,store_name,purchase,cost,vip_price,price,unit');
|
||||||
|
if ($this->params['product_id']) {
|
||||||
|
$query->where('id|store_name', $this->params['product_id']);
|
||||||
|
}
|
||||||
|
return $query->limit($this->limitOffset, $this->limitLength)
|
||||||
->field('id,store_name,purchase,cost,vip_price,price,unit')
|
->field('id,store_name,purchase,cost,vip_price,price,unit')
|
||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
->select()->each(function ($item) {
|
->select()->each(function ($item) {
|
||||||
@ -64,7 +68,11 @@ class StoreProductGroupPriceLists extends BaseAdminDataLists implements ListsSea
|
|||||||
*/
|
*/
|
||||||
public function count(): int
|
public function count(): int
|
||||||
{
|
{
|
||||||
return StoreProduct::where($this->searchWhere)->count();
|
$query = StoreProduct::field('id,store_name,purchase,cost,vip_price,price,unit');
|
||||||
|
if ($this->params['product_id']) {
|
||||||
|
$query->where('id|store_name', $this->params['product_id']);
|
||||||
|
}
|
||||||
|
return $query->count();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user