From c3202c68f6df1d6af487d1ad0181dfa4e80a37d1 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Fri, 7 Jun 2024 14:30:17 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E9=97=A8=E5=BA=97?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E8=AE=B0=E5=BD=95=E5=88=97=E8=A1=A8=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SystemStoreStorageLists.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) 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(); }