Merge pull request '根据用户权限隐藏价格信息' (#270) from dev into main
Reviewed-on: #270
This commit is contained in:
commit
9e7d0a3cc2
@ -51,8 +51,9 @@ class BeforehandOrderThreeLists extends BaseAdminDataLists implements ListsSearc
|
|||||||
$this->outbound_id=$outbound_id;
|
$this->outbound_id=$outbound_id;
|
||||||
$this->searchWhere[]=['oid','=',$outbound_id];
|
$this->searchWhere[]=['oid','=',$outbound_id];
|
||||||
$this->searchWhere[]=['financial_pm','=',0];
|
$this->searchWhere[]=['financial_pm','=',0];
|
||||||
|
$job_ids=$this->adminInfo['job_ids']??[];
|
||||||
return WarehouseProduct::where($this->searchWhere)->select()
|
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();
|
$find=StoreProduct::where('id',$item['product_id'])->field('store_name,image,unit')->withTrashed()->find();
|
||||||
$item['store_name']=$find['store_name'];
|
$item['store_name']=$find['store_name'];
|
||||||
$item['image']=$find['image'];
|
$item['image']=$find['image'];
|
||||||
@ -66,6 +67,12 @@ class BeforehandOrderThreeLists extends BaseAdminDataLists implements ListsSearc
|
|||||||
}else{
|
}else{
|
||||||
$item['supplier_name']='';
|
$item['supplier_name']='';
|
||||||
}
|
}
|
||||||
|
foreach($job_ids as $k=>$v){
|
||||||
|
if($v==1){
|
||||||
|
$item->price='*';
|
||||||
|
$item->total_price='*';
|
||||||
|
}
|
||||||
|
}
|
||||||
return $item;
|
return $item;
|
||||||
})
|
})
|
||||||
->toArray();
|
->toArray();
|
||||||
|
@ -51,8 +51,9 @@ class BeforehandOrderTwoLists extends BaseAdminDataLists implements ListsSearchI
|
|||||||
$this->warehousing_id=$warehousing_id;
|
$this->warehousing_id=$warehousing_id;
|
||||||
$this->searchWhere[]=['oid','=',$warehousing_id];
|
$this->searchWhere[]=['oid','=',$warehousing_id];
|
||||||
$this->searchWhere[]=['financial_pm','=',1];
|
$this->searchWhere[]=['financial_pm','=',1];
|
||||||
|
$job_ids=$this->adminInfo['job_ids']??[];
|
||||||
return WarehouseProduct::where($this->searchWhere)->select()
|
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();
|
$find=StoreProduct::where('id',$item['product_id'])->field('store_name,image,unit')->withTrashed()->find();
|
||||||
$item['store_name']=$find['store_name'];
|
$item['store_name']=$find['store_name'];
|
||||||
$item['image']=$find['image'];
|
$item['image']=$find['image'];
|
||||||
@ -66,6 +67,12 @@ class BeforehandOrderTwoLists extends BaseAdminDataLists implements ListsSearchI
|
|||||||
}else{
|
}else{
|
||||||
$item['supplier_name']='';
|
$item['supplier_name']='';
|
||||||
}
|
}
|
||||||
|
foreach($job_ids as $k=>$v){
|
||||||
|
if($v==1){
|
||||||
|
$item->price='*';
|
||||||
|
$item->total_price='*';
|
||||||
|
}
|
||||||
|
}
|
||||||
return $item;
|
return $item;
|
||||||
})
|
})
|
||||||
->toArray();
|
->toArray();
|
||||||
|
@ -57,11 +57,12 @@ class PurchaseProductOfferLists extends BaseAdminDataLists implements ListsSearc
|
|||||||
$this->is_ids=1;
|
$this->is_ids=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$job_ids=$this->adminInfo['job_ids']??[];
|
||||||
return PurchaseProductOffer::where($this->searchWhere)
|
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'])
|
->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)
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
->select()->each(function($item){
|
->select()->each(function($item) use($job_ids){
|
||||||
$find=StoreProduct::where('id',$item->product_id)->withTrashed()->find();
|
$find=StoreProduct::where('id',$item->product_id)->withTrashed()->find();
|
||||||
$item->store_name=$find->store_name;
|
$item->store_name=$find->store_name;
|
||||||
$item->store_info=$find->store_info;
|
$item->store_info=$find->store_info;
|
||||||
@ -95,7 +96,12 @@ class PurchaseProductOfferLists extends BaseAdminDataLists implements ListsSearc
|
|||||||
$item->is_storage_name='未入库';
|
$item->is_storage_name='未入库';
|
||||||
}
|
}
|
||||||
$item->pay_type_name=$item->pay_type==1?'赊账':'现金';
|
$item->pay_type_name=$item->pay_type==1?'赊账':'现金';
|
||||||
|
foreach($job_ids as $k=>$v){
|
||||||
|
if($v==1){
|
||||||
|
$item->price='*';
|
||||||
|
$item->total_price='*';
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
->toArray();
|
->toArray();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user