Merge pull request 'dev' (#173) from dev into main

Reviewed-on: #173
This commit is contained in:
mkm 2024-08-29 19:52:04 +08:00
commit 84b273c0b9
2 changed files with 11 additions and 3 deletions

View File

@ -29,7 +29,8 @@ class WarehouseOrderLists extends BaseAdminDataLists implements ListsSearchInter
public function setSearch(): array
{
return [
'='=>['financial_pm']
'='=>['financial_pm','supplier_id','warehouse_id','store_id'],
'between_time' => 'create_time'
];
}

View File

@ -49,7 +49,7 @@ class CartList extends BaseAdminDataLists implements ListsSearchInterface, Lists
'is_pay' => 0
];
$list = Cart::where($this->searchWhere)->where($where)
->limit($this->limitOffset, $this->limitLength)
->limit(100)
->order(['id' => 'desc'])
->select()->each(function ($item) {
@ -91,7 +91,14 @@ class CartList extends BaseAdminDataLists implements ListsSearchInterface, Lists
$item['image'] = $find['image'];
$item['cost'] = $find['cost'];
$item['store_name'] = $find['store_name'];
$item['unit_name'] = StoreProductUnit::where('id', $find['unit'])->value('name');
$unit = StoreProductUnit::where('id', $find['unit'])->find();
if($unit){
$item['unit_name']=$unit['name'];
$item['is_bulk']=$unit['is_bulk'];
}else{
$item['unit_name']='';
$item['is_bulk']=0;
}
}
}
return $list;