diff --git a/app/admin/lists/system_store_storage/SystemStoreStorageLists.php b/app/admin/lists/system_store_storage/SystemStoreStorageLists.php index 243334d71..5918a2e69 100644 --- a/app/admin/lists/system_store_storage/SystemStoreStorageLists.php +++ b/app/admin/lists/system_store_storage/SystemStoreStorageLists.php @@ -6,7 +6,10 @@ namespace app\admin\lists\system_store_storage; use app\admin\lists\BaseAdminDataLists; use app\common\model\system_store_storage\SystemStoreStorage; use app\common\lists\ListsSearchInterface; - +use app\common\model\auth\Admin; +use app\common\model\store_product\StoreProduct; +use app\common\model\system_store\SystemStore; +use app\common\model\system_store\SystemStoreStaff; /** * 门店入库记录列表 @@ -46,7 +49,18 @@ class SystemStoreStorageLists extends BaseAdminDataLists implements ListsSearchI ->field(['id', 'store_id', 'admin_id', 'staff_id', 'product_id', 'nums', 'status']) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) - ->select() + ->select()->each(function($item){ + $item['system_store_name']=SystemStore::where('id',$item['store_id'])->value('name'); + $item['admin_name']=Admin::where('id',$item['admin_id'])->value('name'); + $item['admin_name']=Admin::where('id',$item['admin_id'])->value('name'); + if($item['staff_id']>0){ + $item['staff_name']=SystemStoreStaff::where('id',$item['staff_id'])->value('staff_name'); + }else{ + $item['staff_name']='无'; + } + $item['store_name']=StoreProduct::where('id',$item['product_id'])->value('store_name'); + return $item; + }) ->toArray(); }