|
|
@@ -11,6 +11,7 @@ use common\models\UserBind;
|
|
|
use common\models\UserBonus;
|
|
|
use common\models\UserInfo;
|
|
|
use common\libs\dataList\column\DateTime;
|
|
|
+use common\models\UserPerformance;
|
|
|
use common\models\UserWallet;
|
|
|
use common\models\Withdraw;
|
|
|
use Yii;
|
|
|
@@ -36,7 +37,6 @@ class BalanceList extends \common\libs\dataList\DataList implements DataListInte
|
|
|
'select' => 'UB.*,UI.*,UW.CASH',
|
|
|
'from' => UserBonus::tableName() . ' AS UB',
|
|
|
'join' => [
|
|
|
-// ['LEFT JOIN', UserInfo::tableName() . ' AS UI', 'UI.USER_ID=UB.USER_ID'],
|
|
|
['LEFT JOIN', User::tableName() . ' AS UI', 'UI.ID=UB.USER_ID'],
|
|
|
['LEFT JOIN', UserWallet::tableName() . ' AS UW', 'UW.USER_ID=UB.USER_ID'],
|
|
|
['LEFT JOIN', UserInfo::tableName() . ' AS I', 'I.USER_ID=UB.USER_ID']
|
|
|
@@ -45,6 +45,11 @@ class BalanceList extends \common\libs\dataList\DataList implements DataListInte
|
|
|
'page' => $this->page,
|
|
|
'pageSize' => $this->pageSize,
|
|
|
]);
|
|
|
+
|
|
|
+ // 绩效奖金
|
|
|
+ foreach ($this->listData as &$item) {
|
|
|
+ $item['PRP'] = UserPerformance::getAmounts($item['USER_ID']);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -121,46 +126,16 @@ class BalanceList extends \common\libs\dataList\DataList implements DataListInte
|
|
|
'tag'=>['type'=>'danger', 'size' => 'small', 'class'=>'no-border'],
|
|
|
],
|
|
|
],
|
|
|
- 'TOURISM_POINTS' => [
|
|
|
- 'header' => \Yii::t('ctx', 'travelIncentive'), // 旅游积分
|
|
|
- 'value' => function($row) {
|
|
|
- return (new Price([
|
|
|
- 'value' => $row['TOURISM_POINTS'],
|
|
|
- ]))->result();
|
|
|
- },
|
|
|
- 'headerOther' => [
|
|
|
- 'width' => '150',
|
|
|
- 'prop'=>'TOURISM_POINTS',
|
|
|
- ],
|
|
|
- 'valueOther' => [
|
|
|
- 'tag'=>['type'=>'danger', 'size' => 'small', 'class'=>'no-border'],
|
|
|
- ],
|
|
|
- ],
|
|
|
- 'GARAGE_POINTS' => [
|
|
|
- 'header' => \Yii::t('ctx', 'carIncentive'), // 车积分
|
|
|
+ 'USER_PERFORMANCE_BONUS' => [
|
|
|
+ 'header' => \Yii::t('ctx', 'userPerformance'), // 绩效奖金
|
|
|
'value' => function($row) {
|
|
|
return (new Price([
|
|
|
- 'value' => $row['GARAGE_POINTS'],
|
|
|
+ 'value' => $row['PRP'],
|
|
|
]))->result();
|
|
|
},
|
|
|
'headerOther' => [
|
|
|
'width' => '150',
|
|
|
- 'prop'=>'GARAGE_POINTS',
|
|
|
- ],
|
|
|
- 'valueOther' => [
|
|
|
- 'tag'=>['type'=>'danger', 'size' => 'small', 'class'=>'no-border'],
|
|
|
- ],
|
|
|
- ],
|
|
|
- 'VILLA_POINTS' => [
|
|
|
- 'header' => \Yii::t('ctx', 'villaIncentive'), // 房积分
|
|
|
- 'value' => function($row) {
|
|
|
- return (new Price([
|
|
|
- 'value' => $row['VILLA_POINTS'],
|
|
|
- ]))->result();
|
|
|
- },
|
|
|
- 'headerOther' => [
|
|
|
- 'width' => '150',
|
|
|
- 'prop'=>'VILLA_POINTS',
|
|
|
+ 'prop'=>'USER_PERFORMANCE_BONUS',
|
|
|
],
|
|
|
'valueOther' => [
|
|
|
'tag'=>['type'=>'danger', 'size' => 'small', 'class'=>'no-border'],
|
|
|
@@ -177,13 +152,6 @@ class BalanceList extends \common\libs\dataList\DataList implements DataListInte
|
|
|
},
|
|
|
'headerOther' => ['width' => '120'],
|
|
|
],
|
|
|
- 'TEL' => [
|
|
|
- 'header' => Yii::t('ctx', 'alternatePhoneNumber'), // 备用手机号码
|
|
|
- 'value' => function($row) {
|
|
|
- return "\t".$row['TEL'];
|
|
|
- },
|
|
|
- 'headerOther' => ['width' => '180'],
|
|
|
- ],
|
|
|
];
|
|
|
}
|
|
|
return $this->columns;
|