|
@@ -30,7 +30,7 @@ class RangeService extends Service
|
|
|
})->select('customer_id')->get()->toArray();
|
|
|
|
|
|
$return_id = array_unique(array_column($customer_id,'customer_id'));
|
|
|
- if(! empty($search['top_depart_id'])){
|
|
|
+ if(! empty($search['top_depart_id']) && ! empty($user['is_all_depart'])){
|
|
|
$id = DB::table('customer')
|
|
|
->where('del_time',0)
|
|
|
->where('top_depart_id',$search['top_depart_id'])
|
|
@@ -60,7 +60,7 @@ class RangeService extends Service
|
|
|
})->select('supplier_id')->get()->toArray();
|
|
|
|
|
|
$return_id = array_unique(array_column($supplier_id,'supplier_id'));
|
|
|
- if(! empty($search['top_depart_id'])){
|
|
|
+ if(! empty($search['top_depart_id']) && ! empty($user['is_all_depart'])){
|
|
|
$id = DB::table('supplier')
|
|
|
->where('del_time',0)
|
|
|
->where('top_depart_id',$search['top_depart_id'])
|
|
@@ -86,7 +86,7 @@ class RangeService extends Service
|
|
|
->toArray();
|
|
|
|
|
|
$return_id = array_unique(array_column($product_id,'product_id'));
|
|
|
- if(! empty($search['top_depart_id'])){
|
|
|
+ if(! empty($search['top_depart_id']) && ! empty($user['is_all_depart'])){
|
|
|
$id = DB::table('product')
|
|
|
->where('del_time',0)
|
|
|
->where('top_depart_id',$search['top_depart_id'])
|
|
@@ -119,7 +119,7 @@ class RangeService extends Service
|
|
|
})->select('sales_order_id')->get()
|
|
|
->toArray();
|
|
|
$return_id = array_unique(array_merge_recursive($sales_order_id,array_column($sales_order_id2,'sales_order_id')));
|
|
|
- if(! empty($search['top_depart_id'])){
|
|
|
+ if(! empty($search['top_depart_id']) && ! empty($user['is_all_depart'])){
|
|
|
$id = DB::table('sales_order')
|
|
|
->where('del_time',0)
|
|
|
->where('top_depart_id',$search['top_depart_id'])
|
|
@@ -141,7 +141,7 @@ class RangeService extends Service
|
|
|
->select('construction_id')
|
|
|
->get()->toArray();
|
|
|
$return_id = array_unique(array_column($construction_id,'construction_id'));
|
|
|
- if(! empty($search['top_depart_id'])){
|
|
|
+ if(! empty($search['top_depart_id']) && ! empty($user['is_all_depart'])){
|
|
|
$id = DB::table('construction')
|
|
|
->where('del_time',0)
|
|
|
->where('top_depart_id',$search['top_depart_id'])
|
|
@@ -167,7 +167,7 @@ class RangeService extends Service
|
|
|
->toArray();
|
|
|
|
|
|
$return_id = array_unique(array_column($return_exchange_id,'return_exchange_id'));
|
|
|
- if(! empty($search['top_depart_id'])){
|
|
|
+ if(! empty($search['top_depart_id']) && ! empty($user['is_all_depart'])){
|
|
|
$id = DB::table('return_exchange_order')
|
|
|
->where('del_time',0)
|
|
|
->where('top_depart_id',$search['top_depart_id'])
|
|
@@ -193,7 +193,7 @@ class RangeService extends Service
|
|
|
->toArray();
|
|
|
|
|
|
$return_id = array_unique(array_column($return_exchange_id,'sports_bag_id'));
|
|
|
- if(! empty($search['top_depart_id'])){
|
|
|
+ if(! empty($search['top_depart_id']) && ! empty($user['is_all_depart'])){
|
|
|
$id = DB::table('sports_bag')
|
|
|
->where('del_time',0)
|
|
|
->where('top_depart_id',$search['top_depart_id'])
|