|
|
@@ -410,25 +410,26 @@ class BonusController extends BaseController {
|
|
|
|
|
|
|
|
|
$result = [];
|
|
|
- foreach ($calcBonus as $key => $data) {
|
|
|
- $result[$key]['PERIOD_NUM'] = ['name' => '期数', 'value' => $data['PERIOD_NUM']];
|
|
|
- $result[$key]['LAST_DEC_NAME'] = ['name' => '级别', 'value' => Cache::getDecLevelConfig()[$data['LAST_DEC_LV']]['LEVEL_NAME']];
|
|
|
- $result[$key]['LAST_EMP_NAME'] = ['name' => '聘级', 'value' => Cache::getEmpLevelConfig()[$data['LAST_EMP_LV']]['LEVEL_NAME']];
|
|
|
- $result[$key]['LAST_ELITE_NAME'] = ['name' => 'Elite级别', 'value' => Cache::getEliteLevelConfig()[($data['LAST_ELITE_LV'] ?: EliteLevel::getDefaultLevelId())]['LEVEL_NAME']];
|
|
|
-
|
|
|
- $result[$key]['BONUS_E'] = ['name' => 'Elite奖金', 'value' => Tool::formatPrice($data['BONUS_E'])];
|
|
|
- $result[$key]['BONUS_PE'] = ['name' => 'SuperElite奖金', 'value' => Tool::formatPrice($data['BONUS_PE'])];
|
|
|
- $result[$key]['BONUS_SE'] = ['name' => 'ProElite奖金', 'value' => Tool::formatPrice($data['BONUS_SE'])];
|
|
|
- $result[$key]['BONUS_LB'] = ['name' => 'LeaderShip奖金', 'value' => Tool::formatPrice($data['BONUS_LB'])];
|
|
|
- $result[$key]['BONUS_ST'] = ['name' => '店铺奖', 'value' => Tool::formatPrice($data['BONUS_ST'])];
|
|
|
- $result[$key]['BONUS_WB'] = ['name' => '迎新奖', 'value' => Tool::formatPrice($data['BONUS_WB'])];
|
|
|
- $result[$key]['BONUS_CAR'] = ['name' => '车奖', 'value' => Tool::formatPrice($data['BONUS_CAR'])];
|
|
|
- $result[$key]['BONUS_TOTAL'] = ['name' => '总奖金', 'value' => Tool::formatPrice($data['BONUS_TOTAL'])];
|
|
|
+ foreach ($calcBonus as $data) {
|
|
|
+ $result[] = [
|
|
|
+ ['name' => 'period', 'value' => $data['PERIOD_NUM']],
|
|
|
+ ['name' => 'decLevel', 'value' => Cache::getDecLevelConfig()[$data['LAST_DEC_LV']]['LEVEL_NAME']],
|
|
|
+ ['name' => 'empLevel', 'value' => Cache::getEmpLevelConfig()[$data['LAST_EMP_LV']]['LEVEL_NAME']],
|
|
|
+ ['name' => 'eliteLevel', 'value' => Cache::getEliteLevelConfig()[($data['LAST_ELITE_LV'] ?: EliteLevel::getDefaultLevelId())]['LEVEL_NAME']],
|
|
|
+ ['name' => 'eliteBonus', 'value' => Tool::formatPrice($data['BONUS_E'])],
|
|
|
+ ['name' => 'proEliteBonus', 'value' => Tool::formatPrice($data['BONUS_PE'])],
|
|
|
+ ['name' => 'superEliteBonus', 'value' => Tool::formatPrice($data['BONUS_SE'])],
|
|
|
+ ['name' => 'leaderShipBonus', 'value' => Tool::formatPrice($data['BONUS_LB'])],
|
|
|
+ ['name' => 'stockistBonus', 'value' => Tool::formatPrice($data['BONUS_ST'])],
|
|
|
+ ['name' => 'welcomeBonus', 'value' => Tool::formatPrice($data['BONUS_WB'])],
|
|
|
+ ['name' => 'carBonus', 'value' => Tool::formatPrice($data['BONUS_CAR'])],
|
|
|
+ ['name' => 'totalBonus', 'value' => Tool::formatPrice($data['BONUS_TOTAL'])],
|
|
|
+ ['name' => 'userPerformanceBonus', 'value' => Tool::formatPrice($data['BONUS_PB'])],
|
|
|
+ ];
|
|
|
|
|
|
- $result[$key]['BONUS_PB'] = ['name' => '绩效奖金', 'value' => Tool::formatPrice($data['BONUS_PB'])];
|
|
|
}
|
|
|
|
|
|
- return static::notice(['tableData' => $result, 'tableKey' => '']);
|
|
|
+ return static::notice(['tableData' => $result]);
|
|
|
}
|
|
|
|
|
|
/**
|