|
@@ -370,7 +370,7 @@ class ProductService extends Service
|
|
|
$customer['unit_name'] = $title;
|
|
|
//库存
|
|
|
$customer['product_inventory'] = $depart_id = [];
|
|
|
- if(! $user['is_main']) $depart_id = array_column($user['rule_depart'],'depart_id');
|
|
|
+ if($user['id'] != Employee::SPECIAL_ADMIN) $depart_id = array_column($user['rule_depart'],'depart_id');
|
|
|
$inventory = $this->getProductInventory([$data['id']], $depart_id);
|
|
|
if(! empty($inventory)) $customer['product_inventory'] = $inventory;
|
|
|
|
|
@@ -427,7 +427,7 @@ class ProductService extends Service
|
|
|
->select('title','id','product_category_id','code','size','unit','bar_code','retail_price','cost','depart_price','state','crt_id','crt_time','mark')
|
|
|
->orderby('id', 'desc');
|
|
|
|
|
|
- if(! $user['is_main']) {
|
|
|
+ if($user['id'] != Employee::SPECIAL_ADMIN) {
|
|
|
$user_id = $user['id'];
|
|
|
$depart_id = array_column($user['rule_depart'],'depart_id');
|
|
|
$product_id = ProductRange::where('del_time',0)
|