diff --git a/app/admin/lists/warehouse_product/WarehouseProductLists.php b/app/admin/lists/warehouse_product/WarehouseProductLists.php index 8dbdc117..a9c4a473 100644 --- a/app/admin/lists/warehouse_product/WarehouseProductLists.php +++ b/app/admin/lists/warehouse_product/WarehouseProductLists.php @@ -11,6 +11,7 @@ use app\common\model\store_product\StoreProduct; use app\common\model\system_store\SystemStore; use app\common\model\warehouse\Warehouse; use app\common\lists\ListsExcelInterface; +use app\common\model\store_category\StoreCategory; use app\common\model\store_product_unit\StoreProductUnit; use app\common\model\supplier\Supplier; @@ -81,6 +82,7 @@ class WarehouseProductLists extends BaseAdminDataLists implements ListsSearchInt $item->price = ''; $item->unit_name = ''; $item->store_info = ''; + $item->top_cate_name = ''; if ($item->financial_pm == 0) { $item->financial_pm_name = '出库'; } else { @@ -104,13 +106,14 @@ class WarehouseProductLists extends BaseAdminDataLists implements ListsSearchInt $item->admin_name = ''; } if ($item->product_id) { - $find = StoreProduct::where('id', $item->product_id)->field('price,image,store_name,unit,store_info')->find(); + $find = StoreProduct::where('id', $item->product_id)->field('price,image,store_name,unit,store_info,top_cate_id')->withTrashed()->find(); if($find){ $item->store_name = $find->store_name . '|' . $item->product_id; $item->image = $find->image; $item->price = $find->price; $item->unit_name = StoreProductUnit::where('id', $find->unit)->value('name'); $item->store_info =$find->store_info; + $item->top_cate_name =StoreCategory::where('id', $find->top_cate_id)->value('name'); } } if ($item->warehouse_id) { @@ -191,6 +194,7 @@ class WarehouseProductLists extends BaseAdminDataLists implements ListsSearchInt 'admin_name' => '操作人员', 'warehouse_name' => '仓库', 'store_name' => '商品名称', + 'top_cate_name' => '分类', 'store_info' => '规格', 'unit_name' => '单位', 'financial_pm_name' => '出入库', diff --git a/app/common/model/OperationLog.php b/app/common/model/OperationLog.php index fd72f600..ff67252f 100644 --- a/app/common/model/OperationLog.php +++ b/app/common/model/OperationLog.php @@ -6,6 +6,6 @@ namespace app\common\model; class OperationLog extends BaseModel { - protected $json = ['params']; + // protected $json = ['params']; } \ No newline at end of file