feat: 添加商品仓库列表显示字段

This commit is contained in:
mkm 2024-09-20 09:26:06 +08:00
parent ae0faa68c2
commit 4dab9bc4c9

View File

@ -75,6 +75,9 @@ class WarehouseProductLists extends BaseAdminDataLists implements ListsSearchInt
->limit($this->limitOffset, $this->limitLength)
->order(['id' => 'desc'])
->select()->each(function ($item) {
$item->store_name = '';
$item->image = '';
$item->price = '';
if ($item->financial_pm == 0) {
$item->financial_pm_name = '出库';
} else {
@ -104,10 +107,6 @@ class WarehouseProductLists extends BaseAdminDataLists implements ListsSearchInt
$item->image = $find->image;
$item->price = $find->price;
}
} else {
$item->store_name = '';
$item->image = '';
$item->price = '';
}
if ($item->warehouse_id) {
$item->warehouse_name = Warehouse::where('id', $item->warehouse_id)->value('name');