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

Merge branch 'master' into feature/calc-serve-1646

root 3 лет назад
Родитель
Сommit
2ef4795acc
94 измененных файлов с 887 добавлено и 574 удалено
  1. 4 2
      backendApi/config/menu.php
  2. 5 5
      backendApi/modules/v1/controllers/AtlasController.php
  3. 3 1
      backendApi/modules/v1/controllers/BaseController.php
  4. 9 9
      backendApi/modules/v1/controllers/BonusController.php
  5. 3 3
      backendApi/modules/v1/controllers/ConfigController.php
  6. 24 23
      backendApi/modules/v1/controllers/FinanceController.php
  7. 1 1
      backendApi/modules/v1/controllers/LogController.php
  8. 1 1
      backendApi/modules/v1/controllers/ReconsumeController.php
  9. 5 4
      backendApi/modules/v1/controllers/ShopController.php
  10. 8 8
      backendApi/modules/v1/controllers/UserController.php
  11. 6 6
      backendApi/modules/v1/models/AdminForm.php
  12. 1 1
      backendApi/modules/v1/models/LoginForm.php
  13. 16 1
      backendApi/modules/v1/models/lists/bonus/BalanceList.php
  14. 4 4
      backendApi/modules/v1/models/lists/bonus/PerfMonthList.php
  15. 12 12
      backendApi/modules/v1/models/lists/bonus/PerfPeriodList.php
  16. 1 1
      backendApi/modules/v1/models/lists/bonus/PeriodBonusList.php
  17. 27 7
      backendApi/modules/v1/models/lists/shop/OrderList.php
  18. 12 12
      backendEle/src/router/index.js
  19. 1 1
      backendEle/src/utils/config_trial.js
  20. 3 3
      backendEle/src/utils/editor.js
  21. 11 1
      backendEle/src/utils/tool.js
  22. 5 5
      backendEle/src/views/ad/edit.vue
  23. 10 10
      backendEle/src/views/ad/list.vue
  24. 1 4
      backendEle/src/views/article/detail.vue
  25. 3 3
      backendEle/src/views/file/export.vue
  26. 2 7
      backendEle/src/views/finance/recharge.vue
  27. 39 40
      backendEle/src/views/login/modify-password.vue
  28. 4 3
      backendEle/src/views/shop/index.vue
  29. 3 4
      backendEle/src/views/user/move-add.vue
  30. 22 17
      common/helpers/bonus/BonusCalc.php
  31. 33 6
      common/helpers/bonus/BonusSend.php
  32. 1 1
      common/helpers/bonus/PerfCalc.php
  33. 2 2
      common/libs/export/BaseExport.php
  34. 14 0
      common/models/Order.php
  35. 2 2
      common/models/ShopGoods.php
  36. 1 1
      common/models/StarCrownLevel.php
  37. 1 1
      common/models/User.php
  38. 1 0
      common/models/UserNetwork.php
  39. 4 4
      common/models/forms/AdminAddUserForm.php
  40. 8 8
      common/models/forms/ChangeBalanceForm.php
  41. 24 22
      common/models/forms/ChangePerfForm.php
  42. 1 1
      common/models/forms/ChangeShowEmpLvForm.php
  43. 1 1
      common/models/forms/CloseDecForm.php
  44. 1 1
      common/models/forms/CloseLoginForm.php
  45. 1 1
      common/models/forms/DealTypeForm.php
  46. 1 1
      common/models/forms/DecLevelLogForm.php
  47. 1 1
      common/models/forms/DecPackageForm.php
  48. 1 1
      common/models/forms/DecRoleLogForm.php
  49. 2 2
      common/models/forms/InvoiceAuditForm.php
  50. 2 2
      common/models/forms/InvoiceBalanceAuditForm.php
  51. 42 42
      common/models/forms/NetMoveForm.php
  52. 2 1
      common/models/forms/OrderForm.php
  53. 6 7
      common/models/forms/ReceiveAddressForm.php
  54. 1 1
      common/models/forms/RechargeForm.php
  55. 2 2
      common/models/forms/ReconsumeForm.php
  56. 2 2
      common/models/forms/RegInfoAuditForm.php
  57. 1 1
      common/models/forms/RegTypeForm.php
  58. 2 2
      common/models/forms/ResendQYForm.php
  59. 1 1
      common/models/forms/SendCFAndLXForm.php
  60. 2 2
      common/models/forms/ShopGoodsForm.php
  61. 4 3
      common/models/forms/UploadForm.php
  62. 11 11
      common/models/forms/UserBasicForm.php
  63. 1 1
      common/models/forms/UserBindForm.php
  64. 2 2
      common/models/forms/UserTeamworkForm.php
  65. 2 2
      common/models/forms/WithdrawForm.php
  66. 1 1
      console/controllers/UserController.php
  67. 1 0
      frontendApi/config/menu.php
  68. 1 0
      frontendApi/config/urlManagerRules.php
  69. 3 3
      frontendApi/modules/v1/controllers/AtlasController.php
  70. 57 6
      frontendApi/modules/v1/controllers/BonusController.php
  71. 2 2
      frontendApi/modules/v1/controllers/ConfigController.php
  72. 19 1
      frontendApi/modules/v1/controllers/DashboardController.php
  73. 6 6
      frontendApi/modules/v1/controllers/FinanceController.php
  74. 1 1
      frontendApi/modules/v1/controllers/OauthController.php
  75. 18 18
      frontendApi/modules/v1/models/LoginForm.php
  76. 12 0
      frontendEle/src/router/index.js
  77. 33 0
      frontendEle/src/utils/config_trial.js
  78. 11 1
      frontendEle/src/utils/tool.js
  79. 21 14
      frontendEle/src/views/atlas/network-opt.vue
  80. 57 0
      frontendEle/src/views/bonus/historical-cumulative-bonus.vue
  81. 1 2
      frontendEle/src/views/bonus/other.vue
  82. 21 11
      frontendEle/src/views/config/receive-address-edit.vue
  83. 92 89
      frontendEle/src/views/dashboard/index.vue
  84. 4 3
      frontendEle/src/views/finance/recharge.vue
  85. 2 2
      frontendEle/src/views/shop/dec-order-list.vue
  86. 6 6
      frontendEle/src/views/shop/index.vue
  87. 1 1
      frontendEle/src/views/shop/order-backing-out.vue
  88. 2 2
      frontendEle/src/views/shop/order-list.vue
  89. 3 3
      frontendEle/src/views/shop/order.vue
  90. 1 1
      frontendEle/src/views/user/upgrade.vue
  91. 3 2
      sql/upgrade/1350.sql
  92. 7 4
      sql/upgrade/1540.sql
  93. 4 0
      sql/upgrade/2022_08_12_crown.sql
  94. 68 58
      sql/upgrade/QTRCALC.sql

+ 4 - 2
backendApi/config/menu.php

@@ -86,8 +86,8 @@ return [
             ['name'=>'修改个人资料', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'modify-profile', 'routePath'=>'user/modify-profile', 'show'=>0,],
             ['name'=>'会员状态', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'modify-status', 'routePath'=>'user/modify-status', 'show'=>0,],
             ['name'=>'密码修改状态', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'is-modify-password-status', 'routePath'=>'user/is-modify-password-status', 'show'=>0,],
-//            ['name'=>'Empty order operation', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'user-add-opt', 'routePath'=>'user/user-add-opt', 'show'=>1,],//空单操作
-            ['name'=>'空单添加', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'user-add', 'routePath'=>'user/user-add', 'show'=>0,],
+            ['name'=>'Empty order operation', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'user-add-opt', 'routePath'=>'user/user-add-opt', 'show'=>1,],//空单操作
+//            ['name'=>'空单添加', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'user-add', 'routePath'=>'user/user-add', 'show'=>0,],
 //            ['name'=>'Empty list', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'empty-list', 'routePath'=>'user/empty-list', 'show'=>0,], // 空单列表
 //            ['name'=>'空单批量1导入', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'import-users-to-excel-table', 'routePath'=>'user/import-users-to-excel-table', 'show'=>0,],
 //            ['name'=>'空单批量2添加', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'import-users-add', 'routePath'=>'user/import-users-add', 'show'=>0,],
@@ -442,6 +442,8 @@ return [
             ['name'=>'Add', 'class'=>'', 'icon'=>'', 'controller'=>'ad', 'action'=>'add', 'routePath'=>'ad/add', 'show'=>0,],
             ['name'=>'Edit', 'class'=>'', 'icon'=>'', 'controller'=>'ad', 'action'=>'edit', 'routePath'=>'ad/edit', 'show'=>0,],
             ['name'=>'Delete', 'class'=>'', 'icon'=>'', 'controller'=>'ad', 'action'=>'ad-delete', 'routePath'=>'ad/ad-delete', 'show'=>0,],
+            ['name'=>'Hide', 'class'=>'', 'icon'=>'', 'controller'=>'ad', 'action'=>'ad-hide', 'routePath'=>'ad/ad-hide', 'show'=>0,],
+            ['name'=>'Un-Hide', 'class'=>'', 'icon'=>'', 'controller'=>'ad', 'action'=>'ad-un-hide', 'routePath'=>'ad/ad-un-hide', 'show'=>0,],
         ]
     ],
     'log'=>[

+ 5 - 5
backendApi/modules/v1/controllers/AtlasController.php

@@ -72,7 +72,7 @@ class AtlasController extends BaseController {
         if ($userName !== '') {
             //$oneUser = Info::getUserByUserNameFromUserInfoTable($userName);
             if (!$userId = Info::getUserIdByUserName($userName)) {
-                return static::notice('会员不存在', 400);
+                return static::notice('Member does not exist', 400); // 会员不存在
             }
         } else {
             $userId = Yii::$app->params['mainUserId'];
@@ -141,11 +141,11 @@ class AtlasController extends BaseController {
             $userId = Yii::$app->params['mainUserId'];
         } else {
             if (!$userId = Info::getUserIdByUserName($userName)) {
-                return static::notice('会员不存在', 400);
+                return static::notice('Member does not exist', 400); // 会员不存在
             }
         }
         $form = new AtlasExportForm();
-        $result = $form->run(array_merge($filter, ['others' => ['userId' => $userId, 'deep' => $deep, 'periodNum' => $periodNum]]), '开拓网络列表');
+        $result = $form->run(array_merge($filter, ['others' => ['userId' => $userId, 'deep' => $deep, 'periodNum' => $periodNum]]), 'Sponsor_Network'); // 开拓网络列表
         if (!$result) {
             return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
         }
@@ -206,11 +206,11 @@ class AtlasController extends BaseController {
             $userId = Yii::$app->params['mainUserId'];
         } else {
             if (!$userId = Info::getUserIdByUserName($userName)) {
-                return static::notice('会员不存在', 400);
+                return static::notice('Member does not exist', 400); // 会员不存在
             }
         }
         $form = new AtlasExportForm();
-        $result = $form->run(array_merge($filter, ['others' => ['userId' => $userId, 'deep' => $deep, 'periodNum' => $periodNum]]), '安置网络列表');
+        $result = $form->run(array_merge($filter, ['others' => ['userId' => $userId, 'deep' => $deep, 'periodNum' => $periodNum]]), 'Placement_Network'); // 安置网络列表
         if (!$result) {
             return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
         }

+ 3 - 1
backendApi/modules/v1/controllers/BaseController.php

@@ -153,12 +153,14 @@ class BaseController extends \yii\rest\ActiveController {
             if ($beforeFun) $beforeFun($selected);
             if ($statusTo == 'hide') {
                 $modelClass::updateAll(['STATUS' => 0], $condition, $params);
+                $stateStr = 'hide';
             } else {
                 $modelClass::updateAll(['STATUS' => 1], $condition, $params);
+                $stateStr = 'Unhide';
             }
             if ($afterFun) $afterFun($selected);
             $transaction->commit();
-            return self::notice($statusTo.' successfully');//删除成功
+            return self::notice($stateStr.' successfully'); // 隐藏/取消隐藏 成功
         } catch (Exception $e) {
             $transaction->rollBack();
             return self::notice($e->getMessage(), 500);

+ 9 - 9
backendApi/modules/v1/controllers/BonusController.php

@@ -283,7 +283,7 @@ class BonusController extends BaseController {
             'TRANSFER_SN' => 'TRANSFER_SN',
         ]);
         $form = new BonusExportForm();
-        $result = $form->run($filter, '奖金流水');
+        $result = $form->run($filter, 'Bonus_Flow'); // 奖金流水
         if (!$result) {
             return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
         }
@@ -693,7 +693,7 @@ class BonusController extends BaseController {
                 return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
             }
         }
-        return static::notice('非法请求', 400);
+        return static::notice('Illegal request', 400); // 非法请求
     }
 
     /**
@@ -901,7 +901,7 @@ class BonusController extends BaseController {
 //        $filter['condition'] .= ' AND CB.PERIOD_NUM=:PERIOD_NUM';
 //        $filter['params'][':PERIOD_NUM'] = $periodNum;
         $form = new BonusExportForm();
-        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth]]), '往期奖金');
+        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth]]), 'Member Bonus'); // 往期奖金
         if (!$result) {
             return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
         }
@@ -1076,7 +1076,7 @@ class BonusController extends BaseController {
         $periodNum = Yii::$app->request->get('periodNum');
         if (!$periodNum) return static::notice('请填写期数', 400);
         if (!$userName = Yii::$app->request->get('userName')) return static::notice('请填写会员编号', 400);
-        if(!$userId = Info::getUserIdByUserName($userName))  return static::notice('会员不存在', 400);
+        if(!$userId = Info::getUserIdByUserName($userName))  return static::notice('Member does not exist', 400); // 会员不存在
         //会员是否有业绩单
         if(!PerfOrder::find()->where('USER_ID=:USER_ID AND PERIOD_NUM=:PERIOD_NUM',[':USER_ID'=>$userId,':PERIOD_NUM'=>$periodNum])->exists()){
             return static::notice('该会员本期没有业绩单', 400);
@@ -1096,7 +1096,7 @@ class BonusController extends BaseController {
         $periodNum = Yii::$app->request->get('periodNum');
         if (!$periodNum) return static::notice('请填写期数', 400);
         if (!$userName = Yii::$app->request->get('userName')) return static::notice('请填写会员编号', 400);
-        if(!$userId = Info::getUserIdByUserName($userName))  return static::notice('会员不存在', 400);
+        if(!$userId = Info::getUserIdByUserName($userName))  return static::notice('Member does not exist', 400); // 会员不存在
         //会员是否有业绩单
         if(!PerfOrder::find()->where('USER_ID=:USER_ID AND PERIOD_NUM=:PERIOD_NUM',[':USER_ID'=>$userId,':PERIOD_NUM'=>$periodNum])->exists()){
             return static::notice('该会员本期没有业绩单', 400);
@@ -1924,7 +1924,7 @@ class BonusController extends BaseController {
         $period = Period::instance();
         $yearMonth = $period->getYearMonth($periodNum);
         if (!$userId = Info::getUserIdByUserName($userName)) {
-            return static::notice('会员不存在', 400);
+            return static::notice('Member does not exist', 400); // 会员不存在
         }
         $data = CalcBonus::findUseSlaves()->yearMonth($yearMonth)->where('PERIOD_NUM=:PERIOD_NUM AND USER_ID=:USER_ID', [':PERIOD_NUM' => $periodNum, ':USER_ID' => $userId])->asArray()->one();
         if ($data) {
@@ -2049,7 +2049,7 @@ class BonusController extends BaseController {
                 return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
             }
         }
-        return static::notice('非法请求', 400);
+        return static::notice('Illegal request', 400); // 非法请求
     }
 
     /**
@@ -2651,7 +2651,7 @@ class BonusController extends BaseController {
     public function actionRealTimePerf() {
         $userName = Yii::$app->request->get('userName');
         if (!$userId = Info::getUserIdByUserName($userName)) {
-            return static::notice('会员不存在', 400);
+            return static::notice('Member does not exist', 400); // 会员不存在
         }
         $period = Period::instance();
         $newPerf = Perf::getPeriodNewPerf($userId);
@@ -2680,7 +2680,7 @@ class BonusController extends BaseController {
     public function actionYcPerf() {
         $userName = Yii::$app->request->get('userName');
         if (!$userId = Info::getUserIdByUserName($userName)) {
-            return static::notice('会员不存在', 400);
+            return static::notice('Member does not exist', 400); // 会员不存在
         }
 
         $userPerfData = Perf::getUserPerf($userId);

+ 3 - 3
backendApi/modules/v1/controllers/ConfigController.php

@@ -530,7 +530,7 @@ class ConfigController extends BaseController {
                 return static::notice('操作失败,请重试');
             }
         }
-        return static::notice('非法请求');
+        return static::notice('Illegal request'); // 非法请求
     }
 
     /**
@@ -775,7 +775,7 @@ class ConfigController extends BaseController {
         $id = Yii::$app->request->get('id');
         $regType = RegType::findOneAsArray('ID=:ID', [':ID' => $id]);
         if (!$regType) {
-            return static::notice('数据不存在', 400);
+            return static::notice('The data does not exist', 400); // 数据不存在
         }
         return static::notice(['id' => $regType['ID'], 'typeName' => $regType['TYPE_NAME'], 'isPact' => $regType['IS_PACT'], 'monthAmount' => $regType['MONTH_LIMIT_AMOUNT'], 'yearAmount' => $regType['YEAR_LIMIT_AMOUNT'], 'remark' => $regType['REMARK']]);
     }
@@ -799,7 +799,7 @@ class ConfigController extends BaseController {
                 return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
             }
         }
-        return static::notice('非法请求', 400);
+        return static::notice('Illegal request', 400); // 非法请求
     }
 
     /**

+ 24 - 23
backendApi/modules/v1/controllers/FinanceController.php

@@ -138,8 +138,8 @@ class FinanceController extends BaseController {
      * @throws \yii\web\HttpException
      */
     public function actionChangeBalance() {
-        if (Yii::$app->request->isPost) {
-            return static::edit(ChangeBalanceForm::class, '申请变动会员余额成功', 'changeAdd', ['changeAdd'], null, function ($formModel, $result) {
+        if (Yii::$app->request->isPost) { // 申请变动会员余额成功
+            return static::edit(ChangeBalanceForm::class, 'Application for change of member balance succeeded', 'changeAdd', ['changeAdd'], null, function ($formModel, $result) {
                 // $userInfo = User::getBaseInfoFromRedis($result['USER_ID']);
                 // $type = BalanceAudit::TYPE[$result['TYPE']]['label'];
                 // Log::adminHandle('申请调整会员' . $userInfo['USER_NAME'] . '的' . $type . '余额,金额:' . $result['AMOUNT'], 1, $userInfo['ID'], $userInfo['USER_NAME'], $result['CREATE_REMARK']);
@@ -168,7 +168,7 @@ class FinanceController extends BaseController {
         $id = Yii::$app->request->get('id');
         $balanceAudit = BalanceAudit::findOneAsArray('ID=:ID', [':ID' => $id]);
         if (!$balanceAudit) {
-            return static::notice('数据不存在', 400);
+            return static::notice('Data not exists', 400);
         }
         $balanceAudit['BASE_INFO'] = Info::baseInfoWithBalance($balanceAudit['USER_ID']);
         return static::notice(['id' => $balanceAudit['ID'], 'baseInfo' => $balanceAudit['BASE_INFO'], 'type' => $balanceAudit['TYPE'], 'dealType' => $balanceAudit['DEAL_TYPE'], 'amount' => Tool::formatPrice($balanceAudit['AMOUNT']), 'remark' => $balanceAudit['CREATE_REMARK'], 'isShow' => $balanceAudit['REMARK_IS_SHOW']]);
@@ -186,7 +186,7 @@ class FinanceController extends BaseController {
         if ($formModel->load(Yii::$app->request->post(), '') && $result = $formModel->edit()) {
             // $user = User::getBaseInfoFromRedis($result['USER_ID']);
             // Log::adminHandle('修改' . $user['USER_NAME'] . '调整会员余额录入数据', 1, $result['USER_ID'], $user['USER_NAME']);
-            return static::notice('修改调整会员余额录入数据完成');
+            return static::notice('Modification and adjustment of member balance entry data completed'); // 修改调整会员余额录入数据完成
         }
         return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
     }
@@ -203,7 +203,7 @@ class FinanceController extends BaseController {
         if ($formModel->load(Yii::$app->request->post(), '') && $result = $formModel->pass()) {
             $user = User::getBaseInfoFromRedis($result['USER_ID']);
             // Log::adminHandle('审核通过' . $user['USER_NAME'] . '调整会员余额录入数据', 1, $result['USER_ID'], $user['USER_NAME']);
-            return static::notice('审核通过会员余额完成');
+            return static::notice('The review is done through the member balance'); // 审核通过会员余额完成
         }
         return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
     }
@@ -222,7 +222,7 @@ class FinanceController extends BaseController {
                 $userName = Info::getUserNameByUserId($value['userId']);
                 // Log::adminHandle('审核调整会员余额录入数据' . $userName . '发放' . $value['type'], 1, $value['userId'], $userName);
             }*/
-            return static::notice('批量审核/审核拒绝会员余额完成');
+            return static::notice('Batch audit/audit reject member balance completed'); // 批量审核/审核拒绝会员余额完成
         }
         return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
     }
@@ -307,7 +307,7 @@ class FinanceController extends BaseController {
             'REMARK' => 'REMARK',
         ]);
         $form = new FinanceExportForm();
-        $result = $form->run($filter, '转账列表');
+        $result = $form->run($filter, 'Transfer_List'); // 转账列表
         if (!$result) {
             return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
         }
@@ -362,8 +362,8 @@ class FinanceController extends BaseController {
      * @throws \yii\web\HttpException
      */
     public function actionWithdrawAdd() {
-        if (Yii::$app->request->isPost) {
-            return parent::edit(WithdrawForm::class, '新增会员提现成功', 'addByAdmin', ['add'], null, function ($form, $result) {
+        if (Yii::$app->request->isPost) {// 新增会员提现成功
+            return parent::edit(WithdrawForm::class, 'The newly added member successfully withdrew cash', 'addByAdmin', ['add'], null, function ($form, $result) {
                 $user = User::getBaseInfoFromRedis($result['USER_ID']);
                 // Log::adminHandle('申请为' . $user['USER_NAME'] . '提现' . $result['WITHDRAW_AMOUNT'], 1, $result['USER_ID'], $user['USER_NAME']);
             });
@@ -383,7 +383,7 @@ class FinanceController extends BaseController {
         $id = Yii::$app->request->get('id');
         $withdraw = Withdraw::findOneAsArray('ID=:ID', [':ID' => $id]);
         if (!$withdraw) {
-            return static::notice('数据不存在', 400);
+            return static::notice('The data does not exist', 400); // 数据不存在
         }
         $withdraw['BASE_INFO'] = Info::baseInfoZh($withdraw['USER_ID']);
         $withdraw['PLAN_PAID_AT'] = $withdraw['PLAN_PAID_AT'] ? Date::convert($withdraw['PLAN_PAID_AT']) : null;
@@ -405,12 +405,12 @@ class FinanceController extends BaseController {
             if ($formModel->load(Yii::$app->request->post(), '') && $result = $formModel->editByAdmin()) {
                 $user = User::getBaseInfoFromRedis($result['USER_ID']);
                 // Log::adminHandle('修改提现信息,ID为:' . $result['ID'], 1, $result['USER_ID'], $user['USER_NAME']);
-                return static::notice('修改提现信息成功');
+                return static::notice('The withdrawal information is modified successfully.'); // 修改提现信息成功
             } else {
                 return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
             }
         }
-        return static::notice('非法请求', 400);
+        return static::notice('Illegal request', 400); // 非法请求
     }
 
     /**
@@ -436,7 +436,7 @@ class FinanceController extends BaseController {
                 return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
             }
         }
-        return static::notice('非法请求', 400);
+        return static::notice('Illegal request', 400); // 非法请求
     }
 
     /**
@@ -473,7 +473,7 @@ class FinanceController extends BaseController {
             }
         }
         $form = new FinanceExportForm();
-        $result = $form->run($filter, '提现申请');
+        $result = $form->run($filter, 'Withdraw_Apply'); // 提现申请
         if (!$result) {
             return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
         }
@@ -507,7 +507,7 @@ class FinanceController extends BaseController {
             } elseif ($result === 0) {
                 return static::notice(['finish' => true]);
             } else {
-                return static::notice('发生错误:' . $errorMsg, 400);
+                return static::notice('Error:' . $errorMsg, 400);
             }
         }
     }
@@ -537,7 +537,7 @@ class FinanceController extends BaseController {
             } elseif ($result === 0) {
                 return static::notice(['finish' => true]);
             } else {
-                return static::notice('发生错误2:' . $errorMsg, 400);
+                return static::notice('error:' . $errorMsg, 400);
             }
         }
     }
@@ -752,8 +752,8 @@ class FinanceController extends BaseController {
      * @throws \yii\web\HttpException
      */
     public function actionPerfApply() {
-        if (\Yii::$app->request->isPost) {
-            return static::edit(ChangePerfForm::class, '申请调整会员业绩成功', 'add', ['add'], null, function ($formModel, $result) {
+        if (\Yii::$app->request->isPost) { // 申请调整会员业绩成功
+            return static::edit(ChangePerfForm::class, 'The application to adjust the member performance was successful', 'add', ['add'], null, function ($formModel, $result) {
                 // 添加操作日志
                 // Log::adminHandle('申请调整会员' . $formModel->userName . '的' . $formModel->location . '区业绩,调整额度为:' . $formModel->amount);
             });
@@ -770,11 +770,12 @@ class FinanceController extends BaseController {
     public function actionPerfApplyGet() {
         $periodNum = Period::sentMaxPeriodNum();
         if (Period::find()->where('IS_SENT=:IS_SENT AND PERIOD_NUM>=:START_PERIOD_NUM AND PERIOD_NUM<=:END_PERIOD_NUM', [':IS_SENT' => Period::SEND_FINISH, ':START_PERIOD_NUM' => $periodNum + 1, ':END_PERIOD_NUM' => $periodNum + 1])->count() == 1) {
-            return static::notice('下一期【' . ($periodNum + 1) . '】已挂网,该期无法调整', 400);
+//            return static::notice('下一期【' . ($periodNum + 1) . '】已挂网,该期无法调整', 400);
+            return static::notice('The next period [' . ($periodNum + 1) . '] has been connected to the net, and this period cannot be adjusted', 400);
         }
         $userName = \Yii::$app->request->get('userName');
         if (!$userId = Info::getUserIdByUserName($userName)) {
-            return static::notice('会员不存在', 400);
+            return static::notice('Member does not exist', 400); // 会员不存在
         }
         $perf = PerfAudit::getUserPerfAndPerfPeriod($userId, $periodNum);
         return static::notice(array_merge(['REAL_NAME' => Info::getUserRealNameByUserId($userId)], $perf));
@@ -789,7 +790,7 @@ class FinanceController extends BaseController {
         $id = Yii::$app->request->get('id');
         $perfAudit = PerfAudit::findOneAsArray('ID=:ID', [':ID' => $id]);
         if (!$perfAudit) {
-            return static::notice('数据不存在', 400);
+            return static::notice('The data does not exist', 400); // 数据不存在
         }
         $perf = PerfAudit::getUserPerfAndPerfPeriod($perfAudit['USER_ID'], $perfAudit['PERIOD_NUM']);
         return static::notice(['userInfo'=>array_merge(['USER_NAME' => Info::getUserNameByUserId($perfAudit['USER_ID']),'REAL_NAME' => Info::getUserRealNameByUserId($perfAudit['USER_ID'])], $perf),'perfAudit'=>['periodNum'=>$perfAudit['PERIOD_NUM'],'perfType'=>$perfAudit['PERF_TYPE'],'location'=>$perfAudit['PERF_LOCATION'],'amount'=>Tool::formatPrice($perfAudit['AMOUNT']),'remark'=>$perfAudit['REMARK'],'id'=>$perfAudit['ID']]]);
@@ -889,7 +890,7 @@ class FinanceController extends BaseController {
         $id = Yii::$app->request->get('id');
         $dealType = DealType::findOneAsArray('ID=:ID', [':ID' => $id]);
         if (!$dealType) {
-            return static::notice('数据不存在', 400);
+            return static::notice('The data does not exist', 400); // 数据不存在
         }
         return static::notice(['id' => $dealType['ID'], 'typeName' => $dealType['TYPE_NAME'], 'isEnable' => $dealType['IS_ENABLE'] ? true : false, 'isPreset' => $dealType['IS_PRESET'] ? true : false, 'createRemark' => $dealType['CREATE_REMARK'], 'sort' => $dealType['SORT_ORDER']]);
     }
@@ -1121,7 +1122,7 @@ class FinanceController extends BaseController {
             'CREATED_AT' => 'R.CREATED_AT',
         ]);
         $form = new FinanceExportForm();
-        $result = $form->run($filter, '充值申请');
+        $result = $form->run($filter, 'Recharge'); // 充值申请
         if (!$result) {
             return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
         }

+ 1 - 1
backendApi/modules/v1/controllers/LogController.php

@@ -96,7 +96,7 @@ class LogController extends BaseController {
             'request_route' => 'user_agent',
         ]);
         $form = new LogExportForm();
-        $result = $form->run($filter, '会员登录日志');
+        $result = $form->run($filter, 'Member_Login_Log'); // 会员登录日志
         if (!$result) {
             return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
         }

+ 1 - 1
backendApi/modules/v1/controllers/ReconsumeController.php

@@ -160,7 +160,7 @@ class ReconsumeController extends BaseController {
         $id = Yii::$app->request->get('id');
         $reconsumAudit = ReconsumeAudit::findOneAsArray('ID=:ID', [':ID' => $id]);
         if (!$reconsumAudit) {
-            return static::notice('数据不存在', 400);
+            return static::notice('The data does not exist', 400); // 数据不存在
         }
         $reconsumAudit['BASE_INFO'] = Info::baseInfoZh($reconsumAudit['USER_ID']);
         $reConsumePool = Reconsume::getUserReconsumePool($reconsumAudit['USER_ID']);

+ 5 - 4
backendApi/modules/v1/controllers/ShopController.php

@@ -93,7 +93,7 @@ class ShopController extends BaseController {
             'CATEGORY_TYPE' => 'CATEGORY_TYPE',
         ]);
         $form = new ShopExportForm();
-        $result = $form->run($filter, '商品列表');
+        $result = $form->run($filter, 'Goods_List'); // 商品列表
         if (!$result) {
             return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
         }
@@ -387,6 +387,7 @@ class ShopController extends BaseController {
             'CREATED_AT'=> 'O.CREATED_AT',
             'ORDER_TYPE'=> 'O.ORDER_TYPE',
             'STATUS' => 'O.STATUS',
+            'IS_AUTO' => 'O.IS_AUTO'
         ]);
         $condition = ' 1=1 ' . $filter['condition'];
         $params = $filter['params'];
@@ -413,7 +414,7 @@ class ShopController extends BaseController {
         ]);
         $filter['condition'] = !$filter['condition'] ? '1=1 AND O.IS_DELETE=0' : ('O.IS_DELETE=0 ' . $filter['condition']);
         $form = new ShopExportForm();
-        $result = $form->run($filter, '订单列表');
+        $result = $form->run($filter, 'Order_List'); // 订单列表
         if (!$result) {
             return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
         }
@@ -661,7 +662,7 @@ class ShopController extends BaseController {
         if(\Yii::$app->request->isPost) {
             return parent::edit(OrderForm::class, '发货成功', 'adminDelivery', ['adminDelivery']);
         }
-        return static::notice('非法请求', 400);
+        return static::notice('Illegal request', 400); // 非法请求
     }
 
     /**
@@ -732,6 +733,6 @@ class ShopController extends BaseController {
         if(\Yii::$app->request->isPost) {
             return parent::edit(OrderForm::class, '退款成功', 'adminRefund', ['adminRefund']);
         }
-        return static::notice('非法请求', 400);
+        return static::notice('Illegal request', 400); // 非法请求
     }
 }

+ 8 - 8
backendApi/modules/v1/controllers/UserController.php

@@ -203,7 +203,7 @@ class UserController extends BaseController
             'ALLOW_TRANSFER' => 'UI.ALLOW_TRANSFER',
         ]);
         $form = new UserExportForm();
-        $result = $form->run($filter, '会员列表');
+        $result = $form->run($filter, 'Member_List');
         if (!$result) {
             return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
         }
@@ -745,7 +745,7 @@ class UserController extends BaseController
             //'CREATE_REMARK' => 'UM.CREATE_REMARK',
         ]);
         $form = new UserExportForm();
-        $result = $form->run($filter, '移网管理');
+        $result = $form->run($filter, 'Move_Network'); // 移网管理
         if (!$result) {
             return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
         }
@@ -762,7 +762,7 @@ class UserController extends BaseController
     public function actionMoveAdd()
     {
         if (Yii::$app->request->isPost) {
-            return parent::edit(NetMoveForm::class, '移网申请成功', 'add', ['add'], null, function ($form, $result) {
+            return parent::edit(NetMoveForm::class, 'Application for net removal succeeds', 'add', ['add'], null, function ($form, $result) {   // 移网申请成功
 //                $user = User::getBaseInfoFromRedis($result['USER_ID']);
                 // Log::adminHandle('申请为' . $user['USER_NAME'] . '移网', 1, $result['USER_ID'], $user['USER_NAME']);
             });
@@ -790,7 +790,7 @@ class UserController extends BaseController
         $id = Yii::$app->request->get('id');
         $userMove = UserMove::find()->where('ID=:ID', [':ID' => $id])->asArray()->one();
         if (!$userMove) {
-            return static::notice('数据不存在', 400);
+            return static::notice('Data not exists', 400);
         }
         $userMove['BASE_INFO'] = Info::baseInfoWithNet($userMove['USER_ID']);
         $toUserInfo = Info::baseInfoZh($userMove['TO_UID']);
@@ -810,7 +810,7 @@ class UserController extends BaseController
         if ($formModel->load(Yii::$app->request->post(), '') && $result = $formModel->edit()) {
             $user = Info::baseInfoZh($result['USER_ID']);
             // Log::adminHandle('修改' . $user['USER_NAME'] . '移网录入数据', 1, $result['USER_ID'], $user['USER_NAME']);
-            return static::notice('修改移网录入数据完成');
+            return static::notice('The modification of the data input is complete'); // 修改移网录入数据完成
         }
         return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
     }
@@ -828,7 +828,7 @@ class UserController extends BaseController
         if ($formModel->load(Yii::$app->request->post(), '') && $result = $formModel->pass()) {
             $user = Info::baseInfoZh($result['USER_ID']);
             // Log::adminHandle('审核通过移网数据', 1, $result['USER_ID'], $user['USER_NAME']);
-            return static::notice('正在移动中,请稍候');
+            return static::notice("It's on the move. Please wait"); // 正在移动中,请稍候
         }
         return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
     }
@@ -847,7 +847,7 @@ class UserController extends BaseController
         $formModel->scenario = 'changeAudit';
         if ($formModel->load(Yii::$app->request->post(), '') && $result = $formModel->changeAudit()) {
             // Log::adminHandle('审核移网数据');
-            return static::notice('审核移网数据完成');
+            return static::notice('Check and verify the net moving data'); // 审核移网数据完成
         }
         return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
     }
@@ -1952,7 +1952,7 @@ class UserController extends BaseController
         $id = Yii::$app->request->get('id');
         $userStatusAudit = UserStatusAudit::findOneAsArray('ID=:ID', [':ID' => $id]);
         if (!$userStatusAudit) {
-            return static::notice('数据不存在', 400);
+            return static::notice('The data does not exist', 400); // 数据不存在
         }
         $userStatusAudit['BASE_INFO'] = Info::baseInfoZh($userStatusAudit['USER_ID']);
         $statuses = Yii::$app->params['userStatus'];

+ 6 - 6
backendApi/modules/v1/models/AdminForm.php

@@ -114,20 +114,20 @@ class AdminForm extends Model
         } elseif($this->scenario == 'noLoginModifyPassword') {
             $model =  Admin::findOne(["ADMIN_NAME"=>$this->adminName]);
             if( !$model ) {
-                $this->addError('noLoginModifyPassword', '不存在的用户名');
+                $this->addError('noLoginModifyPassword', 'The member name does not exist'); // 不存在的用户名
                 return null;
             }
             if( $this->oldPassword === $this->password ) {
-                $this->addError('noLoginModifyPassword', '登录密码没有发生改变');
+                $this->addError('noLoginModifyPassword', 'The login password has not changed'); // 登录密码没有发生改变
                 return null;
             }
             if ( !$model->validatePassword($this->oldPassword) ) {
-                $this->addError('noLoginModifyPassword', '原登录密码错误');
+                $this->addError('noLoginModifyPassword', 'The old login password is incorrect'); // 原登录密码错误
                 return null;
             }
             $model->IS_MODIFY_PASSWORD = 0;
         }else {
-            $this->addError('id', '提交场景不存在');
+            $this->addError('id', 'The submission does not exist'); // 提交场景不存在
             return null;
         }
 
@@ -135,7 +135,7 @@ class AdminForm extends Model
         if($this->password){
             if ($this->scenario == 'changePassword' || $this->scenario == 'noLoginModifyPassword'){
                 if (strlen($this->password) < 8){
-                    $this->addError($this->scenario, '登录密码不能小于8位');
+                    $this->addError($this->scenario, 'The password must contain at least eight characters'); // 登录密码不能小于8位
                     return null;
                 }
 //               $symbol = '!#$%^&*';
@@ -143,7 +143,7 @@ class AdminForm extends Model
                $passwordRules = '/^(?![\d]+$)(?![a-z]+$)(?![A-Z]+$)(?!['.$symbol.']+$)[\da-zA-z'.$symbol.']{8,}$/';
                $verificationResults = preg_match($passwordRules,$this->password);
                if (!$verificationResults){
-                   $this->addError($this->scenario, '登录密码中需要包含数字、大写字母、小写字母、特殊字符至少两种');
+                   $this->addError($this->scenario, 'The password must contain at least two types of digits, capital letters, small letters and special characters'); // 登录密码中需要包含数字、大写字母、小写字母、特殊字符至少两种
                    return null;
                }
             }

+ 1 - 1
backendApi/modules/v1/models/LoginForm.php

@@ -56,7 +56,7 @@ class LoginForm extends Model {
         if (!$this->hasErrors()) {
             $this->getUser();
             if(!$this->_user){
-                $this->addError($attribute, '会员不存在');
+                $this->addError($attribute, 'Member does not exist');
                 return false;
             }
             if (!$this->_user->validatePassword($this->password)) {

+ 16 - 1
backendApi/modules/v1/models/lists/bonus/BalanceList.php

@@ -333,7 +333,7 @@ class BalanceList extends \common\libs\dataList\DataList implements DataListInte
                     ],
                 ],
                 'GARAGE_POINTS' => [
-                    'header' => 'CarVilla incentive',//车积分
+                    'header' => 'Car incentive',// 车积分
                     'value' => function($row) {
                         return (new Price([
                             'value' => $row['GARAGE_POINTS'],
@@ -347,6 +347,21 @@ class BalanceList extends \common\libs\dataList\DataList implements DataListInte
                         'tag'=>['type'=>'danger', 'size' => 'small', 'class'=>'no-border'],
                     ],
                 ],
+                'VILLA_POINTS' => [
+                    'header' => 'Villa incentive',// 房积分
+                    'value' => function($row) {
+                        return (new Price([
+                            'value' => $row['VILLA_POINTS'],
+                        ]))->result();
+                    },
+                    'headerOther' => [
+                        'width' => '150',
+                        'prop'=>'VILLA_POINTS',
+                    ],
+                    'valueOther' => [
+                        'tag'=>['type'=>'danger', 'size' => 'small', 'class'=>'no-border'],
+                    ],
+                ],
                 'PERIOD_AT' => 'Joining Period',//加入期数
 //                'DEC_DEC_ROLE_NAME' => [
 //                    'header' => '所属报单中心级别',

+ 4 - 4
backendApi/modules/v1/models/lists/bonus/PerfMonthList.php

@@ -109,7 +109,7 @@ class PerfMonthList extends \common\libs\dataList\DataList implements DataListIn
                     },
                 ],
                 'VIP_PV_1L_ZC' => [
-                    'header' => 'I. new market entry performance',//一市场新增报单业绩
+                    'header' => 'L. new market entry performance',//一市场新增报单业绩
                     'headerOther' => [
                         'width' => '150',
                     ],
@@ -120,7 +120,7 @@ class PerfMonthList extends \common\libs\dataList\DataList implements DataListIn
                     },
                 ],
                 'VIP_PV_2L_ZC' => [
-                    'header' => 'II. New market entry performance',//二市场新增报单业绩
+                    'header' => 'R. New market entry performance',//二市场新增报单业绩
                     'headerOther' => [
                         'width' => '150',
                     ],
@@ -142,7 +142,7 @@ class PerfMonthList extends \common\libs\dataList\DataList implements DataListIn
 //                    },
 //                ],
                 'VIP_SURPLUS_1L_ZC' => [
-                    'header' => 'Remaining declaration performance in the first market month',//一市场月剩余报单业绩
+                    'header' => 'L. Market Monthly remaining declaration performance',//一市场月剩余报单业绩
                     'headerOther' => [
                         'width' => '150',
                     ],
@@ -153,7 +153,7 @@ class PerfMonthList extends \common\libs\dataList\DataList implements DataListIn
                     },
                 ],
                 'VIP_SURPLUS_2L_ZC' => [
-                    'header' => 'II. Market Monthly remaining declaration performance',//二市场月剩余报单业绩
+                    'header' => 'R. Market Monthly remaining declaration performance',//二市场月剩余报单业绩
                     'headerOther' => [
                         'width' => '150',
                     ],

+ 12 - 12
backendApi/modules/v1/models/lists/bonus/PerfPeriodList.php

@@ -104,7 +104,7 @@ class PerfPeriodList extends \common\libs\dataList\DataList implements DataListI
                     },
                 ],
                 'PV_1L' => [
-                    'header' => 'I. new market performance',//一市场新增业绩
+                    'header' => 'L. new market performance',//一市场新增业绩
                     'headerOther' => [
                         'width' => '150',
                     ],
@@ -115,7 +115,7 @@ class PerfPeriodList extends \common\libs\dataList\DataList implements DataListI
                     },
                 ],
                 'PV_1L_ZC' => [
-                    'header' => 'I. new performance of market entry',//一市场报单新增业绩
+                    'header' => 'L. new performance of market entry',//一市场报单新增业绩
                     'headerOther' => [
                         'width' => '150',
                     ],
@@ -126,7 +126,7 @@ class PerfPeriodList extends \common\libs\dataList\DataList implements DataListI
                     },
                 ],
                 'PV_1L_FX' => [
-                    'header' => 'I. new performance of market re cancellation',//一市场复消新增业绩
+                    'header' => 'L. new performance of market re cancellation',//一市场复消新增业绩
                     'headerOther' => [
                         'width' => '150',
                     ],
@@ -137,7 +137,7 @@ class PerfPeriodList extends \common\libs\dataList\DataList implements DataListI
                     },
                 ],
                 'PV_2L' => [
-                    'header' => 'II. New market performance',//二市场新增业绩
+                    'header' => 'R. New market performance',//二市场新增业绩
                     'headerOther' => [
                         'width' => '150',
                     ],
@@ -148,7 +148,7 @@ class PerfPeriodList extends \common\libs\dataList\DataList implements DataListI
                     },
                 ],
                 'PV_2L_ZC' => [
-                    'header' => 'II. New performance of market entry',//二市场报单新增业绩
+                    'header' => 'R. New performance of market entry',//二市场报单新增业绩
                     'headerOther' => [
                         'width' => '150',
                     ],
@@ -159,7 +159,7 @@ class PerfPeriodList extends \common\libs\dataList\DataList implements DataListI
                     },
                 ],
                 'PV_2L_FX' => [
-                    'header' => 'II. New performance of market re cancellation',//二市场复消新增业绩
+                    'header' => 'R. New performance of market re cancellation',//二市场复消新增业绩
                     'headerOther' => [
                         'width' => '150',
                     ],
@@ -203,7 +203,7 @@ class PerfPeriodList extends \common\libs\dataList\DataList implements DataListI
 //                    },
 //                ],
                 'SURPLUS_1L' => [
-                    'header' => 'I. market balance performance',//一市场结余业绩
+                    'header' => 'L. market balance performance',//一市场结余业绩
                     'value' => function($row) {
                         return (new Price([
                             'value' => $row['SURPLUS_1L'],
@@ -215,7 +215,7 @@ class PerfPeriodList extends \common\libs\dataList\DataList implements DataListI
                     ],
                 ],
                 'SURPLUS_2L' => [
-                    'header' => 'II. Market balance performance',//二市场结余业绩
+                    'header' => 'R. Market balance performance',//二市场结余业绩
                     'value' => function($row) {
                         return (new Price([
                             'value' => $row['SURPLUS_2L'],
@@ -239,7 +239,7 @@ class PerfPeriodList extends \common\libs\dataList\DataList implements DataListI
 //                    ],
 //                ],
                 'SURPLUS_1L_ZC' => [
-                    'header' => 'I. market entry balance performance',//一市场报单结余业绩
+                    'header' => 'L. market entry balance performance',//一市场报单结余业绩
                     'value' => function($row) {
                         return (new Price([
                             'value' => $row['SURPLUS_1L_ZC'],
@@ -251,7 +251,7 @@ class PerfPeriodList extends \common\libs\dataList\DataList implements DataListI
                     ],
                 ],
                 'SURPLUS_2L_ZC' => [
-                    'header' => 'II. Market entry balance performance',//二市场报单结余业绩
+                    'header' => 'R. Market entry balance performance',//二市场报单结余业绩
                     'value' => function($row) {
                         return (new Price([
                             'value' => $row['SURPLUS_2L_ZC'],
@@ -275,7 +275,7 @@ class PerfPeriodList extends \common\libs\dataList\DataList implements DataListI
 //                    ],
 //                ],
                 'SURPLUS_1L_FX' => [
-                    'header' => 'I. market reconditioning balance performance',//一市场复消结余业绩
+                    'header' => 'L. market reconditioning balance performance',//一市场复消结余业绩
                     'value' => function($row) {
                         return (new Price([
                             'value' => $row['SURPLUS_1L_FX'],
@@ -287,7 +287,7 @@ class PerfPeriodList extends \common\libs\dataList\DataList implements DataListI
                     ],
                 ],
                 'SURPLUS_2L_FX' => [
-                    'header' => 'II. Market re cancellation balance performance',//二市场复消结余业绩
+                    'header' => 'R. Market re cancellation balance performance',//二市场复消结余业绩
                     'value' => function($row) {
                         return (new Price([
                             'value' => $row['SURPLUS_2L_FX'],

+ 1 - 1
backendApi/modules/v1/models/lists/bonus/PeriodBonusList.php

@@ -507,7 +507,7 @@ class PeriodBonusList extends \common\libs\dataList\DataList implements DataList
                     },
                     'headerOther' => [
                         'width' => '120',
-                        'prop'=>'REAL_BONUS_QUARTER',
+                        'prop'=>'BONUS_QUARTER',
                     ],
                 ],
 //                'ORI_BONUS_QUARTER' => [

+ 27 - 7
backendApi/modules/v1/models/lists/shop/OrderList.php

@@ -197,8 +197,6 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
                     'headerOther' => ['width' => '120'],
                     'value' => function ($row) {
                         switch ($row['ORDER_TYPE']) {
-                            case 'FO':
-                                return 'remain BV order';
                             case 'ZC':
                                 return 'Welcome pack';
                             case 'FX':
@@ -206,6 +204,17 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
                         }
                     },
                 ],
+                'IS_AUTO' => [
+                    'header' => 'Is Auto', // 是否自动
+                    'value' => function ($row) {
+                        switch ($row['IS_AUTO']) {
+                            case 1:
+                                return 'Yes';
+                            case 0:
+                                return 'No';
+                        }
+                    },
+                ],
 //                'WAREHOUSE' => [
 //                    'header' => 'Delivery warehouse',//发货仓
 //                ],
@@ -369,12 +378,23 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
                 'ORDER_TYPE'=> ['name'=> 'Order Type'],
                 'PERIOD_NUM'=> ['name'=> 'Number of periods'],//期数
                 'CREATED_AT'=> ['name'=> 'Creation time', 'other'=>'date'],//创建时间
-                'STATUS'=> ['name'=> 'Status', 'other'=> 'select', 'selectData'=> [
-                    ['id' => \Yii::$app->params['orderStatus']['paid']['value'], 'name' => \Yii::$app->params['orderStatus']['paid']['label']],
-                    ['id' => \Yii::$app->params['orderStatus']['notPaid']['value'], 'name' => \Yii::$app->params['orderStatus']['notPaid']['label']],
-                    ['id' => \Yii::$app->params['orderStatus']['failPaid']['value'], 'name' => \Yii::$app->params['orderStatus']['failPaid']['label']]
+                'STATUS'=> [
+                    'name'=> 'Status',
+                    'other'=> 'select',
+                    'selectData'=> [
+                        ['id' => \Yii::$app->params['orderStatus']['paid']['value'], 'name' => \Yii::$app->params['orderStatus']['paid']['label']],
+                        ['id' => \Yii::$app->params['orderStatus']['notPaid']['value'], 'name' => \Yii::$app->params['orderStatus']['notPaid']['label']],
+                        ['id' => \Yii::$app->params['orderStatus']['failPaid']['value'], 'name' => \Yii::$app->params['orderStatus']['failPaid']['label']]
+                    ]
+                ],
+                'IS_AUTO' => [
+                    'name'=>'Is Auto',
+                    'other'=> 'select',
+                    'selectData'=> [
+                        ['id'=>1, 'name'=>'YES'],
+                        ['id'=>0, 'name'=>'NO'],
+                    ]
                 ]
-                ],
             ];
         }
         return $this->filterTypes;

+ 12 - 12
backendEle/src/router/index.js

@@ -172,18 +172,18 @@ export const constantRouterMap = [
           ],
         },
       },
-      // {
-      //   path: '/user/user-add-opt',
-      //   component: _import('user/user-add-opt'),
-      //   name: 'user_user-add-opt',
-      //   meta: {
-      //     title: 'Empty order operation', // 空单操作
-      //     breadcrumb: [
-      //       {title: 'Dashboard', path: '/dashboard/index'}, // Dashboard
-      //       {title: 'Member management', path: '/user/index'}, // 会员管理
-      //     ],
-      //   },
-      // },
+      {
+        path: '/user/user-add-opt',
+        component: _import('user/user-add-opt'),
+        name: 'user_user-add-opt',
+        meta: {
+          title: 'Empty order operation', // 空单操作
+          breadcrumb: [
+            {title: 'Dashboard', path: '/dashboard/index'}, // Dashboard
+            {title: 'Member management', path: '/user/index'}, // 会员管理
+          ],
+        },
+      },
       // {
       //   path: '/user/empty-list',
       //   component: _import('user/empty-list'),

+ 1 - 1
backendEle/src/utils/config_trial.js

@@ -8,7 +8,7 @@ const WEBSOCKET_HOST = 'ws://127.0.0.1:9513'
 const BONUS_WEBSOCKET_HOST = 'ws://127.0.0.1:9513'
 const DEVICE_TYPE = 'pc'
 const ACCESS_TOKEN_PREFIX = 'Bearer '
-const CDN_BASE_URL = 'http://ng-upload.elken.com'
+const CDN_BASE_URL = 'http://16.163.228.151:8029'
 const CDN_IMG_URL = `${CDN_BASE_URL}/cdn/`
 const PRICE_IS_ROUND = true
 const FRONTEND_SERVER = 'http://16.163.228.151:8028'

+ 3 - 3
backendEle/src/utils/editor.js

@@ -1,6 +1,6 @@
 import {CDN_IMG_URL} from './config'
 import network from "./network";
-import {SERVER_API_HTTP_TYPE,SERVER_API_DOMAIN} from '@/utils/config'
+import tool from "./tool";
 
 const EDITOR_ROOT_URL = `${CDN_IMG_URL}/tinymce`
 const EDITOR_LANGUAGE = `${EDITOR_ROOT_URL}/langs/zh_CN.js`
@@ -35,7 +35,7 @@ let textEditor = {
           params.append('file', blobInfo.blob())
           params.append('uploadToken', token)
           await network.postData('ad/upload', params).then(response => {
-              let imageUrl = SERVER_API_HTTP_TYPE + SERVER_API_DOMAIN + '/uploads/' + response;
+              let imageUrl = tool.getArImage(response, '/files/');
               success(imageUrl)
           }).catch(error => {
               failure(error)
@@ -58,7 +58,7 @@ let textEditor = {
               params.append('file', file);
               params.append('uploadToken', token);
               await network.postData('article/upload', params).then(response => {
-                  let fileUrl = SERVER_API_HTTP_TYPE + SERVER_API_DOMAIN + '/uploads/' + response;
+                  let fileUrl = tool.getArImage(response, '/files/');
                   callback(fileUrl, {text: response})
               }).catch(error => {
                   console.log(error)

+ 11 - 1
backendEle/src/utils/tool.js

@@ -3,7 +3,7 @@ import baseInfo from './baseInfo'
 import userInfo from './userInfo'
 import router from '@/router'
 import network from '@/utils/network'
-import {PRICE_IS_ROUND, SERVER_API_DOMAIN} from './config'
+import {PRICE_IS_ROUND, CDN_BASE_URL} from './config'
 
 let tool = {
   /**
@@ -262,6 +262,16 @@ let tool = {
       window.location.href = window.location.href.replace(searchStr, '$1$2'+value+'$4')
     }
   },
+
+  /**
+   * 拼装图片
+   * @param imageUrl 图片
+   * @param path 路径
+   * @returns {string}
+   */
+  getArImage(imageUrl, path) {
+    return `${CDN_BASE_URL}${path}${imageUrl}`;
+  },
 }
 
 export default tool

+ 5 - 5
backendEle/src/views/ad/edit.vue

@@ -41,7 +41,7 @@
 <script>
 import network from '../../utils/network'
 import LeoUploader from '../../components/Uploader'
-import {SERVER_API_HTTP_TYPE,SERVER_API_DOMAIN} from '@/utils/config'
+import tool from '@/utils/tool'
 
 export default {
   name: 'ad_edit',
@@ -54,8 +54,8 @@ export default {
         this.form.type = response.oneData.TYPE
 
         this.imageAd = response.oneData.IMAGE;
-        this.form.image = SERVER_API_HTTP_TYPE + SERVER_API_DOMAIN + '/uploads/' + response.oneData.IMAGE;
-        this.defaultImageUrl = SERVER_API_HTTP_TYPE + SERVER_API_DOMAIN + '/uploads/' + response.oneData.IMAGE;
+        this.form.image = tool.getArImage(response.oneData.IMAGE, '/files/');
+        this.defaultImageUrl = tool.getArImage(response.oneData.IMAGE, '/files/');
 
         this.form.content = response.oneData.CONTENT
         if (response.oneData.TYPE === '1') {
@@ -121,8 +121,8 @@ export default {
     },
     handleSuccess (imageUrl) {
       this.imageAd = imageUrl
-      this.form.image = SERVER_API_HTTP_TYPE + SERVER_API_DOMAIN + '/uploads/' + imageUrl;
-      this.defaultImageUrl = SERVER_API_HTTP_TYPE + SERVER_API_DOMAIN + '/uploads/' + imageUrl;
+      this.form.image = tool.getArImage(imageUrl, '/files/');
+      this.defaultImageUrl = tool.getArImage(imageUrl, '/files/');
     },
   },
   watch: {

+ 10 - 10
backendEle/src/views/ad/list.vue

@@ -112,7 +112,7 @@ import tool from '@/utils/tool'
 import store from '@/utils/vuexStore'
 import permission from '@/utils/permission'
 import Pagination from '@/components/Pagination'
-import {SERVER_API_HTTP_TYPE,SERVER_API_DOMAIN} from '@/utils/config'
+import {SERVER_API_HTTP_TYPE,SERVER_API_DOMAIN,CDN_BASE_URL} from '@/utils/config'
 import article from "../article";
 
 export default {
@@ -161,7 +161,7 @@ export default {
     handleHide (row) {
       this.hideData(row.ID)
     },
-    handleUnHide(row) {
+    handleUnHide (row) {
       this.unHideData(row.ID)
     },
     handleMuliDel () {
@@ -271,16 +271,16 @@ export default {
 
       })
     },
-    getImage(imageUrl) {
-      return SERVER_API_HTTP_TYPE + SERVER_API_DOMAIN + '/uploads/' + imageUrl;
+    getImage (imageUrl) {
+      return tool.getArImage(imageUrl, '/files/')
     },
-    getContent(aid) {
-      let titles = this.allArticle.filter(article => article.ID === aid).map(article => article.TITLE);
-      return titles.length > 0 ? titles[0] : aid;
-    },
-    getHref(link) {
-        return link.indexOf('http') > -1 ? link : 'http://' + link;
+    getContent (aid) {
+      let titles = this.allArticle.filter(article => article.ID === aid).map(article => article.TITLE)
+      return titles.length > 0 ? titles[0] : aid
     },
+    getHref (link) {
+      return link.indexOf('http') > -1 ? link : 'http://' + link
+    }
   }
 }
 

+ 1 - 4
backendEle/src/views/article/detail.vue

@@ -12,11 +12,8 @@
 </template>
 
 <script>
-import Vue from 'vue'
 import network from '@/utils/network'
 import tool from '@/utils/tool'
-import store from '@/utils/vuexStore'
-import {SERVER_API_HTTP_TYPE,SERVER_API_DOMAIN} from '@/utils/config'
 
 export default {
   name: 'article_detail',
@@ -48,7 +45,7 @@ export default {
       })
     },
     getLink(fileUrl) {
-      return SERVER_API_HTTP_TYPE + SERVER_API_DOMAIN + '/uploads/' + fileUrl;
+      return tool.getArImage(fileUrl, '/files/');
     },
   }
 }

+ 3 - 3
backendEle/src/views/file/export.vue

@@ -20,7 +20,7 @@
         <el-table-column label="route"><!-- 路径 -->
           <template slot-scope="scope">
             <el-button type="success" size="small" @click="singleDownload(scope.row)"
-                       v-if="Number(scope.row.EXPORT_PERCENT)===100">下载
+                       v-if="Number(scope.row.EXPORT_PERCENT)===100">Download
             </el-button>
           </template>
         </el-table-column>
@@ -88,7 +88,7 @@
   import baseInfo from '@/utils/baseInfo'
   import store from '@/utils/vuexStore'
   import permission from '@/utils/permission'
-  import {SERVER_API_HTTP_TYPE, SERVER_API_DOMAIN} from '@/utils/config'
+  import {SERVER_API_HTTP_TYPE, SERVER_API_DOMAIN,SERVER_API_PORT} from '@/utils/config'
   import filterHelper from '../../utils/filterHelper'
 
   export default {
@@ -127,7 +127,7 @@
     },
     methods: {
       singleDownload(row) {
-        let url = (row.REMOTE_URL) ? row.REMOTE_URL : SERVER_API_HTTP_TYPE + '/' + SERVER_API_DOMAIN + '/' + 'upload/excel_export' + '/' + row.FILE_NAME;
+        let url = (row.REMOTE_URL) ? row.REMOTE_URL : SERVER_API_HTTP_TYPE + '/' + SERVER_API_DOMAIN + SERVER_API_PORT + '/' + 'upload/excel_export' + '/' + row.FILE_NAME;
         window.open(url);
       },
       handleSelectionChange(val) {

+ 2 - 7
backendEle/src/views/finance/recharge.vue

@@ -52,13 +52,11 @@
 <script>
     import network from '@/utils/network'
     import tool from '@/utils/tool'
-    import baseInfo from '@/utils/baseInfo'
     import FilterUser from '../../components/FilterUser'
     import permission from '@/utils/permission'
     import Pagination from '@/components/Pagination'
     import filterHelper from '@/utils/filterHelper'
-    import {FRONTEND_SERVER,SERVER_API_HTTP_TYPE,SERVER_API_DOMAIN} from '@/utils/config'
-    import store from './../../utils/vuexStore'
+
     export default {
         name: 'recharge',
         components: {FilterUser,Pagination},
@@ -151,10 +149,7 @@
                     console.log(response)
                     this.dialogInvoiceLoading = false
                     let invoiceUrl = response.list;
-                    console.log(row)
-                    this.urlimg= SERVER_API_HTTP_TYPE + SERVER_API_DOMAIN + '/uploads/' + row.BANK_PROVE;
-                    console.log(this.urlimg)
-
+                    this.urlimg = tool.getArImage(row.BANK_PROVE, '/files/');
                 })
             },
 

+ 39 - 40
backendEle/src/views/login/modify-password.vue

@@ -1,24 +1,24 @@
 <template>
   <div class="modify-wrapper">
     <el-container>
-      <el-header class="modify-header">管理员密码修改</el-header>
+      <el-header class="modify-header">Changing the Password of Administrator</el-header> <!-- 管理员密码修改 -->
       <el-main>
         <div class="white-box">
           <el-form ref="form" :model="passwordInfo" label-width="250px" class="form-page">
-            <el-form-item label="用户编号">
+            <el-form-item label="Administrator Code"> <!-- 用户编号 -->
               <el-input v-model="passwordInfo.adminName"></el-input>
             </el-form-item>
-            <el-form-item label="原登录密码">
+            <el-form-item label="Original login password"> <!-- 原登录密码 -->
               <el-input v-model="passwordInfo.oldPassword" show-password></el-input>
             </el-form-item>
-            <el-form-item label="新登录密码">
+            <el-form-item label="New login password"> <!-- 新登录密码 -->
               <el-input v-model="passwordInfo.password" show-password></el-input>
             </el-form-item>
-            <el-form-item label="确认新密码">
+            <el-form-item label="Confirm login password"> <!-- 确认新密码 -->
               <el-input v-model="passwordInfo.surePassword" show-password></el-input>
             </el-form-item>
             <el-form-item>
-              <el-button type="primary" @click="handleModifyPasswordSubmit" :loading="modifyPasswordButtonStat">确认修改</el-button>
+              <el-button type="primary" @click="handleModifyPasswordSubmit" :loading="modifyPasswordButtonStat">Confirm</el-button> <!-- 确认修改 -->
             </el-form-item>
           </el-form>
         </div>
@@ -28,43 +28,42 @@
 </template>
 
 <script>
-    import axiosObj from "../../utils/axiosPlugin";
-    import tool from '@/utils/tool'
+import axiosObj from '../../utils/axiosPlugin'
+import tool from '@/utils/tool'
 
-    export default {
-      name: "modify-password",
-      mounted() {
-        this.passwordInfo.adminName = this.$route.params.adminName
+export default {
+  name: 'modify-password',
+  mounted () {
+    this.passwordInfo.adminName = this.$route.params.adminName
+  },
+  data () {
+    return {
+      passwordInfo: {
+        adminName: '',
+        oldPassword: '',
+        password: '',
+        surePassword: ''
       },
-      data () {
-        return {
-          passwordInfo:{
-            adminName:'',
-            oldPassword:'',
-            password:'',
-            surePassword:'',
-          },
-          modifyPasswordButtonStat:false,
-        }
-      },
-      methods: {
-        handleModifyPasswordSubmit() {
-          this.modifyPasswordButtonStat = true
-          let path = 'oauth/no-login-modify-password'
-          axiosObj.post(path, this.passwordInfo).then(response => {
-            this.$message.success(response)
-            this.modifyPasswordButtonStat = false
-            this.$router.push('/login')
-          }).catch(error => {
-            this.modifyPasswordButtonStat = false
-            error = tool.errorHandle(error)
-            this.$message.error(error.message)
-            console.log(error)
-          })
-
-        },
-      }
+      modifyPasswordButtonStat: false
     }
+  },
+  methods: {
+    handleModifyPasswordSubmit () {
+      this.modifyPasswordButtonStat = true
+      let path = 'oauth/no-login-modify-password'
+      axiosObj.post(path, this.passwordInfo).then(response => {
+        this.$message.success(response)
+        this.modifyPasswordButtonStat = false
+        this.$router.push('/login')
+      }).catch(error => {
+        this.modifyPasswordButtonStat = false
+        error = tool.errorHandle(error)
+        this.$message.error(error.message)
+        console.log(error)
+      })
+    }
+  }
+}
 </script>
 
 <style scoped>

+ 4 - 3
backendEle/src/views/shop/index.vue

@@ -165,7 +165,7 @@
     import permission from '@/utils/permission'
     import Pagination from '@/components/Pagination'
     import filterHelper from '@/utils/filterHelper'
-    import {FRONTEND_SERVER,SERVER_API_HTTP_TYPE,SERVER_API_DOMAIN} from '@/utils/config'
+    import {FRONTEND_SERVER,SERVER_API_HTTP_TYPE,SERVER_API_DOMAIN,CDN_BASE_URL} from '@/utils/config'
     import store from './../../utils/vuexStore'
      import LeoUploader from '@/components/Uploader';
     export default {
@@ -217,6 +217,7 @@
                     cover:'',
                     textarea:'',
                     sellDiscount:'',
+                    pvSplit:'',
                     categoryType: '',
                     sellType: 1,
                     taxRate: 0,
@@ -255,7 +256,7 @@
             },
             upLoadSuccess(file){
                 // this.form.cover=file;
-                this.form.cover = SERVER_API_HTTP_TYPE + SERVER_API_DOMAIN + '/uploads/' + file;
+                this.form.cover = tool.getArImage(file, '/files/');
                 this.form.coverOrigin = file
                 this.img_show=false;
             },
@@ -321,7 +322,7 @@
                     //   })
 
                     vueObj.form.coverOrigin = response.goodsInfo.COVER
-                    vueObj.form.cover = SERVER_API_HTTP_TYPE + SERVER_API_DOMAIN + '/uploads/' + response.goodsInfo.COVER
+                    vueObj.form.cover = tool.getArImage(response.goodsInfo.COVER, '/files/');
 
                     this.$forceUpdate()
                 })

+ 3 - 4
backendEle/src/views/user/move-add.vue

@@ -57,7 +57,6 @@
           <el-select v-model="form.location" placeholder="Move to location"> <!-- 移动到区位 -->
             <el-option label="I. Market" value="1" key="location_1"></el-option><!-- 一市场 -->
             <el-option label="II. Market" value="2" key="location_2"></el-option><!-- 二市场 -->
-            <el-option label="III. Market" value="3" key="location_3"></el-option><!-- 三市场 -->
           </el-select>
         </el-form-item>
 
@@ -97,7 +96,7 @@ export default {
         toConUserName: null,
         toConRealName: null,
         type: null,
-        location: null,
+        location: 1,
         remark: null,
       },
       moveUser: {},
@@ -140,11 +139,11 @@ export default {
         network.getData('user/chk-relation', {userName: this.form.moveUserName, toUserName: this.form.toConUserName}).then(response => {
           if (response.is === 1) {
             this.isRelation = true
-            this.toAlertTile = '在同一推荐网络内'
+            this.toAlertTile = 'Within the same sponsor network' // 在同一推荐网络内
             this.toAlertType = 'success'
           } else {
             this.isRelation = false
-            this.toAlertTile = '不同一推荐网络内'
+            this.toAlertTile = 'Not in the same sponsor network' // 不同一推荐网络内
             this.toAlertType = 'warning'
           }
           this.showToName = response.real_name

+ 22 - 17
common/helpers/bonus/BonusCalc.php

@@ -1835,6 +1835,11 @@ class BonusCalc extends BaseObject {
                 continue;
             }
 
+            // 会员级别达到要求才会发放奖金
+            if ($item['LAST_DEC_LV'] != $minDecLevel) {
+                continue;
+            }
+
             $insertBonusData[] = [
                 'ID' => SnowFake::instance()->generateId(),
                 'USER_ID' => $item['USER_ID'],
@@ -1873,17 +1878,14 @@ class BonusCalc extends BaseObject {
                 // 奖金数不能大于封顶值
                 $amount = ($amount > $capBonus) ? $capBonus : $amount;
 
-                // 会员级别达到要求才会发放奖金
-                if ($bonusData['LAST_DEC_LV'] == $minDecLevel) {
-                    // 放入缓存
-                    CalcCache::villaBonus($bonusData['USER_ID'], $this->_periodNum, $amount);
-                    // 加入月奖的会员
-                    CalcCache::addHasMonthBonusUsers($bonusData['USER_ID'], $this->_periodNum);
-                }
-
                 $bonusData['AMOUNT'] = $amount;
                 $bonusData['CAP_AMOUNT'] = $capAmount;
                 $bonusData['POINT_COMPLEX'] = $bonusPointComplex;
+
+                // 放入缓存
+                CalcCache::villaBonus($bonusData['USER_ID'], $this->_periodNum, $amount);
+                // 加入月奖的会员
+                CalcCache::addHasMonthBonusUsers($bonusData['USER_ID'], $this->_periodNum);
             }
 
             CalcBonusVilla::batchInsert($insertBonusData);
@@ -1956,6 +1958,12 @@ class BonusCalc extends BaseObject {
                 continue;
             }
 
+            // 会员级别达到要求才会发放奖金
+            $lastDecLv = $userStarDirectorObj[$userId]['LAST_DEC_LV'] ?? ($userStarCrownObj[$userId]['LAST_DEC_LV'] ?? '');
+            if ($lastDecLv != $minDecLevel) {
+                continue;
+            }
+
             $insertBonusData[] = [
                 'ID' => SnowFake::instance()->generateId(),
                 'USER_ID' => $userId,
@@ -1993,17 +2001,14 @@ class BonusCalc extends BaseObject {
                 // 奖金数不能大于封顶值
                 $amount = ($amount > $capBonus) ? $capBonus : $amount;
 
-                // 会员级别达到要求才会发放奖金
-                if ($bonusData['LAST_DEC_LV'] == $minDecLevel) {
-                    // 放入缓存
-                    CalcCache::garageBonus($bonusData['USER_ID'], $this->_periodNum, $amount);
-                    // 加入月奖的会员
-                    CalcCache::addHasMonthBonusUsers($bonusData['USER_ID'], $this->_periodNum);
-                }
-
                 $bonusData['AMOUNT'] = $amount;
                 $bonusData['CAP_AMOUNT'] = $capAmount;
                 $bonusData['POINT_COMPLEX'] = $bonusPointComplex;
+
+                // 放入缓存
+                CalcCache::garageBonus($bonusData['USER_ID'], $this->_periodNum, $amount);
+                // 加入月奖的会员
+                CalcCache::addHasMonthBonusUsers($bonusData['USER_ID'], $this->_periodNum);
             }
 
             CalcBonusGarage::batchInsert($insertBonusData);
@@ -3748,7 +3753,7 @@ class BonusCalc extends BaseObject {
         // }
 
         //没有共享和管理奖
-        $bonusReal = $bonus['BONUS_BD'] + $bonus['BONUS_TG'] + $bonus['BONUS_XF'] + $bonus['BONUS_YJ'] + $bonus['BONUS_QY'] + $bonus['BONUS_YC'] + $bonus['BONUS_YC_EXTRA'] + $bonus['BONUS_VIP'] + $standardBonus + $bonus['BONUS_BS_MNT'] + $bonus['BONUS_BS_ABBR'];
+        $bonusReal = $bonus['BONUS_BD'] + $bonus['BONUS_TG'] + $bonus['BONUS_XF'] + $bonus['BONUS_YJ'] + $bonus['BONUS_QY'] + $bonus['BONUS_YC'] + $bonus['BONUS_YC_EXTRA'] + $bonus['BONUS_VIP'] + $standardBonus + $bonus['BONUS_BS_MNT'] + $bonus['BONUS_BS_ABBR'] + $bonus['BONUS_QUARTER'];
         $realBonusGx = 0;
         $realBonusGl = 0;
         $realBonusBs = 0; // 蓝星管理奖. BlueStar

+ 33 - 6
common/helpers/bonus/BonusSend.php

@@ -129,8 +129,9 @@ class BonusSend extends BaseObject {
      *
      */
     public function putFakeOrder() {
-        echo('开始处理假订单' . PHP_EOL);
-        $fakeOrder= Order::find()->where(['PERIOD_NUM'=>$this->_periodNum, 'ORDER_TYPE'=>'FO'])->asArray()->all();
+        echo('开始处理-假订单' . PHP_EOL);
+        $fakeOrder= Order::find()->where(['PERIOD_NUM'=>$this->_periodNum, 'IS_AUTO'=>'1'])->asArray()->all();
+//        print_r($fakeOrder);exit;
         foreach($fakeOrder as $fOrder){
             $oRemainPv=RemainPv::findOne(["USER_ID"=>$fOrder['USER_ID']]);
             $transactionRemain = \Yii::$app->db->beginTransaction();
@@ -207,13 +208,13 @@ class BonusSend extends BaseObject {
             $this->_updatePercent(20);
             //Yii::$app->db->close();
             //Yii::$app->dbShop->close();
-            // 更新聘级
+            // 更新StarDirectory
             $this->updateEmpLevel();
             $this->_updatePercent(40);
             $t4 = microtime(true);
             echo('更新聘级完成,耗时:' . round($t4 - $t3, 3) . ',内存使用:' . (round(memory_get_usage() / 1024 / 1024, 3)) . 'MB' . PHP_EOL);
 
-            // 更新星级
+            // 更新StarCrown
             $this->updateCrownLevel();
             $this->_updatePercent(50);
             $t41 = microtime(true);
@@ -619,6 +620,7 @@ class BonusSend extends BaseObject {
      */
     public function updateCrownLevel(int $offset = 0)
     {
+        $starCrownLv = StarCrownLevel::getIdConvertLevelSortCache();
         $allData = CalcBonusQY::findUseDbCalc()
             ->yearMonth($this->_calcYearMonth)
             ->where(
@@ -634,18 +636,43 @@ class BonusSend extends BaseObject {
             ->limit($this->_limit)
             ->all();
 
+        $defaultEmpLv = StarCrownLevel::getDefaultLevelId();
         if ($allData) {
             $transaction = Yii::$app->db->beginTransaction();
             try {
                 foreach ($allData as $data) {
-                    User::updateAll(['CROWN_LV' => $data['LAST_CROWN_LV']], 'ID = :USER_ID', [':USER_ID' => $data['USER_ID']]);
+                    // 默认级别不更新
+                    if( $data['LAST_CROWN_LV'] === $defaultEmpLv ) continue;
+
+                    $modernCrownLv = $data['LAST_CROWN_LV'];   // 本期计算出的最新级别
+
+                    $user = CalcCache::getUserInfo($data['USER_ID'], $this->_periodNum);
+                    $originCrownLv = $user['CROWN_LV']; // 用户的历史最高crown级别
+                    $originCrownLvSort = $starCrownLv[$originCrownLv]; // 历史最高crown级别值
+                    $modernCrownLvSort = $starCrownLv[$modernCrownLv]; // 当前计算的crown级别值
+                    if ($modernCrownLvSort > $originCrownLvSort) {
+                        $columns = [
+                            'CROWN_LV' => $data['LAST_CROWN_LV'],
+                            'LAST_CROWN_LV' => $data['LAST_CROWN_LV'],
+                            'LAST_CROWN_LV_UPDATED_AT' => time(),
+                            'LAST_CROWN_LV_UPDATED_PERIOD' => $this->_periodNum,
+                        ];
+                    } else {
+                        $columns = [
+                            'LAST_CROWN_LV' => $data['LAST_CROWN_LV'],
+                            'LAST_CROWN_LV_UPDATED_AT' => time(),
+                            'LAST_CROWN_LV_UPDATED_PERIOD' => $this->_periodNum,
+                        ];
+                    }
+
+                    User::updateAll($columns, 'ID = :USER_ID', [':USER_ID' => $data['USER_ID']]);
                     User::deleteBaseInfoFromRedis($data['USER_ID']);
                     unset($data);
                 }
                 $transaction->commit();
             } catch (Exception $e) {
                 $transaction->rollBack();
-                $this->addError('updateStarCrownLevel', '更新星级失败,原因:' . $e->getMessage());
+                $this->addError('updateStarCrownLevel', '更新StartCrown失败,原因:' . $e->getMessage());
                 return false;
             }
             unset($transaction, $allData);

+ 1 - 1
common/helpers/bonus/PerfCalc.php

@@ -196,7 +196,7 @@ class PerfCalc {
             $periods = Period::getCurrentMonthPeriodByPeriodNum($periodNum);
             //先清除本期的假订单
             echo('首先,清除上次尝试生成业绩单时所创建的虚假订单'. date('Y-m-d  H:i:s', time()) . PHP_EOL);
-            $delFOrder = Order::deleteAll(['ORDER_TYPE'=>'FO','PERIOD_NUM'=>$periodNum]);
+            $delFOrder = Order::deleteAll(['IS_AUTO'=>'1','PERIOD_NUM'=>$periodNum]);
             echo('检查有结余PV的用户,如果他当月PV不足30,则为其创建假订单'. PHP_EOL);
             foreach($userHaveRemain as $uR){
                 $myPv = Order::find()->where(['PERIOD_NUM'=>$periods, 'USER_ID'=>$uR['USER_ID']])->SUM('PV');

+ 2 - 2
common/libs/export/BaseExport.php

@@ -346,7 +346,7 @@ class BaseExport extends Component {
                     'ADDRESS' => $columnData['ADDRESS'],
                     'PERIOD_NUM' => $columnData['PERIOD_NUM'],
                     'ORDER_TYPE' => ($columnData['ORDER_TYPE'] == 'ZC') ? 'Welcome pack' : (in_array($columnData['PAY_TYPE'], ['cash', 'pay_stack']) ? 'Reselling': 'Points'),
-                    'WAREHOUSE' => $columnData['WAREHOUSE'],
+                    // 'WAREHOUSE' => $columnData['WAREHOUSE'],
                     'CREATED_AT' => Date('Y-m-d H:i:s', $columnData['CREATED_AT']),
                     'PAY_TYPE' => ShopGoods::payTypes()[$columnData['PAY_TYPE']]['name'] ?? ShopGoods::payTypes()['cash']['name'],
                     'PAY_AT' => Date('Y-m-d H:i:s', $columnData['PAY_AT']),
@@ -488,7 +488,7 @@ class BaseExport extends Component {
 
         // 把文件对应的相关资料存入数据库中
         $export = new Export();
-        $export->EXPORT_NAME = $params['listName'] . '_' . date('y年m月d日H时i分s秒导出', Date::nowTime());
+        $export->EXPORT_NAME = $params['listName'] . '_' . date('Exp_y-m-d H:i:s', Date::nowTime());
         $export->MODULE_NAME = $params['moduleId'];
         $export->REMARK = $params['remark'];
         $export->IS_EXPORTING = 1;

+ 14 - 0
common/models/Order.php

@@ -134,4 +134,18 @@ class Order extends \common\components\ActiveRecord
             'EMAIL' => 'Email'
         ];
     }
+    /*
+     * 通过 期数和用户ID
+     * 查询当月订单
+     */
+    public static function fetchOrderCurrentMonth($periodNum, $userId){
+        if($periodNum % 2 == 0){
+            $periods = [$periodNum-1, $periodNum];
+        }else{
+            $periods = [$periodNum];
+        }
+        $periodsStr = implode(",", $periods);
+        $orders = Order::find()->where("USER_ID = '$userId' AND PERIOD_NUM IN (' . $periodsStr . ')");
+        return $orders;
+    }
 }

+ 2 - 2
common/models/ShopGoods.php

@@ -82,10 +82,10 @@ class ShopGoods extends \common\components\ActiveRecord
     ];
     const GIFT_TYPE = [
         1 =>[
-            'name'=>'Entry area',//报单区
+            'name'=>'1st Purchase',//报单区
         ],
         2 =>[
-            'name'=>'Reselling area',//复消区
+            'name'=>'Repeat Purchase',//复消区
         ],
         3 =>[
             'name'=>'Office Entry area',//工作室报单

+ 1 - 1
common/models/StarCrownLevel.php

@@ -100,7 +100,7 @@ class StarCrownLevel extends \common\components\ActiveRecord
         $ret = [];
         $allData = static::find()->where('1=1')->orderBy('SORT ASC, CREATED_AT ASC')->indexBy('ID')->asArray()->all();
         foreach($allData as $data) {
-            $ret[$data['ID']] = $data['LEVEL_SORT'];
+            $ret[$data['ID']] = $data['SORT'];
         }
         return $ret;
     }

+ 1 - 1
common/models/User.php

@@ -111,7 +111,7 @@ class User extends \common\components\ActiveRecord
     public function rules()
     {
         return [
-            [['USER_NAME', 'PASSWORD_HASH', 'PAY_PASSWORD', 'REAL_NAME', 'ID_CARD', 'AVATAR'], 'required'],
+            [['USER_NAME', 'PASSWORD_HASH', 'PAY_PASSWORD', 'REAL_NAME',/* 'ID_CARD',*/ 'AVATAR'], 'required'],
             [['NATION', 'ID_TYPE', 'BANK_PROVINCE', 'BANK_CITY', 'BANK_COUNTY', 'CREATED_AT', 'UPDATED_AT', 'STATUS', 'DEC_CLOSED', 'DEC_CLOSED_AT', 'PROVINCE', 'CITY', 'COUNTY', 'DELETED', 'DELETED_AT', 'IS_DEC', 'IS_ATLAS', 'IS_RECHARGE','IS_STUDIO',  'PERIOD_AT', 'DEC_PROVINCE', 'DEC_CITY', 'DEC_COUNTY', 'IS_UNION', 'STATUS_AT', 'VERIFIED', 'VERIFIED_AT', 'ALLOW_LOGIN', 'NOT_OPERATING', 'REG_FROM', 'BANK_UPDATED_AT', 'IS_DIRECT_SELLER', 'DEC_LV_UPDATED_AT', 'DEC_LV_UPDATED_PERIOD', 'PART_FUNC_CLOSED', 'LAST_DEC_LV_UPDATED_PERIOD', 'LAST_DEC_LV_UPDATED_AT', 'DEC_CREATED_AT', 'DEC_CREATED_PERIOD', 'PASSWORD_CHANGED', 'SUB_COM_LEADER', 'READ_AGREEMENT', 'IS_FIRST_OPEN', 'IS_MODIFY_PASSWORD'], 'integer'],
             [['ZG_UPGRADE_PV'], 'number'],
             [['ID', 'OPEN_BANK', 'BANK_NO', 'DEC_LV', 'EMP_LV', 'CROWN_LV', 'SUB_COM_ID', 'DEC_ID', 'DEC_ROLE_ID', 'ID_CARD_PREFIX', 'SEX', 'DEC_PHONE', 'GUARANTOR', 'USER_CREATOR', 'USER_UPDATER', 'LAST_DEC_LV', 'EMAIL'], 'string', 'max' => 32],

+ 1 - 0
common/models/UserNetwork.php

@@ -366,6 +366,7 @@ class UserNetwork extends \common\components\ActiveRecord
                 $allData[$key]['icon'] = $icon;
                 $allData[$key]['isExpanded'] = false;
                 $allData[$key]['displayNone'] = 'display-none';
+                $allData[$key]['RELATIVE_LOCATION'] = $data['RELATIVE_LOCATION'] == 1 ? 'L' : 'R';
             }
         }
         return $allData;

+ 4 - 4
common/models/forms/AdminAddUserForm.php

@@ -68,7 +68,7 @@ class AdminAddUserForm extends Model {
      */
     public function rules() {
         return [
-            [['userName', 'nation', 'realName', 'idCard', 'mobile', 'address', 'openBank', 'bankAddress', 'bankNo', 'bankAreaSelected', 'decLv', 'areaSelected', 'tel', 'isDec', 'decUserName', 'birthday', 'decRoleId', 'conUserName', 'recUserName', 'location', 'delUserName'], 'trim'],
+            [['userName', 'nation', 'realName', /*'idCard',*/ 'mobile', 'address', 'openBank', 'bankAddress', 'bankNo', 'bankAreaSelected', 'decLv', 'areaSelected', 'tel', 'isDec', 'decUserName', 'birthday', 'decRoleId', 'conUserName', 'recUserName', 'location', 'delUserName'], 'trim'],
             [['userName', 'realName', /*'idCard',*/ 'decLv', 'decUserName', 'conUserName', 'recUserName', 'location'], 'required'],
             [['userName'], 'unique', 'targetClass' => UserInfo::class, 'targetAttribute' => 'USER_NAME'],
             [['conUserName'], 'exist', 'targetClass' => UserInfo::class, 'targetAttribute' => 'USER_NAME'],
@@ -93,7 +93,7 @@ class AdminAddUserForm extends Model {
     public function scenarios() {
         $parentScenarios = parent::scenarios();
         $customScenarios = [
-            'add' => ['userName', 'nation', 'realName', 'idCard', 'mobile', 'address', 'openBank', 'bankAddress', 'bankNo', 'bankAreaSelected', 'decLv', 'areaSelected', 'tel', 'isDec', 'decUserName', 'birthday', 'decRoleId', 'conUserName', 'recUserName', 'location'],
+            'add' => ['userName', 'nation', 'realName', /*'idCard',*/ 'mobile', 'address', 'openBank', 'bankAddress', 'bankNo', 'bankAreaSelected', 'decLv', 'areaSelected', 'tel', 'isDec', 'decUserName', 'birthday', 'decRoleId', 'conUserName', 'recUserName', 'location'],
             'userDel' => ['delUserName'],
         ];
         return array_merge($parentScenarios, $customScenarios);
@@ -104,7 +104,7 @@ class AdminAddUserForm extends Model {
             'userName' => 'Member Code',//会员编号
             'nation' => 'Nation',//民族
             'realName' => 'Member Name',//会员姓名
-            'idCard' => 'ID',//身份证号
+//            'idCard' => 'ID',//身份证号
             'mobile' => 'Phone Number',//手机号
             'address' => 'Address',//地址
             'openBank' => 'Bank Name',//开户行
@@ -222,7 +222,7 @@ class AdminAddUserForm extends Model {
             $user->PAY_PASSWORD = \Yii::$app->security->generatePasswordHash($pwd);
             $user->NATION = 0;
             $user->REAL_NAME = $this->realName;
-            $user->ID_CARD = $this->idCard;
+//            $user->ID_CARD = $this->idCard;
             $user->MOBILE = $this->mobile;
             $user->ADDRESS = 'nothing';//无
             $user->ADDRESS = $this->address ? $this->address : 'nothing';//无

+ 8 - 8
common/models/forms/ChangeBalanceForm.php

@@ -109,7 +109,7 @@ class ChangeBalanceForm extends Model {
         $model = $this->_model = BalanceAudit::findOne(['ID' => $this->id]);
         $this->_userId = $model['USER_ID'];
         if ($model->AUDIT_STATUS > \Yii::$app->params['auditStatus']['un']['value']) {
-            $this->addError($attribute, '该申请已经被审核,不能重复审核');
+            $this->addError($attribute, 'The application has been reviewed and cannot be reviewed again');// 该申请已经被审核,不能重复审核
         }
     }
 
@@ -128,7 +128,7 @@ class ChangeBalanceForm extends Model {
                 }
             }
         } else {
-            $this->addError($attribute, '会员不存在');
+            $this->addError($attribute, 'Member does not exist'); // 会员不存在
         }
     }
 
@@ -185,20 +185,20 @@ class ChangeBalanceForm extends Model {
         }
         switch ($this->auditStatus) {
             case 'un':
-                $this->addError($attribute, '不能设置为待审核状态' . $this->auditStatus);
+                $this->addError($attribute, 'Cannot be set to pending review' . $this->auditStatus); // 不能设置为待审核状态
                 break;
             case 'true':
                 if (isset($oneData['AUDIT_STATUS']) && $oneData['AUDIT_STATUS'] == \Yii::$app->params['auditStatus']['true']['value']) {
-                    $this->addError($attribute, '已经审核通过不能重复审核');
+                    $this->addError($attribute, 'The audit has been approved and cannot be repeated'); // 已经审核通过不能重复审核
                 } elseif (isset($oneData['AUDIT_STATUS']) && $oneData['AUDIT_STATUS'] == \Yii::$app->params['auditStatus']['reject']['value']) {
-                    $this->addError($attribute, '已经审核拒绝不能重复审核');
+                    $this->addError($attribute, 'It has been reviewed and rejected and cannot be reviewed again'); // 已经审核拒绝不能重复审核
                 }
                 break;
             case 'reject':
                 if ($oneData['AUDIT_STATUS'] == \Yii::$app->params['auditStatus']['true']['value']) {
-                    $this->addError($attribute, '已经审核通过不能重复审核');
+                    $this->addError($attribute, 'The audit has been approved and cannot be repeated'); // 已经审核通过不能重复审核
                 } elseif ($oneData['AUDIT_STATUS'] == \Yii::$app->params['auditStatus']['reject']['value']) {
-                    $this->addError($attribute, '已经审核拒绝不能重复审核');
+                    $this->addError($attribute, 'It has been reviewed and rejected and cannot be reviewed again'); // 已经审核拒绝不能重复审核
                 }
                 break;
             default:
@@ -220,7 +220,7 @@ class ChangeBalanceForm extends Model {
      */
     public function isSelected($attributes) {
         if (!$this->selected) {
-            $this->addError($attributes, '必须选择一条数据');
+            $this->addError($attributes, 'A piece of data must be selected'); // 必须选择一条数据
         }
         if (!is_array($this->selected)) {
             $this->selected = [$this->selected];

+ 24 - 22
common/models/forms/ChangePerfForm.php

@@ -103,7 +103,7 @@ class ChangePerfForm extends Model {
         $model = $this->_model = PerfAudit::findOne(['ID' => $this->id]);
         $this->_userId = $model->USER_ID;
         if ($model->AUDIT_STATUS > \Yii::$app->params['auditStatus']['un']['value']) {
-            $this->addError($attribute, '该申请已经被审核,不能重复审核');
+            $this->addError($attribute, 'The application has been reviewed and cannot be reviewed again');// 该申请已经被审核,不能重复审核
         }
     }
 
@@ -116,10 +116,10 @@ class ChangePerfForm extends Model {
         if ($this->_userId) {
             // 如果该会员已经存在一个待审核的申请,直接提示错误
             if (PerfAudit::find()->where('USER_ID=:USER_ID AND AUDIT_STATUS=:AUDIT_STATUS', [':USER_ID' => $this->_userId, ':AUDIT_STATUS' => \Yii::$app->params['auditStatus']['un']['value']])->exists()) {
-                $this->addError($attribute, '该会员审核列表中如果有待审记录,需等待待审核记录审核后才可提交');
+                $this->addError($attribute, 'If there is a pending record in the member review list, it shall be submitted after the pending record has been reviewed'); // 该会员审核列表中如果有待审记录,需等待待审核记录审核后才可提交
             }
         } else {
-            $this->addError($attribute, '会员不存在');
+            $this->addError($attribute, 'Member does not exist'); // 会员不存在
         }
     }
 
@@ -130,10 +130,12 @@ class ChangePerfForm extends Model {
     public function isPeriodNum($attribute) {
         $period = Period::instance();
         if (!$period->isSent($this->periodNum)) {
-            $this->addError($attribute, '该期【' . $this->periodNum . '】未挂网,无法调整');
+//            $this->addError($attribute, '该期【' . $this->periodNum . '】未挂网,无法调整');
+            $this->addError($attribute, 'This period [' . $this->periodNum . '] is not connected to the net and cannot be adjusted');
         }
         if (Period::find()->where('IS_SENT=:IS_SENT AND PERIOD_NUM>=:START_PERIOD_NUM AND PERIOD_NUM<=:END_PERIOD_NUM', [':IS_SENT' => Period::SEND_FINISH, ':START_PERIOD_NUM' => $this->periodNum + 1, ':END_PERIOD_NUM' => $this->periodNum + 1])->count() == 1) {
-            $this->addError($attribute, '下一期【' . ($this->periodNum + 1) . '】已挂网,该期无法调整');
+            $this->addError($attribute, 'The next period [' . ($this->periodNum + 1) . '] has been connected to the net, and this period cannot be adjusted');
+//            $this->addError($attribute, '下一期【' . ($this->periodNum + 1) . '】已挂网,该期无法调整');
         }
     }
 
@@ -143,7 +145,7 @@ class ChangePerfForm extends Model {
      */
     public function isPerfType($attribute) {
         if (!in_array($this->perfType, array_keys(PerfAudit::CHANGE_PERF_TYPE))) {
-            $this->addError($attribute, '调整类型不正确');
+            $this->addError($attribute, 'The adjustment type is incorrect'); // 调整类型不正确
         }
         $this->_periodNum = Period::sentMaxPeriodNum();
     }
@@ -154,10 +156,10 @@ class ChangePerfForm extends Model {
      */
     public function isLocation($attribute) {
         if ($this->perfType==PerfAudit::PERF_TYPE_PV && !in_array($this->location, [1, 2, 3, 4, 5])) {
-            $this->addError($attribute, '区位不正确');
+            $this->addError($attribute, 'Incorrect location'); // 区位不正确
         }
         if ($this->perfType==PerfAudit::PERF_TYPE_SURPLUS && !in_array($this->location, [1, 2, 3, 4, 5, 6])) {
-            $this->addError($attribute, '区位不正确');
+            $this->addError($attribute, 'Incorrect location'); // 区位不正确
         }
     }
 
@@ -166,21 +168,21 @@ class ChangePerfForm extends Model {
      * @param $attribute
      */
     public function isAmount($attribute) {
-        if ($this->amount == 0) $this->addError($attribute, '变动数额不能为0');
+        if ($this->amount == 0) $this->addError($attribute, 'The amount of change cannot be 0'); // 变动数额不能为0
         if ($this->perfType == PerfAudit::PERF_TYPE_PV) {
             $userPerf = UserPerf::findOneAsArray('USER_ID=:USER_ID', [':USER_ID' => $this->_userId]);
             if ($this->amount < 0 && (abs($this->amount) > $userPerf['PV_' . $this->location . 'L'])) {
-                $this->addError('scenario', '该会员该区域的数额不足');
+                $this->addError('scenario', 'The member is underrepresented in that region'); // 该会员该区域的数额不足
             }
         } elseif ($this->perfType == PerfAudit::PERF_TYPE_SURPLUS) {
             $perfPeriod = PerfPeriod::findOneAsArray('USER_ID=:USER_ID AND PERIOD_NUM=:PERIOD_NUM', [':USER_ID' => $this->_userId, ':PERIOD_NUM' => $this->_periodNum]);
             if($this->location==6){
                 if ($this->amount < 0 && (abs($this->amount) > $perfPeriod['SURPLUS_LS'])) {
-                    $this->addError('scenario', '该会员当期该区域剩余数额不足');
+                    $this->addError('scenario', 'The member has insufficient surplus in the region for the current period'); // 该会员当期该区域剩余数额不足
                 }
             }else {
                 if ($this->amount < 0 && (abs($this->amount) > $perfPeriod['SURPLUS_' . $this->location . 'L'])) {
-                    $this->addError('scenario', '该会员当期该区域剩余数额不足');
+                    $this->addError('scenario', 'The member has insufficient surplus in the region for the current period'); // 该会员当期该区域剩余数额不足
                 }
             }
         }
@@ -195,20 +197,20 @@ class ChangePerfForm extends Model {
         $oneData = PerfAudit::findOneAsArray(['ID' => $this->id]);
         switch ($this->auditStatus) {
             case 'un':
-                $this->addError($attribute, '不能设置为待审核状态' . $this->auditStatus);
+                $this->addError($attribute, 'Cannot be set to pending review' . $this->auditStatus); // 不能设置为待审核状态
                 break;
             case 'true':
                 if ($oneData['AUDIT_STATUS'] == \Yii::$app->params['auditStatus']['true']['value']) {
-                    $this->addError($attribute, '已经审核通过不能重复审核');
+                    $this->addError($attribute, 'The audit has been approved and cannot be repeated'); // 已经审核通过不能重复审核
                 } elseif ($oneData['AUDIT_STATUS'] == \Yii::$app->params['auditStatus']['reject']['value']) {
-                    $this->addError($attribute, '已经审核拒绝不能重复审核');
+                    $this->addError($attribute, 'It has been reviewed and rejected and cannot be reviewed again'); // 已经审核拒绝不能重复审核
                 }
                 break;
             case 'reject':
                 if ($oneData['AUDIT_STATUS'] == \Yii::$app->params['auditStatus']['true']['value']) {
-                    $this->addError($attribute, '已经审核通过不能重复审核');
+                    $this->addError($attribute, 'The audit has been approved and cannot be repeated'); // 已经审核通过不能重复审核
                 } elseif ($oneData['AUDIT_STATUS'] == \Yii::$app->params['auditStatus']['reject']['value']) {
-                    $this->addError($attribute, '已经审核拒绝不能重复审核');
+                    $this->addError($attribute, 'It has been reviewed and rejected and cannot be reviewed again'); // 已经审核拒绝不能重复审核
                 }
                 break;
             default:
@@ -222,7 +224,7 @@ class ChangePerfForm extends Model {
      */
     public function isSelected($attributes) {
         if (!$this->selected) {
-            $this->addError($attributes, '必须选择一条数据');
+            $this->addError($attributes, 'A piece of data must be selected'); // 必须选择一条数据
         }
         if (!is_array($this->selected)) {
             $this->selected = [$this->selected];
@@ -409,7 +411,7 @@ class ChangePerfForm extends Model {
         $periodData = $this->adminOperateLogger->saveAfterContent;
         $this->adminOperateLogger->saveAfterContent=array_merge($perfData,$periodData);
         $this->adminOperateLogger->clean()->save([
-            'optType' => '审核通过会员业绩',
+            'optType' => 'Review and approve the performance of members', // 审核通过会员业绩
             'userId' => $model->USER_ID,
             'userName' => Info::getUserNameByUserId($model->USER_ID),
             'remark' => $model->REMARK,
@@ -517,13 +519,13 @@ class ChangePerfForm extends Model {
                 $periodData = $this->adminOperateLogger->saveAfterContent;
                 $this->adminOperateLogger->saveAfterContent=Tool::mergeArrayWithKey($perfData,$periodData);
                 $this->adminOperateLogger->setBatchField('USER_ID')->setOptObjField('USER_ID')->clean()->save([
-                    'optType' => '审核会员业绩',
+                    'optType' => 'Review member performance', // 审核会员业绩
                     'remark' => $this->remark,
                 ]);
             }else{
                 $this->adminOperateLogger->fetchClass = PerfAudit::class;
                 $this->adminOperateLogger->setIsBatch(true)->afterUpdate($this->selected, 'ID')->clean()->save([
-                    'optType' => '审核会员业绩',
+                    'optType' => 'Review member performance', // 审核会员业绩
                     'remark' => $this->remark,
                 ]);
             }
@@ -552,7 +554,7 @@ class ChangePerfForm extends Model {
      */
     public function delete($selected) {
         $this->adminOperateLogger->clean()->save([
-            'optType' => '删除业绩调整待审核数据',
+            'optType' => 'Delete performance adjustment pending review data', // 删除业绩调整待审核数据
         ]);
     }
 }

+ 1 - 1
common/models/forms/ChangeShowEmpLvForm.php

@@ -83,7 +83,7 @@ class ChangeShowEmpLvForm extends Model
     public function isUser($attribute){
         $this->_userId = Info::getUserIdByUserName($this->userName);
         if(!$this->_userId){
-            $this->addError($attribute, '会员不存在');
+            $this->addError($attribute, 'Member does not exist'); // 会员不存在
         }
     }
 

+ 1 - 1
common/models/forms/CloseDecForm.php

@@ -100,7 +100,7 @@ class CloseDecForm extends Model
     public function initUserId($attribute){
         $this->_userId = Info::getUserIdByUserName($this->userName);
         if(!$this->_userId){
-            $this->addError($attribute, '会员不存在');
+            $this->addError($attribute, 'Member does not exist'); // 会员不存在
         }
     }
 

+ 1 - 1
common/models/forms/CloseLoginForm.php

@@ -100,7 +100,7 @@ class CloseLoginForm extends Model
     public function initUserId($attribute){
         $this->_userId = Info::getUserIdByUserName($this->userName);
         if(!$this->_userId){
-            $this->addError($attribute, '会员不存在');
+            $this->addError($attribute, 'Member does not exist'); // 会员不存在
         }
     }
 

+ 1 - 1
common/models/forms/DealTypeForm.php

@@ -72,7 +72,7 @@ class DealTypeForm extends Model {
     public function initModel($attributes) {
         $this->_model = DealType::findOne(['ID' => $this->id]);
         if (!$this->_model) {
-            $this->addError($attributes, '数据不存在');
+            $this->addError($attributes, 'The data does not exist'); // 数据不存在
         }
     }
 

+ 1 - 1
common/models/forms/DecLevelLogForm.php

@@ -86,7 +86,7 @@ class DecLevelLogForm extends Model
     public function isUser($attribute){
         $this->_userId = Info::getUserIdByUserName($this->userName);
         if(!$this->_userId){
-            $this->addError($attribute, '会员不存在');
+            $this->addError($attribute, 'Member does not exist'); // 会员不存在
         }
     }
 

+ 1 - 1
common/models/forms/DecPackageForm.php

@@ -78,7 +78,7 @@ class DecPackageForm extends Model
      */
     public function isSelected($attributes) {
         if (!$this->selectedIds) {
-            $this->addError($attributes, '必须选择一条数据');
+            $this->addError($attributes, 'A piece of data must be selected'); // 必须选择一条数据
         }
         if (!is_array($this->selectedIds)) {
             $this->selectedIds = [$this->selectedIds];

+ 1 - 1
common/models/forms/DecRoleLogForm.php

@@ -84,7 +84,7 @@ class DecRoleLogForm extends Model
     public function isUser($attribute){
         $this->_userId = Info::getUserIdByUserName($this->userName);
         if(!$this->_userId){
-            $this->addError($attribute, '会员不存在');
+            $this->addError($attribute, 'Member does not exist'); // 会员不存在
         }
     }
 

+ 2 - 2
common/models/forms/InvoiceAuditForm.php

@@ -105,7 +105,7 @@ class InvoiceAuditForm extends Model {
     public function initModel($attributes) {
         $this->_model = InvoiceAudit::findOne(['ID' => $this->id]);
         if (!$this->_model) {
-            $this->addError($attributes, '数据不存在');
+            $this->addError($attributes, 'The data does not exist'); // 数据不存在
         }
         if ($this->_model->AUDIT_STATUS != \Yii::$app->params['auditStatus']['un']['value']) {
             $this->addError($attributes, '本数据已经被处理过了');
@@ -119,7 +119,7 @@ class InvoiceAuditForm extends Model {
     public function initWithdrawModel($attributes) {
         $this->_withdrawModel = Withdraw::findOne(['ID' => $this->withdrawId]);
         if (!$this->_withdrawModel) {
-            $this->addError($attributes, '数据不存在');
+            $this->addError($attributes, 'The data does not exist'); // 数据不存在
         }
         if ($this->_withdrawModel->AUDIT_STATUS != Withdraw::STATUS_APPLIED) {
             $this->addError($attributes, '已审核的提现无法修改发票信息');

+ 2 - 2
common/models/forms/InvoiceBalanceAuditForm.php

@@ -80,7 +80,7 @@ class InvoiceBalanceAuditForm extends Model {
     public function initModel($attributes) {
         $this->_model = InvoiceBalanceAudit::findOne(['ID' => $this->id]);
         if (!$this->_model) {
-            $this->addError($attributes, '数据不存在');
+            $this->addError($attributes, 'The data does not exist'); // 数据不存在
         }
         if ($this->_model->AUDIT_STATUS != \Yii::$app->params['auditStatus']['un']['value']) {
             $this->addError($attributes, '本数据已经被处理过了');
@@ -106,7 +106,7 @@ class InvoiceBalanceAuditForm extends Model {
             }
             $this->_uid = $userInfo['USER_ID'];
         } else {
-            $this->addError($attributes, '会员不存在');
+            $this->addError($attributes, 'Member does not exist'); // 会员不存在
         }
     }
 

+ 42 - 42
common/models/forms/NetMoveForm.php

@@ -52,9 +52,9 @@ class NetMoveForm extends Model {
         return [
             [['moveId', 'moveUserName', 'toConUserName', 'toConRealName', 'location', 'type', 'remark', 'auditStatus'], 'trim'],
             [['moveId', 'moveUserName', 'toConUserName', 'toConRealName', 'location', 'type', 'remark', 'auditStatus'], 'required'],
-            [['moveId'], 'exist', 'targetClass' => UserMove::class, 'targetAttribute' => 'ID', 'message' => '移网申请不存在'],
+            [['moveId'], 'exist', 'targetClass' => UserMove::class, 'targetAttribute' => 'ID', 'message' => 'The application to move the net does not exist'], // 移网申请不存在
             [['moveId'], 'initModel'],
-            [['moveUserName'], 'exist', 'targetClass' => UserInfo::class, 'targetAttribute' => 'USER_NAME', 'message' => '要移动的会员不存在'],
+            [['moveUserName'], 'exist', 'targetClass' => UserInfo::class, 'targetAttribute' => 'USER_NAME', 'message' => 'The member to move does not exist'],// 要移动的会员不存在
             [['location'], 'integer'],
             [['location'], 'isLocation'],
             [['type'], 'isType'],
@@ -85,14 +85,14 @@ class NetMoveForm extends Model {
      */
     public function attributeLabels() {
         return [
-            'moveId' => '移网申请Id',
-            'moveUserName' => '要移动的会员编号',
-            'toConUserName' => '移动到的会员编号',
-            'toConRealName' => '移动到的会员姓名',
-            'location' => '位置',
-            'type' => '移网类型',
-            'remark' => '备注',
-            'auditStatus' => '状态',
+            'moveId' => 'Id of the network transfer application',// 移网申请Id
+            'moveUserName' => 'The member code to be moved',// 要移动的会员编号
+            'toConUserName' => 'The member code to which to move',//移动到的会员编号
+            'toConRealName' => 'Member name to move to',//移动到的会员姓名
+            'location' => 'Location',// 位置
+            'type' => 'Moving network type',// 移网类型
+            'remark' => 'Note',// 备注
+            'auditStatus' => 'State',// 状态
         ];
     }
 
@@ -103,7 +103,7 @@ class NetMoveForm extends Model {
     public function initModel($attribute) {
         $model = $this->_model = UserMove::findOne(['ID' => $this->moveId]);
         if ($model->AUDIT_STATUS > \Yii::$app->params['auditStatus']['un']['value']) {
-            $this->addError($attribute, '该申请已经被审核,不能重复审核');
+            $this->addError($attribute, 'The application has been reviewed and cannot be reviewed again');// 该申请已经被审核,不能重复审核
         }
     }
 
@@ -113,8 +113,8 @@ class NetMoveForm extends Model {
      */
     public function isLocation($attribute) {
         if ($this->type == NetPoint::NET_TYPE_NETWORK) {
-            if (!in_array($this->location, [1, 2, 3])) {
-                $this->addError($attribute, '区位不正确');
+            if (!in_array($this->location, [1, 2])) {
+                $this->addError($attribute, 'Incorrect location');//区位不正确
             }
         }
     }
@@ -125,7 +125,7 @@ class NetMoveForm extends Model {
      */
     public function isType($attribute) {
         if (!in_array($this->type, [NetPoint::NET_TYPE_NETWORK, NetPoint::NET_TYPE_RELATION])) {
-            $this->addError($attribute, '移网类型不正确');
+            $this->addError($attribute, 'The type of moving net is incorrect');// 移网类型不正确
         }
     }
 
@@ -138,7 +138,7 @@ class NetMoveForm extends Model {
      */
     public function isMoveUser($attribute, $params) {
         if ($this->moveUserName == $this->toConUserName) {
-            $this->addError($attribute, '不能移动到自己点位下');
+            $this->addError($attribute, 'Cannot move to its own point');//不能移动到自己点位下
         }
         $this->_moveUserId = Info::getUserIdByUserName($this->moveUserName);
         $this->_moveUserInfo = Info::baseInfo($this->_moveUserId);
@@ -151,7 +151,7 @@ class NetMoveForm extends Model {
         $this->_toConUserId = Info::getUserIdByUserName($this->toConUserName);
 
         if (!$this->_fromConUserInfo) {
-            $this->addError($attribute, '原节点会员不存在,可能该会员是顶层会员不可移动');
+            $this->addError($attribute, 'The original node member does not exist. The member may be a top-level member and cannot be moved.');// 原节点会员不存在,可能该会员是顶层会员不可移动
         }
         if ($this->type == NetPoint::NET_TYPE_NETWORK) {
             $this->_fromLocation = UserNetwork::getLocation($this->_moveUserId, $this->_fromConUserId);
@@ -159,12 +159,12 @@ class NetMoveForm extends Model {
         // 原接点和新接点是否同一个
         if ($this->_fromConUserId == $this->_toConUserId) {
             if($this->type == NetPoint::NET_TYPE_RELATION){
-                $this->addError($attribute, '节点位置没有发生变化');
+                $this->addError($attribute, 'The node position does not change');// 节点位置没有发生变化
             }
             elseif($this->type == NetPoint::NET_TYPE_NETWORK){
                 // 查看原区位
                 if($this->_fromLocation == $this->location){
-                    $this->addError($attribute, '节点位置没有发生变化');
+                    $this->addError($attribute, 'The node position does not change');// 节点位置没有发生变化
                 }
             }
         }
@@ -185,7 +185,7 @@ class NetMoveForm extends Model {
                 foreach ($allChildUser as $child) {
                     $isLocation[$child['RELATIVE_LOCATION']] = true;
                     if ($child['RELATIVE_LOCATION'] == $this->location) {
-                        $this->addError($attribute, '新接点人的此区位已经存在会员');
+                        $this->addError($attribute, 'The new node already has a member for this location');// 新接点人的此区位已经存在会员
                     }
                 }
                 // 第二区不能空点,必须要有会员才能注册到第三区
@@ -205,7 +205,7 @@ class NetMoveForm extends Model {
             $modelClass = UserRelation::class;
         }
         if ($modelClass::isParentUser($this->_toConUserId, $this->_moveUserId)) {
-            $this->addError($attribute, '不能移动到该会员的子会员点位下');
+            $this->addError($attribute, 'Cannot be moved to the sub-member point of the member');// 不能移动到该会员的子会员点位下
         }
     }
 
@@ -218,7 +218,7 @@ class NetMoveForm extends Model {
         //移动到的节点会员不存在
         $toUser = Info::baseInfo($this->_toConUserId);
         if ($toUser['REAL_NAME'] != $this->toConRealName) {
-            $this->addError($attribute, '移动到的会员账号和姓名不匹配');
+            $this->addError($attribute, 'The code and name of the member you moved to do not match');// 移动到的会员账号和姓名不匹配
         }
     }
 
@@ -231,24 +231,24 @@ class NetMoveForm extends Model {
         $oneData = UserMove::findOneAsArray(['ID' => $this->moveId]);
         switch ($this->auditStatus) {
             case 'un':
-                $this->addError($attribute, '不能设置为待审核状态' . $this->auditStatus);
+                $this->addError($attribute, 'Cannot be set to pending review' . $this->auditStatus); // 不能设置为待审核状态
                 break;
             case 'true':
                 if ($oneData['AUDIT_STATUS'] == \Yii::$app->params['auditStatus']['true']['value']) {
-                    $this->addError($attribute, '已经审核通过不能重复审核');
+                    $this->addError($attribute, 'The application has been passed and cannot be reviewed again'); // 已经审核通过不能重复审核
                 } elseif ($oneData['AUDIT_STATUS'] == \Yii::$app->params['auditStatus']['reject']['value']) {
-                    $this->addError($attribute, '已经审核拒绝不能重复审核');
+                    $this->addError($attribute, 'The application has been rejected and cannot be reviewed again'); // 已经审核拒绝不能重复审核
                 }
                 break;
             case 'reject':
                 if ($oneData['AUDIT_STATUS'] == \Yii::$app->params['auditStatus']['true']['value']) {
-                    $this->addError($attribute, '已经审核通过不能重复审核');
+                    $this->addError($attribute, 'The application has been passed and cannot be reviewed again');// 已经审核通过不能重复审核
                 } elseif ($oneData['AUDIT_STATUS'] == \Yii::$app->params['auditStatus']['reject']['value']) {
-                    $this->addError($attribute, '已经审核拒绝不能重复审核');
+                    $this->addError($attribute, 'The application has been rejected and cannot be reviewed again');// 已经审核拒绝不能重复审核
                 }
                 break;
             default:
-                $this->addError($attribute, '状态参数有误');
+                $this->addError($attribute, 'Status parameter error'); // 状态参数有误
         }
     }
 
@@ -276,7 +276,7 @@ class NetMoveForm extends Model {
             } elseif ($this->type == NetPoint::NET_TYPE_RELATION) {
                 $model->TYPE = UserMove::TYPE_RELATION;
             } else {
-                throw new Exception('错误的移网类型');
+                throw new Exception('The type of moving net is incorrect'); // 错误的移网类型
             }
             $model->PERIOD_NUM = $period->getNowPeriodNum();
             $model->MOVE_ADMIN_ID = \Yii::$app->user->id;
@@ -323,7 +323,7 @@ class NetMoveForm extends Model {
         try {
             $model = $this->_model;
             if ($model->IS_MOVING == 1) {
-                throw new Exception('该申请正在移网操作,不能重复编辑');
+                throw new Exception('This application is being transferred to the net and cannot be edited repeatedly');// 该申请正在移网操作,不能重复编辑
             }
             $model->USER_ID = $this->_moveUserId;
             $model->FROM_UID = $this->_fromConUserId;
@@ -334,7 +334,7 @@ class NetMoveForm extends Model {
             } elseif ($this->type == NetPoint::NET_TYPE_RELATION) {
                 $model->TYPE = UserMove::TYPE_RELATION;
             } else {
-                throw new Exception('类型不存在');
+                throw new Exception('The type of moving net is incorrect'); // 类型不存在
             }
             $model->CREATE_REMARK = $this->remark;
             if (!$model->save()) {
@@ -369,7 +369,7 @@ class NetMoveForm extends Model {
         try {
             $model = $this->_model;
             if ($model->IS_MOVING == 1) {
-                throw new Exception('该申请正在移网操作,不能重复审核');
+                throw new Exception('This application is being transferred to the net and cannot be reviewed  again'); // 该申请正在移网操作,不能重复审核
             }
             $model->USER_ID = $this->_moveUserId;
             $model->FROM_UID = $this->_fromConUserId;
@@ -380,7 +380,7 @@ class NetMoveForm extends Model {
             } elseif ($this->type == NetPoint::NET_TYPE_RELATION) {
                 $model->TYPE = UserMove::TYPE_RELATION;
             } else {
-                throw new Exception('类型不存在');
+                throw new Exception('The type of moving net is incorrect'); // 类型不存在
             }
             if (!$model->save()) {
                 throw new Exception(Form::formatErrorsForApi($model->getErrors()));
@@ -393,7 +393,7 @@ class NetMoveForm extends Model {
         }
 
         $this->adminOperateLogger->afterUpdate($model)->clean()->save([
-            'optType' => '审核通过移网',
+            'optType' => 'Transfer net approved', // 审核通过移网
             'userId' => $model->USER_ID,
             'userName' => Info::getUserNameByUserId($model->USER_ID),
             'remark' => $this->remark??''
@@ -401,11 +401,11 @@ class NetMoveForm extends Model {
 
         $oneMove = UserMove::find()->select('UM.*, UMI.USER_NAME AS MOVE_USER_NAME, UTI.USER_NAME AS TO_USER_NAME')->from(UserMove::tableName() . ' AS UM')->join('LEFT JOIN', UserInfo::tableName() . ' AS UMI', 'UM.USER_ID=UMI.USER_ID')->join('LEFT JOIN', UserInfo::tableName() . ' AS UTI', 'UM.TO_UID=UTI.USER_ID')->where('UM.ID=:ID', [':ID' => $this->moveId])->asArray()->one();
         if (!$oneMove) {
-            $this->addError('audit', '移网申请不存在');
+            $this->addError('audit', 'The application to move the net does not exist'); // 移网申请不存在
             return null;
         }
         if ($oneMove['AUDIT_STATUS'] > 0) {
-            $this->addError('audit', '已审核过,不能审核');
+            $this->addError('audit', 'The application has been reviewed and cannot be reviewed again');// 已审核过,不能审核
             return null;
         }
         $this->moveUserName = $oneMove['MOVE_USER_NAME'];
@@ -428,7 +428,7 @@ class NetMoveForm extends Model {
         ])->asArray()->one();
 
         if( $oneData ) {
-            $this->addError('edit', '有正在移网的数据,请稍后再操作。');
+            $this->addError('edit', 'There is data being moved, please operate later.'); // 有正在移网的数据,请稍后再操作。
             return false;
         }
 
@@ -496,7 +496,7 @@ class NetMoveForm extends Model {
                 $this->moveWebToAsync();
             }
         } else {
-            $this->addError('audit', '错误的审核方式' . $this->auditStatus);
+            $this->addError('audit', 'The wrong way to audit' . $this->auditStatus); // 错误的审核方式
         }
         $this->adminOperateLogger->setIsBatch(true)->afterUpdate($this->selected,'ID')->clean()->save([
             'optType' => '审核移网',
@@ -574,7 +574,7 @@ class NetMoveForm extends Model {
         $period = Period::instance();
         $moveModel = UserMove::findOne(['ID' => $this->moveId]);
         if ($moveModel->IS_MOVING == 1) {
-            $this->addError('moveWebToAsync', '正在移动中请稍候');
+            $this->addError('moveWebToAsync', 'Please wait while it is moving'); // 正在移动中请稍候
             return null;
         }
         $moveModel->IS_MOVING = 1;
@@ -592,7 +592,7 @@ class NetMoveForm extends Model {
         } elseif ($moveModel->TYPE === NetPoint::NET_TYPE_RELATION) {
             $route = 'user/move-relation';
         } else {
-            $this->addError('scenario', '场景不存在');
+            $this->addError('scenario', 'The scene does not exist'); // 场景不存在
             return null;
         }
         // 异步处理添加任务
@@ -608,7 +608,7 @@ class NetMoveForm extends Model {
         $taskKey = \Yii::$app->swooleAsyncTimer->asyncHandle($route, $params);
         if ($taskKey === false) {
             $this->errorHandle();
-            $this->addError('send', '请求失败');
+            $this->addError('send', 'The request failed'); // 请求失败
             return null;
         }
         return $moveModel;
@@ -639,7 +639,7 @@ class NetMoveForm extends Model {
         } elseif ($this->type == NetPoint::NET_TYPE_RELATION) {
             $moveResult = $netPoint->moveRelationPoint($this->_moveUserId, $this->_toConUserId);
         } else {
-            $this->addError('netType', '移网的网络类型错误');
+            $this->addError('netType', 'The type of moving net is incorrect'); // 移网的网络类型错误
             unset($netPoint);
             return null;
         }
@@ -679,7 +679,7 @@ class NetMoveForm extends Model {
      */
     public function delete($selected) {
         $this->adminOperateLogger->clean()->save([
-            'optType' => '删除移网',
+            'optType' => 'Delete move network', // 删除移网
         ]);
     }
 }

+ 2 - 1
common/models/forms/OrderForm.php

@@ -998,13 +998,14 @@ class OrderForm extends Model
         $orderModel->USER_NAME = $userName;
         $orderModel->PERIOD_NUM = $periodNum;
         $orderModel->CREATE_USER = 'FAKE';
-        $orderModel->ORDER_TYPE = 'FO';
+        $orderModel->ORDER_TYPE = 'FX';
         $orderModel->STATUS = 1;
         $orderModel->PV = 30;
         $orderModel->PAY_PV = 30;
         $orderModel->P_CALC_MONTH = '1970-01-01';
         $orderModel->CREATED_AT = Date::nowTime();
         $orderModel->EXPRESS_TYPE = 1;
+        $orderModel->IS_AUTO = 1;
         if(!$orderModel->save()){
             $this->addErrors($orderModel->getErrors());
             return false;

+ 6 - 7
common/models/forms/ReceiveAddressForm.php

@@ -58,14 +58,14 @@ class ReceiveAddressForm extends Model
     public function attributeLabels()
     {
         return [
-            'consignee' => '收货人',
-            'mobile' => '手机号',
-            'province' => '省/市',
+            'consignee' => 'Consignee',
+            'mobile' => 'Phone',
+            'province' => 'State',
 //            'city' => '市/区',
 //            'county' => '区/县',
-            'lgaName' => 'LGA Name',
+            'lgaName' => 'Local Government Area',
             'cityName' => 'City Name',
-            'address' => '详细地址',
+            'address' => 'Address',
         ];
     }
 
@@ -78,7 +78,7 @@ class ReceiveAddressForm extends Model
         $parentScenarios =  parent::scenarios();
         $customScenarios = [
             'userAdd' => ['consignee', 'mobile', 'province', 'lgaName', 'cityName', 'address', 'isDefault'],
-            'userEdit' => ['id', 'consignee', 'mobile', 'province', /*'lgaName', 'cityName',*/ 'address', 'isDefault'],
+            'userEdit' => ['id', 'consignee', 'mobile', 'province', 'lgaName', 'cityName', 'address', 'isDefault'],
             'userIsDefault' => ['id', 'isDefault'],
         ];
         return array_merge($parentScenarios, $customScenarios);
@@ -133,7 +133,6 @@ class ReceiveAddressForm extends Model
             if ($this->isDefault) {
                 ReceiveAddress::updateAll(['IS_DEFAULT' => 0], 'USER_ID=:USER_ID', [':USER_ID'=>\Yii::$app->user->id]);
             }
-//            print_r($this);exit;
             if($this->scenario == 'userAdd'){
                 $this->_model->USER_ID = \Yii::$app->user->id;
                 $this->_model->USER_NAME = Info::getUserNameByUserId(\Yii::$app->user->id);

+ 1 - 1
common/models/forms/RechargeForm.php

@@ -117,7 +117,7 @@ class RechargeForm extends Model {
      */
     public function isSelected($attributes) {
         if (!$this->selectedIds) {
-            $this->addError($attributes, '必须选择一条数据');
+            $this->addError($attributes, 'A piece of data must be selected'); // 必须选择一条数据
         }
 //        if (!is_array($this->selectedIds)) {
 //            $this->selectedIds = [$this->selectedIds];

+ 2 - 2
common/models/forms/ReconsumeForm.php

@@ -106,7 +106,7 @@ class ReconsumeForm extends Model {
         $model = $this->_model = ReconsumeAudit::findOne(['ID' => $this->id]);
         $this->_userId = $model->USER_ID;
         if ($model->AUDIT_STATUS > \Yii::$app->params['auditStatus']['un']['value']) {
-            $this->addError($attribute, '该申请已经被审核,不能重复审核');
+            $this->addError($attribute, 'The application has been reviewed and cannot be reviewed again');// 该申请已经被审核,不能重复审核
         }
     }
 
@@ -155,7 +155,7 @@ class ReconsumeForm extends Model {
      */
     public function isSelected($attributes) {
         if (!$this->selected) {
-            $this->addError($attributes, '必须选择一条数据');
+            $this->addError($attributes, 'A piece of data must be selected'); // 必须选择一条数据
         }
         if (!is_array($this->selected)) {
             $this->selected = [$this->selected];

+ 2 - 2
common/models/forms/RegInfoAuditForm.php

@@ -98,7 +98,7 @@ class RegInfoAuditForm extends Model {
     public function initModel($attributes) {
         $this->_model = RegInfoAudit::findOne(['ID' => $this->id]);
         if (!$this->_model) {
-            $this->addError($attributes, '数据不存在');
+            $this->addError($attributes, 'The data does not exist'); // 数据不存在
         }
         if ($this->_model->AUDIT_STATUS != \Yii::$app->params['auditStatus']['un']['value']) {
             $this->addError($attributes, '本数据已经被处理过了');
@@ -121,7 +121,7 @@ class RegInfoAuditForm extends Model {
             }
             $this->_uid = $userInfo['USER_ID'];
         } else {
-            $this->addError($attributes, '会员不存在');
+            $this->addError($attributes, 'Member does not exist'); // 会员不存在
         }
 
     }

+ 1 - 1
common/models/forms/RegTypeForm.php

@@ -61,7 +61,7 @@ class RegTypeForm extends Model {
     public function initModel($attributes) {
         $this->_model = RegType::findOne(['ID' => $this->id]);
         if (!$this->_model) {
-            $this->addError($attributes, '数据不存在');
+            $this->addError($attributes, 'The data does not exist'); // 数据不存在
         }
     }
 

+ 2 - 2
common/models/forms/ResendQYForm.php

@@ -110,7 +110,7 @@ class ResendQYForm extends Model {
      */
     public function isUser($attribute) {
         if (!$this->_userId = Info::getUserIdByUserName($this->userName)) {
-            $this->addError($attribute, '会员不存在');
+            $this->addError($attribute, 'Member does not exist'); // 会员不存在
         }
     }
 
@@ -149,7 +149,7 @@ class ResendQYForm extends Model {
      */
     public function isSelected($attributes) {
         if (!$this->selectedIds) {
-            $this->addError($attributes, '必须选择一条数据');
+            $this->addError($attributes, 'A piece of data must be selected'); // 必须选择一条数据
         }
         if (!is_array($this->selectedIds)) {
             $this->selectedIds = [$this->selectedIds];

+ 1 - 1
common/models/forms/SendCFAndLXForm.php

@@ -126,7 +126,7 @@ class SendCFAndLXForm extends Model {
      */
     public function isSelected($attributes) {
         if (!$this->selectedIds) {
-            $this->addError($attributes, '必须选择一条数据');
+            $this->addError($attributes, 'A piece of data must be selected'); // 必须选择一条数据
         }
         if (!is_array($this->selectedIds)) {
             $this->selectedIds = [$this->selectedIds];

+ 2 - 2
common/models/forms/ShopGoodsForm.php

@@ -113,7 +113,7 @@ class ShopGoodsForm extends Model
     public function initModel($attributes) {
         $this->_model = ShopGoods::findOne(['ID' => $this->id]);
         if (!$this->_model) {
-            $this->addError($attributes, '数据不存在');
+            $this->addError($attributes, 'The data does not exist'); // 数据不存在
         }
     }
 
@@ -157,7 +157,7 @@ class ShopGoodsForm extends Model
      */
     public function isSelected($attributes) {
         if (!$this->selectedIds) {
-            $this->addError($attributes, '必须选择一条数据');
+            $this->addError($attributes, 'A piece of data must be selected'); // 必须选择一条数据
         }
         if (!is_array($this->selectedIds)) {
             $this->selectedIds = [$this->selectedIds];

+ 4 - 3
common/models/forms/UploadForm.php

@@ -8,6 +8,7 @@ use common\helpers\Date;
 use common\helpers\Excel;
 use common\helpers\Form;
 use common\helpers\http\RemoteUploadApi;
+use common\helpers\LoggerTool;
 use common\helpers\ocr\OcrApi;
 use common\helpers\Tool;
 use common\helpers\user\Info;
@@ -178,16 +179,16 @@ class UploadForm extends Model {
                 unlink($this->file->tempName);
             } else {
                 // 生成文件名
-                $fileName = Tool::generateId(false);
+//                $fileName = Tool::generateId(false);
+                $fileName = $this->file->baseName;
                 // 保存在本地
-                $localPath = \Yii::getAlias('@common/runtime/uploads/') . $fileName . '.' . $this->file->extension;
+                $localPath = '/ng/Volumes/HDD/workshop/old/ar.upload.ming/files/' . $fileName . '.' . $this->file->extension;
                 if (!$this->file->saveAs($localPath)) {
                     throw new Exception('Failed');
                 }
                 $uploadInfo = [
                     'fileName' => $fileName . '.' . $this->file->extension,
                     'category' => $uploadCategory,
-//                    'url' => $localPath,
                     'url' => $fileName . '.' . $this->file->extension,
                     'fileSize' => null,
                     'md5' => null,

+ 11 - 11
common/models/forms/UserBasicForm.php

@@ -41,8 +41,8 @@ class UserBasicForm extends Model {
         return [
             [['userId', 'password', 'passwordType','realName', 'mobile','openBank','bankAddress','bankNo','status'], 'trim'],
             [['userId'], 'required'],
-            [['idCard', 'allData'], 'required', 'on'=>['addWithUserName']],
-            [['nation','realName', 'mobile', 'idCard', 'openBank', 'bankAddress', 'bankNo'], 'required', 'on'=>'modifyProfile'],
+            [[/*'idCard', */'allData'], 'required', 'on'=>['addWithUserName']],
+            [['nation','realName', 'mobile', /*'idCard', */'openBank', 'bankAddress', 'bankNo'], 'required', 'on'=>'modifyProfile'],
             [['mobile'], 'mobile'],
         ];
     }
@@ -55,7 +55,7 @@ class UserBasicForm extends Model {
         $parentScenarios = parent::scenarios();
         $customScenarios = [
             'modifyPassword' => ['userId', 'password', 'passwordType'],
-            'modifyProfile' => ['userId','realName','idCard','mobile','openBank','bankAddress','bankNo'],
+            'modifyProfile' => ['userId','realName',/*'idCard',*/'mobile','openBank','bankAddress','bankNo'],
             'modifyStatus' => ['userId','status'],
             'isModifyPasswordStatus' => ['userId','status'],
         ];
@@ -69,7 +69,7 @@ class UserBasicForm extends Model {
             'passwordType' => '密码类型',
 //            'nation' => '民族',
             'realName' => '真实姓名',
-            'idCard' => '身份证号',
+//            'idCard' => '身份证号',
             'mobile' => '手机号',
             'openBank' => '银行名称',
             'bankAddress' => '开户支行',
@@ -132,7 +132,7 @@ class UserBasicForm extends Model {
 //            $userModel->NATION = $this->nation;
             $userModel->REAL_NAME = $this->realName;
             $userModel->MOBILE = $this->mobile;
-            $userModel->ID_CARD = $this->idCard;
+//            $userModel->ID_CARD = $this->idCard;
             $userModel->OPEN_BANK = $this->openBank;
             $userModel->BANK_NO = $this->bankNo;
             $userModel->BANK_ADDRESS = $this->bankAddress;
@@ -141,13 +141,13 @@ class UserBasicForm extends Model {
             }
             $transaction->commit();
             $this->adminOperateLogger->afterUpdate($userModel)->clean()->save([
-                'optType' => '修改会员资料',
+                'optType' => 'Modification of Member information', // 修改会员资料
                 'userId' => $this->userId,
                 'userName' => $userModel->USER_NAME,
 //                'nation' => $this->nation,
                 'realName' => $this->realName,
                 'mobile' => $this->mobile,
-                'idCard' => $this->idCard,
+//                'idCard' => $this->idCard,
                 'openBank' => $this->openBank,
                 'bankNo' => $this->bankNo,
                 'bankAddress' => $this->bankAddress,
@@ -176,8 +176,8 @@ class UserBasicForm extends Model {
         try {
             $userModel = User::findOne(['ID' => $this->userId]);
             if($userModel->STATUS==$this->status){
-                $statusName = ($userModel->STATUS == 1) ? '激活' : '锁定';
-                throw new Exception('当前会员状态已【' . $statusName . '】,无需重复设置!');
+                $statusName = ($userModel->STATUS == 1) ? 'activation' : 'lock'; // 激活 锁定
+                throw new Exception('The current member status is【' . $statusName . '】,Do not need to set it again!'); // 当前会员状态已  无需重复设置
             }
             $userModel->STATUS = $this->status;
             $userModel->STATUS_AT = Date::nowTime();
@@ -191,7 +191,7 @@ class UserBasicForm extends Model {
             return null;
         }
         $this->adminOperateLogger->afterUpdate($this->userId,'ID',['select'=>'ID,STATUS'])->clean()->save([
-            'optType' => ($this->status == 1) ? '会员激活' : '会员锁定',
+            'optType' => ($this->status == 1) ? 'Member activation' : 'Member of the lock', // 会员激活 会员锁定
         ]);
         return $userModel;
     }
@@ -209,7 +209,7 @@ class UserBasicForm extends Model {
         try {
             $userModel = User::findOne(['ID' => $this->userId]);
             if($userModel->IS_MODIFY_PASSWORD==$this->status){
-                throw new Exception('状态没有发生改变,无需重复设置!');
+                throw new Exception('The status has not changed, and do not need to set it again');// 状态没有发生改变,无需重复设置!
             }
             $userModel->IS_MODIFY_PASSWORD = $this->status;
             if( !$userModel->save(false) ) {

+ 1 - 1
common/models/forms/UserBindForm.php

@@ -84,7 +84,7 @@ class UserBindForm extends Model {
     public function initModel($attributes) {
         $this->_model = UserBind::findOne(['ID' => $this->id]);
         if (!$this->_model) {
-            $this->addError($attributes, '数据不存在');
+            $this->addError($attributes, 'The data does not exist'); // 数据不存在
         }
         if($this->scenario=='frontEdit'){
             if (Info::getIdCardByUserId(\Yii::$app->user->id) != Info::getIdCardByUserId($this->_model['MAIN_UID'])) {

+ 2 - 2
common/models/forms/UserTeamworkForm.php

@@ -117,7 +117,7 @@ class UserTeamworkForm extends Model {
     public function initModel($attributes) {
         $this->_model = UserTeamwork::findOne(['ID' => $this->id]);
         if (!$this->_model) {
-            $this->addError($attributes, '数据不存在');
+            $this->addError($attributes, 'The data does not exist'); // 数据不存在
         }
     }
 
@@ -145,7 +145,7 @@ class UserTeamworkForm extends Model {
                     $this->addError($attributes, '非正常的会员不允许设置点位合作');
                 }
             } else {
-                $this->addError($attributes, '会员不存在');
+                $this->addError($attributes, 'Member does not exist'); // 会员不存在
             }
         } else {
             if (strpos(strtolower($this->userName), 'hz') !== 0) {

+ 2 - 2
common/models/forms/WithdrawForm.php

@@ -137,7 +137,7 @@ class WithdrawForm extends Model {
             }
             $this->_userId = $userInfo['USER_ID'];
         } else {
-            $this->addError($attributes, $this->userName . '会员不存在');
+            $this->addError($attributes, $this->userName . 'Member does not exist'); // 会员不存在
         }
     }
 
@@ -222,7 +222,7 @@ class WithdrawForm extends Model {
      */
     public function isSelected($attributes) {
         if (!$this->selectedIds) {
-            $this->addError($attributes, '必须选择一条数据');
+            $this->addError($attributes, 'A piece of data must be selected'); // 必须选择一条数据
         }
         if (!is_array($this->selectedIds)) {
             $this->selectedIds = [$this->selectedIds];

+ 1 - 1
console/controllers/UserController.php

@@ -92,7 +92,7 @@ class UserController extends BaseController
      * @return bool
      */
     public function actionIndexExport($taskId){
-        return $this->_export($taskId, IndexList::class, '会员列表');
+        return $this->_export($taskId, IndexList::class, 'Member_list');
     }
 
     /**

+ 1 - 0
frontendApi/config/menu.php

@@ -78,6 +78,7 @@ return [
             ['name'=>'My account', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'index', 'routePath'=>'bonus/index', 'show'=>1,],//我的账户
 //            ['name'=>'最新奖金', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'new', 'routePath'=>'bonus/new', 'show'=>1,'allow'=>'newBonusSwitch'],
             ['name'=>'My bonus', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'other', 'routePath'=>'bonus/other', 'show'=>1,'allow'=>'pastBonusSwitch'],//往期奖金
+            ['name'=>'Historical cumulative bonus', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'other', 'routePath'=>'bonus/historical-cumulative-bonus', 'show'=>1,'allow'=>'pastBonusSwitch'],//历史累积奖金
             //['name'=>'实时业绩', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'real-time-perf', 'routePath'=>'bonus/real-time-perf', 'show'=>1,],
            // ['name'=>'房产积分', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'fc-point', 'routePath'=>'bonus/fc-point', 'show'=>1,],
 //            ['name'=>'报单中心补助明细查询', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-bt', 'routePath'=>'bonus/flow-bt', 'show'=>1,],

+ 1 - 0
frontendApi/config/urlManagerRules.php

@@ -127,6 +127,7 @@ return [
             'GET trace-fl' => 'trace-fl',
             'GET dec-period' => 'dec-period',
             'GET fc-point' => 'fc-point',
+            'GET historical-cumulative-bonus' => 'historical-cumulative-bonus',
         ],
     ],
     [

+ 3 - 3
frontendApi/modules/v1/controllers/AtlasController.php

@@ -36,7 +36,7 @@ class AtlasController extends BaseController {
 
         if ($userName !== '') {
             if (!$userId = Info::getUserIdByUserName($userName)) {
-                return static::notice('会员不存在', 400);
+                return static::notice('Member does not exist', 400); // 会员不存在
             }
             $topUid = \Yii::$app->user->id;
             $userNetInfo = UserNetwork::findOneAsArray('USER_ID=:USER_ID', [':USER_ID' => $userId], 'PARENT_UIDS');
@@ -84,7 +84,7 @@ class AtlasController extends BaseController {
         $periodNum = Yii::$app->request->get('periodNum', null);
         $deep = Yii::$app->request->get('deep', 5);
         if ($deep > 20) {
-            return static::notice('最多查看会员的前20层子会员', 400);
+            return static::notice('View the top 20 sub members of the member at most', 400); // 最多查看会员的前20层子会员
         }
         $allData = UserNetwork::getChildrenWithDeepAndLayer($userId, $deep, 1, $periodNum);
         return static::notice(['allData' => $allData, 'periodNum' => $periodNum]);
@@ -105,7 +105,7 @@ class AtlasController extends BaseController {
             $userId = \Yii::$app->user->id;
         } else {
             if (!$userId = Info::getUserIdByUserName($userName)) {
-                return static::notice('会员不存在', 400);
+                return static::notice('Member does not exist', 400); //  会员不存在
             }
             $topUid = \Yii::$app->user->id;
             $userNetInfo = UserNetwork::findOneAsArray('USER_ID=:USER_ID', [':USER_ID' => $userId], 'PARENT_UIDS');

+ 57 - 6
frontendApi/modules/v1/controllers/BonusController.php

@@ -379,7 +379,7 @@ class BonusController extends BaseController {
         $calcBonus = CalcBonus::find()->where('USER_ID=:USER_ID AND IS_SENT=1', [':USER_ID' => \Yii::$app->user->id])
         ->select('PERIOD_NUM,ORI_BONUS_QY,ORI_BONUS_YC,ORI_BONUS_VIP,ORI_BONUS_STANDARD,ORI_BONUS_BD,ORI_BONUS_TG,
         ORI_BONUS_XF,BONUS_TOTAL,MANAGE_TAX,BONUS_REAL,BONUS_INCOME,ORI_BONUS_YJ,ORI_BONUS_GX,ORI_BONUS_GL,RECONSUME_POINTS,
-        LAST_DEC_LV,LAST_EMP_LV,EXCHANGE_POINTS,ORI_BONUS_BS,ORI_BONUS_BS_MNT,ORI_BONUS_BS_ABBR,BONUS_TOURISM,BONUS_GARAGE')
+        LAST_DEC_LV,LAST_EMP_LV,EXCHANGE_POINTS,ORI_BONUS_BS,ORI_BONUS_BS_MNT,ORI_BONUS_BS_ABBR,ORI_BONUS_QUARTER,BONUS_TOURISM,BONUS_GARAGE')
         ->limit($showBonusPeriodNum)
         ->orderBy('PERIOD_NUM DESC')
         ->asArray()
@@ -508,6 +508,57 @@ class BonusController extends BaseController {
         return static::notice(['tableData' => $calcBonus, 'tableKey' => '', 'bonusSwitch' => $bonusSwitch]);
     }
 
+    /**
+     * 历史累积奖金
+     * @return mixed
+     * @throws \yii\web\HttpException
+     */
+    public function actionHistoricalCumulativeBonus()
+    {
+        $calcBonus = CalcBonus::find()->where('USER_ID=:USER_ID AND IS_SENT=1', [':USER_ID' => \Yii::$app->user->id])
+            ->select([
+                'SUM(ORI_BONUS_TG) AS ORI_BONUS_TG',
+                'SUM(ORI_BONUS_QY) AS ORI_BONUS_QY',
+                'SUM(ORI_BONUS_BD) AS ORI_BONUS_BD',
+                'SUM(ORI_BONUS_BS) AS ORI_BONUS_BS',
+                'SUM(ORI_BONUS_QUARTER) AS ORI_BONUS_QUARTER',
+                'SUM(BONUS_TOTAL) AS BONUS_TOTAL'
+            ])
+            ->asArray()
+            ->one();
+
+        // 增加明细开关控制(0 只显示总奖金 1 全部显示)
+        $flowBonusSwitch = Cache::getSystemConfig()['flowBonusSwitch']['VALUE'];
+
+        $sysConfig = Cache::getSystemConfig();
+        $bonusSwitch = [
+            'welcomeBonusSwitch' => intval($sysConfig['openTG']['VALUE']),
+            'teamBonusSwitch' => intval($sysConfig['openQY']['VALUE']),
+            'stockistCommissionSwitch' => intval($sysConfig['openFW']['VALUE']),
+        ];
+
+        if ($calcBonus) {
+            if ($flowBonusSwitch) {
+                if ($sysConfig['openTG']['VALUE']) {
+                    $calcBonus['BONUS_TG'] = ['name' => '销售奖金', 'value' => Tool::formatPrice($calcBonus['ORI_BONUS_TG'])];
+                }
+                if ($sysConfig['openQY']['VALUE']) {
+                    $calcBonus['ORI_BONUS_QY'] = ['name' => '业绩奖金', 'value' => Tool::formatPrice($calcBonus['ORI_BONUS_QY'])];
+                }
+                if ($sysConfig['openFW']['VALUE']) {
+                    $calcBonus['BONUS_BD'] = ['name' => '服务奖金', 'value' => Tool::formatPrice($calcBonus['ORI_BONUS_BD'])];
+                }
+
+                $calcBonus['ORI_BONUS_BS'] = ['name' => '蓝星奖', 'value' => Tool::formatPrice($calcBonus['ORI_BONUS_BS'])];
+                $calcBonus['ORI_BONUS_QUARTER'] = ['name' => '季度奖金', 'value' => Tool::formatPrice($calcBonus['ORI_BONUS_QUARTER'])];
+            }
+
+            $calcBonus['BONUS_TOTAL'] = ['name' => '总奖金', 'value' => Tool::formatPrice($calcBonus['BONUS_TOTAL'])];
+        }
+
+        return static::notice(['tableData' => [$calcBonus], 'bonusSwitch' => $bonusSwitch]);
+    }
+
     /**
      * 实时业绩
      * @return mixed
@@ -719,7 +770,7 @@ class BonusController extends BaseController {
                 return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
             }
         } else {
-            return static::notice('非法请求', 400);
+            return static::notice('Illegal request', 400); // 非法请求
         }
     }
 
@@ -739,7 +790,7 @@ class BonusController extends BaseController {
                 return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
             }
         } else {
-            return static::notice('非法请求', 400);
+            return static::notice('Illegal request', 400); // 非法请求
         }
     }
 
@@ -814,7 +865,7 @@ class BonusController extends BaseController {
         $id = \Yii::$app->request->get('id');
         $withdraw = Withdraw::findOneAsArray('ID=:ID', [':ID' => $id]);
         if (!$withdraw) {
-            return static::notice('数据不存在', 400);
+            return static::notice('The data does not exist', 400); // 数据不存在
         }
         $uploadInvoiceTip = Cache::getSystemConfig()['uploadInvoiceTip']['VALUE'];
         if ($withdraw['AUDIT_STATUS'] == Withdraw::STATUS_APPLIED) {
@@ -834,7 +885,7 @@ class BonusController extends BaseController {
         $id = \Yii::$app->request->get('id');
         $withdraw = Withdraw::findOneAsArray('ID=:ID', [':ID' => $id]);
         if (!$withdraw) {
-            return static::notice('数据不存在', 400);
+            return static::notice('The data does not exist', 400); // 数据不存在
         }
         if (\Yii::$app->request->isPost) {
             $formModel = new UploadForm();
@@ -861,7 +912,7 @@ class BonusController extends BaseController {
         $id = \Yii::$app->request->get('id');
         $uploads = Uploads::findOneAsArray('ID=:ID', [':ID' => $id],'URL');
         if (!$uploads) {
-            return static::notice('数据不存在', 400);
+            return static::notice('The data does not exist', 400); // 数据不存在
         }
         return static::notice($uploads['URL']);
     }

+ 2 - 2
frontendApi/modules/v1/controllers/ConfigController.php

@@ -120,7 +120,7 @@ class ConfigController extends BaseController
     public function actionReceiveAddressAdd() {
         Region::updateToCache();
         if(\Yii::$app->request->isPost) {
-            return parent::edit(ReceiveAddressForm::class, '添加收货地址成功', 'userAdd', ['edit']);
+            return parent::edit(ReceiveAddressForm::class, 'Added Successfully', 'userAdd', ['edit']);
         }
         return static::notice('非法访问', 400);
     }
@@ -132,7 +132,7 @@ class ConfigController extends BaseController
      */
     public function actionReceiveAddressEdit() {
         if(\Yii::$app->request->isPost) {
-            return parent::edit(ReceiveAddressForm::class, '添加收货地址成功', 'userEdit', ['edit']);
+            return parent::edit(ReceiveAddressForm::class, 'Modified Successfully', 'userEdit', ['edit']);
         }
         return static::notice('非法访问', 400);
     }

+ 19 - 1
frontendApi/modules/v1/controllers/DashboardController.php

@@ -20,6 +20,7 @@ use common\models\FlowBonus;
 use common\models\Period;
 use common\models\ReconsumePool;
 use common\models\RemainPv;
+use common\models\Order;
 
 class DashboardController extends BaseController
 {
@@ -96,6 +97,22 @@ class DashboardController extends BaseController
 
         //剩余分期PV显示
         $myRemainPv = RemainPv::findOne(['USER_ID'=>$baseInfo['ID']])->REMAIN_PV ?? 0;
+        // 找到当月的所有订单,计算总PV及总REMAIN_PV
+        $myOrders = Order::fetchOrderCurrentMonth($periodNum, $baseInfo['ID']);
+        $currentPv = $myOrders->SUM('PV');
+        $currentRemainPv = $myOrders->SUM('REMAIN_PV');
+
+        $totalRemainPv = $myRemainPv + $currentRemainPv;
+        $remainMonth = $totalRemainPv / 30;
+
+        if($currentPv >= 30){ // 如果当月合格,则活跃资格延后一个月
+            $activeEndStr = date("Y-m", strtotime('next month'));
+        }else{
+            $activeEndStr = date("Y-m");
+        }
+
+        $activeEndStr = $activeEndStr. " + $remainMonth months";
+        $activeEnd = date("Y-m-d H:i:s", strtotime($activeEndStr));
 
         return static::notice([
             'nowTime' => $nowTime,
@@ -107,7 +124,8 @@ class DashboardController extends BaseController
             'news'=>$news,
 //            'periodNum'=>'Period '.$periodNum.' ,'.$curYM['CALC_MONTH'].'月第'.$wkrd.'周,共'.$weeks.'周',
             'periodNum'=>$periodNum.' ,'.$wkrd.' period  of '. $monthArray[$curYM['CALC_MONTH']],
-            'myRemainPv'=>$myRemainPv
+            'myRemainPv'=>$totalRemainPv,
+            'activeEnd'=>$activeEnd
         ]);
     }
 

+ 6 - 6
frontendApi/modules/v1/controllers/FinanceController.php

@@ -134,7 +134,7 @@ class FinanceController extends BaseController {
             return $rtn;
 
         } else {
-            return static::notice('非法请求', 400);
+            return static::notice('Illegal request', 400); // 非法请求
         }
     }
 
@@ -158,7 +158,7 @@ class FinanceController extends BaseController {
      * @throws \yii\web\HttpException
      */
     public function actionWithdrawBack() {
-        return static::notice('非法请求', 400);
+        return static::notice('Illegal request', 400); // 非法请求
         if (\Yii::$app->request->isPost) {
             $formModel = new WithdrawForm();
             $formModel->scenario = 'backByUser';
@@ -168,7 +168,7 @@ class FinanceController extends BaseController {
                 return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
             }
         } else {
-            return static::notice('非法请求', 400);
+            return static::notice('Illegal request', 400); // 非法请求
         }
     }
 
@@ -250,7 +250,7 @@ class FinanceController extends BaseController {
         $id = \Yii::$app->request->get('id');
         $withdraw = Withdraw::findOneAsArray('ID=:ID', [':ID' => $id]);
         if (!$withdraw) {
-            return static::notice('数据不存在', 400);
+            return static::notice('The data does not exist', 400); // 数据不存在
         }
         $uploadInvoiceTip = Cache::getSystemConfig()['uploadInvoiceTip']['VALUE'];
         if ($withdraw['AUDIT_STATUS'] == Withdraw::STATUS_APPLIED) {
@@ -270,7 +270,7 @@ class FinanceController extends BaseController {
         $id = \Yii::$app->request->get('id');
         $withdraw = Withdraw::findOneAsArray('ID=:ID', [':ID' => $id]);
         if (!$withdraw) {
-            return static::notice('数据不存在', 400);
+            return static::notice('The data does not exist', 400); // 数据不存在
         }
         if (\Yii::$app->request->isPost) {
             $formModel = new UploadForm();
@@ -297,7 +297,7 @@ class FinanceController extends BaseController {
         $id = \Yii::$app->request->get('id');
         $uploads = Uploads::findOneAsArray('ID=:ID', [':ID' => $id],'URL');
         if (!$uploads) {
-            return static::notice('数据不存在', 400);
+            return static::notice('The data does not exist', 400); // 数据不存在
         }
         return static::notice($uploads['URL']);
     }

+ 1 - 1
frontendApi/modules/v1/controllers/OauthController.php

@@ -179,7 +179,7 @@ class OauthController extends BaseController
                 return static::notice($result);
             }
         }
-        return static::notice('非法请求', 400);
+        return static::notice('Illegal request', 400); // 非法请求
     }
 
     /**

+ 18 - 18
frontendApi/modules/v1/models/LoginForm.php

@@ -57,7 +57,7 @@ class LoginForm extends Model
         if (!$this->hasErrors()) {
             $user = $this->getUser();
             if(!$user){
-                $this->addError($attribute, '用户名错误');
+                $this->addError($attribute, 'Member name error');// 用户名错误
             } else {
 
 //                $userInfo = UserInfo::findOneAsArray('USER_ID=:USER_ID', [':USER_ID'=>$user['ID']]);
@@ -115,33 +115,33 @@ class LoginForm extends Model
         try{
             $this->getUser();
             if(!$this->_user){
-                throw new Exception('账号不存在');
+                throw new Exception('The account does not exist'); // 账号不存在
             }
 
             if (!$this->_user->validatePassword($this->password)) {
-                $this->_updateFailTimes($transaction,'用户名或密码错误');
-                throw new Exception('用户名或密码错误');
+                $this->_updateFailTimes($transaction,'The member name or password is incorrect'); // 用户名或密码错误
+                throw new Exception('The member name or password is incorrect'); // 用户名或密码错误
             }
             // 找到会员的基本信息来判断其是否可登录
             if(!$this->_user['ALLOW_LOGIN']){
-                $this->_updateFailTimes($transaction,'会员编号异常');
-                throw new Exception('会员编号异常');
+                $this->_updateFailTimes($transaction,'Abnormal member code'); // 会员编号异常
+                throw new Exception('Abnormal member code'); // 会员编号异常
             }
             if($this->_user['STATUS'] == Yii::$app->params['userStatus'][0]['value']){
-                $this->_updateFailTimes($transaction,'会员未激活');
-                throw new Exception('会员未激活');
+                $this->_updateFailTimes($transaction,'Member not activated'); // 会员未激活
+                throw new Exception('Member not activated'); // 会员未激活
             } elseif($this->_user['STATUS'] == Yii::$app->params['userStatus'][2]['value']){
-                $this->_updateFailTimes($transaction,'会员已被注销');
-                throw new Exception('会员已被注销');
+                $this->_updateFailTimes($transaction,'The member has been cancelled'); // 会员已被注销
+                throw new Exception('The member has been cancelled'); // 会员已被注销
             } elseif($this->_user['STATUS'] == Yii::$app->params['userStatus'][3]['value']){
-                $this->_updateFailTimes($transaction,'会员已被列入黑名单');
-                throw new Exception('会员已被列入黑名单');
+                $this->_updateFailTimes($transaction,'The member has been blacklisted'); // 会员已被列入黑名单
+                throw new Exception('The member has been blacklisted'); // 会员已被列入黑名单
             } elseif($this->_user['STATUS'] == Yii::$app->params['userStatus'][9]['value']){
-                $this->_updateFailTimes($transaction,'会员已被永久关停');
-                throw new Exception('会员已被永久关停');
+                $this->_updateFailTimes($transaction,'The member has been permanently suspended'); // 会员已被永久关停
+                throw new Exception('The member has been permanently suspended'); // 会员已被永久关停
             } elseif($this->_user['PART_FUNC_CLOSED'] == 1){
-                $this->_updateFailTimes($transaction,'会员部分功能关闭,无法登录');
-                throw new Exception('会员部分功能关闭,无法登录');
+                $this->_updateFailTimes($transaction,'Member part of the function is closed, unable to log in.'); // 会员部分功能关闭,无法登录
+                throw new Exception('Member part of the function is closed, unable to log in.'); // 会员部分功能关闭,无法登录
             } elseif($this->_user['IS_MODIFY_PASSWORD'] == 1){
                 throw new Exception(self::ERROR_IS_MODIFY_PASSWORD);
             }
@@ -159,8 +159,8 @@ class LoginForm extends Model
                     'BONUS_APP_CLIENT_ID' => $clientId,
                 ];
                 if (!User::updateAll($update, 'ID=:ID', ['ID' => $this->_user['ID']])) {
-                    $this->_updateFailTimes($transaction, '会员APP设备信息更新失败');
-                    throw new Exception('会员APP设备信息更新失败');
+                    $this->_updateFailTimes($transaction, 'Member APP device information update failed'); // 会员APP设备信息更新失败
+                    throw new Exception('Member APP device information update failed'); // 会员APP设备信息更新失败
                 }
             }
 

+ 12 - 0
frontendEle/src/router/index.js

@@ -306,6 +306,18 @@ export const constantRouterMap = [
           ],
         },
       },
+      {
+        path: '/bonus/historical-cumulative-bonus',
+        component: _import('bonus/historical-cumulative-bonus'),
+        name: 'historical-cumulative-bonus',
+        meta: {
+          title: 'Historical cumulative bonus',//往期历史奖金累积
+          breadcrumb: [
+            {title: 'Dashboard', path: '/dashboard/index'},//Dashboard
+            {title: 'Bonus management', path: '/bonus/index'},//奖金管理
+          ],
+        },
+      },
       {
         path: '/bonus/real-time-perf',
         component: _import('bonus/real-time-perf'),

+ 33 - 0
frontendEle/src/utils/config_trial.js

@@ -0,0 +1,33 @@
+const APP_NAME = '奖金结算系统'
+const SERVER_API_DOMAIN = '16.163.228.151'
+const SERVER_API_HTTP_TYPE = 'http://'
+const SERVER_API_PORT = ':8026'  // ':8102'
+const SERVER_API_VERSION = 'v1'
+const REQUEST_URL = `${SERVER_API_HTTP_TYPE}${SERVER_API_DOMAIN}${SERVER_API_PORT}/${SERVER_API_VERSION}/`
+const WEBSOCKET_HOST = 'ws://127.0.0.1:9512'
+const DEVICE_TYPE = 'pc'
+const ACCESS_TOKEN_PREFIX = 'Bearer '
+const CDN_BASE_URL = 'http://16.163.228.151:8029'
+const CDN_IMG_URL = `${CDN_BASE_URL}/cdn/`
+const PRICE_IS_ROUND = true
+const REGION_URL = `${CDN_BASE_URL}/cdn/jsdata/ar_region_data.js?ver=0.1`
+const PAY_STACK_PUBLIC_KEY = 'pk_test_2eed10135c4a958c5073795b22854ded9d1a6c55'
+const PAY_STACK_CURRENCY = 'NGN'
+
+export {
+  APP_NAME,
+  SERVER_API_DOMAIN,
+  SERVER_API_HTTP_TYPE,
+  SERVER_API_PORT,
+  SERVER_API_VERSION,
+  REQUEST_URL,
+  WEBSOCKET_HOST,
+  DEVICE_TYPE,
+  ACCESS_TOKEN_PREFIX,
+  CDN_BASE_URL,
+  CDN_IMG_URL,
+  PRICE_IS_ROUND,
+  REGION_URL,
+  PAY_STACK_PUBLIC_KEY,
+  PAY_STACK_CURRENCY
+}

+ 11 - 1
frontendEle/src/utils/tool.js

@@ -1,6 +1,6 @@
 import errorCode from './errorCode'
 import baseInfo from './baseInfo'
-import {PRICE_IS_ROUND} from './config'
+import {PRICE_IS_ROUND,CDN_BASE_URL} from './config'
 import userInfo from "../../../backendEle/src/utils/userInfo";
 
 let tool = {
@@ -215,6 +215,16 @@ let tool = {
       let taxAmount = (amount - amount / (1 + taxRate / 100)) * count
       return Math.round(taxAmount * 100) / 100
   },
+
+  /**
+   * 拼装图片
+   * @param imageUrl 图片
+   * @param path 路径
+   * @returns {string}
+   */
+  getArImage(imageUrl, path) {
+    return `${CDN_BASE_URL}${path}${imageUrl}`;
+  },
 }
 
 export default tool

+ 21 - 14
frontendEle/src/views/atlas/network-opt.vue

@@ -2,18 +2,18 @@
   <div v-loading="loading">
     <div class="white-box">
       <el-tabs v-model="tabActiveName">
-        <el-tab-pane label="安置网络图" name="first">
+        <el-tab-pane label="Resettlement network diagram" name="first"><!-- 安置网络图 -->
           <div class="filter-user" @keyup.enter="enterToGetData()">
             <el-input v-model="mainUserName" size="small" style="width:300px;">
-              <template slot="prepend">顶级会员</template>
+              <template slot="prepend">Top member</template><!-- 顶级会员 -->
             </el-input>
             <el-input v-model="expandDeep" size="small" style="width:150px;">
-              <template slot="prepend">展开深度</template>
+              <template slot="prepend">Spread depth</template><!-- 展开深度 -->
             </el-input>
             <el-input v-model="periodNum" size="small" style="width:150px;" v-show="false">
-              <template slot="prepend">期数</template>
+              <template slot="prepend">Number of periods</template><!-- 期数 -->
             </el-input>
-            <el-button type="primary" size="small" @click="getMainData()">确定</el-button>
+            <el-button type="primary" size="small" @click="getMainData()">confirm</el-button><!--  -->
           </div>
           <el-tree :props="props" :data="treeData" node-key="USER_ID" @node-click="getChildData" ref="tree" :indent="0"
                    default-expand-all :height="tool.getTableHeight(true)">
@@ -22,22 +22,29 @@
                     <span :class="'el-icon-loading '+ data.displayNone"></span>
                     <span :class="data.icon"></span>
                     <span>
-                      <el-tag type="danger">层数:{{countTopDeep(data.TOP_NETWORK_DEEP,topDeep)}}</el-tag> <el-tag>会员编号:{{ node.label }}</el-tag> <el-tag>姓名:{{data.REAL_NAME}}</el-tag> <el-tag type="danger">区位:{{data.RELATIVE_LOCATION}}</el-tag> <el-tag type="success">级别:{{data.DEC_LV_NAME}}</el-tag> <el-tag type="warning">聘级:{{data.EMP_LV_NAME}}</el-tag> <el-tag>加入期数:{{data.PERIOD_AT}}</el-tag></span>
+                      <el-tag type="danger">Number of Layers:{{countTopDeep(data.TOP_NETWORK_DEEP,topDeep)}}</el-tag> <!-- 层数 -->
+                      <el-tag>Member code:{{ node.label }}</el-tag> <!-- 会员编号 -->
+                      <el-tag>Name:{{data.REAL_NAME}}</el-tag> <!-- 姓名 -->
+                      <el-tag type="danger">Location:{{data.RELATIVE_LOCATION}}</el-tag> <!-- 区位 -->
+                      <el-tag type="success">Level:{{data.DEC_LV_NAME}}</el-tag> <!-- 级别 -->
+                      <el-tag type="warning">Rank:{{data.EMP_LV_NAME}}, {{data.CROWN_LV_NAME}}</el-tag> <!-- 聘级 -->
+                      <el-tag>Joining Period:{{data.PERIOD_AT}}</el-tag><!-- 加入期数 -->
+                    </span>
                 </span>
           </el-tree>
         </el-tab-pane>
-        <el-tab-pane label="安置网络列表" name="two">
+        <el-tab-pane label="Placement network list" name="two"><!-- 安置网络列表 -->
           <div class="filter-user">
             <el-input v-model="filterForm.userName" size="small" style="width:300px;">
-              <template slot="prepend">会员编号</template>
+              <template slot="prepend">Member code</template><!-- 会员编号 -->
             </el-input>
             <el-input v-model="filterForm.deep" size="small" style="width:150px;">
-              <template slot="prepend">深度</template>
+              <template slot="prepend">depth</template><!-- 深度 -->
             </el-input>
             <el-input v-model="filterForm.periodNum" size="small" style="width:150px;" v-show="false">
-              <template slot="prepend">期数</template>
+              <template slot="prepend">Number of periods</template><!-- 期数 -->
             </el-input>
-            <el-button type="primary" size="small" @click="handleFilter">确定</el-button>
+            <el-button type="primary" size="small" @click="handleFilter">confirm</el-button><!-- 确定 -->
           </div>
 
           <el-table :data="tableData" stripe style="width: 100%;" :height="tool.getTableHeight(true)">
@@ -53,7 +60,7 @@
                 </template>
                 <template v-else>
                   <template v-if="tableHeader.index === 'USER_NAME'">
-                    <el-tooltip class="item" effect="dark" content="查看该会员的下级" placement="top">
+                    <el-tooltip class="item" effect="dark" content="View the subordinates of this member" placement="top"><!-- 查看该会员的下级 -->
                     <el-button @click.native="handleShow(scope.row)" size="small" type="primary">
                       {{scope.row[tableHeader.index].value}}
                     </el-button>
@@ -125,7 +132,7 @@
     methods: {
       getData() {
         this.$message({
-          message: '正在获取数据,请稍后',
+          message: 'Getting data, please wait', // 正在获取数据,请稍后
         })
         //this.periodNum = baseInfo.nowPeriodNum()
         //this.filterForm.periodNum = baseInfo.nowPeriodNum()
@@ -134,7 +141,7 @@
       getMainData (userName = null, getList = false) {
         this.$message.closeAll()
         this.$message({
-          message: '正在获取数据,请稍后',
+          message: 'Getting data, please wait', // 正在获取数据,请稍后
         })
         let thisObj = this
         let requestData = {

+ 57 - 0
frontendEle/src/views/bonus/historical-cumulative-bonus.vue

@@ -0,0 +1,57 @@
+<template>
+  <div v-loading="loading">
+    <div class="white-box">
+      <el-table class="table-box" :data="tableData" style="width: 100%;">
+        <el-table-column label="Welcome Bonus" prop="BONUS_TG.value" v-if="welcomeBonusSwitch === 1"></el-table-column><!-- 销售奖金 -->
+        <el-table-column label="Team Bonus" prop="ORI_BONUS_QY.value" v-if="teamBonusSwitch === 1"></el-table-column><!-- 绩效奖 -->
+        <el-table-column label="Director Bonus" prop="ORI_BONUS_BS.value"></el-table-column><!-- 蓝星奖金/管理奖 -->
+        <el-table-column label="Quarterly Bonus" prop="ORI_BONUS_QUARTER.value"></el-table-column><!-- 季度分红 -->
+        <el-table-column label="Stockist Commission" prop="BONUS_BD.value" v-if="stockistCommissionSwitch === 1"></el-table-column><!-- 服务中心 -->
+         <el-table-column label="Total Bonus" prop="BONUS_TOTAL.value"></el-table-column>  <!--合计-->
+      </el-table>
+    </div>
+  </div>
+</template>
+
+<script>
+  import network from '@/utils/network'
+  import tool from '@/utils/tool'
+
+  export default {
+    name: 'historical-cumulative-bonus',
+    components: {},
+    mounted() {
+      this.getData()
+    },
+    data() {
+      return {
+        loading: true,
+        tableData: null,
+        welcomeBonusSwitch: false,
+        teamBonusSwitch: false,
+        stockistCommissionSwitch: false,
+      }
+    },
+    methods: {
+      getData() {
+        let vueObj = this
+        vueObj.loading = true
+        network.getData('bonus/historical-cumulative-bonus').then(response => {
+          vueObj.tableData = response.tableData
+          vueObj.welcomeBonusSwitch = response.bonusSwitch.welcomeBonusSwitch
+          vueObj.teamBonusSwitch = response.bonusSwitch.teamBonusSwitch
+          vueObj.stockistCommissionSwitch = response.bonusSwitch.stockistCommissionSwitch
+          vueObj.loading = false
+        }).catch(_ => {
+           vueObj.loading = false
+        })
+      },
+    }
+  }
+</script>
+<style>
+  .other-table-box .el-table__header-wrapper{display: none;}
+  .other-table-box .el-table__body tr:hover>td{background-color: #fff!important;}
+  .other-table-box .el-table__body tr td:not(:last-child):hover{background-color: #f5f5f5!important;}
+  .bonus-list .bonus-item{float: left;width: 33.333%;background: #fff;height:36px;line-height:36px;border: 1px solid #ddd;margin: -1px 0 0 -1px;box-sizing: border-box;}
+</style>

+ 1 - 2
frontendEle/src/views/bonus/other.vue

@@ -14,8 +14,7 @@
         </el-table-column>
         <el-table-column label="Stockist Commission" prop="BONUS_BD.value" width="170" v-if="stockistCommissionSwitch === 1"><!-- 服务中心 -->
         </el-table-column>
-        <el-table-column label="Total Bonus" prop="BONUS_TOTAL.value" width="170"><!-- 合计 -->
-        </el-table-column>
+        <!-- <el-table-column label="Total Bonus" prop="BONUS_TOTAL.value" width="170"></el-table-column> --><!-- 合计 -->
         <el-table-column label="Actual Bonus" prop="BONUS_REAL.value" width="170"><!-- 实发 -->
         </el-table-column>
         <el-table-column >

+ 21 - 11
frontendEle/src/views/config/receive-address-edit.vue

@@ -30,16 +30,25 @@
           </template>
           <el-input v-model="form.lgaName"></el-input>
         </el-form-item>
-        <el-form-item prop="areaSelected">
+<!--        <el-form-item prop="areaSelected">-->
+<!--          <template slot="label">-->
+<!--            <span class="text-danger">*</span>-->
+<!--            State&lt;!&ndash; 地区 &ndash;&gt;-->
+<!--          </template>-->
+<!--          <el-cascader-->
+<!--            size="large"-->
+<!--            :options="regionData"-->
+<!--            v-model="form.areaSelected">-->
+<!--          </el-cascader>-->
+<!--        </el-form-item>-->
+        <el-form-item>
           <template slot="label">
             <span class="text-danger">*</span>
             State<!-- 地区 -->
           </template>
-          <el-cascader
-            size="large"
-            :options="regionData"
-            v-model="form.areaSelected">
-          </el-cascader>
+          <el-select v-model="form.areaSelected">
+            <el-option v-for="(item,index) in regionData" :key="index" :label="item.label" :value="item.value"></el-option>
+          </el-select>
         </el-form-item>
         <el-form-item>
           <template slot="label">
@@ -85,7 +94,9 @@ export default {
       form: {
         consignee: '',
         mobile: '',
-        areaSelected: [],
+        areaSelected: '',
+        lgaName: '',
+        cityName: '',
         address: '',
         isDefault: false,
       },
@@ -100,7 +111,7 @@ export default {
       let postData = {
         consignee: this.form.consignee,
         mobile: this.form.mobile,
-        province: this.form.areaSelected[0] ? this.form.areaSelected[0] : '',
+        province: this.form.areaSelected ? this.form.areaSelected : '',
         // city: this.form.areaSelected[1] ? this.form.areaSelected[1] : '',
         // county: this.form.areaSelected[2] ? this.form.areaSelected[2] : '',
         lgaName: this.form.lgaName,
@@ -114,7 +125,7 @@ export default {
           id: this.$route.params.id,
           consignee: this.form.consignee,
           mobile: this.form.mobile,
-          province: this.form.areaSelected[0] ? this.form.areaSelected[0] : '',
+          province: this.form.areaSelected ? this.form.areaSelected : '',
           // city: this.form.areaSelected[1] ? this.form.areaSelected[1] : '',
           // county: this.form.areaSelected[2] ? this.form.areaSelected[2] : '',
           lgaName: this.form.lgaName,
@@ -136,10 +147,9 @@ export default {
     },
     getData () {
       network.getData(`config/receive-address-one/${this.$route.params.id}`).then(response => {
-        console.log(response)
         this.form.consignee = response.CONSIGNEE
         this.form.mobile = response.MOBILE
-        this.form.areaSelected[0] = response.PROVINCE
+        this.form.areaSelected = response.PROVINCE
         // this.form.areaSelected[1] = response.CITY
         // this.form.areaSelected[2] = response.COUNTY
         this.form.lgaName = response.LGA_NAME

+ 92 - 89
frontendEle/src/views/dashboard/index.vue

@@ -10,7 +10,8 @@
           <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12">
             <el-row :gutter="10">
               <el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="12">Current System Time:{{nowDateTime}}</el-col> <!--当前系统时间-->
-              <el-col :xs="24" :sm="24" :md="24" :lg="4" :xl="12">Rank:{{myEmpLv['LEVEL_NAME']!='No Rank'?myEmpLv['LEVEL_NAME']:''}}<!--<span v-if="myEmpLv['ICON_TYPE']==0">No Rank</span><img
+              <el-col :xs="24" :sm="24" :md="24" :lg="4" :xl="12">Rank:{{myEmpLv['LEVEL_NAME']!='No Rank'?myEmpLv['LEVEL_NAME']:''}}
+                <!--<span v-if="myEmpLv['ICON_TYPE']==0">No Rank</span><img
                   :src="getEmpIco(myEmpLv['ICON_TYPE'])" alt=""
                   v-for="(o,key) in parseInt(myEmpLv['ICON_NUM'])"
                   :key="key" v-if="myEmpLv['ICON_TYPE']>0">-->
@@ -18,6 +19,7 @@
               <el-col :xs="24" :sm="24" :md="24" :lg="4" :xl="12">Member Level:{{decLvName}}</el-col><!--会员级别-->
               <el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="12">Current Period:{{periodNum}}</el-col><!--当前业绩期-->
               <el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="12">Remain BV:{{myRemainPv}}</el-col><!--剩余的PV-->
+              <el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="12">Active Deadline Date:{{activeEnd}}</el-col><!--活跃日期截止-->
             </el-row>
           </el-col>
         </el-row>
@@ -67,102 +69,103 @@
 </template>
 
 <script>
-  import network from '@/utils/network'
-  import tool from '@/utils/tool'
-  import baseInfo from '@/utils/baseInfo'
-  import userInfo from '@/utils/userInfo'
-  import countUp from 'vue-countup-v2'
-  import {SERVER_API_HTTP_TYPE,SERVER_API_DOMAIN} from '@/utils/config'
+import network from '@/utils/network'
+import tool from '@/utils/tool'
+import baseInfo from '@/utils/baseInfo'
+import userInfo from '@/utils/userInfo'
+import countUp from 'vue-countup-v2'
 
-  export default {
-    name: 'dashboard_index',
-    components: {
-      countUp
-    },
-    mounted() {
-      network.getData(`dashboard/index`).then(response => {
-        this.myEmpLv.ID = this.baseEmpLevels[response.empLv]['ID']
-        this.myEmpLv.LEVEL_NAME = this.baseEmpLevels[response.empLv]['LEVEL_NAME']
-        this.myEmpLv.ICON_TYPE = this.baseEmpLevels[response.empLv]['ICON_TYPE']
-        this.myEmpLv.ICON_NUM = this.baseEmpLevels[response.empLv]['ICON_NUM']
-        this.slides = response.slides
-        this.news = response.news
-        this.periodNum = response.periodNum
-        this.decLvName = response.decLvName
-        this.myRemainPv = response.myRemainPv
-        this.loading = false
-        this.imgLoad()
-        return network.getData(`dashboard/bonus-num`)
-      })
-      if(this.verified==='0'){
-		  // '您未实名认证,请登录商城系统完善会员资料并上传身份证', '请注意'
-        this.$confirm('You do not have real name authentication, please log in the member system to complete the member information and upload ID card.', 'Please pay attention', {
-          confirmButtonText: 'Confirm',//确定
-          type: 'warning'
-        }).then(() => {
-        }).catch(() => {
+export default {
+  name: 'dashboard_index',
+  components: {
+    countUp
+  },
+  mounted () {
+    network.getData(`dashboard/index`).then(response => {
+      this.myEmpLv.ID = this.baseEmpLevels[response.empLv]['ID']
+      this.myEmpLv.LEVEL_NAME = this.baseEmpLevels[response.empLv]['LEVEL_NAME']
+      this.myEmpLv.ICON_TYPE = this.baseEmpLevels[response.empLv]['ICON_TYPE']
+      this.myEmpLv.ICON_NUM = this.baseEmpLevels[response.empLv]['ICON_NUM']
+      this.slides = response.slides
+      this.news = response.news
+      this.periodNum = response.periodNum
+      this.decLvName = response.decLvName
+      this.myRemainPv = response.myRemainPv
+      this.activeEnd = response.activeEnd
+      this.loading = false
+      this.imgLoad()
+      return network.getData(`dashboard/bonus-num`)
+    })
+    if (this.verified === '0') {
+    // '您未实名认证,请登录商城系统完善会员资料并上传身份证', '请注意'
+      this.$confirm('You do not have real name authentication, please log in the member system to complete the member information and upload ID card.', 'Please pay attention', {
+        confirmButtonText: 'Confirm', // 确定
+        type: 'warning'
+      }).then(() => {
+      }).catch(() => {
 
-        })
-      }
-      this.calcTime()
-      window.addEventListener('resize', () => {
-        this.imgLoad()
-      }, false)
+      })
+    }
+    this.calcTime()
+    window.addEventListener('resize', () => {
+      this.imgLoad()
+    }, false)
+  },
+  data () {
+    return {
+      loading: true,
+      tool: tool,
+      nowTime: tool.getTimestamp(),
+      userName: userInfo.userName(),
+      verified: userInfo.baseData().VERIFIED,
+      baseEmpLevels: baseInfo.empLevels(),
+      myEmpLv: {'ID': 0, 'LEVEL_NAME': null, 'ICON_TYPE': 0, 'ICON_NUM': 0},
+      slides: [],
+      news: [],
+      periodNum: '',
+      decLvName: '',
+      myRemainPv: '',
+      activeEnd: '',
+      bannerHeight: ''
+    }
+  },
+  computed: {
+    nowDateTime: function () {
+      return tool.formatDate(this.nowTime)
+    }
+  },
+  methods: {
+    getEmpIco (type) {
+      if (type) return require('@/assets/emp-ico-' + type + '.png')
     },
-    data() {
-      return {
-        loading: true,
-        tool: tool,
-        nowTime: tool.getTimestamp(),
-        userName: userInfo.userName(),
-        verified: userInfo.baseData().VERIFIED,
-        baseEmpLevels: baseInfo.empLevels(),
-        myEmpLv: {'ID': 0, 'LEVEL_NAME': null, 'ICON_TYPE': 0, 'ICON_NUM': 0},
-        slides: [],
-        news: [],
-        periodNum: '',
-        decLvName: '',
-        myRemainPv: '',
-        bannerHeight: '',
-      }
+    getEmpBg (type) {
+      if (type !== 0) return 'backgroundImage:url(' + require('@/assets/emp-bg-' + type + '.png') + ')'
+    },
+    sub_str (str, len = 15) {
+      if (str) return str.slice(0, len)
     },
-    computed: {
-      nowDateTime: function () {
-        return tool.formatDate(this.nowTime)
+    calcTime () {
+      let obj = this
+      setInterval(function () {
+        obj.nowTime += 1
+      }, 1000)
+    },
+    go: function (url) {
+      this.$router.push(url)
+    },
+    imgLoad () {
+      let _this = this
+      if (_this.$refs.bannerHeight) {
+        _this.$nextTick(function () {
+          _this.bannerHeight = _this.$refs.bannerHeight[0].height
+        })
       }
     },
-    methods: {
-      getEmpIco(type) {
-        if (type) return require('@/assets/emp-ico-' + type + '.png')
-      },
-      getEmpBg(type) {
-        if (type != 0) return 'backgroundImage:url(' + require('@/assets/emp-bg-' + type + '.png') + ')'
-      },
-      sub_str(str, len = 15) {
-        if (str) return str.slice(0, len)
-      },
-      calcTime() {
-        let obj = this
-        setInterval(function () {
-          obj.nowTime += 1
-        }, 1000)
-      },
-      go: function (url) {
-        this.$router.push(url)
-      },
-      imgLoad() {
-        let _this = this
-        if (_this.$refs.bannerHeight) {
-          _this.$nextTick(function () {
-            _this.bannerHeight = _this.$refs.bannerHeight[0].height
-          })
-        }
-      },
-      imageArticle(imageUrl) {
-        return SERVER_API_HTTP_TYPE + SERVER_API_DOMAIN + '/uploads/' + imageUrl;
-      },
+    imageArticle (imageUrl) {
+      return tool.getArImage(imageUrl, '/files/')
     }
   }
+}
 </script>
 
 <style scoped>

+ 4 - 3
frontendEle/src/views/finance/recharge.vue

@@ -73,7 +73,7 @@ import tool from '@/utils/tool'
 import LeoFilter from '@/components/Filter'
 import LeoUploader from '@/components/Uploader'
 import Pagination from '@/components/Pagination'
-import {SERVER_API_HTTP_TYPE,SERVER_API_DOMAIN} from '@/utils/config'
+
 export default {
   name: 'recharge',
   components: {LeoFilter, LeoUploader, Pagination},
@@ -146,7 +146,7 @@ export default {
       this.$router.push({path: `/finance/recharge-add`})
     },
     handlePictureCardPreview (file) {
-      this.dialogImageUrl = SERVER_API_HTTP_TYPE + SERVER_API_DOMAIN + '/uploads/' + file.url;
+      this.dialogImageUrl = tool.getArImage(file.url, '/files/');
       this.dialogVisible = true;
       this.file = file;
       // console.log(file);
@@ -168,6 +168,7 @@ export default {
     handleAddInvoiceShow: function (row) {
       this.dialogAddInvoiceLoading = true
       this.auditId = row.ID
+      // this.defaultImageUrl = tool.getArImage(row.BANK_PROVE, '/files/');
       this.defaultImageUrl = row.BANK_PROVE
       // console.log(this.auditId)
       // this.requestRoute = 'finance/prove-add/' + this.auditId
@@ -201,7 +202,7 @@ export default {
         this.dialogInvoiceLoading = false
         let invoiceUrl = response.list;
         // console.log(row)
-        this.urlimg = SERVER_API_HTTP_TYPE + SERVER_API_DOMAIN + '/uploads/' + row.BANK_PROVE
+        this.urlimg = tool.getArImage(row.BANK_PROVE, '/files/');
         this.auditId = row.ID
       })
     },

+ 2 - 2
frontendEle/src/views/shop/dec-order-list.vue

@@ -40,7 +40,7 @@
     import network from '@/utils/network'
     import tool from '@/utils/tool'
     import Pagination from '@/components/Pagination'
-    import {SERVER_API_HTTP_TYPE, SERVER_API_DOMAIN} from '@/utils/config'
+    import {SERVER_API_HTTP_TYPE, SERVER_API_DOMAIN,SERVER_API_PORT} from '@/utils/config'
     export default {
         name: "dec-order-list",
         components: {Pagination},
@@ -157,7 +157,7 @@
 
                     let downloadElement = document.createElement('a')
                     downloadElement.target = '_blank'
-                    downloadElement.href = SERVER_API_HTTP_TYPE + SERVER_API_DOMAIN + '/' + fileUrl
+                    downloadElement.href = SERVER_API_HTTP_TYPE + SERVER_API_DOMAIN + SERVER_API_PORT + '/' + fileUrl
                     // 下载后文件名
                     downloadElement.download = targetName
                     //点击下载

+ 6 - 6
frontendEle/src/views/shop/index.vue

@@ -20,7 +20,7 @@
                       <el-table-column label="Product Picture" ><!--图片-->
                         <template slot-scope="scope">
 <!--                          <img :src="scope.row.COVER" alt="" style="width:100px" >-->
-                          <el-image style="width: 100px; height: 100px" :src="scope.row.COVER" :preview-src-list="[scope.row.COVER]"></el-image>
+                          <el-image style="width: 100px; height: 100px" :src="tool.getArImage(scope.row.COVER, '/files/')" :preview-src-list="[tool.getArImage(scope.row.COVER, '/files/')]"></el-image>
                         </template>
                       </el-table-column>
 
@@ -75,15 +75,16 @@
 <script>
 import network from '@/utils/network'
 import tool from '@/utils/tool'
-import {SERVER_API_DOMAIN, SERVER_API_HTTP_TYPE} from '@/utils/config'
 import Pagination from '@/components/Pagination'
 
 export default {
         name: "index",
         components: {Pagination},
+        async created() {
+          await this.getData()
+        },
         mounted() {
             this.getGoodsActive()
-            this.getData()
         },
         data() {
             return {
@@ -238,9 +239,9 @@ export default {
                 }).catch(() => {
                 });
             },*/
-            getData (page, pageSize) {
+            async getData (page, pageSize) {
                 let obj = this
-                network.getPageData(this, `shop/index`, page, pageSize, { categoryType: obj.goodsCategory }, function (response) {
+                await network.getPageData(this, `shop/index`, page, pageSize, { categoryType: obj.goodsCategory }, function (response) {
                     obj.loading = false;
                     obj.currentPage = response.currentPage;
                     obj.list = response.list;
@@ -269,7 +270,6 @@ export default {
                                     break;
                                 }
                             }
-                            obj.tableData[i].COVER = SERVER_API_HTTP_TYPE + SERVER_API_DOMAIN + '/uploads/' + obj.tableData[i].COVER
                         }
                         obj.selectLock = false;
                     })

+ 1 - 1
frontendEle/src/views/shop/order-backing-out.vue

@@ -39,5 +39,5 @@
 </script>
 
 <style scoped>
- 
+
 </style>

+ 2 - 2
frontendEle/src/views/shop/order-list.vue

@@ -45,7 +45,7 @@
     import network from '@/utils/network'
     import tool from '@/utils/tool'
     import Pagination from '@/components/Pagination'
-    import {SERVER_API_HTTP_TYPE, SERVER_API_DOMAIN} from '@/utils/config'
+    import {SERVER_API_HTTP_TYPE, SERVER_API_DOMAIN,SERVER_API_PORT} from '@/utils/config'
     export default {
         name: "order-list",
         components: {Pagination},
@@ -168,7 +168,7 @@
 
                     let downloadElement = document.createElement('a')
                     downloadElement.target = '_blank'
-                    downloadElement.href = SERVER_API_HTTP_TYPE + SERVER_API_DOMAIN + '/' + fileUrl
+                    downloadElement.href = SERVER_API_HTTP_TYPE + SERVER_API_DOMAIN + SERVER_API_PORT + '/' + fileUrl
                     // 下载后文件名
                     downloadElement.download = targetName
                     //点击下载

+ 3 - 3
frontendEle/src/views/shop/order.vue

@@ -11,10 +11,9 @@
              <el-table-column label="Product Name" prop="GOODS_NAME"><!--商品名称-->
             </el-table-column>
 
-            <el-table-column label="Product picture" ><!--图片-->
+            <el-table-column label="Product Picture" ><!--图片-->
               <template slot-scope="scope">
-<!--                <img :src="scope.row.COVER" alt="" style="width:100%">-->
-                <el-image style="width: 100px; height: 100px" :src="scope.row.COVER" :preview-src-list="[scope.row.COVER]"></el-image>
+                <el-image style="width: 100px; height: 100px" :src="tool.getArImage(scope.row.COVER, '/files/')" :preview-src-list="[tool.getArImage(scope.row.COVER, '/files/')]"></el-image>
               </template>
             </el-table-column>
 
@@ -208,6 +207,7 @@ export default{
   name: 'order',
   data: function () {
     return {
+      tool: tool,
       loading: true,
       goods: [],
       payList: [],

+ 1 - 1
frontendEle/src/views/user/upgrade.vue

@@ -45,7 +45,7 @@
                         </el-option>
                     </el-select>
                 </el-form-item>
-                <el-form-item v-if="!isMax" label="Payment"><!-- 升级补差业绩 -->
+                <el-form-item v-if="!isMax" label="Top Up(BV)"><!-- 升级补差业绩 -->
                     <el-input v-model="needDiffPv"
                     disabled
                     >

+ 3 - 2
sql/upgrade/1350.sql

@@ -28,7 +28,7 @@ CREATE TABLE `AR_CALC_BONUS_QUARTER`  (
   `MANAGE_TAX` decimal(16, 3) NULL DEFAULT NULL,
   `AMOUNT` decimal(16, 3) NULL DEFAULT NULL,
   `RECONSUME_POINTS` decimal(16, 3) NULL DEFAULT NULL,
-  `CALC_YEAR` int(11) NULL DEFAULT NULL,
+  `LAST_DEC_LV` varchar(32)  CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
   `CALC_MONTH` int(11) NULL DEFAULT NULL,
   `PERIOD_NUM` int(11) NULL DEFAULT NULL,
   `CREATED_AT` datetime(0) NOT NULL,
@@ -59,4 +59,5 @@ CREATE TABLE `AR_QTR_CALC_SCORE`  (
 ) ENGINE = InnoDB AUTO_INCREMENT = 256 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
 
 alter table `AR_CALC_BONUS` add column ORI_BONUS_QUARTER decimal(16,2) not null default 0.00 comment "季度奖-原奖金";
-alter table `AR_CALC_BONUS` add column BONUS_QUARTER decimal(16,2) not null default 0.00 comment "季度奖";
+alter table `AR_CALC_BONUS` add column BONUS_QUARTER decimal(16,2) not null default 0.00 comment "季度奖";
+ALTER TABLE `AR_CALC_BONUS_QUARTER` ADD COLUMN LAST_DEC_LV varchar(32)  CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;

+ 7 - 4
sql/upgrade/1540.sql

@@ -1,9 +1,9 @@
-alter table `AR_ORDER` add column REMAIN_PV decimal(16,2) not null default 0.00 comment "当期未计入的剩余PV";
-alter table `AR_ORDER_GOODS` add column REMAIN_PV decimal(16,2) not null default 0.00 comment "当期未计入的剩余PV";
+alter table `AR_ORDER` add column REMAIN_PV decimal(16,2) not null default 0.00 comment "褰撴湡鏈��鍏ョ殑鍓╀綑PV";
+alter table `AR_ORDER_GOODS` add column REMAIN_PV decimal(16,2) not null default 0.00 comment "褰撴湡鏈��鍏ョ殑鍓╀綑PV";
 
-alter table `AR_APPROACH_ORDER` add column REMAIN_PV decimal(16,2) not null default 0.00 comment "当期未计入的剩余PV";
+alter table `AR_APPROACH_ORDER` add column REMAIN_PV decimal(16,2) not null default 0.00 comment "褰撴湡鏈��鍏ョ殑鍓╀綑PV";
 
-ALTER TABLE `AR_SHOP_GOODS` ADD COLUMN PV_SPLIT TINYINT NOT NULL DEFAULT 0 COMMENT "是否BV分期";
+ALTER TABLE `AR_SHOP_GOODS` ADD COLUMN PV_SPLIT TINYINT NOT NULL DEFAULT 0 COMMENT "鏄�惁BV鍒嗘湡";
 
 CREATE TABLE `AR_REMAIN_PV`  (
   `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
@@ -24,3 +24,6 @@ CREATE TABLE `AR_FLOW_REMAIN_PV`  (
   `ORDER_SN` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
   PRIMARY KEY (`ID`) USING BTREE
 ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
+
+alter table `AR_ORDER` add column IS_AUTO int(11) not null default 0 comment "鍋囪�鍗曟爣蹇�";
+alter table `AR_APPROACH_ORDER` add column IS_AUTO int(11) not null default 0 comment "鍋囪�鍗曟爣蹇�";

+ 4 - 0
sql/upgrade/2022_08_12_crown.sql

@@ -0,0 +1,4 @@
+
+ALTER TABLE `AR_USER` ADD COLUMN `LAST_CROWN_LV` varchar(32) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '最新Crown级别';
+ALTER TABLE `AR_USER` ADD COLUMN `LAST_CROWN_LV_UPDATED_AT` int(11) NOT NULL DEFAULT 0 COMMENT '最新Crown级别更新时间';
+ALTER TABLE `AR_USER` ADD COLUMN `LAST_CROWN_LV_UPDATED_PERIOD` int(11) NOT NULL DEFAULT 0 COMMENT '最新Crown级别更新期数';

+ 68 - 58
sql/upgrade/QTRCALC.sql

@@ -1,4 +1,4 @@
-CREATE DEFINER=`black_tea_0309`@`%` PROCEDURE `QTRCALC`(IN `PCPID` INT)
+CREATE DEFINER=`babysbreath`@`%` PROCEDURE `QTRCALC`(IN `PCPID` INT)
 LABEL: BEGIN
 -- DECLARE QTRSTARTPID, QTRSTARTMONTH, THISYEAR, THISMONTH, MISMONTH INT;
 
@@ -24,7 +24,7 @@ CALL QTRCALCRECORD(1,'清除数据',PCPID,NOW());
 COMMIT;
 
 SELECT
- CALC_YEAR, CALC_MONTH, IS_MONTH INTO THISYEAR, THISMONTH, MISMONTH FROM AR_PERIOD WHERE PERIOD_NUM = PCPID;
+    CALC_YEAR, CALC_MONTH, IS_MONTH INTO THISYEAR, THISMONTH, MISMONTH FROM AR_PERIOD WHERE PERIOD_NUM = PCPID;
 
 CALL QTRCALCRECORD(2,'初始化',PCPID,NOW());
 COMMIT;
@@ -33,8 +33,8 @@ COMMIT;
 
 IF(THISMONTH!=3 AND THISMONTH!=6 AND THISMONTH!=9 AND THISMONTH!=12) OR MISMONTH!=1 THEN
   CALL QTRCALCRECORD(12,'非季结,结束',PCPID,NOW());
-	COMMIT;
-  LEAVE LABEL;
+COMMIT;
+LEAVE LABEL;
 END IF;
 
 CALL QTRCALCRECORD(3,'计算总奖金',PCPID,NOW());
@@ -55,41 +55,47 @@ COMMIT;
 
 -- 查找,所有星级用户
 INSERT INTO AR_QTR_CALC_WEIGHT
-	SELECT 
-		NULL AS ID,
-		QY.USER_ID,
-		MAX(CL.SORT) AS MAX_SORT,
-		(MAX(CL.SORT) - 1)/2 + 1 AS WEIGHT,
-		PERIOD_NUM,
-		CALC_MONTH,
-		CALC_YEAR
-	FROM
-		AR_CALC_BONUS_QY AS QY
-	 INNER JOIN 
-		AR_CROWN_LEVEL AS CL
-	 ON QY.LAST_CROWN_LV = CL.ID
-	 
-	WHERE
-		QY.LAST_CROWN_LV != (SELECT ID FROM AR_CROWN_LEVEL WHERE SORT = 0)
-
-	GROUP BY USER_ID, CALC_MONTH;
+SELECT
+    NULL AS ID,
+    QY.USER_ID,
+    MAX(CL.SORT) AS MAX_SORT,
+    (MAX(CL.SORT) - 1)/2 + 1 AS WEIGHT,
+    PERIOD_NUM,
+    CALC_MONTH,
+    CALC_YEAR
+FROM
+    AR_CALC_BONUS_QY AS QY
+        INNER JOIN
+    AR_CROWN_LEVEL AS CL
+    ON QY.LAST_CROWN_LV = CL.ID
+        INNER JOIN
+    AR_USER AS U
+    ON QY.USER_ID = U.ID
+
+WHERE
+    QY.LAST_CROWN_LV != (SELECT ID FROM AR_CROWN_LEVEL WHERE SORT = 0)
+		AND U.DEC_LV = '67ABCE0ECE705575E055736AECE8644D'
+		AND QY.CALC_MONTH >= CONCAT(THISYEAR, lpad(QTRSTARTMONTH,2,0))
+		AND QY.CALC_MONTH <= CONCAT(THISYEAR, lpad(THISMONTH,2,0))
+
+GROUP BY USER_ID, CALC_MONTH;
 
 COMMIT;
 
 INSERT INTO AR_QTR_CALC_SCORE
-	SELECT
-		NULL AS ID,
-		USER_ID, 
-		COUNT(*) AS CNT,
-		SUM(WEIGHT) AS SCORE,
-		CALC_MONTH,
-		CALC_YEAR
-	FROM 
-		AR_QTR_CALC_WEIGHT
-	GROUP BY USER_ID;
+SELECT
+    NULL AS ID,
+    USER_ID,
+    COUNT(*) AS CNT,
+    SUM(WEIGHT) AS SCORE,
+    CALC_MONTH,
+    CALC_YEAR
+FROM
+    AR_QTR_CALC_WEIGHT
+GROUP BY USER_ID;
 
 COMMIT;
-	
+
 SELECT SUM(SCORE) INTO TOTALU FROM AR_QTR_CALC_SCORE;
 
 SET BONUSPERU = TBONUS / TOTALU;
@@ -98,36 +104,40 @@ SET BONUSPERU = TBONUS / TOTALU;
 CALL QTRCALCRECORD(5,'计算每一份奖金',PCPID,NOW());
 COMMIT;
 
-
-
 INSERT INTO AR_QTR_CALC_USER
-	SELECT 
-		NULL AS ID,
-		SC.USER_ID,
-		BONUSPERU * SC.SCORE AS AMOUNT,
-		CALC_YEAR,
-		CALC_MONTH,
-		PCPID AS PERIOD_NUM
-	FROM
-		AR_QTR_CALC_SCORE AS SC;
+SELECT
+    NULL AS ID,
+    SC.USER_ID,
+    BONUSPERU * SC.SCORE AS AMOUNT,
+    CALC_YEAR,
+    CALC_MONTH,
+    PCPID AS PERIOD_NUM
+FROM
+    AR_QTR_CALC_SCORE AS SC;
+
+CALL QTRCALCRECORD(6,'写入user表',PCPID,NOW());
 
+COMMIT;
 
 INSERT INTO AR_CALC_BONUS_QUARTER
-	SELECT
-		NULL AS ID,
-		USER_ID,
-		AMOUNT AS ORI_BONUS,
-		0 AS MANAGE_TAX,
-		AMOUNT,
-		0 AS RECONSUME_POINTS,
-		CALC_YEAR, 
-		CALC_MONTH, 
-		PERIOD_NUM,
-		NOW() AS CREATE_AT
-	FROM
-		AR_QTR_CALC_USER;
+SELECT
+    NULL AS ID,
+    AU.USER_ID,
+    AU.AMOUNT AS ORI_BONUS,
+    0 AS MANAGE_TAX,
+    AU.AMOUNT,
+    0 AS RECONSUME_POINTS,
+    U.DEC_LV,
+    AU.CALC_MONTH,
+    AU.PERIOD_NUM,
+    NOW() AS CREATE_AT
+FROM
+    AR_QTR_CALC_USER AS AU
+        LEFT JOIN
+    AR_USER AS U
+    ON AU.USER_ID = U.ID;
 
 CALL QTRCALCRECORD(20,'写入季度奖金表',PCPID,NOW());
-COMMIT;	
+COMMIT;
 
 END