|
@@ -234,8 +234,7 @@ class StatisticsService extends Service
|
|
//总社id
|
|
//总社id
|
|
$head = $user['head']['id'] ?? 0;
|
|
$head = $user['head']['id'] ?? 0;
|
|
//当前门店
|
|
//当前门店
|
|
- $current_top_depart_id = $user['depart_top'][0] ?? [];
|
|
|
|
- $current_top_depart_id = $current_top_depart_id['depart_id'] ?? 0;
|
|
|
|
|
|
+ $current_top_depart_id = $this->getMyTopDepart($user);
|
|
|
|
|
|
//需要所有数据的门店
|
|
//需要所有数据的门店
|
|
$setting = Setting::where('setting_name','bt_top_depart_id')->first();
|
|
$setting = Setting::where('setting_name','bt_top_depart_id')->first();
|
|
@@ -306,8 +305,7 @@ class StatisticsService extends Service
|
|
//总社id
|
|
//总社id
|
|
$head = $user['head']['id'] ?? 0;
|
|
$head = $user['head']['id'] ?? 0;
|
|
//当前门店
|
|
//当前门店
|
|
- $current_top_depart_id = $user['depart_top'][0] ?? [];
|
|
|
|
- $current_top_depart_id = $current_top_depart_id['depart_id'] ?? 0;
|
|
|
|
|
|
+ $current_top_depart_id = $this->getMyTopDepart($user);
|
|
|
|
|
|
//销售订单类型
|
|
//销售订单类型
|
|
$model_type = 0;
|
|
$model_type = 0;
|
|
@@ -436,8 +434,7 @@ class StatisticsService extends Service
|
|
//总社id
|
|
//总社id
|
|
$head = $user['head']['id'] ?? 0;
|
|
$head = $user['head']['id'] ?? 0;
|
|
//当前门店
|
|
//当前门店
|
|
- $current_top_depart_id = $user['depart_top'][0] ?? [];
|
|
|
|
- $current_top_depart_id = $current_top_depart_id['depart_id'] ?? 0;
|
|
|
|
|
|
+ $current_top_depart_id = $this->getMyTopDepart($user);
|
|
|
|
|
|
//销售订单类型
|
|
//销售订单类型
|
|
$model_type = 0;
|
|
$model_type = 0;
|
|
@@ -561,8 +558,7 @@ class StatisticsService extends Service
|
|
//总社id
|
|
//总社id
|
|
$head = $user['head']['id'] ?? 0;
|
|
$head = $user['head']['id'] ?? 0;
|
|
//当前门店
|
|
//当前门店
|
|
- $current_top_depart_id = $user['depart_top'][0] ?? [];
|
|
|
|
- $current_top_depart_id = $current_top_depart_id['depart_id'] ?? 0;
|
|
|
|
|
|
+ $current_top_depart_id = $this->getMyTopDepart($user);
|
|
|
|
|
|
//销售订单类型
|
|
//销售订单类型
|
|
$model_type = 0;
|
|
$model_type = 0;
|
|
@@ -662,8 +658,7 @@ class StatisticsService extends Service
|
|
//总社id
|
|
//总社id
|
|
$head = $user['head']['id'] ?? 0;
|
|
$head = $user['head']['id'] ?? 0;
|
|
//当前门店
|
|
//当前门店
|
|
- $current_top_depart_id = $user['depart_top'][0] ?? [];
|
|
|
|
- $current_top_depart_id = $current_top_depart_id['depart_id'] ?? 0;
|
|
|
|
|
|
+ $current_top_depart_id = $this->getMyTopDepart($user);
|
|
|
|
|
|
//特殊的门店
|
|
//特殊的门店
|
|
$setting = Setting::where('setting_name','bt_top_depart_id')->first();
|
|
$setting = Setting::where('setting_name','bt_top_depart_id')->first();
|
|
@@ -872,8 +867,7 @@ class StatisticsService extends Service
|
|
//总社id
|
|
//总社id
|
|
$head = $user['head']['id'] ?? 0;
|
|
$head = $user['head']['id'] ?? 0;
|
|
//当前门店
|
|
//当前门店
|
|
- $current_top_depart_id = $user['depart_top'][0] ?? [];
|
|
|
|
- $current_top_depart_id = $current_top_depart_id['depart_id'] ?? 0;
|
|
|
|
|
|
+ $current_top_depart_id = $this->getMyTopDepart($user);
|
|
|
|
|
|
//线下 销售订单类型
|
|
//线下 销售订单类型
|
|
$model_type = SalesOrder::Model_type_one;
|
|
$model_type = SalesOrder::Model_type_one;
|
|
@@ -1007,8 +1001,7 @@ class StatisticsService extends Service
|
|
//总社id
|
|
//总社id
|
|
$head = $user['head']['id'] ?? 0;
|
|
$head = $user['head']['id'] ?? 0;
|
|
//当前门店
|
|
//当前门店
|
|
- $current_top_depart_id = $user['depart_top'][0] ?? [];
|
|
|
|
- $current_top_depart_id = $current_top_depart_id['depart_id'] ?? 0;
|
|
|
|
|
|
+ $current_top_depart_id = $this->getMyTopDepart($user);
|
|
|
|
|
|
//线下 销售订单类型
|
|
//线下 销售订单类型
|
|
$model_type = SalesOrder::Model_type_four;
|
|
$model_type = SalesOrder::Model_type_four;
|