diff --git a/app/admin/lists/beforehand_order/BeforehandOrderThreeLists.php b/app/admin/lists/beforehand_order/BeforehandOrderThreeLists.php index 726bca26c..048e00b3e 100644 --- a/app/admin/lists/beforehand_order/BeforehandOrderThreeLists.php +++ b/app/admin/lists/beforehand_order/BeforehandOrderThreeLists.php @@ -51,8 +51,9 @@ class BeforehandOrderThreeLists extends BaseAdminDataLists implements ListsSearc $this->outbound_id=$outbound_id; $this->searchWhere[]=['oid','=',$outbound_id]; $this->searchWhere[]=['financial_pm','=',0]; + $job_ids=$this->adminInfo['job_ids']??[]; return WarehouseProduct::where($this->searchWhere)->select() - ->each(function($item){ + ->each(function($item) use($job_ids){ $find=StoreProduct::where('id',$item['product_id'])->field('store_name,image,unit')->withTrashed()->find(); $item['store_name']=$find['store_name']; $item['image']=$find['image']; @@ -66,6 +67,12 @@ class BeforehandOrderThreeLists extends BaseAdminDataLists implements ListsSearc }else{ $item['supplier_name']=''; } + foreach($job_ids as $k=>$v){ + if($v==1){ + $item->price='*'; + $item->total_price='*'; + } + } return $item; }) ->toArray(); diff --git a/app/admin/lists/beforehand_order/BeforehandOrderTwoLists.php b/app/admin/lists/beforehand_order/BeforehandOrderTwoLists.php index 1b47ce629..7875386d9 100644 --- a/app/admin/lists/beforehand_order/BeforehandOrderTwoLists.php +++ b/app/admin/lists/beforehand_order/BeforehandOrderTwoLists.php @@ -51,8 +51,9 @@ class BeforehandOrderTwoLists extends BaseAdminDataLists implements ListsSearchI $this->warehousing_id=$warehousing_id; $this->searchWhere[]=['oid','=',$warehousing_id]; $this->searchWhere[]=['financial_pm','=',1]; + $job_ids=$this->adminInfo['job_ids']??[]; return WarehouseProduct::where($this->searchWhere)->select() - ->each(function($item){ + ->each(function($item) use($job_ids){ $find=StoreProduct::where('id',$item['product_id'])->field('store_name,image,unit')->withTrashed()->find(); $item['store_name']=$find['store_name']; $item['image']=$find['image']; @@ -66,6 +67,12 @@ class BeforehandOrderTwoLists extends BaseAdminDataLists implements ListsSearchI }else{ $item['supplier_name']=''; } + foreach($job_ids as $k=>$v){ + if($v==1){ + $item->price='*'; + $item->total_price='*'; + } + } return $item; }) ->toArray(); diff --git a/app/admin/lists/purchase_product_offer/PurchaseProductOfferLists.php b/app/admin/lists/purchase_product_offer/PurchaseProductOfferLists.php index ae004f90f..9a7342d8f 100644 --- a/app/admin/lists/purchase_product_offer/PurchaseProductOfferLists.php +++ b/app/admin/lists/purchase_product_offer/PurchaseProductOfferLists.php @@ -57,11 +57,12 @@ class PurchaseProductOfferLists extends BaseAdminDataLists implements ListsSearc $this->is_ids=1; } } + $job_ids=$this->adminInfo['job_ids']??[]; return PurchaseProductOffer::where($this->searchWhere) ->field(['id', 'supplier_id', 'order_id', 'product_id', 'price','total_price', 'buyer_nums', 'unit', 'is_buyer', 'buyer_confirm', 'is_storage', 'is_stream', 'need_num', 'mark', 'buyer_id', 'status', 'stream_admin_id', 'stream_time', 'storage_admin_id']) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) - ->select()->each(function($item){ + ->select()->each(function($item) use($job_ids){ $find=StoreProduct::where('id',$item->product_id)->withTrashed()->find(); $item->store_name=$find->store_name; $item->store_info=$find->store_info; @@ -95,7 +96,12 @@ class PurchaseProductOfferLists extends BaseAdminDataLists implements ListsSearc $item->is_storage_name='未入库'; } $item->pay_type_name=$item->pay_type==1?'赊账':'现金'; - + foreach($job_ids as $k=>$v){ + if($v==1){ + $item->price='*'; + $item->total_price='*'; + } + } }) ->toArray(); }