Просмотр исходного кода

车房奖金隐藏、绩效奖相关

kevin 1 год назад
Родитель
Сommit
775011f163

+ 10 - 42
backendApi/modules/v1/models/lists/bonus/BalanceList.php

@@ -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;

+ 7 - 7
backendApi/modules/v1/models/lists/user/IndexList.php

@@ -271,13 +271,13 @@ class IndexList extends \common\libs\dataList\DataList implements DataListInterf
                     },
                     'headerOther' => ['width' => '120'],
                 ],
-                'TEL' => [
-                    'header' => Yii::t('ctx', 'alternatePhoneNumber'),
-                    'value' => function($row) {
-                        return "\t".$row['TEL'];
-                    },
-                    'headerOther' => ['width' => '180'],
-                ],
+//                'TEL' => [
+//                    'header' => Yii::t('ctx', 'alternatePhoneNumber'),
+//                    'value' => function($row) {
+//                        return "\t".$row['TEL'];
+//                    },
+//                    'headerOther' => ['width' => '180'],
+//                ],
                 'DEC_USER_NAME' => [
                     'header' => Yii::t('ctx', 'stockistCode'),
                     'headerOther' => ['width' => '150'],

+ 1 - 0
common/messages/en-US/ctx.php

@@ -607,6 +607,7 @@ return [
     # Bonus
     'memberBonus' => 'Member Bonus',
     'memberEcoin' => 'Member Ecoin',
+    'userPerformance' => 'User Performance',
     'travelIncentive' => 'Travel Incentive',
     'carIncentive' => 'Car Incentive',
     'villaIncentive' => 'Villa Incentive',

+ 1 - 0
common/messages/zh-CN/ctx.php

@@ -609,6 +609,7 @@ return [
     # 奖金
     'memberBonus' => '会员奖金',
     'memberEcoin' => '会员余额',
+    'userPerformance' => '绩效奖金',
     'travelIncentive' => '旅游积分',
     'carIncentive' => '车积分',
     'villaIncentive' => '房积分',