|
@@ -43,6 +43,15 @@ class Cron
|
|
|
}
|
|
|
|
|
|
|
|
|
+
|
|
|
+ 区域毛利 = 区域内所有门店的采购商品的零售价总额 x 30%
|
|
|
+
|
|
|
+ 城市分润 = 区域毛利 x 1%
|
|
|
+
|
|
|
+ 区县分润 = 区域毛利 x 3%
|
|
|
+
|
|
|
+ 街道分润 = 区域毛利 x 5%
|
|
|
+ */
|
|
|
public function area_api()
|
|
|
{
|
|
|
|
|
@@ -52,10 +61,15 @@ class Cron
|
|
|
foreach ($member as $k => $v) {
|
|
|
|
|
|
$role = Dever::db('setting/role')->find($v['role']);
|
|
|
+ $profit = $role['profit'];
|
|
|
+ if (!$profit) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
$temp = explode(',', $v['area']);
|
|
|
if ($role['type'] == 2) {
|
|
|
if ($role['area'] == 1) {
|
|
|
|
|
|
+
|
|
|
} elseif ($role['area'] == 2) {
|
|
|
|
|
|
} elseif ($role['area'] == 3) {
|