Преглед изворни кода

Merge branch 'master' into feature/dd-1684-delorder

root пре 3 година
родитељ
комит
ef62c52fbc
52 измењених фајлова са 808 додато и 627 уклоњено
  1. 9 9
      backendApi/config/menu.php
  2. 3 0
      backendApi/modules/v1/controllers/AtlasController.php
  3. 1 1
      backendApi/modules/v1/controllers/BonusController.php
  4. 4 0
      backendApi/modules/v1/controllers/FinanceController.php
  5. 3 2
      backendApi/modules/v1/controllers/ShopController.php
  6. 1 1
      backendApi/modules/v1/models/lists/bonus/PerfOrderList.php
  7. 1 0
      backendApi/modules/v1/models/lists/bonus/PeriodBonusList.php
  8. 52 52
      backendApi/modules/v1/models/lists/bonus/UserPerfList.php
  9. 27 27
      backendApi/modules/v1/models/lists/finance/WithdrawList.php
  10. 2 2
      backendApi/modules/v1/models/lists/shop/GoodsList.php
  11. 52 15
      backendApi/modules/v1/models/lists/shop/OrderList.php
  12. 0 1
      backendApi/web/.gitignore
  13. 122 122
      backendEle/src/router/index.js
  14. 10 2
      backendEle/src/views/atlas/network-opt.vue
  15. 8 1
      backendEle/src/views/atlas/relation-opt.vue
  16. 9 2
      backendEle/src/views/config/bonus-opt.vue
  17. 2 2
      backendEle/src/views/finance/deal-type-add.vue
  18. 12 12
      backendEle/src/views/finance/deal-type.vue
  19. 2 2
      backendEle/src/views/finance/history-bonus.vue
  20. 11 1
      backendEle/src/views/finance/withdraw.vue
  21. 1 1
      common/config/main.php
  22. 13 13
      common/helpers/bonus/BonusSend.php
  23. 8 8
      common/models/BalanceAudit.php
  24. 2 2
      common/models/Transfer.php
  25. 1 1
      common/models/User.php
  26. 2 0
      common/models/UserNetwork.php
  27. 2 0
      common/models/UserRelation.php
  28. 8 1
      common/models/forms/ApproachOrderForm.php
  29. 35 35
      common/models/forms/DeclarationForm.php
  30. 1 0
      common/models/forms/DeclarationLevelForm.php
  31. 9 1
      common/models/forms/OrderForm.php
  32. 7 20
      common/models/forms/RechargeForm.php
  33. 7 4
      frontendApi/config/menu.php
  34. 2 0
      frontendApi/modules/v1/controllers/AtlasController.php
  35. 1 1
      frontendApi/modules/v1/controllers/FinanceController.php
  36. 91 21
      frontendApi/modules/v1/controllers/ShopController.php
  37. 5 3
      frontendApi/modules/v1/controllers/UserController.php
  38. 0 1
      frontendApi/web/.gitignore
  39. 22 22
      frontendEle/src/components/FilteTransfer.vue
  40. 4 4
      frontendEle/src/components/Filter.vue
  41. 28 29
      frontendEle/src/router/index.js
  42. 11 4
      frontendEle/src/views/atlas/network.vue
  43. 88 79
      frontendEle/src/views/finance/recharge-add.vue
  44. 27 50
      frontendEle/src/views/finance/recharge.vue
  45. 23 23
      frontendEle/src/views/finance/transfer-add.vue
  46. 10 10
      frontendEle/src/views/finance/transfer-list.vue
  47. 5 3
      frontendEle/src/views/shop/order-list.vue
  48. 47 29
      frontendEle/src/views/shop/order.vue
  49. 1 1
      frontendEle/src/views/shop/reconsume-order.vue
  50. 7 7
      frontendEle/src/views/user/dec.vue
  51. 2 0
      sql/upgrade/1736.sql
  52. 7 0
      sql/upgrade/1741.sql

+ 9 - 9
backendApi/config/menu.php

@@ -145,11 +145,11 @@ return [
         'routePath'=>'atlas',
         'show'=>1,
         'child'=>[
-            ['name'=>'Expand network', 'class'=>'', 'icon'=>'', 'controller'=>'atlas', 'action'=>'relation-opt', 'routePath'=>'atlas/relation-opt', 'show'=>1,],//开拓网络
+            ['name'=>'Sponor network', 'class'=>'', 'icon'=>'', 'controller'=>'atlas', 'action'=>'relation-opt', 'routePath'=>'atlas/relation-opt', 'show'=>1,],//开拓网络
             ['name'=>'开拓网络图', 'class'=>'', 'icon'=>'', 'controller'=>'atlas', 'action'=>'relation', 'routePath'=>'atlas/relation', 'show'=>0,],
             ['name'=>'开拓网络列表', 'class'=>'', 'icon'=>'', 'controller'=>'atlas', 'action'=>'relation-list', 'routePath'=>'atlas/relation-list', 'show'=>0,],
             ['name'=>'开拓网络列表导出', 'class'=>'', 'icon'=>'', 'controller'=>'atlas', 'action'=>'relation-list-export', 'routePath'=>'atlas/relation-list-export', 'show'=>0,],
-            ['name'=>'Resettlement network', 'class'=>'', 'icon'=>'', 'controller'=>'atlas', 'action'=>'network-opt', 'routePath'=>'atlas/network-opt', 'show'=>1,],//安置网络
+            ['name'=>'Placement network', 'class'=>'', 'icon'=>'', 'controller'=>'atlas', 'action'=>'network-opt', 'routePath'=>'atlas/network-opt', 'show'=>1,],//安置网络
             ['name'=>'安置网络图', 'class'=>'', 'icon'=>'', 'controller'=>'atlas', 'action'=>'network', 'routePath'=>'atlas/network', 'show'=>0,],
             ['name'=>'安置网络列表', 'class'=>'', 'icon'=>'', 'controller'=>'atlas', 'action'=>'network-list', 'routePath'=>'atlas/network-list', 'show'=>0,],
             ['name'=>'安置网络列表导出', 'class'=>'', 'icon'=>'', 'controller'=>'atlas', 'action'=>'network-list-export', 'routePath'=>'atlas/network-list-export', 'show'=>0,],
@@ -197,9 +197,9 @@ return [
 //            ['name'=>'年度奖金发放审核', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'cf-lx-audit-list', 'routePath'=>'bonus/cf-lx-audit-list', 'show'=>1,],
 //            ['name'=>'年度奖发放审核操作', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'cf-lx-audit', 'routePath'=>'bonus/cf-lx-audit', 'show'=>0,],
             //['name'=>'期奖金明细', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'period-detail', 'routePath'=>'bonus/period-detail', 'show'=>0,],
-            ['name'=>'Latest bonus', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'new-period-bonus', 'routePath'=>'bonus/new-period-bonus', 'show'=>1,],//最新奖金
+//            ['name'=>'Latest bonus', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'new-period-bonus', 'routePath'=>'bonus/new-period-bonus', 'show'=>1,],//最新奖金
             ['name'=>'最新奖金导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'new-period-bonus-export', 'routePath'=>'bonus/new-period-bonus-export', 'show'=>0,],
-            ['name'=>'Previous bonuses', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'other-period-bonus', 'routePath'=>'bonus/other-period-bonus', 'show'=>1,],//往期奖金
+            ['name'=>'Member bonus', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'other-period-bonus', 'routePath'=>'bonus/other-period-bonus', 'show'=>1,],//往期奖金
             ['name'=>'往期奖金导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'other-period-bonus-export', 'routePath'=>'bonus/other-period-bonus-export', 'show'=>0,],
             ['name'=>'Bonus flow', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-bonus', 'routePath'=>'bonus/flow-bonus', 'show'=>1,],//奖金流水
             ['name'=>'奖金流水导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-bonus-export', 'routePath'=>'bonus/flow-bonus-export', 'show'=>0,],
@@ -209,9 +209,9 @@ return [
 //            ['name'=>'领袖分红奖流水导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-lx-export', 'routePath'=>'bonus/flow-lx-export', 'show'=>0,],
 //            ['name'=>'复消积分流水', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-rp', 'routePath'=>'bonus/flow-rp', 'show'=>1,],
 //            ['name'=>'复消积分流水导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-rp-export', 'routePath'=>'bonus/flow-rp-export', 'show'=>0,],
-            ['name'=>'兑换积分流水', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-exchange', 'routePath'=>'bonus/flow-exchange', 'show'=>1,],
+//            ['name'=>'兑换积分流水', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-exchange', 'routePath'=>'bonus/flow-exchange', 'show'=>1,],
             ['name'=>'兑换积分流水导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-exchange-export', 'routePath'=>'bonus/flow-exchange-export', 'show'=>0,],
-            ['name'=>'会员余额流水', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-balance', 'routePath'=>'bonus/flow-balance', 'show'=>1,],
+//            ['name'=>'会员余额流水', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-balance', 'routePath'=>'bonus/flow-balance', 'show'=>1,],
             ['name'=>'会员余额流水导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-balance-export', 'routePath'=>'bonus/flow-balance-export', 'show'=>0,],
 //            ['name'=>'区域津贴核算', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'calc-qy', 'routePath'=>'bonus/calc-qy', 'show'=>1,],
 //            ['name'=>'区域津贴补发列表', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'resend-qy-list', 'routePath'=>'bonus/resend-qy-list', 'show'=>1,],
@@ -253,7 +253,7 @@ return [
 //            ['name'=>'管理奖向下追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-down-gl-export', 'routePath'=>'bonus/trace-down-gl-export', 'show'=>0,],
 //            ['name'=>'管理奖贴向上追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-gl', 'routePath'=>'bonus/trace-up-gl', 'show'=>1,],
 //            ['name'=>'管理奖向上追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-gl-export', 'routePath'=>'bonus/trace-up-gl-export', 'show'=>0,],
-            ['name'=>'User performance', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'user-perf', 'routePath'=>'bonus/user-perf', 'show'=>1,],//用户业绩
+            ['name'=>'Member performance', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'user-perf', 'routePath'=>'bonus/user-perf', 'show'=>1,],//用户业绩
 //            ['name'=>'荣衔业绩', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'yc-perf', 'routePath'=>'bonus/yc-perf', 'show'=>1,],
 //            ['name'=>'达标业绩', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'perf-standard', 'routePath'=>'bonus/perf-standard', 'show'=>1,],
 //            ['name'=>'达标业绩导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'perf-standard-export', 'routePath'=>'bonus/perf-standard-export', 'show'=>0,],
@@ -270,11 +270,11 @@ return [
             ['name'=>'Performance sheet', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'perf-order', 'routePath'=>'bonus/perf-order', 'show'=>1,],//业绩单
             ['name'=>'业绩单导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'perf-order-export', 'routePath'=>'bonus/perf-order-export', 'show'=>0,],
 //            ['name'=>'会员实时业绩', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'real-time-perf', 'routePath'=>'bonus/real-time-perf', 'show'=>1,],
-            ['name'=>'Interim performance', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'perf-period-list', 'routePath'=>'bonus/perf-period-list', 'show'=>1,],//期业绩
+            ['name'=>'Period performance', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'perf-period-list', 'routePath'=>'bonus/perf-period-list', 'show'=>1,],//期业绩
             ['name'=>'期业绩导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'perf-period-list-export', 'routePath'=>'bonus/perf-period-list-export', 'show'=>0,],
             ['name'=>'Monthly performance', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'perf-month', 'routePath'=>'bonus/perf-month', 'show'=>1,],//月业绩
             ['name'=>'月业绩导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'perf-month-export', 'routePath'=>'bonus/perf-month-export', 'show'=>0,],
-            ['name'=>'Score-month', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'score-month', 'routePath'=>'bonus/score-month', 'show'=>1,],//月积分
+//            ['name'=>'Score-month', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'score-month', 'routePath'=>'bonus/score-month', 'show'=>1,],//月积分
             ['name'=>'月积分导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'score-month-export', 'routePath'=>'bonus/score-month-export', 'show'=>0,],
         ]
     ],

+ 3 - 0
backendApi/modules/v1/controllers/AtlasController.php

@@ -78,8 +78,10 @@ class AtlasController extends BaseController {
             $userId = Yii::$app->params['mainUserId'];
         }
         $baseInfo = Info::baseInfo($userId, $periodNum);
+//        print_r($baseInfo);exit;
         $decLevelConfig = Cache::getDecLevelConfig();
         $empLevelConfig = Cache::getEmpLevelConfig();
+        $starLevelConfig = Cache::getStarCrownLevelConfig();
         return static::notice([
             [
                 'TOP_RELATION_DEEP' => $baseInfo['RELATION_DEEP'],
@@ -90,6 +92,7 @@ class AtlasController extends BaseController {
                 'PERIOD_AT' => $baseInfo['PERIOD_AT'],
                 'DEC_LV_NAME' => $decLevelConfig[$baseInfo['DEC_LV']]['LEVEL_NAME'],
                 'EMP_LV_NAME' => isset($empLevelConfig[$baseInfo['EMP_LV']])?$empLevelConfig[$baseInfo['EMP_LV']]['LEVEL_NAME']:'',
+                'STAR_LV_NAME' => $starLevelConfig[$baseInfo['STAR_LV']]['LEVEL_NAME'],
                 'leaf' => false,
                 'icon' => 'el-icon-user-solid',
                 'children' => null,

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

@@ -841,7 +841,7 @@ class BonusController extends BaseController {
         }
         $data = $this->_periodBonus($periodNum,false);
         if( isset($data['filterTypes']) && is_array($data['filterTypes']) ) {
-            $data['filterTypes'] = array_merge(['periodNum'=>['isUserTable'=> false, 'name'=> '结算期数']], $data['filterTypes']);
+            $data['filterTypes'] = array_merge(['periodNum'=>['isUserTable'=> false, 'name'=> 'Number of settlement periods']], $data['filterTypes']);
         }
 
         return static::notice($data);

+ 4 - 0
backendApi/modules/v1/controllers/FinanceController.php

@@ -452,6 +452,10 @@ class FinanceController extends BaseController {
             'AUDIT_STATUS_NAME' => 'W.AUDIT_STATUS',
             'USER_NAME' => 'U.USER_NAME',
         ]);
+        $selectedIds = \Yii::$app->request->get('selectedIds', []);
+        if ($selectedIds) {
+            $filter['condition'] .= " AND W.ID IN (" . implode(',', $selectedIds) . ")";
+        }
         $form = new FinanceExportForm();
         $result = $form->run($filter, '提现申请');
         if (!$result) {

+ 3 - 2
backendApi/modules/v1/controllers/ShopController.php

@@ -385,10 +385,11 @@ class ShopController extends BaseController {
             'MOBILE'=> 'O.MOBILE',
             'PERIOD_NUM'=> 'O.PERIOD_NUM',
             'CREATED_AT'=> 'O.CREATED_AT',
+            'STATUS' => 'O.STATUS',
         ]);
-        $condition = $filter['condition'];
+        $condition = ' 1=1 ' . $filter['condition'];
         $params = $filter['params'];
-        $condition .= ' AND O.IS_DELETE=0';
+        $condition .= $condition ? ' AND O.IS_DELETE=0' : ' O.IS_DELETE=0';
         $listObj = new OrderList();
         $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
         return static::notice($data);

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

@@ -78,7 +78,7 @@ class PerfOrderList extends \common\libs\dataList\DataList implements DataListIn
                 'DEC_TYPE' => [
                     'header' => 'Performance sheet type',//业绩单类型
                     'headerOther' => [
-                        'width' => '110',
+                        'width' => '130',
                     ],
                     'value' => function($row){
                         $decTypes = [

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

@@ -747,6 +747,7 @@ class PeriodBonusList extends \common\libs\dataList\DataList implements DataList
                 'LAST_MOBILE'=> ['isUserTable'=> false, 'name'=> 'phone number'],//手机号
                 'LAST_PERIOD_AT'=> ['isUserTable'=> false, 'name'=> 'Number of joining periods'],//加入期数
                 'LAST_CREATED_AT'=> ['isUserTable'=> false, 'name'=> 'Join time', 'other'=> 'date'],//加入时间
+                'CALCULATED_AT'=> ['isUserTable'=> false, 'name'=> 'Settlement time', 'other'=> 'date'],//备份时间
                 'LAST_REC_USER_NAME'=> ['isUserTable'=> false, 'name'=> 'Pioneer No'],//开拓者编号
                 'LAST_REC_REAL_NAME'=> ['isUserTable'=> false, 'name'=> 'Pioneer name'],//开拓者姓名
                 'LAST_CON_USER_NAME'=> ['isUserTable'=> false, 'name'=> 'Superior number'],//上级编号

+ 52 - 52
backendApi/modules/v1/models/lists/bonus/UserPerfList.php

@@ -51,19 +51,19 @@ class UserPerfList extends \common\libs\dataList\DataList implements DataListInt
                 'USER_NAME' => [
                     'header' => 'Member code',//会员编号
                     'headerOther' => [
-                        'width' => '110',
+                        'width' => '200',
                     ],
                 ],
                 'REAL_NAME' => [
                     'header' => 'Member name',//会员姓名
                     'headerOther' => [
-                        'width' => '150',
+                        'width' => '200',
                     ],
                 ],
                 'PV_PCS' => [
                     'header' => 'Personal performance',//个人业绩
                     'headerOther' => [
-                        'width' => '150',
+                        'width' => '180',
                     ],
                     'value' => function($row) {
                         return (new Price([
@@ -72,9 +72,9 @@ class UserPerfList extends \common\libs\dataList\DataList implements DataListInt
                     },
                 ],
                 'SURPLUS_1L' => [
-                    'header' => 'I. remaining market performance',//一市场剩余业绩
+                    'header' => 'Left market residual performance',//一市场剩余业绩
                     'headerOther' => [
-                        'width' => '150',
+                        'width' => '240',
                     ],
                     'value' => function($row) {
                         return (new Price([
@@ -83,9 +83,9 @@ class UserPerfList extends \common\libs\dataList\DataList implements DataListInt
                     },
                 ],
                 'SURPLUS_2L' => [
-                    'header' => 'II. remaining market performance',//二市场剩余业绩
+                    'header' => 'Right market residual performance',//二市场剩余业绩
                     'headerOther' => [
-                        'width' => '150',
+                        'width' => '240',
                     ],
                     'value' => function($row) {
                         return (new Price([
@@ -104,28 +104,28 @@ class UserPerfList extends \common\libs\dataList\DataList implements DataListInt
 //                        ]))->result();
 //                    },
 //                ],
-                'SURPLUS_1L_ZC' => [
-                    'header' => 'I. remaining performance of market declaration',//一市场报单剩余业绩
-                    'headerOther' => [
-                        'width' => '150',
-                    ],
-                    'value' => function($row) {
-                        return (new Price([
-                            'value' => $row['SURPLUS_1L_ZC'],
-                        ]))->result();
-                    },
-                ],
-                'SURPLUS_2L_ZC' => [
-                    'header' => 'II. remaining performance of market declaration',//二市场报单剩余业绩
-                    'headerOther' => [
-                        'width' => '150',
-                    ],
-                    'value' => function($row) {
-                        return (new Price([
-                            'value' => $row['SURPLUS_2L_ZC'],
-                        ]))->result();
-                    },
-                ],
+//                'SURPLUS_1L_ZC' => [
+//                    'header' => 'I. remaining performance of market declaration',//一市场报单剩余业绩
+//                    'headerOther' => [
+//                        'width' => '150',
+//                    ],
+//                    'value' => function($row) {
+//                        return (new Price([
+//                            'value' => $row['SURPLUS_1L_ZC'],
+//                        ]))->result();
+//                    },
+//                ],
+//                'SURPLUS_2L_ZC' => [
+//                    'header' => 'II. remaining performance of market declaration',//二市场报单剩余业绩
+//                    'headerOther' => [
+//                        'width' => '150',
+//                    ],
+//                    'value' => function($row) {
+//                        return (new Price([
+//                            'value' => $row['SURPLUS_2L_ZC'],
+//                        ]))->result();
+//                    },
+//                ],
 //                'SURPLUS_3L_ZC' => [
 //                    'header' => '三市场报单剩余业绩',
 //                    'headerOther' => [
@@ -137,28 +137,28 @@ class UserPerfList extends \common\libs\dataList\DataList implements DataListInt
 //                        ]))->result();
 //                    },
 //                ],
-                'VIP_SURPLUS_1L_ZC' => [
-                    'header' => 'I. remaining performance of VIP declaration in the market',//一市场VIP报单剩余业绩
-                    'headerOther' => [
-                        'width' => '150',
-                    ],
-                    'value' => function($row) {
-                        return (new Price([
-                            'value' => $row['VIP_SURPLUS_1L_ZC'],
-                        ]))->result();
-                    },
-                ],
-                'VIP_SURPLUS_2L_ZC' => [
-                    'header' => 'II. remaining performance of VIP declaration in the market',//二市场VIP报单剩余业绩
-                    'headerOther' => [
-                        'width' => '150',
-                    ],
-                    'value' => function($row) {
-                        return (new Price([
-                            'value' => $row['VIP_SURPLUS_2L_ZC'],
-                        ]))->result();
-                    },
-                ],
+//                'VIP_SURPLUS_1L_ZC' => [
+//                    'header' => 'I. remaining performance of VIP declaration in the market',//一市场VIP报单剩余业绩
+//                    'headerOther' => [
+//                        'width' => '150',
+//                    ],
+//                    'value' => function($row) {
+//                        return (new Price([
+//                            'value' => $row['VIP_SURPLUS_1L_ZC'],
+//                        ]))->result();
+//                    },
+//                ],
+//                'VIP_SURPLUS_2L_ZC' => [
+//                    'header' => 'II. remaining performance of VIP declaration in the market',//二市场VIP报单剩余业绩
+//                    'headerOther' => [
+//                        'width' => '150',
+//                    ],
+//                    'value' => function($row) {
+//                        return (new Price([
+//                            'value' => $row['VIP_SURPLUS_2L_ZC'],
+//                        ]))->result();
+//                    },
+//                ],
 //                'VIP_SURPLUS_3L_ZC' => [
 //                    'header' => '三市场VIP报单剩余业绩',
 //                    'headerOther' => [
@@ -173,7 +173,7 @@ class UserPerfList extends \common\libs\dataList\DataList implements DataListInt
                 'PV_PSS_TOTAL' => [
                     'header' => 'Cumulative team performance',//累计团队业绩
                     'headerOther' => [
-                        'width' => '150',
+                        'width' => '250',
                     ],
                     'value' => function($row) {
                         return (new Price([

+ 27 - 27
backendApi/modules/v1/models/lists/finance/WithdrawList.php

@@ -118,39 +118,39 @@ class WithdrawList extends \common\libs\dataList\DataList implements DataListInt
                     'headerOther' => ['width' => '150'],
                 ],
                 'OPEN_BANK' => [
-                    'header' => '提现银行',
+                    'header' => 'Bank info',
                     'headerOther' => ['width' => '150'],
                     'value' => function ($row) {
                         return $row['OPEN_BANK'] ? OpenBank::getCnName($row['OPEN_BANK']) : '';
                     },
                 ],
-                'BANK_AREA' => [
-                    'header' => '银行地区',
-                    'value' => function($row) use($regionConfig) {
-                        $province = $regionConfig[$row['BANK_PROVINCE']]['REGION_NAME'] ?? '';
-                        $city = $regionConfig[$row['BANK_CITY']]['REGION_NAME'] ?? '';
-                        $county = $regionConfig[$row['BANK_COUNTY']]['REGION_NAME'] ?? '';
-                        return $province.$city.$county;
-                    },
-                    'showValue' => function($row) use($regionConfig) {
-                        $province = $regionConfig[$row['BANK_PROVINCE']]['REGION_NAME'] ?? '';
-                        $city = $regionConfig[$row['BANK_CITY']]['REGION_NAME'] ?? '';
-                        $county = $regionConfig[$row['BANK_COUNTY']]['REGION_NAME'] ?? '';
-                        return '<div class="addr" title='.$province.$city.$county.'>'.$province.$city.$county.'</div>';
-                    },
-                    'headerOther' => [
-                        'width' => '200'
-                    ],
-                ],
-                'BANK_ADDRESS' => [
-                    'header' => '开户地址',
-                    'headerOther' => ['width' => '250'],
-                    'showValue' => function($row) {
-                        return '<div class="addr" title='.$row['BANK_ADDRESS'].'>'.$row['BANK_ADDRESS'].'</div>';
-                    },
-                ],
+//                'BANK_AREA' => [
+//                    'header' => '银行地区',
+//                    'value' => function($row) use($regionConfig) {
+//                        $province = $regionConfig[$row['BANK_PROVINCE']]['REGION_NAME'] ?? '';
+//                        $city = $regionConfig[$row['BANK_CITY']]['REGION_NAME'] ?? '';
+//                        $county = $regionConfig[$row['BANK_COUNTY']]['REGION_NAME'] ?? '';
+//                        return $province.$city.$county;
+//                    },
+//                    'showValue' => function($row) use($regionConfig) {
+//                        $province = $regionConfig[$row['BANK_PROVINCE']]['REGION_NAME'] ?? '';
+//                        $city = $regionConfig[$row['BANK_CITY']]['REGION_NAME'] ?? '';
+//                        $county = $regionConfig[$row['BANK_COUNTY']]['REGION_NAME'] ?? '';
+//                        return '<div class="addr" title='.$province.$city.$county.'>'.$province.$city.$county.'</div>';
+//                    },
+//                    'headerOther' => [
+//                        'width' => '200'
+//                    ],
+//                ],
+//                'BANK_ADDRESS' => [
+//                    'header' => '开户地址',
+//                    'headerOther' => ['width' => '250'],
+//                    'showValue' => function($row) {
+//                        return '<div class="addr" title='.$row['BANK_ADDRESS'].'>'.$row['BANK_ADDRESS'].'</div>';
+//                    },
+//                ],
                 'BANK_NO' => [
-                    'header' => '提现银行账号',
+                    'header' => 'Bank account',
                     'headerOther' => ['width' => '150'],
                     'value' => function ($row) {
                         return $row['BANK_NO'].' /';

+ 2 - 2
backendApi/modules/v1/models/lists/shop/GoodsList.php

@@ -180,7 +180,7 @@ class GoodsList extends \common\libs\dataList\DataList implements DataListInterf
                     ],
                 ],
                 'STATUS' => [
-                    'header' => 'STATUS',//状态
+                    'header' => 'Status',//状态
                     'value' => function($row) {
                         return $row['STATUS'] == 1 ? 'On sale' : 'Sold out'; //已上架:已下架
                     },
@@ -189,7 +189,7 @@ class GoodsList extends \common\libs\dataList\DataList implements DataListInterf
                     ],
                 ],
                 'UPDATED_AT' => [
-                    'header' => 'Update time',//更新时间
+                    'header' => 'Update Time',//更新时间
                     'value' => function ($row) {
                         return (new DateTime([
                             'value' => $row['UPDATED_AT'],

+ 52 - 15
backendApi/modules/v1/models/lists/shop/OrderList.php

@@ -5,10 +5,15 @@ use common\helpers\Cache;
 use common\helpers\Tool;
 use common\helpers\user\Info;
 use common\libs\dataList\DataListInterface;
+use common\models\ApproachOrder;
+use common\models\ApproachOrderGoods;
 use common\models\Order;
 use common\models\OrderGoods;
+use common\models\ShopGoods;
 use common\models\User;
 use common\libs\dataList\column\DateTime;
+use yii\data\Pagination;
+use yii\db\Query;
 
 class OrderList extends \common\libs\dataList\DataList implements DataListInterface
 {
@@ -25,17 +30,43 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
      */
     public function dataHandle()
     {
-        $this->listData = Order::lists($this->condition, $this->params, [
-            'select' => 'O.*,U.REAL_NAME,U.DEC_ID,OG.*',
-            'orderBy' => 'O.CREATED_AT DESC, O.ID DESC',
-            'from' => Order::tableName() . ' AS O',
-            'join' => [
-                ['LEFT JOIN', OrderGoods::tableName() . ' AS OG', 'OG.ORDER_SN=O.SN'],
-                ['LEFT JOIN', User::tableName() . ' AS U', 'U.ID=O.USER_ID'],
-            ],
-            'page' => $this->page,
-            'pageSize' => $this->pageSize,
-        ]);
+        $orderQuery = Order::find()
+            ->alias('O')
+            ->where($this->condition, $this->params)
+            ->select('O.*,U.REAL_NAME,U.DEC_ID,SG.CATEGORY_TYPE,OG.REAL_PRICE,OG.TAX_RATE,OG.BUY_NUMS,OG.SKU_CODE,OG.GOODS_TITLE,OG.REAL_PV')
+            ->join('LEFT JOIN', User::tableName() . ' AS U', 'U.ID=O.USER_ID')
+            ->join('LEFT JOIN', OrderGoods::tableName() . ' AS OG', 'OG.ORDER_SN=O.SN')
+            ->join('LEFT JOIN', ShopGoods::tableName() . ' AS SG', 'SG.ID=OG.GOODS_ID')
+            ->orderBy('O.CREATED_AT DESC');
+
+        // 订单中间表只查询待支付和支付失败的订单
+        $this->params[':NOT_PAID'] = \Yii::$app->params['orderStatus']['notPaid']['value'];   // 待支付
+        $this->params[':FAIL_PAID'] = \Yii::$app->params['orderStatus']['failPaid']['value'];   // 支付失败
+        $orderStandardQuery = ApproachOrder::find()
+            ->alias('O')
+            ->where($this->condition . ' AND (O.STATUS = :NOT_PAID OR O.STATUS = :FAIL_PAID)', $this->params)
+            ->select('O.*,U.REAL_NAME,U.DEC_ID,SG.CATEGORY_TYPE,OG.REAL_PRICE,OG.TAX_RATE,OG.BUY_NUMS,OG.SKU_CODE,OG.GOODS_TITLE,OG.REAL_PV')
+            ->join('LEFT JOIN', User::tableName() . ' AS U', 'U.ID=O.USER_ID')
+            ->join('LEFT JOIN', ApproachOrderGoods::tableName() . ' AS OG', 'OG.ORDER_SN=O.SN')
+            ->join('LEFT JOIN', ShopGoods::tableName() . ' AS SG', 'SG.ID=OG.GOODS_ID')
+            ->orderBy('O.CREATED_AT DESC');
+
+        $queryAll = $orderQuery->union($orderStandardQuery, true);
+        $query = (new Query())->from(['Q' => $queryAll])->select('Q.*')->distinct()->orderBy(['CREATED_AT' => SORT_DESC]);
+
+        $totalCount = $query->count();
+        $pagination = new Pagination(['totalCount' => $totalCount, 'pageSize' => \Yii::$app->request->get('pageSize')]);
+        $lists = $query->offset($pagination->offset)->limit($pagination->limit)->all();
+
+        $this->listData = [
+            'list' => $lists,
+            'currentPage'=>$pagination->page,
+            'totalPages'=>$pagination->pageCount,
+            'startNum' => $pagination->page * $pagination->pageSize + 1,
+            'totalCount' => $pagination->totalCount,
+            'pageSize' => $pagination->pageSize,
+        ];
+
         foreach ($this->listData['list'] as $key => $value) {
             $CREATE_USER_ID = Info::getUserIdByUserName($value['CREATE_USER']);
             $this->listData['list'][$key]['DEC_USER_NAME'] = Info::getUserNameByUserId($value['DEC_ID']);
@@ -75,8 +106,8 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
                     'header' => 'Order code',//订单号
                     'headerOther' => ['width' => '200'],
                 ],
-                'STATUS' => null,
-                'STATUS_NAME' => [
+//                'STATUS' => null,
+                'STATUS' => [
                     'header' => 'Order status',//订单状态
                     'headerOther' => [
                         'width' => '110',
@@ -167,9 +198,9 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
                     'headerOther' => ['width' => '120'],
                     'value' => function ($row) {
                             if($row['ORDER_TYPE']=='ZC'){
-                                $orderType = 'declaration form';
+                                $orderType = 'Welcome pack';
                             }else{
-                                $orderType = ($row['PAY_TYPE']=='cash') ? 'Cancel again': 'integral';//'重消' : '积分'
+                                $orderType = ($row['PAY_TYPE']=='cash') ? 'Reselling': 'Points';//'重消' : '积分'
                             }
                         return $orderType;
                     },
@@ -330,6 +361,12 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
                 'MOBILE'=> ['name'=> 'Contact 1'],//联系方式1
                 'PERIOD_NUM'=> ['name'=> 'Number of periods'],//期数
                 'CREATED_AT'=> ['name'=> 'Creation time', 'other'=>'date'],//创建时间
+                'STATUS'=> ['name'=> 'Order 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']]
+                ]
+                ],
             ];
         }
         return $this->filterTypes;

+ 0 - 1
backendApi/web/.gitignore

@@ -3,4 +3,3 @@
 upload
 /upload/excelExport
 /upload/excel_export
-index.php

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

@@ -436,18 +436,18 @@ export const constantRouterMap = [
           ],
         },
       },
-        {
-            path: '/user/dec-level-list',
-            component: _import('user/dec-level-list'),
-            name: 'user_dec-level-list',
-            meta: {
-                title: 'Member level adjustment list',//会员级别调整列表
-                breadcrumb: [
-                    {title: 'Dashboard', path: '/dashboard/index'},//Dashboard
-                    {title: 'Member management', path: '/user/index'},//会员管理
-                ],
-            },
-        },
+      {
+          path: '/user/dec-level-list',
+          component: _import('user/dec-level-list'),
+          name: 'user_dec-level-list',
+          meta: {
+              title: 'Member level adjustment list',//会员级别调整列表
+              breadcrumb: [
+                  {title: 'Dashboard', path: '/dashboard/index'},//Dashboard
+                  {title: 'Member management', path: '/user/index'},//会员管理
+              ],
+          },
+      },
       {
         path: '/user/change-user-dec-level',
         component: _import('user/change-user-dec-level'),
@@ -508,10 +508,10 @@ export const constantRouterMap = [
         component: _import('atlas/relation-opt'),
         name: 'atlas_relation-opt',
         meta: {
-          title: 'Expand network',//开拓网络
+          title: 'Sponor network', // 开拓网络
           breadcrumb: [
-            {title: 'Dashboard', path: '/dashboard/index'},//Dashboard
-            {title: 'Network Atlas', path: '/atlas/relation-opt'},//网络图谱
+            {title: 'Dashboard', path: '/dashboard/index'}, // Dashboard
+            {title: 'Network Atlas', path: '/atlas/relation-opt'}, // 网络图谱
           ],
         },
       },
@@ -520,10 +520,10 @@ export const constantRouterMap = [
         component: _import('atlas/network-opt'),
         name: 'atlas_network-opt',
         meta: {
-          title: 'Resettlement network',//安置网络
+          title: 'Placement network', // 安置网络
           breadcrumb: [
-            {title: 'Dashboard', path: '/dashboard/index'},//Dashboard
-            {title: 'Network Atlas', path: '/atlas/relation-opt'},//网络图谱
+            {title: 'Dashboard', path: '/dashboard/index'}, // Dashboard
+            {title: 'Network Atlas', path: '/atlas/relation-opt'}, // 网络图谱
           ],
         },
       },
@@ -723,10 +723,10 @@ export const constantRouterMap = [
         component: _import('bonus/other-period-bonus'),
         name: 'bonus_other-period-bonus',
         meta: {
-          title: 'Previous bonuses',//往期奖金
+          title: 'Member bonus', // 往期奖金
           breadcrumb: [
-            {title: 'Dashboard', path: '/dashboard/index'},//Dashboard
-            {title: 'Bonus management', path: '/bonus/period'},//奖金管理
+            {title: 'Dashboard', path: '/dashboard/index'}, // Dashboard
+            {title: 'Bonus management', path: '/bonus/period'}, // 奖金管理
           ],
         },
       },
@@ -735,10 +735,10 @@ export const constantRouterMap = [
         component: _import('bonus/flow-bonus'),
         name: 'bonus_flow-bonus',
         meta: {
-          title: 'Bonus flow',//奖金流水
+          title: 'Bonus flow', // 奖金流水
           breadcrumb: [
-            {title: 'Dashboard', path: '/dashboard/index'},//Dashboard
-            {title: 'Bonus management', path: '/bonus/period'},//奖金管理
+            {title: 'Dashboard', path: '/dashboard/index'}, // Dashboard
+            {title: 'Bonus management', path: '/bonus/period'}, // 奖金管理
           ],
         },
       },
@@ -961,76 +961,76 @@ export const constantRouterMap = [
         },
       },
       {
-          path: '/bonus/trace-down-yj',
-          component: _import('bonus/trace-down-yj'),
-          name: 'bonus_trace-down-yj',
-          meta: {
-              title: '业绩奖向下追溯',
-              breadcrumb: [
-                  {title: 'Dashboard', path: '/dashboard/index'},
-                  {title: '奖金管理', path: '/bonus/period'},
-              ],
-          },
+        path: '/bonus/trace-down-yj',
+        component: _import('bonus/trace-down-yj'),
+        name: 'bonus_trace-down-yj',
+        meta: {
+          title: '业绩奖向下追溯',
+          breadcrumb: [
+            {title: 'Dashboard', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
       },
       {
-          path: '/bonus/trace-up-yj',
-          component: _import('bonus/trace-up-yj'),
-          name: 'bonus_trace-up-yj',
-          meta: {
-              title: '业绩奖向上追溯',
-              breadcrumb: [
-                  {title: 'Dashboard', path: '/dashboard/index'},
-                  {title: '奖金管理', path: '/bonus/period'},
-              ],
-          },
+        path: '/bonus/trace-up-yj',
+        component: _import('bonus/trace-up-yj'),
+        name: 'bonus_trace-up-yj',
+        meta: {
+          title: '业绩奖向上追溯',
+          breadcrumb: [
+            {title: 'Dashboard', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
       },
       {
-          path: '/bonus/trace-down-gx',
-          component: _import('bonus/trace-down-gx'),
-          name: 'bonus_trace-down-gx',
-          meta: {
-              title: '共享奖向下追溯',
-              breadcrumb: [
-                  {title: 'Dashboard', path: '/dashboard/index'},
-                  {title: '奖金管理', path: '/bonus/period'},
-              ],
-          },
+        path: '/bonus/trace-down-gx',
+        component: _import('bonus/trace-down-gx'),
+        name: 'bonus_trace-down-gx',
+        meta: {
+          title: '共享奖向下追溯',
+          breadcrumb: [
+            {title: 'Dashboard', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
       },
       {
-          path: '/bonus/trace-up-gx',
-          component: _import('bonus/trace-up-gx'),
-          name: 'bonus_trace-up-gx',
-          meta: {
-              title: '共享奖向上追溯',
-              breadcrumb: [
-                  {title: 'Dashboard', path: '/dashboard/index'},
-                  {title: '奖金管理', path: '/bonus/period'},
-              ],
-          },
+        path: '/bonus/trace-up-gx',
+        component: _import('bonus/trace-up-gx'),
+        name: 'bonus_trace-up-gx',
+        meta: {
+          title: '共享奖向上追溯',
+          breadcrumb: [
+            {title: 'Dashboard', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
       },
       {
-          path: '/bonus/trace-down-gl',
-          component: _import('bonus/trace-down-gl'),
-          name: 'bonus_trace-down-gl',
-          meta: {
-              title: '管理奖向下追溯',
-              breadcrumb: [
-                  {title: 'Dashboard', path: '/dashboard/index'},
-                  {title: '奖金管理', path: '/bonus/period'},
-              ],
-          },
+        path: '/bonus/trace-down-gl',
+        component: _import('bonus/trace-down-gl'),
+        name: 'bonus_trace-down-gl',
+        meta: {
+          title: '管理奖向下追溯',
+          breadcrumb: [
+            {title: 'Dashboard', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
       },
       {
-          path: '/bonus/trace-up-gl',
-          component: _import('bonus/trace-up-gl'),
-          name: 'bonus_trace-up-gl',
-          meta: {
-              title: '管理奖向上追溯',
-              breadcrumb: [
-                  {title: 'Dashboard', path: '/dashboard/index'},
-                  {title: '奖金管理', path: '/bonus/period'},
-              ],
-          },
+        path: '/bonus/trace-up-gl',
+        component: _import('bonus/trace-up-gl'),
+        name: 'bonus_trace-up-gl',
+        meta: {
+          title: '管理奖向上追溯',
+          breadcrumb: [
+            {title: 'Dashboard', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
       },
       {
         path: '/bonus/trace-down-fx',
@@ -1109,24 +1109,24 @@ export const constantRouterMap = [
         component: _import('bonus/perf-period-list'),
         name: 'bonus_perf-period-list',
         meta: {
-          title: 'Interim performance',//期业绩
+          title: 'Period performance', // 期业绩
           breadcrumb: [
-            {title: 'Dashboard', path: '/dashboard/index'},//Dashboard
-            {title: 'Bonus management', path: '/bonus/period'},//奖金管理
+            {title: 'Dashboard', path: '/dashboard/index'}, // Dashboard
+            {title: 'Bonus management', path: '/bonus/period'}, // 奖金管理
           ],
         },
       },
       {
-          path: '/bonus/perf-month',
-          component: _import('bonus/perf-month'),
-          name: 'bonus_perf-month',
-          meta: {
-              title: 'Monthly performance',//月业绩
-              breadcrumb: [
-                  {title: 'Dashboard', path: '/dashboard/index'},//Dashboard
-                  {title: 'Bonus management', path: '/bonus/period'},//奖金管理
-              ],
-          },
+        path: '/bonus/perf-month',
+        component: _import('bonus/perf-month'),
+        name: 'bonus_perf-month',
+        meta: {
+          title: 'Monthly performance', // 月业绩
+          breadcrumb: [
+            {title: 'Dashboard', path: '/dashboard/index'}, // Dashboard
+            {title: 'Bonus management', path: '/bonus/period'}, // 奖金管理
+          ],
+        },
       },
       {
         path: '/bonus/perf-standard',
@@ -1181,10 +1181,10 @@ export const constantRouterMap = [
         component: _import('bonus/user-perf'),
         name: 'leo-user-perf-table',
         meta: {
-          title: 'User performance',//用户业绩
+          title: 'Member performance', // 用户业绩
           breadcrumb: [
-            {title: 'Dashboard', path: '/dashboard/index'},//Dashboard
-            {title: 'Bonus management', path: '/bonus/period'},//奖金管理
+            {title: 'Dashboard', path: '/dashboard/index'}, // Dashboard
+            {title: 'Bonus management', path: '/bonus/period'}, // 奖金管理
           ],
         },
       },
@@ -1367,30 +1367,30 @@ export const constantRouterMap = [
           ],
         },
       },
-        {
-            path: '/finance/recharge',
-            component: _import('finance/recharge'),
-            name: 'finance_recharge',
-            meta: {
-                title: '充值管理',
-                breadcrumb: [
-                    {title: 'Dashboard', path: '/dashboard/index'},
-                    {title: '财务管理', path: '/finance/balance-audit-list'},
-                ],
-            },
+      {
+        path: '/finance/recharge',
+        component: _import('finance/recharge'),
+        name: 'finance_recharge',
+        meta: {
+          title: '充值管理',
+          breadcrumb: [
+            {title: 'Dashboard', path: '/dashboard/index'},
+            {title: '财务管理', path: '/finance/balance-audit-list'},
+          ],
         },
-        {
-            path: '/finance/recharge-status',
-            component: _import('finance/recharge-status'),
-            name: 'finance_recharge-status',
-            meta: {
-                title: '状态管理',
-                breadcrumb: [
-                    {title: 'Dashboard', path: '/dashboard/index'},
-                    {title: '财务管理', path: '/finance/balance-audit-list'},
-                ],
-            },
+      },
+      {
+        path: '/finance/recharge-status',
+        component: _import('finance/recharge-status'),
+        name: 'finance_recharge-status',
+        meta: {
+          title: '状态管理',
+          breadcrumb: [
+            {title: 'Dashboard', path: '/dashboard/index'},
+            {title: '财务管理', path: '/finance/balance-audit-list'},
+          ],
         },
+      },
     ]
   },
   {

+ 10 - 2
backendEle/src/views/atlas/network-opt.vue

@@ -22,11 +22,19 @@
                     <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><!-- 会员编号 -->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}}</el-tag> <el-tag><!-- 加入期数 -->Number of joining periods:{{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}}</el-tag>
+                      <el-tag type="warning"><!-- 聘级 -->Star:{{data.STAR_LV_NAME}}</el-tag>
+                      <el-tag><!-- 加入期数 -->Number of joining periods:{{data.PERIOD_AT}}</el-tag>
+                    </span>
                 </span>
           </el-tree>
         </el-tab-pane>
-        <el-tab-pane label="Placement network list" name="two" v-if="permission.hasPermission(`user/network-list`)"><!-- 安置网络列表 -->
+        <el-tab-pane label="Placement network list" name="two" v-if="permission.hasPermission(`atlas/network`)"><!-- 安置网络列表 -->
           <div class="filter-user">
             <el-input v-model="filterForm.userName" size="small" style="width:300px;">
               <template slot="prepend"><!-- 会员编号 -->Member code</template>

+ 8 - 1
backendEle/src/views/atlas/relation-opt.vue

@@ -21,7 +21,14 @@
                       slot-scope="{ node, data }">
                     <span :class="'el-icon-loading '+ data.displayNone"></span>
                     <span :class="data.icon"></span>
-                  <span><el-tag type="danger"><!-- 代数 -->Algebra:{{countTopDeep(data.TOP_RELATION_DEEP,topDeep)}}</el-tag> <el-tag><!-- 会员编号 -->Member code:{{ node.label }}</el-tag> <el-tag type="success">Name<!-- 姓名 -->:{{data.REAL_NAME}}</el-tag> <el-tag type="warning">Level<!-- 级别 -->:{{data.DEC_LV_NAME}}</el-tag> <el-tag type="warning"><!-- 聘级 -->Rank:{{data.EMP_LV_NAME}}</el-tag></span>
+                    <span>
+                      <el-tag type="danger"><!-- 代数 -->Algebra:{{countTopDeep(data.TOP_RELATION_DEEP,topDeep)}}</el-tag>
+                      <el-tag><!-- 会员编号 -->Member code:{{ node.label }}</el-tag>
+                      <el-tag type="success">Name<!-- 姓名 -->:{{data.REAL_NAME}}</el-tag>
+                      <el-tag type="warning">Level<!-- 级别 -->:{{data.DEC_LV_NAME}}</el-tag>
+                      <el-tag type="warning">Rank:<!-- 聘级 -->{{data.EMP_LV_NAME}}</el-tag>
+                      <el-tag type="warning">Star:<!-- 星级 -->{{data.STAR_LV_NAME}}</el-tag>
+                    </span>
                 </span>
           </el-tree>
         </el-tab-pane>

+ 9 - 2
backendEle/src/views/config/bonus-opt.vue

@@ -91,19 +91,26 @@
     </div>
     <div class="panel" v-if="permission.hasPermission(`config/bonus-dec-level`)">
       <div class="panel-heading">
-        团队
+        绩效
       </div>
       <div class="panel-wrapper">
         <div class="panel-body">
           <el-table :data="decLevelTableData" stripe style="width: 100%;">
             <el-table-column prop="LEVEL_NAME" label="级别名称"></el-table-column>
-            <el-table-column label="拿奖比例(%)">
+            <el-table-column label="拿奖比例">
               <template slot-scope="scope">
                 <el-input v-model="scope.row.QY_PERCENT" min="0" max="100">
                   <template slot="append">%</template>
                 </el-input>
               </template>
             </el-table-column>
+            <el-table-column label="个人封顶值">
+              <template slot-scope="scope">
+                <el-input v-model="scope.row.INCOME_CAP" min="0">
+                  <template slot="append">$</template>
+                </el-input>
+              </template>
+            </el-table-column>
           </el-table>
         </div>
         <div class="panel-footer">

+ 2 - 2
backendEle/src/views/finance/deal-type-add.vue

@@ -15,7 +15,7 @@
           <el-input v-model="form.sort" type="number" min="1"></el-input>
         </el-form-item>
         <el-form-item>
-          <el-button type="primary" @click="onSubmit" :loading="submitButtonStat">提交</el-button>
+          <el-button type="primary" @click="onSubmit" :loading="submitButtonStat">Confirm</el-button>
         </el-form-item>
       </el-form>
     </div>
@@ -66,4 +66,4 @@
 
 <style scoped>
 
-</style>
+</style>

+ 12 - 12
backendEle/src/views/finance/deal-type.vue

@@ -9,13 +9,13 @@
         </el-table-column>
         <el-table-column label="是否系统预置" width="110">
           <template slot-scope="scope">
-            <el-tag :type="(scope.row.IS_PRESET=='1'?'success':'danger')">{{(scope.row.IS_PRESET==='1'?'是':'否')}}
+            <el-tag :type="(scope.row.IS_PRESET=='1'?'success':'danger')">{{(scope.row.IS_PRESET==='1'?'Yes':'No')}}
             </el-tag>
           </template>
         </el-table-column>
         <el-table-column label="是否启用" width="110">
           <template slot-scope="scope">
-            <el-tag :type="(scope.row.IS_ENABLE=='1'?'success':'danger')">{{(scope.row.IS_ENABLE==='1'?'是':'否')}}
+            <el-tag :type="(scope.row.IS_ENABLE=='1'?'success':'danger')">{{(scope.row.IS_ENABLE==='1'?'Yes':'No')}}
             </el-tag>
           </template>
         </el-table-column>
@@ -34,12 +34,12 @@
             {{scope.row.UPDATE_ADMIN_NAME}}
           </template>
         </el-table-column>
-        <el-table-column label="修改时间" width="180">
+        <el-table-column label="Update time" width="180">
           <template slot-scope="scope">
             {{tool.formatDate(scope.row.UPDATED_AT)}}
           </template>
         </el-table-column>
-        <el-table-column label="备注" width="150">
+        <el-table-column label="Note" width="150">
           <template slot-scope="scope">
             {{scope.row.CREATE_REMARK}}
           </template>
@@ -49,14 +49,14 @@
             {{scope.row.SORT_ORDER}}
           </template>
         </el-table-column>
-        <el-table-column fixed="right" label="操作" width="180">
+        <el-table-column fixed="right" label="Operation" width="180">
           <template slot-scope="scope">
             <el-dropdown size="small" trigger="click" v-if="permission.hasPermission(`finance/deal-type-edit`)">
               <el-button type="primary" size="small" @click.stop="">
                 Operate on this data<i class="el-icon-arrow-down el-icon--right"></i>
               </el-button>
               <el-dropdown-menu slot="dropdown">
-                <el-dropdown-item command="edit" @click.native="handleEditShow(scope.row)">修改数据
+                <el-dropdown-item command="edit" @click.native="handleEditShow(scope.row)">Edit
                 </el-dropdown-item>
               </el-dropdown-menu>
             </el-dropdown>
@@ -87,8 +87,8 @@
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button @click="dialogEditFormVisible = false">取 消</el-button>
-        <el-button type="primary" @click.native="handleEdit">修 改</el-button>
+        <el-button @click="dialogEditFormVisible = false">Cancel</el-button>
+        <el-button type="primary" @click.native="handleEdit">Confirm</el-button>
       </div>
     </el-dialog>
   </div>
@@ -177,8 +177,8 @@
       handleDel(id = null) {
         let obj = this
         this.$confirm('确定删除选定的数据?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
+          confirmButtonText: 'Confirm',
+          cancelButtonText: 'Cancel',
           type: 'warning'
         }).then(() => {
           let selectedIds = []
@@ -214,8 +214,8 @@
       chkEnable(val) {
         if (!val) {
           this.$confirm('确定要关闭该交易类型?', '提示', {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
+            confirmButtonText: 'Confirm',
+            cancelButtonText: 'Cancel',
             type: 'warning'
           }).then(() => {
           }).catch(() => {

+ 2 - 2
backendEle/src/views/finance/history-bonus.vue

@@ -85,8 +85,8 @@
       },
       handleExport(){
         this.$confirm(`确定要导出当前数据吗?`, '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
+          confirmButtonText: 'Confirm',
+          cancelButtonText: 'Cancel',
           type: 'warning'
         }).then(() => {
           return network.getData(`finance/history-bonus-export`, this.filterModel)

+ 11 - 1
backendEle/src/views/finance/withdraw.vue

@@ -344,12 +344,22 @@ export default {
               this.$refs.multipleTable.toggleRowExpansion(row)
           },
           handleExport() {
+              let filterData = this.filterModel
+              // 如果有选中,导出选中ID,否则导出全部
+              if (this.multipleSelection.length > 0) {
+                  let selectedIds = []
+                  for (let val of this.multipleSelection) {
+                      selectedIds.push(val.ID)
+                  }
+
+                  filterData.selectedIds = selectedIds
+              }
               this.$confirm('确定要导出当前表格中的提现数据吗?', '提示', {
                   confirmButtonText: '确定',
                   cancelButtonText: '取消',
                   type: 'warning'
               }).then(() => {
-                  return network.getData('finance/withdraw-export', this.filterModel)
+                  return network.getData('finance/withdraw-export', filterData)
               }).then(response => {
                   this.$message({
                       message: response,

+ 1 - 1
common/config/main.php

@@ -11,7 +11,7 @@ if (YII_ENV_DEV) {
 
 return [
     'language' => 'en',
-    'timeZone' => 'PRC',
+    'timeZone' => 'Africa/Lagos',
     'aliases' => [
         '@bower' => '@vendor/bower-asset',
         '@npm'   => '@vendor/npm-asset',

+ 13 - 13
common/helpers/bonus/BonusSend.php

@@ -390,18 +390,18 @@ class BonusSend extends BaseObject {
 //                            'DEAL_TYPE_ID' => DealType::RECONSUME_POINTS_SEND,
 //                        ]);
 //                    }
-
-                    //发放兑换积分
-                    if ($data['EXCHANGE_POINTS'] > 0) {
-                        Balance::changeUserBonus($data['USER_ID'], 'exchange_points', $data['EXCHANGE_POINTS'], [
-                            'CALC_ID' => $data['ID'],
-                            'REMARK' => 'From ' . $periodNum . '期',
-                            'PERIOD_NUM' => $periodNum,
-                            'EXCHANGE_POINTS' => $data['EXCHANGE_POINTS'],
-                            'DEAL_TYPE_ID' => DealType::EXCHANGE_POINTS_SEND,
-                            'BONUS_ISSUE' => true,
-                        ]);
-                    }
+//
+//                    //发放兑换积分
+//                    if ($data['EXCHANGE_POINTS'] > 0) {
+//                        Balance::changeUserBonus($data['USER_ID'], 'exchange_points', $data['EXCHANGE_POINTS'], [
+//                            'CALC_ID' => $data['ID'],
+//                            'REMARK' => 'From ' . $periodNum . '期',
+//                            'PERIOD_NUM' => $periodNum,
+//                            'EXCHANGE_POINTS' => $data['EXCHANGE_POINTS'],
+//                            'DEAL_TYPE_ID' => DealType::EXCHANGE_POINTS_SEND,
+//                            'BONUS_ISSUE' => true,
+//                        ]);
+//                    }
                     // 把记录标记为已发放状态
                     CalcBonus::updateAll(['IS_SENT' => 1, 'SENT_AT' => Date::nowTime()], 'ID=:ID', [':ID' => $data['ID']]);
 
@@ -410,7 +410,7 @@ class BonusSend extends BaseObject {
                 $transaction->commit();
             } catch (Exception $e) {
                 $transaction->rollBack();
-                $this->addError('sendBonus', '奖金发放失败,原因:' . $e->getMessage());
+                $this->addError('sendBonus', '奖金发放失败,原因:' . $e->getFile() . ' ' . $e->getLine() . '  ' . $e->getMessage());
                 return false;
             }
 

+ 8 - 8
common/models/BalanceAudit.php

@@ -38,10 +38,10 @@ class BalanceAudit extends \common\components\ActiveRecord
 //            'name' => 'reconsume_points',
 //            'label' => '复消积分',
 //        ],
-        'exchange_points' => [
-            'name' => 'exchange_points',
-            'label' => '兑换积分',
-        ],
+//        'exchange_points' => [
+//            'name' => 'exchange_points',
+//            'label' => '兑换积分',
+//        ],
         'cash' => [
             'name' => 'cash',
             'label' => '会员账户余额',
@@ -54,10 +54,10 @@ class BalanceAudit extends \common\components\ActiveRecord
 //            'name' => 'lx',
 //            'label' => '领袖分红奖余额',
 //        ],
-        'tourism_points' => [
-            'name' => 'tourism_points',
-            'label' => '旅游积分',
-        ],
+//        'tourism_points' => [
+//            'name' => 'tourism_points',
+//            'label' => '旅游积分',
+//        ],
         'garage_points' => [
             'name' => 'garage_points',
             'label' => '车房积分',

+ 2 - 2
common/models/Transfer.php

@@ -35,8 +35,8 @@ class Transfer extends \common\components\ActiveRecord
 {
 
     const WALLET_NAME = [
-        'bonus'=>'奖金',
-        'cash'=>'余额',
+        'bonus'=>'Bonus',
+        'cash'=>'Balance',
     ];
 
     /**

+ 1 - 1
common/models/User.php

@@ -118,7 +118,7 @@ class User extends \common\components\ActiveRecord
             [['USER_NAME', 'SPOUSE_NAME', 'TEL'], 'string', 'max' => 16],
             [['PASSWORD_HASH', 'PAY_PASSWORD', 'ID_IMAGE', 'BANK_ADDRESS', 'AVATAR'], 'string', 'max' => 255],
             [['REAL_NAME', 'APP_CLIENT_ID', 'BONUS_APP_CLIENT_ID'], 'string', 'max' => 128],
-            [['ID_CARD', 'SPOUSE_IDCARD'], 'string','min' => 18, 'max' => 18],
+//            [['ID_CARD', 'SPOUSE_IDCARD'], 'string','min' => 18, 'max' => 18],
             [['MOBILE'], 'string','min' => 11, 'max' => 11],
             [['ADDRESS', 'DEC_ADDRESS'], 'string', 'max' => 2000],
             [['DEC_ACCOUNT_OLD', 'GUARANTOR_NAME'], 'string', 'max' => 64],

+ 2 - 0
common/models/UserNetwork.php

@@ -261,6 +261,7 @@ class UserNetwork extends \common\components\ActiveRecord
         if($allData){
             $decLevelConfig = Cache::getDecLevelConfig();
             $empLevelConfig = Cache::getEmpLevelConfig();
+            $starLevelConfig = Cache::getStarCrownLevelConfig();
             foreach($allData as $key=>$data){
                 // 获取用户的基本信息
                 $baseInfo = Info::baseInfo($data['USER_ID'], $periodNum);
@@ -270,6 +271,7 @@ class UserNetwork extends \common\components\ActiveRecord
                     'REAL_NAME' => $baseInfo['REAL_NAME'],
                     'DEC_LV_NAME' => $decLevelConfig[$baseInfo['DEC_LV']]['LEVEL_NAME'],
                     'EMP_LV_NAME' => isset($empLevelConfig[$baseInfo['EMP_LV']])?$empLevelConfig[$baseInfo['EMP_LV']]['LEVEL_NAME']:'',
+                    'STAR_LV_NAME' => $starLevelConfig[$baseInfo['STAR_LV']]['LEVEL_NAME'],
 //                    'MOBILE' => $baseInfo['MOBILE'],
                     'PERIOD_AT' => $baseInfo['PERIOD_AT'],
                 ]);

+ 2 - 0
common/models/UserRelation.php

@@ -205,6 +205,7 @@ class UserRelation extends \common\components\ActiveRecord
         if($allData){
             $decLevelConfig = Cache::getDecLevelConfig();
             $empLevelConfig = Cache::getEmpLevelConfig();
+            $starLevelConfig = Cache::getStarCrownLevelConfig();
             foreach($allData as $key=>$data){
                 // 获取用户的基本信息
                 $baseInfo = Info::baseInfo($data['USER_ID'], $periodNum);
@@ -214,6 +215,7 @@ class UserRelation extends \common\components\ActiveRecord
                     'REAL_NAME' => $baseInfo['REAL_NAME'],
                     'DEC_LV_NAME' => $decLevelConfig[$baseInfo['DEC_LV']]['LEVEL_NAME'],
                     'EMP_LV_NAME' => isset($empLevelConfig[$baseInfo['EMP_LV']])?$empLevelConfig[$baseInfo['EMP_LV']]['LEVEL_NAME']:'',
+                    'STAR_LV_NAME' => $starLevelConfig[$baseInfo['STAR_LV']]['LEVEL_NAME'],
                     'PERIOD_AT' => $baseInfo['PERIOD_AT'],
                 ]);
                 // 获取字节点数量

+ 8 - 1
common/models/forms/ApproachOrderForm.php

@@ -376,9 +376,16 @@ class ApproachOrderForm extends Model
             }
         }
 
+        // 汇率
+        $exchangeRate = floatval(Cache::getSystemConfig()['exchangeRate']['VALUE'] ?? 0);
+        // 运费.美元转奈拉
+        $freight = floatval(Cache::getSystemConfig()['freight']['VALUE'] ?? 0);
+        // 普通商品免运费阈值.美元转奈拉
+        $freeShipping = floatval(Cache::getSystemConfig()['freeShipping']['VALUE'] ?? 0);
+
         $this->_decAmount = $totalAmount;
         $this->_decPv = $totalPv;
-        $this->_freight = ($totalAmount>=300) ? 0 : 15;
+        $this->_freight = ($totalAmount >= $freeShipping) ? 0 : $freight;
         if($this->_address['PROVINCE']==1){
             $this->_freight = 0;
         }

+ 35 - 35
common/models/forms/DeclarationForm.php

@@ -116,15 +116,15 @@ class DeclarationForm extends Model
     public function rules()
     {
         return [
-            [['type','decLv','decWay','packageId', 'insertUserName', 'realName', 'insertUserIdCard', 'mobile', 'address', 'openBank', 'bankAddress', 'bankNo','bankProvince','bankCity','bankCounty','consignee','acceptMobile','province','city','county','cityName','lgaName','decUserName', 'conUserName', 'recUserName', 'location'], 'trim'],
-            [['type','decLv','decWay','insertUserName', 'insertUserIdCard','password','payPassword','decUserName'], 'required'],
+            [['type','decLv','decWay','packageId', 'insertUserName', 'realName',/* 'insertUserIdCard',*/ 'mobile', 'address', 'openBank', 'bankAddress', 'bankNo','bankProvince','bankCity','bankCounty','consignee','acceptMobile','province','city','county','cityName','lgaName','decUserName', 'conUserName', 'recUserName', 'location'], 'trim'],
+            [['type','decLv','decWay','insertUserName',/* 'insertUserIdCard',*/'password','payPassword','decUserName'], 'required'],
             [['type'], 'isType', 'on'=>['userDec', 'canDec']],
             [['insertUserName'], 'isCanAddUser'],
             [['decUserName'], 'issetDec'],
             [['conUserName'], 'isConUserName'],
             [['recUserName'], 'isRecUserName'],
             [['location'], 'isLocation'],
-            [['insertUserIdCard'], 'isSameSystem'],
+//            [['insertUserIdCard'], 'isSameSystem'],
         ];
     }
 
@@ -174,8 +174,8 @@ class DeclarationForm extends Model
     {
         $parentScenarios =  parent::scenarios();
         $customScenarios = [
-            'userDec' => ['type','allData', 'decLv','decWay','insertUserName','password','payPassword', 'realName', 'insertUserIdCard', 'mobile', 'address', 'openBank', 'bankAddress', 'bankNo', 'bankProvince','bankCity','bankCounty', 'consignee','acceptMobile','province',/*'city','county',*/ 'conUserName', 'recUserName','decUserName', 'location', 'email'],
-            'canDec' => ['type', 'insertUserName', 'insertUserIdCard', 'conUserName', 'recUserName', 'location'],
+            'userDec' => ['type','allData', 'decLv','decWay','insertUserName','password','payPassword', 'realName',/* 'insertUserIdCard',*/ 'mobile', 'address', 'openBank', 'bankAddress', 'bankNo', 'bankProvince','bankCity','bankCounty', 'consignee','acceptMobile','province',/*'city','county',*/ 'conUserName', 'recUserName','decUserName', 'location', 'email'],
+            'canDec' => ['type', 'insertUserName',/* 'insertUserIdCard',*/ 'conUserName', 'recUserName', 'location'],
             'notFull' => ['type', 'insertUserName', 'conUserName', 'recUserName', 'location'],
         ];
         return array_merge($parentScenarios, $customScenarios);
@@ -566,7 +566,7 @@ class DeclarationForm extends Model
                     if(!$this->insertUserName) $this->addError($attribute, 'Membership number must be filled in for initial purchase');//首购必须填写加入会员编号
                 }
                 if(!$this->insertUserName) $this->addError($attribute, 'Membership number must be filled in for initial purchase');//首购必须填写加入会员编号
-                if(!$this->insertUserIdCard) $this->addError($attribute, 'For the first purchase, the ID number of the member must be filled in');//首购必须填写加入会员的身份证号
+//                if(!$this->insertUserIdCard) $this->addError($attribute, 'For the first purchase, the ID number of the member must be filled in');//首购必须填写加入会员的身份证号
                 if(!$this->conUserName) $this->addError($attribute, 'For the first purchase, you must fill in the instructor number of the member');//首购必须填写加入会员的指导老师编号
                 if(!$this->recUserName) $this->addError($attribute, 'For the first purchase, the pioneer number of the member must be filled in');//首购必须填写加入会员的开拓人编号
                 if(!$this->location) $this->addError($attribute, 'The first purchase must be filled in the market of the member');//首购必须填写加入会员的市场
@@ -580,33 +580,33 @@ class DeclarationForm extends Model
      * 检验相同身份证 会员是否同一体系内(接点)
      * @param $attribute
      */
-    public function isSameSystem($attribute){
-        if(isset($this->_tempParentUser[$this->conUserName])){
-            // 新加入会员的身份证号对应网内的其他会员
-            $otherUser = User::findAllAsArray("ID_CARD=:ID_CARD AND IS_UNION=0 AND DELETED=0 AND (ID_CARD_PREFIX IS NULL OR ID_CARD_PREFIX='')", [':ID_CARD'=>$this->insertUserIdCard]);
-            if(count($otherUser)>=7){
-                $this->addError($attribute, 'Only 7 documents can be reported for the same ID card');//同一个身份证限制只能报7单
-            }
-            if($otherUser){
-                $flipParent = array_flip(array_filter($this->_tempNetworkParentUser[$this->insertUserName]));
-                $isExsit = false;
-                foreach ($otherUser as $conUser){
-                    if(isset($flipParent[$conUser['USER_NAME']])){
-                        $isExsit = true;
-                        break;
-                    }
-                }
-                if (!$isExsit) {
-//                    $this->addError($attribute, '为' . $this->insertUserName . '报单,身份证号码相同的会员'.$otherUser[0]['USER_NAME'].'不在' . $this->insertUserName . '的安置网上级中');
-                    $this->addError($attribute, 'To' . $this->insertUserName . 'Entry,Members with the same ID number'.$otherUser[0]['USER_NAME'].'not in exist' . $this->insertUserName . 'in the placement superiors');
-                    return ;
-                }
-            }
-        } else {
-//            $this->addError($attribute, '为'.$this->insertUserName.'报单,接点人'.$this->conUserName.'不存在');
-            $this->addError($attribute, 'To'.$this->insertUserName.'Entry,Contact person'.$this->conUserName.'not in exist');
-        }
-    }
+//    public function isSameSystem($attribute){
+//        if(isset($this->_tempParentUser[$this->conUserName])){
+//            // 新加入会员的身份证号对应网内的其他会员
+//            $otherUser = User::findAllAsArray("ID_CARD=:ID_CARD AND IS_UNION=0 AND DELETED=0 AND (ID_CARD_PREFIX IS NULL OR ID_CARD_PREFIX='')", [':ID_CARD'=>$this->insertUserIdCard]);
+//            if(count($otherUser)>=7){
+//                $this->addError($attribute, 'Only 7 documents can be reported for the same ID card');//同一个身份证限制只能报7单
+//            }
+//            if($otherUser){
+//                $flipParent = array_flip(array_filter($this->_tempNetworkParentUser[$this->insertUserName]));
+//                $isExsit = false;
+//                foreach ($otherUser as $conUser){
+//                    if(isset($flipParent[$conUser['USER_NAME']])){
+//                        $isExsit = true;
+//                        break;
+//                    }
+//                }
+//                if (!$isExsit) {
+////                    $this->addError($attribute, '为' . $this->insertUserName . '报单,身份证号码相同的会员'.$otherUser[0]['USER_NAME'].'不在' . $this->insertUserName . '的安置网上级中');
+//                    $this->addError($attribute, 'To' . $this->insertUserName . 'Entry,Members with the same ID number'.$otherUser[0]['USER_NAME'].'not in exist' . $this->insertUserName . 'in the placement superiors');
+//                    return ;
+//                }
+//            }
+//        } else {
+////            $this->addError($attribute, '为'.$this->insertUserName.'报单,接点人'.$this->conUserName.'不存在');
+//            $this->addError($attribute, 'To'.$this->insertUserName.'Entry,Contact person'.$this->conUserName.'not in exist');
+//        }
+//    }
 
     /**
      * 添加报单
@@ -718,7 +718,7 @@ class DeclarationForm extends Model
         $user->PAY_PASSWORD = \Yii::$app->security->generatePasswordHash($this->payPassword);
         $user->NATION = 0;
         $user->REAL_NAME = $this->realName;
-        $user->ID_CARD = $this->insertUserIdCard;
+        $user->ID_CARD = $this->mobile;
         $user->MOBILE = $this->mobile;
         $user->EMAIL = $this->email;
         $user->ADDRESS = $this->address ? $this->address : 'nothing';//无
@@ -762,7 +762,7 @@ class DeclarationForm extends Model
         $userForm->conUserName = $this->conUserName;
         $userForm->recUserName = $this->recUserName;
         $userForm->location = $this->location;
-        $userForm->idCard = $this->insertUserIdCard;
+        $userForm->idCard = $this->mobile;
         $userForm->allData = $allData;
         if(!$userForm->validate()){
             $this->addErrors($userForm->getErrors());

+ 1 - 0
common/models/forms/DeclarationLevelForm.php

@@ -51,6 +51,7 @@ class DeclarationLevelForm extends Model {
                     $decLevelModel->GL_ODD_DEEP_ONE = $value['GL_ODD_DEEP_ONE'];
                     $decLevelModel->GL_ODD_DEEP_TWO = $value['GL_ODD_DEEP_TWO'];
                     $decLevelModel->GL_ODD_DEEP_THREE = $value['GL_ODD_DEEP_THREE'];
+                    $decLevelModel->INCOME_CAP = $value['INCOME_CAP'];
                     if (!$decLevelModel->save()) {
                         throw new \Exception(Form::formatErrorsForApi($decLevelModel->getErrors()));
                     }

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

@@ -483,9 +483,17 @@ class OrderForm extends Model
                 }
             }
         }
+
+        // 汇率
+        $exchangeRate = floatval(Cache::getSystemConfig()['exchangeRate']['VALUE'] ?? 0);
+        // 运费.美元转奈拉
+        $freight = floatval(Cache::getSystemConfig()['freight']['VALUE'] ?? 0);
+        // 普通商品免运费阈值.美元转奈拉
+        $freeShipping = floatval(Cache::getSystemConfig()['freeShipping']['VALUE'] ?? 0);
+
         $this->_decAmount = $totalAmount;
         $this->_decPv = $totalPv;
-        $this->_freight = ($totalAmount>=300) ? 0 : 15;
+        $this->_freight = ($totalAmount >= $freeShipping) ? 0 : $freight;
         if($this->_address['PROVINCE']==1){
             $this->_freight = 0;
         }

+ 7 - 20
common/models/forms/RechargeForm.php

@@ -6,7 +6,6 @@ use common\components\Model;
 use common\helpers\Cache;
 use common\helpers\Date;
 use common\helpers\Form;
-use common\helpers\PayStack;
 use common\helpers\Tool;
 use common\helpers\user\Cash;
 use common\helpers\user\Info;
@@ -32,7 +31,6 @@ class RechargeForm extends Model {
 //    public $bankCounty;
 
     public $sn;
-    public $currency;
     public $amount;
     public $bankRealName;
 
@@ -44,7 +42,7 @@ class RechargeForm extends Model {
     public function rules() {
         return [
             [['userName', 'idCard', 'applyAmount', 'auditStatus', 'remark', 'selectedIds', 'sn','amount', 'bankRealName', 'bankNo'], 'trim'],
-            [['selectedIds', 'auditStatus', 'userName','applyAmount', 'currency'/*,'openBank','bankNo','bankAddress'*/], 'required'],
+            [['selectedIds', 'auditStatus', 'userName','applyAmount','openBank','bankNo'/*,'bankAddress'*/], 'required'],
             [['selectedIds'], 'exist', 'targetClass' => Recharge::class, 'targetAttribute' => 'ID', 'message' => '充值申请不存在'],
             [['userName'], 'exist', 'targetClass' => UserInfo::class, 'targetAttribute' => 'USER_NAME', 'message' => '会员不存在'],
             [['applyAmount'], 'price'],
@@ -62,7 +60,7 @@ class RechargeForm extends Model {
         $parentScenarios = parent::scenarios();
         $customScenarios = [
             'addByAdmin' => ['userName', 'applyAmount'],
-            'addByUser' => ['applyAmount','openBank','bankNo','bankAddress','currency'],
+            'addByUser' => ['applyAmount','openBank','bankNo','bankAddress'/*,'currency'*/],
             'statusByAdmin' => ['selectedIds', 'auditStatus', 'createRemark'],
         ];
         return array_merge($parentScenarios, $customScenarios);
@@ -76,10 +74,9 @@ class RechargeForm extends Model {
             'selectedIds' => '充值申请ID',
             'userName' => '会员编号',
             'applyAmount' => '申请充值的金额',
-//            'openBank' => '汇款银行',
-//            'bankNo' => '汇款账号',
+            'openBank' => '汇款银行',
+            'bankNo' => '汇款账号',
 //            'bankAddress' => '银行支行',
-            'currency' => '货币',
 //            'bankProvince' => '银行省',
 //            'bankCity' => '银行市',
 //            'bankCounty' => '银行县',
@@ -188,12 +185,6 @@ class RechargeForm extends Model {
         }
         $db = \Yii::$app->db;
         $transaction = $db->beginTransaction();
-        // 向paystack发起订单
-        $userInfo = Info::baseInfo($this->_userId);
-        $rechargeOrder = PayStack::transactionInit($this->currency, $this->applyAmount, $userInfo['EMAIL']);
-        if($rechargeOrder['status']!=1){
-            throw new Exception('api error');
-        }
         try {
             $nowTime = Date::nowTime();
             $period = Recharge::getPeriod($nowTime);
@@ -208,14 +199,10 @@ class RechargeForm extends Model {
             $rechargeModel->RECHARGE_PERIOD_NUM = $period['nowPeriodNum'];
             $rechargeModel->RECHARGE_YEAR = $period['nowYear'];
             $rechargeModel->RECHARGE_MONTH = $period['nowMonth'];
-            $rechargeModel->CURRENCY = $this->currency;
             $rechargeModel->AMOUNT = $this->applyAmount;
-            $rechargeModel->RECHARGE_REF = $rechargeOrder['data']['reference'];
-            $rechargeModel->RECHARGE_ORDER_ID = $rechargeOrder['data']['access_code'];
-            $rechargeModel->RECHARGE_STATUS = 0;
-            $rechargeModel->OPEN_BANK = 'a';
-            $rechargeModel->BANK_ADDRESS = 'b';
-            $rechargeModel->BANK_NO = 'c';
+            $rechargeModel->OPEN_BANK = $this->openBank;
+            $rechargeModel->BANK_ADDRESS = $this->bankAddress;
+            $rechargeModel->BANK_NO = $this->bankNo;
 //            $rechargeModel->BANK_PROVINCE = $this->bankProvince ?? 0;
 //            $rechargeModel->BANK_CITY = $this->bankCity ?? 0;
 //            $rechargeModel->BANK_COUNTY = $this->bankCounty ?? 0;

+ 7 - 4
frontendApi/config/menu.php

@@ -55,7 +55,7 @@ return [
         ]
     ],
     'atlas'=>[
-        'name'=>'网络图谱',
+        'name'=>'Network Atlas',
         'class' => '',
         'icon'=>'el-icon-data-line',
         'controller'=>'atlas',
@@ -63,7 +63,7 @@ return [
         'routePath'=>'atlas',
         'show'=>1,
         'child'=>[
-            ['name'=>'安置网络图', 'class'=>'', 'icon'=>'', 'controller'=>'atlas', 'action'=>'network', 'routePath'=>'atlas/network', 'show'=>1,],
+            ['name'=>'Placement network', 'class'=>'', 'icon'=>'', 'controller'=>'atlas', 'action'=>'network', 'routePath'=>'atlas/network', 'show'=>1,],
         ]
     ],
     'bonus'=>[
@@ -84,6 +84,10 @@ return [
 //            ['name'=>'报单中心货补追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-fl', 'routePath'=>'bonus/trace-fl', 'show'=>1,],
             ['name'=>'Withdrawal details', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'withdraw', 'routePath'=>'finance/withdraw', 'show'=>1,],//提现明细
             ['name'=>'申请提现', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'withdraw-add', 'routePath'=>'finance/withdraw-add', 'show'=>0,],
+            ['name'=>'Recharge details', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'recharge', 'routePath'=>'finance/recharge', 'show'=>1,],//充值明细
+            ['name'=>'Apply for recharge', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'recharge-add', 'routePath'=>'finance/recharge-add', 'show'=>1,], // 申请充值
+            ['name'=>'Transfer record list', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'transfer-list', 'routePath'=>'finance/transfer-list', 'show'=>1,'allow'=>'transferRecordSwitch'],
+            ['name'=>'Transfer list', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'transfer-add', 'routePath'=>'finance/transfer-add', 'show'=>1,'allow'=>'transferSwitch'], // 我要转账
         ]
     ],
 //    'finance'=>[
@@ -98,8 +102,7 @@ return [
 ////            ['name'=>'会员复销池余额流水', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'reconsume-pool-flow', 'routePath'=>'finance/reconsume-pool-flow', 'show'=>1,],
 ////            ['name'=>'转账记录', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'transfer-list', 'routePath'=>'finance/transfer-list', 'show'=>1,'allow'=>'transferRecordSwitch'],
 ////            ['name'=>'我要转账', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'transfer-add', 'routePath'=>'finance/transfer-add', 'show'=>1,'allow'=>'transferSwitch'],
-////            ['name'=>'Recharge details', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'recharge', 'routePath'=>'finance/recharge', 'show'=>1,],//充值明细
-////            ['name'=>'申请充值', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'recharge-add', 'routePath'=>'finance/recharge-add', 'show'=>0,],
+////
 //        ]
 //    ],
     'article'=>[

+ 2 - 0
frontendApi/modules/v1/controllers/AtlasController.php

@@ -51,6 +51,7 @@ class AtlasController extends BaseController {
         $baseInfo = Info::baseInfo($userId, $periodNum);
         $decLevelConfig = Cache::getDecLevelConfig();
         $empLevelConfig = Cache::getEmpLevelConfig();
+        $starLevelConfig = Cache::getStarCrownLevelConfig();
         return static::notice([
             [
                 'TOP_RELATION_DEEP' => $baseInfo['RELATION_DEEP'],
@@ -61,6 +62,7 @@ class AtlasController extends BaseController {
                 'PERIOD_AT' => $baseInfo['PERIOD_AT'],
                 'DEC_LV_NAME' => $decLevelConfig[$baseInfo['DEC_LV']]['LEVEL_NAME'],
                 'EMP_LV_NAME' => $empLevelConfig[$baseInfo['EMP_LV']]['LEVEL_NAME'],
+                'STAR_LV_NAME' => $starLevelConfig[$baseInfo['STAR_LV']]['LEVEL_NAME'],
                 'leaf' => false,
                 'icon' => 'el-icon-user-solid',
                 'children' => null,

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

@@ -501,7 +501,7 @@ class FinanceController extends BaseController {
             //$data['list'][$key]['BANK_PROVINCE_NAME'] = $value['BANK_PROVINCE'] ? Region::getCnName($value['BANK_PROVINCE']) : '';
             //$data['list'][$key]['BANK_CITY_NAME'] = $value['BANK_CITY'] ? Region::getCnName($value['BANK_CITY']) : '';
             //$data['list'][$key]['BANK_COUNTY_NAME'] = $value['BANK_COUNTY'] ? Region::getCnName($value['BANK_COUNTY']) : '';
-            $data['list'][$key]['STATUS_NAME'] = Recharge::RECHARGE_STATUS_NAME[$value['RECHARGE_STATUS']];
+            $data['list'][$key]['STATUS_NAME'] = Recharge::RECHARGE_STATUS_NAME[$value['AUDIT_STATUS']];
         }
         return static::notice($data);
     }

+ 91 - 21
frontendApi/modules/v1/controllers/ShopController.php

@@ -9,6 +9,7 @@
 namespace frontendApi\modules\v1\controllers;
 
 use Codeception\PHPUnit\ResultPrinter\HTML;
+use common\helpers\Cache;
 use common\helpers\Date;
 use common\helpers\Form;
 use common\helpers\LoggerTool;
@@ -25,6 +26,8 @@ use common\models\Order;
 use common\models\OrderDec;
 use common\models\OrderGoods;
 use common\models\OrderGoodsDec;
+use common\models\OrderStandard;
+use common\models\OrderStandardGoods;
 use common\models\ReceiveAddress;
 use common\models\Region;
 use common\models\ShopGoods;
@@ -32,6 +35,8 @@ use common\models\User;
 use common\models\UserBonus;
 use common\models\UserWallet;
 use Yii;
+use yii\data\Pagination;
+use yii\db\Query;
 
 
 class ShopController extends BaseController {
@@ -115,12 +120,21 @@ class ShopController extends BaseController {
             $userBalance['cash'] = $userCashResult['CASH'];
         }
 
+        // 汇率
+        $exchangeRate = floatval(Cache::getSystemConfig()['exchangeRate']['VALUE'] ?? 0);
+        // 运费.奈拉
+        $freight = floatval(Cache::getSystemConfig()['freight']['VALUE'] ?? 0);
+        // 普通商品免运费阈值.奈拉
+        $freeShipping = floatval(Cache::getSystemConfig()['freeShipping']['VALUE'] ?? 0);
+
         return static::notice(
             [
                 'payList'=>$payList,
                 'allAddress'=>$allAddress,
                 'userBalance'=>$userBalance,
                 'sellType' => ShopGoods::CATEGORY_TYPE,
+                'freight' => $freight,
+                'freeShipping' => $freeShipping,
             ]);
     }
 
@@ -273,23 +287,51 @@ class ShopController extends BaseController {
      */
     public function actionOrderList() {
         $uname = Info::getUserNameByUserId(\Yii::$app->user->id);
-        $condition = " AND (USER_ID=:USER_ID OR CREATE_USER='$uname')";
+        $condition = " (USER_ID=:USER_ID OR CREATE_USER='$uname')";
         $params[':USER_ID'] = \Yii::$app->user->id;
-        $data = Order::lists($condition, $params, [
-            'select' => 'O.*,U.REAL_NAME,OG.*,SG.CATEGORY_TYPE',
-            'orderBy' => 'O.CREATED_AT DESC',
-            'from' => Order::tableName() . ' AS O',
-            'join' => [
-                ['LEFT JOIN', User::tableName() . ' AS U', 'U.ID=O.USER_ID'],
-                ['LEFT JOIN', OrderGoods::tableName() . ' AS OG', 'OG.ORDER_SN=O.SN'],
-                ['LEFT JOIN', ShopGoods::tableName() . ' AS SG', 'SG.ID=OG.GOODS_ID'],
-            ],
-        ]);
+        $orderQuery = Order::find()
+            ->alias('O')
+            ->where($condition, $params)
+            ->select('O.*,U.REAL_NAME,SG.CATEGORY_TYPE,OG.REAL_PRICE,OG.TAX_RATE,OG.BUY_NUMS,OG.SKU_CODE,OG.GOODS_TITLE,OG.REAL_PV')
+            ->join('LEFT JOIN', User::tableName() . ' AS U', 'U.ID=O.USER_ID')
+            ->join('LEFT JOIN', OrderGoods::tableName() . ' AS OG', 'OG.ORDER_SN=O.SN')
+            ->join('LEFT JOIN', ShopGoods::tableName() . ' AS SG', 'SG.ID=OG.GOODS_ID')
+            ->orderBy('O.CREATED_AT DESC');
+
+        // 订单中间表只查询待支付和支付失败的订单
+        $params[':NOT_PAID'] = \Yii::$app->params['orderStatus']['notPaid']['value'];   // 待支付
+        $params[':FAIL_PAID'] = \Yii::$app->params['orderStatus']['failPaid']['value'];   // 支付失败
+        $orderStandardQuery = ApproachOrder::find()
+            ->alias('O')
+            ->where($condition . ' AND (O.STATUS = :NOT_PAID OR O.STATUS = :FAIL_PAID)', $params)
+            ->select('O.*,U.REAL_NAME,SG.CATEGORY_TYPE,OG.REAL_PRICE,OG.TAX_RATE,OG.BUY_NUMS,OG.SKU_CODE,OG.GOODS_TITLE,OG.REAL_PV')
+            ->join('LEFT JOIN', User::tableName() . ' AS U', 'U.ID=O.USER_ID')
+            ->join('LEFT JOIN', ApproachOrderGoods::tableName() . ' AS OG', 'OG.ORDER_SN=O.SN')
+            ->join('LEFT JOIN', ShopGoods::tableName() . ' AS SG', 'SG.ID=OG.GOODS_ID')
+            ->orderBy('O.CREATED_AT DESC');
+
+        $queryAll = $orderQuery->union($orderStandardQuery, true);
+        $query = (new Query())->from(['Q' => $queryAll])->select('Q.*')->distinct()->orderBy(['CREATED_AT' => SORT_DESC]);
+
+        $totalCount = $query->count();
+        $pagination = new Pagination(['totalCount' => $totalCount, 'pageSize' => \Yii::$app->request->get('pageSize')]);
+        $lists = $query->offset($pagination->offset)->limit($pagination->limit)->all();
+
+        $data = [
+            'list' => $lists,
+            'currentPage'=>$pagination->page,
+            'totalPages'=>$pagination->pageCount,
+            'startNum' => $pagination->page * $pagination->pageSize + 1,
+            'totalCount' => $pagination->totalCount,
+            'pageSize' => $pagination->pageSize,
+        ];
+
         foreach ($data['list'] as $key => $value) {
             $data['list'][$key]['PAY_AT'] = $value['PAY_AT'] ? Date::convert($value['PAY_AT'],'Y-m-d H:i:s') : '';
+            $data['list'][$key]['CREATED_AT'] = $value['CREATED_AT'] ? Date::convert($value['CREATED_AT'],'Y-m-d H:i:s') : '';
             $data['list'][$key]['CATEGORY_TYPE'] = intval($value['CATEGORY_TYPE']);
             $data['list'][$key]['PAY_TYPE'] = array_column(ShopGoods::SALE_TYPE, NULL, 'label')[$value['PAY_TYPE']]['name'] ?? '';
-//            $data['list'][$key]['STATUS'] = \Yii::$app->params['orderStatus'][$value['STATUS']]['label'] ?? '';
+            $data['list'][$key]['STATUS'] = \Yii::$app->params['orderStatus'][$value['STATUS']]['label'] ?? '';
             $data['list'][$key]['CATEGORY'] = array_column(ShopGoods::CATEGORY_TYPE, NULL, 'id')[$value['CATEGORY_TYPE']]['name'] ?? ShopGoods::CATEGORY_TYPE[0]['name'];
             $data['list'][$key]['FULL_ADDRESS'] = $value['ADDRESS'];//.', '.$value['CITY_NAME'].', '.$value['LGA_NAME'];
             if($value['CITY_NAME']){
@@ -309,6 +351,7 @@ class ShopController extends BaseController {
 //            }
             $data['list'][$key]['TAX_AMOUNT'] = Tool::formatPrice(($value['REAL_PRICE'] - $value['REAL_PRICE'] / (1 + $value['TAX_RATE'] / 100)) * $value['BUY_NUMS']);
         }
+
         return static::notice($data);
     }
 
@@ -415,15 +458,42 @@ class ShopController extends BaseController {
             ':SN' => $orderSn,
         ];
 
-        $data = Order::lists($condition, $params, [
-            'select' => 'O.*,U.REAL_NAME,OG.*,OG.CATEGORY_TYPE',
-            'orderBy' => 'O.CREATED_AT DESC',
-            'from' => Order::tableName() . ' AS O',
-            'join' => [
-                ['LEFT JOIN', User::tableName() . ' AS U', 'U.ID=O.USER_ID'],
-                ['LEFT JOIN', OrderGoods::tableName() . ' AS OG', 'OG.ORDER_SN=O.SN'],
-            ],
-        ]);
+        $orderQuery = Order::find()
+            ->alias('O')
+            ->where($condition, $params)
+            ->select('O.*,U.REAL_NAME,SG.CATEGORY_TYPE,OG.REAL_PRICE,OG.TAX_RATE,OG.BUY_NUMS,OG.SKU_CODE,OG.GOODS_TITLE,OG.REAL_PV')
+            ->join('LEFT JOIN', User::tableName() . ' AS U', 'U.ID=O.USER_ID')
+            ->join('LEFT JOIN', OrderGoods::tableName() . ' AS OG', 'OG.ORDER_SN=O.SN')
+            ->join('LEFT JOIN', ShopGoods::tableName() . ' AS SG', 'SG.ID=OG.GOODS_ID')
+            ->orderBy('O.CREATED_AT DESC');
+
+        // 订单中间表只查询待支付和支付失败的订单
+        $params[':NOT_PAID'] = \Yii::$app->params['orderStatus']['notPaid']['value'];   // 待支付
+        $params[':FAIL_PAID'] = \Yii::$app->params['orderStatus']['failPaid']['value'];   // 支付失败
+        $orderStandardQuery = ApproachOrder::find()
+            ->alias('O')
+            ->where($condition . ' AND (O.STATUS = :NOT_PAID OR O.STATUS = :FAIL_PAID)', $params)
+            ->select('O.*,U.REAL_NAME,SG.CATEGORY_TYPE,OG.REAL_PRICE,OG.TAX_RATE,OG.BUY_NUMS,OG.SKU_CODE,OG.GOODS_TITLE,OG.REAL_PV')
+            ->join('LEFT JOIN', User::tableName() . ' AS U', 'U.ID=O.USER_ID')
+            ->join('LEFT JOIN', ApproachOrderGoods::tableName() . ' AS OG', 'OG.ORDER_SN=O.SN')
+            ->join('LEFT JOIN', ShopGoods::tableName() . ' AS SG', 'SG.ID=OG.GOODS_ID')
+            ->orderBy('O.CREATED_AT DESC');
+
+        $queryAll = $orderQuery->union($orderStandardQuery, true);
+        $query = (new Query())->from(['Q' => $queryAll])->select('Q.*')->distinct()->orderBy(['CREATED_AT' => SORT_DESC]);
+
+        $totalCount = $query->count();
+        $pagination = new Pagination(['totalCount' => $totalCount, 'pageSize' => \Yii::$app->request->get('pageSize')]);
+        $lists = $query->offset($pagination->offset)->limit($pagination->limit)->all();
+
+        $data = [
+            'list' => $lists,
+            'currentPage'=>$pagination->page,
+            'totalPages'=>$pagination->pageCount,
+            'startNum' => $pagination->page * $pagination->pageSize + 1,
+            'totalCount' => $pagination->totalCount,
+            'pageSize' => $pagination->pageSize,
+        ];
 
         $userId = '';
         $userName = '';

+ 5 - 3
frontendApi/modules/v1/controllers/UserController.php

@@ -402,7 +402,7 @@ class UserController extends BaseController {
             return static::notice('Failed to generate member number', 400);//会员编号生成失败
         }
         //随机码保存在redis中方便进行比对
-        $msg = $redis->setex('key_'.$userName , 1800 , $userName);
+        $msg = $redis->setex('key_'.$userName , 3600 , $userName);
 
         return static::notice(['allDecPackage' => $allDecPackage,'allGoods' => $allGoods,'allOpenBank' => $allOpenBank, 'userName' => $userName]);
     }
@@ -432,10 +432,12 @@ class UserController extends BaseController {
         if($user){
             $userInfo['REAL_NAME'] = $user['REAL_NAME'];
             $allChildUser = UserNetwork::getFirstFloorChildren($userId);
-            $isLocation = [1 => '左-', 2 => '右-'];
+            $isLocation = [1 => 'Left-', 2 => 'Right-'];
             if($allChildUser) {
                 foreach ($allChildUser as $child) {
-                    $isLocation[$child['RELATIVE_LOCATION']].= '满';
+                    if ($child['RELATIVE_LOCATION']<'3'){
+                        $isLocation[$child['RELATIVE_LOCATION']].= 'Full';
+                    }
                 }
             }
             $userInfo['isLocation'] = '('.implode(',',$isLocation).')';

+ 0 - 1
frontendApi/web/.gitignore

@@ -1,3 +1,2 @@
 /index-test.php
 /test.php
-index.php

+ 22 - 22
frontendEle/src/components/FilteTransfer.vue

@@ -6,26 +6,26 @@
         format="yyyy-MM-dd"
         type="daterange"
         :editable="false"
-        range-separator=""
-        start-placeholder="开始日期"
-        end-placeholder="结束日期">
+        range-separator="to"
+        start-placeholder="Start date"
+        end-placeholder="End date"> <!-- 结束日期 -->
       </el-date-picker>
     </div>
 
     <div :class="`filter-item filter-user-name`">
-      <el-select v-model="filterModel.outWallet" placeholder="请选择转出账户">
+      <el-select v-model="filterModel.outWallet" placeholder="Select transfer out of account"> <!-- 请选择转出账户 -->
         <el-option v-for="(item,key) in walletType" :label="item.label" :value="item.type"
                    :key="key"></el-option>
       </el-select>
     </div>
     <div v-show="userNameDisplay" :class="`filter-item filter-user-name ${userNameClass}`">
-      <el-input v-model="filterModel.userName" placeholder="请输入接收会员编号"></el-input>
+      <el-input v-model="filterModel.userName" placeholder="Enter your receiving member code"></el-input> <!-- 请输入接收会员编号 -->
     </div>
     <div v-show="realNameDisplay" :class="`filter-item filter-real-name ${realNameClass}`">
-      <el-input v-model="filterModel.realName" placeholder="请输入接收会员姓名"></el-input>
+      <el-input v-model="filterModel.realName" placeholder="Enter the name of receiving member"></el-input> <!-- 请输入接收会员姓名 -->
     </div>
     <div :class="`filter-item filter-user-name`">
-      <el-select v-model="filterModel.inWallet" placeholder="请选择转入账户">
+      <el-select v-model="filterModel.inWallet" placeholder="Select transfer in account"> <!-- 请选择转入账户 -->
         <el-option v-for="(item,key) in walletType" :label="item.label" :value="item.type"
                    :key="key"></el-option>
       </el-select>
@@ -79,12 +79,12 @@ export default {
       default: '',
     },
     inWalletDefault: {
-        type: String,
-        default: '',
+      type: String,
+      default: '',
     },
     outWalletDefault: {
-        type: String,
-        default: '',
+      type: String,
+      default: '',
     },
     realNameDefault: {
       type: String,
@@ -106,14 +106,14 @@ export default {
         inWallet: '',
       },
       walletType: [
-          {
-              type:"bonus",
-              label:"奖金"
-          },
-          {
-              type:"cash",
-              label:"余额"
-          },
+        {
+          type: 'bonus',
+          label: 'Bonus'
+        },
+        {
+          type: 'cash',
+          label: 'Balance'
+        },
       ],
     }
   },
@@ -122,16 +122,16 @@ export default {
       this.filterModel.dateRange = this.dateRangePickerDefault
     },
     outWalletdefault () {
-        this.filterModel.outWallet = this.outWalletDefault
+      this.filterModel.outWallet = this.outWalletDefault
     },
     userNameDefault () {
-        this.filterModel.userName = this.userNameDefault
+      this.filterModel.userName = this.userNameDefault
     },
     realNameDefault () {
       this.filterModel.realName = this.realNameDefault
     },
     inWalletDefault () {
-        this.filterModel.inWallet = this.inWalletDefault
+      this.filterModel.inWallet = this.inWalletDefault
     },
   },
   methods: {

+ 4 - 4
frontendEle/src/components/Filter.vue

@@ -6,9 +6,9 @@
         format="yyyy-MM-dd"
         type="daterange"
         :editable="false"
-        range-separator=""
-        start-placeholder="开始日期"
-        end-placeholder="结束日期">
+        range-separator="to"
+        start-placeholder="Start date"
+        end-placeholder="End date">
       </el-date-picker>
     </div>
     <div v-show="dateMonthPickerDisplay" :class="`filter-item filter-date-month-picker ${dateMonthPickerClass}`">
@@ -188,4 +188,4 @@ export default {
       display: none;
     }
   }
-</style>
+</style>

+ 28 - 29
frontendEle/src/router/index.js

@@ -256,10 +256,10 @@ export const constantRouterMap = [
                 component: _import('atlas/network'),
                 name: 'atlas_network',
                 meta: {
-                    title: '安置网络',
+                    title: 'Placement network',
                     breadcrumb: [
                         {title: 'Dashboard', path: '/dashboard/index'},
-                        {title: '网络图谱', path: '/atlas/network'},
+                        {title: 'Network Atlas', path: '/atlas/network'},
                     ],
                 },
             },
@@ -455,7 +455,7 @@ export const constantRouterMap = [
         component: _import('finance/transfer-list'),
         name: 'finance_transfer-list',
         meta: {
-          title: '转账记录',
+          title: 'Tranfer record',
           breadcrumb: [
             {title: 'Dashboard', path: '/dashboard/index'},
             {title: 'Financial management', path: '/finance/index'},
@@ -467,41 +467,40 @@ export const constantRouterMap = [
         component: _import('finance/transfer-add'),
         name: 'finance_transfer-add',
         meta: {
-          title: '我要转账',
+          title: 'Transfer list',
           highLight: '/finance/transfer-list',
           breadcrumb: [
             {title: 'Dashboard', path: '/dashboard/index'},
             {title: 'Financial management', path: '/finance/index'},
-            {title: '转账记录', path: '/finance/transfer-list'},
           ],
         },
       },
-        {
-            path: '/finance/recharge',
-            component: _import('finance/recharge'),
-            name: 'finance_recharge',
-            meta: {
-                title: 'Recharge details',//充值明细
-                breadcrumb: [
-                    {title: 'Dashboard', path: '/dashboard/index'},//首页
-                    {title: 'financial management', path: '/finance/index'},//财务管理
-                ],
-            },
+      {
+        path: '/finance/recharge',
+        component: _import('finance/recharge'),
+        name: 'finance_recharge',
+        meta: {
+          title: 'Recharge details', // 充值明细
+          breadcrumb: [
+            {title: 'Dashboard', path: '/dashboard/index'}, // 首页
+            {title: 'financial management', path: '/finance/index'}, // 财务管理
+          ],
         },
-        {
-            path: '/finance/recharge-add',
-            component: _import('finance/recharge-add'),
-            name: 'finance_recharge-add',
-            meta: {
-                title: 'Recharge',//我要充值
-                highLight: '/finance/recharge',
-                breadcrumb: [
-                    {title: 'Dashboard', path: '/dashboard/index'},//首页
-                    {title: 'financial management', path: '/finance/index'},//财务管理
-                    {title: 'Withdrawal details', path: '/finance/withdraw'},
-                ],
-            },
+      },
+      {
+        path: '/finance/recharge-add',
+        component: _import('finance/recharge-add'),
+        name: 'finance_recharge-add',
+        meta: {
+          title: 'Recharge', // 我要充值
+          highLight: '/finance/recharge',
+          breadcrumb: [
+            {title: 'Dashboard', path: '/dashboard/index'}, // 首页
+            {title: 'financial management', path: '/finance/index'}, // 财务管理
+            {title: 'Recharge details', path: '/finance/recharge'},
+          ],
         },
+      },
     ]
   },
   {

+ 11 - 4
frontendEle/src/views/atlas/network.vue

@@ -3,15 +3,15 @@
     <div class="white-box">
         <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>
             </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)">
@@ -20,7 +20,14 @@
                     <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}}</el-tag>
+                      <el-tag type="warning">Star: {{data.STAR_LV_NAME}}</el-tag>
+                      <el-tag>Number of joining periods: {{data.PERIOD_AT}}</el-tag></span>
                 </span>
         </el-tree>
     </div>

+ 88 - 79
frontendEle/src/views/finance/recharge-add.vue

@@ -1,89 +1,98 @@
 <template>
-  <div v-loading="loading">
-    <div class="white-box">
-      <el-form ref="form"  label-width="250px" class="form-page">
-        <el-form-item label="Currency">
-          <el-select v-model="form.currency" placeholder="Select">
-            <el-option
-              v-for="item in currencyList"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value">
-            </el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="Recharge amount">
-            <el-input v-model="form.applyAmount"></el-input>
-        </el-form-item>
-        <el-form-item>
-            <el-button type="primary" @click="onSubmits" :loading="submitButtonStat">SAVE</el-button>
-        </el-form-item>
-      </el-form>
+    <div v-loading="loading">
+        <div class="white-box">
+            <el-form ref="form"  label-width="250px" class="form-page">
+                <el-form-item label="Recharge Amount">
+                    <el-input v-model="form.applyAmount"></el-input>
+                </el-form-item>
+                <el-form-item label="Bank account">
+                    <el-input v-model="form.bankNo"></el-input>
+                </el-form-item>
+                <el-form-item label="Remitting bank">
+                    <el-select v-model="form.openBank" placeholder="Select Bank">
+                        <el-option v-for="(item,index) in allOpenBank" :key="index" :label="item.BANK_NAME"
+                                   :value="item.BANK_CODE"></el-option>
+                    </el-select>
+                </el-form-item>
+
+<!--                <el-form-item label="开户支行">-->
+<!--                    <el-input v-model="form.bankAddress"></el-input>-->
+<!--                </el-form-item>-->
+
+                <el-form-item>
+                    <el-button type="primary" @click="onSubmits" :loading="submitButtonStat">Save</el-button>
+                </el-form-item>
+            </el-form>
+        </div>
     </div>
-  </div>
 </template>
 
 <script>
-import Vue from 'vue'
-import network from '@/utils/network'
-import baseInfo from '@/utils/baseInfo'
-import store from '@/utils/vuexStore'
-export default {
-  name: "recharge-add",
-  mounted() {
-    this.getData()
-  },
-  data(){
-    return{
-      currencyList: {
-        'NGN': {
-          'value': 'NGN',
-          'label': 'Nigeria naira (NGN)'
+    import Vue from 'vue'
+    import network from '@/utils/network'
+    import baseInfo from '@/utils/baseInfo'
+    import store from '@/utils/vuexStore'
+    export default {
+        name: "recharge-add",
+        mounted() {
+            this.getData()
+        },
+        data(){
+            return{
+
+                form:{
+                    applyAmount:'',
+                    bankNo:'',
+                    bankAddress:'',
+                    openBank:'',
+
+
+                },
+                loading: false,
+                allOpenBank: null,
+                submitButtonStat: false
+            }
+        },
+        methods: {
+            getData () {
+
+                network.getData(`/finance/recharge-add`).then(response => {
+                    console.log(response)
+                    this.loading = false;
+                    this.allOpenBank = response.allOpenBank;
+
+                }).catch(() => {
+                });
+
+            },
+            onSubmits() {
+                this.submitButtonStat = true
+                let path = '/finance/recharge-add'
+                let postData = {
+                    openBank: this.form.openBank,
+                    bankAddress: this.form.bankAddress,
+                    bankNo: this.form.bankNo,
+                    applyAmount: this.form.applyAmount,
+
+
+                };
+
+                return network.postData(path, postData).then(response => {
+                    console.log(response);
+                    this.$message({
+                        message: response,
+                        type: 'success'
+                    })
+                    this.submitButtonStat = false
+                    this.$router.go(-1)
+                }).catch(() => {
+                    this.submitButtonStat = false
+                })
+            },
         }
-      },
-      form:{
-        currency: 'NGN',
-        applyAmount: '',
-        // bankNo: '',
-        // bankAddress: '',
-        // openBank: '',
-      },
-      loading: false,
-      allOpenBank: null,
-      submitButtonStat: false
+
+
     }
-  },
-  methods: {
-    getData () {
-      network.getData(`/finance/recharge-add`).then(response => {
-        console.log(response)
-        this.loading = false;
-        this.allOpenBank = response.allOpenBank;
-      }).catch(() => {
-      });
-    },
-    onSubmits() {
-      this.submitButtonStat = true
-      let path = '/finance/recharge-add'
-      let postData = {
-        currency: this.form.currency,
-        applyAmount: this.form.applyAmount,
-      };
-      return network.postData(path, postData).then(response => {
-        // console.log(postData)
-        // console.log(response);
-        this.$message({
-          message: response,
-          type: 'success'
-        })
-        this.submitButtonStat = false
-        this.$router.go(-1)
-      }).catch(() => {
-        this.submitButtonStat = false
-      })
-    },
-  }
-}
 </script>
 
 <style scoped>

+ 27 - 50
frontendEle/src/views/finance/recharge.vue

@@ -3,71 +3,48 @@
         <div v-loading="loading">
             <div class="white-box">
                 <el-table class="withdraw-table" :data="tableData" stripe style="width: 100%;">
-                    <el-table-column label="Serial Number" prop="SN" width="200px">
-                    </el-table-column>
-                    <el-table-column label="Creation time"><!-- 创建时间 -->
+
+                    <el-table-column label="Created Time">
                         <template slot-scope="scope">
                             {{tool.formatDate(scope.row.CREATED_AT)}}
                         </template>
                     </el-table-column>
-<!--                    <el-table-column label="RECHARGE ORDER ID" prop="RECHARGE_ORDER_ID" width="200px">&lt;!&ndash;PS订单ID&ndash;&gt;-->
-<!--                    </el-table-column>-->
-                    <el-table-column label="Currency" prop="CURRENCY" width="100px"><!--货币名称-->
-                    </el-table-column>
-                    <el-table-column label="Amount" prop="AMOUNT" width="150px">
-                    </el-table-column>
 
-                    <el-table-column label="Recharge status name" width="200px"><!-- 充值状态名称 -->
-                      <template slot-scope="scope">
-                        <el-tag :type="tool.statusType(scope.row.RECHARGE_STATUS)">{{scope.row.STATUS_NAME}}</el-tag>
-                      </template>
+                    <el-table-column label="Recharge Amount" prop="AMOUNT">
+
                     </el-table-column>
 
-                    <el-table-column label="Acitons">
-                      <template slot-scope="scope">
-                        <template v-if="scope.row.RECHARGE_STATUS==0">
-                          <el-button type="primary" plain>To pay<!-- 去支付 --></el-button>
-                          <el-button type="info" plain disabled>verification<!-- 验证 --></el-button>
-                        </template>
-                        <template v-else-if="scope.row.RECHARGE_STATUS==1">
-                          <el-button type="info" plain disabled>Paid<!-- 已支付 --></el-button>
-                          <el-button type="primary" plain>verification<!-- 验证 --></el-button>
-                        </template>
-                        <template v-else-if="scope.row.RECHARGE_STATUS==2">
-                          <el-button type="info" plain disabled>Paid<!-- 已支付 --></el-button>
-                          <el-button type="info" plain disabled>Verified<!-- 已验证 --></el-button>
-                        </template>
-                        <template v-else>
-                          <el-button type="danger" plain disabled>Payment failed<!-- 支付失败 --></el-button>
-                          <el-button type="danger" plain disabled>verification<!-- 验证 --></el-button>
+                    <el-table-column label="Recharge Status">
+                        <template slot-scope="scope">
+                        <el-tag :type="tool.statusType(scope.row.AUDIT_STATUS)">{{scope.row.STATUS_NAME}}</el-tag>
                         </template>
-                      </template>
                     </el-table-column>
-<!--                    <el-table-column label="Remitting bank" prop="OPEN_BANK_NAME">&lt;!&ndash; 汇款银行 &ndash;&gt;-->
+                    <el-table-column label="Remitting bank" prop="OPEN_BANK_NAME">
 
-<!--                    </el-table-column>-->
+                    </el-table-column>
 
-<!--                    <el-table-column label="My remittance account number" prop="BANK_NO">&lt;!&ndash; 我的汇款账号 &ndash;&gt;-->
+                    <el-table-column label="Bank account" prop="BANK_NO">
 
-<!--                    </el-table-column>-->
+                    </el-table-column>
 
-<!--                      <el-table-column label="Print voucher" width="200">&lt;!&ndash; 打印凭证 &ndash;&gt;-->
-<!--                            <template slot-scope="scope">-->
-<!--                                <el-button type="primary" size="small" @click="handleAddInvoiceShow(scope.row)"-->
-<!--                                           v-if="scope.row.AUDIT_STATUS==='0'" icon="el-icon-upload">Upload voucher&lt;!&ndash; 上传凭证 &ndash;&gt;-->
-<!--                                </el-button>-->
+                    <el-table-column label="Print voucher" width="200">
+                        <template slot-scope="scope">
+                            <el-button type="primary" size="small" @click="handleAddInvoiceShow(scope.row)"
+                                       v-if="scope.row.AUDIT_STATUS==='0'" icon="el-icon-upload">Upload voucher
+                            </el-button>
+
+                            <el-button type="success" size="small" @click="handleInvoiceShow(scope.row)"
+                                       v-if="scope.row.AUDIT_STATUS!=='0'" icon="el-icon-view">View voucher
+                            </el-button>
+                        </template>
+                    </el-table-column>
 
-<!--                                <el-button type="success" size="small" @click="handleInvoiceShow(scope.row)"-->
-<!--                                           v-if="scope.row.AUDIT_STATUS!=='0'" icon="el-icon-view">View voucher&lt;!&ndash; 查看凭证 &ndash;&gt;-->
-<!--                                </el-button>-->
-<!--                            </template>-->
-<!--                        </el-table-column>-->
                 </el-table>
                 <div class="white-box-footer">
-                    <el-button type="primary" size="small" @click="handleAdd">Recharge<!-- 我要充值 --></el-button>
+                    <el-button type="primary" size="small" @click="handleAdd">我要充值</el-button>
                     <pagination :total="totalCount" :page_size="pageSize" @size-change="handleSizeChange" @current-change="handleCurrentChange"></pagination>
                 </div>
-                <el-dialog title="Upload voucher" :visible.sync="dialogAddInvoiceVisible"><!-- 上传凭证 -->
+                <el-dialog title="上传凭证" :visible.sync="dialogAddInvoiceVisible">
                     <div v-loading="dialogAddInvoiceLoading">
                         <el-alert type="warning" :closable="false">
                             <slot name="title">
@@ -80,12 +57,12 @@
                     </div>
                 </el-dialog>
 
-                <el-dialog title="View recharge voucher" :visible.sync="dialogInvoiceVisible"><!-- 查看充值凭证 -->
+                <el-dialog title="查看充值凭证" :visible.sync="dialogInvoiceVisible">
                     <div v-loading="dialogInvoiceLoading">
                         <a :href="invoiceUrl" target="_blank"><img :src="urlimg" alt="" style="max-width: 100%"></a>
                     </div>
                     <div slot="footer" class="dialog-footer">
-                        <el-button @click="dialogInvoiceVisible = false">Confirm</el-button><!-- 确定 -->
+                        <el-button @click="dialogInvoiceVisible = false">确 定</el-button>
                     </div>
                 </el-dialog>
             </div>
@@ -210,7 +187,7 @@
             handleSuccess(response, file) {
                 this.getData()
                 this.$message({
-                    message: 'Upload voucher completed!',//上传凭证完成
+                    message: '上传凭证完成!',
                     type: 'success'
                 })
                 //this.form.image = imageUrl;

+ 23 - 23
frontendEle/src/views/finance/transfer-add.vue

@@ -2,47 +2,47 @@
   <div v-loading="loading">
     <div class="white-box">
       <el-form ref="form" :model="form" label-width="250px" class="form-page">
-        <el-form-item label="转账类型">
-          <el-select v-model="form.type" placeholder="请选择转账类型" @change="handleTypeChange">
-            <el-option v-for="(item,key) in transferConfig" :label="item.outName+''+item.inName" :value="item.typeId" :key="key"></el-option>
+        <el-form-item label="Transfer type"> <!-- 转账类型 -->
+          <el-select v-model="form.type" placeholder="请选择转账类型" @change="handleTypeChange">  <!-- 请选择转账类型 -->
+            <el-option v-for="(item,key) in transferConfig" :label="item.outName+' To '+item.inName" :value="item.typeId" :key="key"></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="当前可用奖金">
-          <el-tag type="success">{{balance}}元</el-tag>
+        <el-form-item label="Current available bonus"> <!-- 当前可用奖金 -->
+          <el-tag type="success">{{balance}} NGN</el-tag> <!-- 元 -->
         </el-form-item>
-        <el-form-item label="当前可用余额">
-          <el-tag type="success">{{cash}}元</el-tag>
+        <el-form-item label="Current available balance"> <!-- 当前可用余额 -->
+          <el-tag type="success">{{cash}} NGN</el-tag> <!-- 元 -->
         </el-form-item>
-        <el-form-item label="当前转账比例" v-if="false">
+        <el-form-item label="当前转账比例" v-if="false"> <!-- 当前转账比例 -->
           <el-tag type="info">{{transferProp}}%</el-tag>
         </el-form-item>
-        <el-form-item label="最大转账金额" v-if="false">
-          <el-tag type="info">{{maxAmount}}元</el-tag>
+        <el-form-item label="最大转账金额" v-if="false"> <!-- 最大转账金额 -->
+          <el-tag type="info">{{maxAmount}} NGN</el-tag> <!-- 元 -->
         </el-form-item>
-        <el-form-item label="转入会员编号">
+        <el-form-item label="Member code"> <!-- 转入会员编号 -->
           <el-input v-model="form.toUserName" @change="handleChange"></el-input>
         </el-form-item>
-        <el-form-item label="会员姓名" v-show="form.toRealName!==null">
+        <el-form-item label="Member name" v-show="form.toRealName!==null"> <!-- 会员姓名 -->
           <el-input v-model="form.toRealName" :disabled="true"></el-input>
         </el-form-item>
         <!--<el-form-item label="转入会员姓名">-->
           <!--<el-input v-model="form.toRealName"></el-input>-->
         <!--</el-form-item>-->
-        <el-form-item label="转账金额" style="margin-bottom: 0;">
+        <el-form-item label="Transfer amount" style="margin-bottom: 0;"> <!-- 转账金额 -->
           <el-input v-model="form.amount" type="number" :max="maxAmount" @change="chkReal"></el-input>
-          <span style="font-size: 8pt;color: #909399;">每次转账不得少于100</span>
+          <span style="font-size: 8pt;color: #909399;">Each transfer shall not be less than 5000 NGN</span> <!-- 每次转账不得少于100 -->
         </el-form-item>
-        <el-form-item label="手续费" v-show="fee!=='0'">
+        <el-form-item label="手续费" v-show="fee!=='0'"> <!-- 手续费 -->
           <el-tag type="info">{{fee}}%</el-tag>
         </el-form-item>
-        <el-form-item label="实际到账金额" v-show="fee!=='0'">
-          <el-tag type="warning">{{realAmount}}元</el-tag>
+        <el-form-item label="实际到账金额" v-show="fee!=='0'"> <!-- 实际到账金额 -->
+          <el-tag type="warning">{{realAmount}}元</el-tag> <!-- 元 -->
         </el-form-item>
-        <el-form-item label="备注">
+        <el-form-item label="Note"> <!-- 备注 -->
           <el-input v-model="form.remark"></el-input>
         </el-form-item>
         <el-form-item>
-          <el-button type="primary" @click="onSubmit" :loading="submitButtonStat">提交</el-button>
+          <el-button type="primary" @click="onSubmit" :loading="submitButtonStat">Submit</el-button>
         </el-form-item>
       </el-form>
     </div>
@@ -102,14 +102,14 @@ export default {
     chkReal(){
       this.realAmount = tool.formatPrice(this.form.amount * (100-this.fee) * 0.01)
     },
-    getWalletName(out,inw){
-      return this.allWallet[out]+'转'+this.allWallet[inw]
+    getWalletName(out,inw) {
+      return this.allWallet[out] +' To ' + this.allWallet[inw]
     },
     handleTypeChange(){
-      //奖金转现金
+      // 奖金转现金
       this.fee = this.transferConfig[this.form.type-1].fee
     },
-    chkTransferUserinfo(){
+    chkTransferUserinfo() {
       network.getData(`finance/chk-transfer-user`).then(response => {
         this.loading = false
         this.userInfo = response.userInfo

+ 10 - 10
frontendEle/src/views/finance/transfer-list.vue

@@ -3,31 +3,31 @@
     <div class="white-box">
       <filter-transfer :filter="handleFilter" :dateRangePickerDisplay="true"></filter-transfer>
       <el-table :data="tableData" stripe style="width: 100%;">
-        <el-table-column label="转出账户" prop="OUT_WALLET_NAME"></el-table-column>
-        <el-table-column label="接收会员编号" prop="LAST_IN_USER_NAME"></el-table-column>
-        <el-table-column label="接收会员姓名" prop="LAST_IN_REAL_NAME"></el-table-column>
-        <el-table-column label="转入账户" prop="IN_WALLET_NAME"></el-table-column>
-        <el-table-column label="转账金额" prop="ORI_AMOUNT">
+        <el-table-column label="Transfer accounts" prop="OUT_WALLET_NAME"></el-table-column> <!-- 转出账户 -->
+        <el-table-column label="Receiving Member Code" prop="LAST_IN_USER_NAME"></el-table-column> <!-- 接收会员编号 -->
+        <el-table-column label="Receiving Member Name" prop="LAST_IN_REAL_NAME"></el-table-column> <!-- 接收会员姓名 -->
+        <el-table-column label="Transfer into account" prop="IN_WALLET_NAME"></el-table-column> <!-- 转入账户 -->
+        <el-table-column label="Transfer amount" prop="ORI_AMOUNT"> <!-- 转账金额 -->
           <template slot-scope="scope">
             {{tool.formatPrice(scope.row.ORI_AMOUNT)}}<br>
           </template>
         </el-table-column>
-        <el-table-column label="手续费" prop="FEE" v-if="showFee">
+        <el-table-column label="手续费" prop="FEE" v-if="showFee"> <!-- 手续费 -->
           <template slot-scope="scope">
             {{tool.formatPrice(scope.row.FEE)}}<br>
           </template>
         </el-table-column>
-        <el-table-column label="实际入账金额" prop="AMOUNT" v-if="showFee">
+        <el-table-column label="实际入账金额" prop="AMOUNT" v-if="showFee"> <!-- 实际入账金额 -->
           <template slot-scope="scope">
             {{tool.formatPrice(scope.row.AMOUNT)}}<br>
           </template>
         </el-table-column>
-        <el-table-column label="转账时间">
+        <el-table-column label="Transfer time"> <!-- 转账时间 -->
           <template slot-scope="scope">
             {{tool.formatDate(scope.row.CREATED_AT)}}<br>
           </template>
         </el-table-column>
-        <el-table-column label="备注" prop="REMARK"></el-table-column>
+        <el-table-column label="Note" prop="REMARK"></el-table-column> <!-- 备注 -->
       </el-table>
       <div class="white-box-footer">
         <!--<el-button type="primary" size="small" @click="handleAdd">我要转账</el-button>-->
@@ -91,4 +91,4 @@
 
 <style scoped>
 
-</style>
+</style>

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

@@ -26,8 +26,9 @@
                 <el-table-column width="120" label="Phone number" prop="MOBILE"></el-table-column><!--收货电话-->
                 <el-table-column width="150" label="Shipping Address" prop="FULL_ADDRESS"></el-table-column><!--收货地址-->
                 <el-table-column label="Payment" prop="PAY_TYPE"></el-table-column>
-                <el-table-column width="120" label="Created time" prop="PAY_AT"></el-table-column><!--支付时间-->
-<!--                <el-table-column label="订单状态" prop="STATUS"></el-table-column>-->
+                <el-table-column width="120" label="Created time" prop="CREATED_AT"></el-table-column>
+                <el-table-column width="120" label="Pay time" prop="PAY_AT"></el-table-column>
+                <el-table-column width="120"  label="Pay Status" prop="STATUS"></el-table-column>
                 <el-table-column width="120" label="Action"><!--操作-->
                   <template slot-scope="scope">
                       <el-button type="primary" size="small" @click.native="handleOrderExportPDF(scope.row.SN)">Export PDF</el-button><!--导出 PDF-->
@@ -112,7 +113,8 @@
               orderList[index].MOBILE === orderList[index - 1].MOBILE &&
               orderList[index].PAY_AT === orderList[index - 1].PAY_AT &&
               orderList[index].STATUS === orderList[index - 1].STATUS &&
-              orderList[index].PAY_TYPE === orderList[index - 1].PAY_TYPE
+              orderList[index].PAY_TYPE === orderList[index - 1].PAY_TYPE &&
+              orderList[index].CREATED_AT === orderList[index - 1].CREATED_AT
             ) {
               // 查找到符合条件的数据时每次要把之前存储的数据+1
               this.spanArr[this.pos] += 1;

+ 47 - 29
frontendEle/src/views/shop/order.vue

@@ -86,11 +86,19 @@
                   <div class="sum">
                     <div class="sum_box" v-if="category_type === 1">
                         <div>Freight</div><!-- 运费 -->
-                        <div><span v-if="category_type === 1">{{ prefixSign }}</span> {{ payType === "cash" ? freight : pointFreight }} <span v-if="category_type === 1">{{ unit }}</span></div>
+                        <div>
+                            <span v-if="category_type === 1">{{ prefixSign }}</span>
+                              {{ pointFreight }}
+                            <span v-if="category_type === 1">{{ unit }}</span>
+                        </div>
                     </div>
                     <div class="sum_box">
                         <div>Amount paid</div><!-- 实付金额 -->
-                        <div><span v-if="category_type === 1">{{ prefixSign }}</span> {{ payType === "cash" ? cashSum : pointsSum }} <span v-if="category_type === 1">{{ unit }}</span></div>
+                        <div>
+                            <span v-if="category_type === 1">{{ prefixSign }}</span>
+                              {{ payType === "cash" ? cashSum : pointsSum }}
+                            <span v-if="category_type === 1">{{ unit }}</span>
+                        </div>
                     </div>
                   </div>
               </div>
@@ -176,7 +184,7 @@
         </el-dialog>
 
         <el-dialog title="Tips" :visible.sync="payDialog" :show-close="false" width="350px" :close="handleOrderList">
-          <el-result icon="success" title="Successful">
+          <el-result icon="success" title="Complete">
             <template slot="extra">
               <span style="color: #008efa; font-size: 30px;">{{ countdown }}</span>
             </template>
@@ -208,6 +216,7 @@
                 cashSum:'',
                 freight:'',
                 pointFreight:'',
+                freeShipping: '',
                 goodsId:'',
                 goodsNum:'',
                 payPassword:'',
@@ -244,10 +253,10 @@
         components: {
             paystack
         },
-        created(){
+        async created(){
             let option= sessionStorage.getItem('order_goods');
             this.category_type = parseInt(sessionStorage.getItem('category_type'))
-            this.getShowCart();
+            await this.getShowCart();
             if(option){
                 let pageGoodsList=JSON.parse(option);
                 // console.log(pageGoodsList);
@@ -272,7 +281,7 @@
                     })
                 }
 
-                this.getSumMoney();
+                await this.getSumMoney();
             }
         },
         computed: {
@@ -289,10 +298,13 @@
             cancelOrder(){
               history.go(-1)
             },
-            setFreight(){
-              if(this.addressId=='100000000000000000'){//如果地址为自提,则运费为0
-                this.pointFreight = this.freight = 0;
-              }
+            setFreight() {
+                //如果地址为自提,则运费为0
+                if (this.addressId == '100000000000000000') {
+                    this.pointFreight = Number(0)
+                } else {
+                    this.pointFreight = Number(this.freight)
+                }
             },
             getSummaries(param) {
               const { columns, data } = param;
@@ -420,12 +432,13 @@
 
                 // 只有普通商品有运费
                 if (this.category_type === 1) {
-                    if(payAmount>=300){
-                        this.pointFreight = this.freight = 0;
-                    }else{
-                        this.pointFreight = this.freight = 15;
-                    }
+                    // 商品自提,免运费
                     this.setFreight();
+                    // 商品总价大于预定值,免运费
+                    this.pointFreight = (this.pointFreight > 0) ? ((payAmount >= this.freeShipping) ? 0 : this.freight) : 0
+                } else {
+                    // 非普通商品,没有运费
+                    this.pointFreight = 0
                 }
                 // if(payPointAmount>=300){
                 //     this.pointFreight = 0;
@@ -435,32 +448,35 @@
                 //console.log('points_plus_sum',points_plus_sum);
                 //console.log('cash_plus_sum',cash_plus_sum);
                 // this.pointsSum=tool.formatPrice(tool.sum(points_plus_sum) + this.pointFreight);
-              this.pointsSum = this.cashSum = this.form.amount = tool.formatPrice(tool.sum(cash_plus_sum) + this.freight) ;
+              this.pointsSum = this.cashSum = this.form.amount = tool.formatPrice(tool.sum(cash_plus_sum) + this.pointFreight) ;
             },
-            getShowCart(){
-                network.getData('shop/show-cart', { categoryType: this.categoryType })
-                .then(response => {
+            async getShowCart() {
+                await network.getData('shop/show-cart', {categoryType: this.categoryType}).then(response => {
                     this.loading = false
                     // 收货地址
                     this.all_address = response.allAddress;
-                    this.all_address.map((item,index)=>{
-                        if(item.IS_DEFAULT==1){
-                            this.addressId = item.ID
-                        }
+                    this.all_address.map((item, index) => {
+                      if (item.IS_DEFAULT == 1) {
+                        this.addressId = item.ID
+                      }
                     })
                     // 账户
                     this.balance = response.userBalance
 
                     // 支付方式
                     for (let item of response.sellType) {
-                        if (item.id === this.category_type) {
-                            this.payList = item.sell_type
-                            break
-                        }
+                      if (item.id === this.category_type) {
+                        this.payList = item.sell_type
+                        break
+                      }
                     }
 
                     // 支付方式的第一项默认选中
                     this.payType = Object.values(this.payList)[0]['label']
+                    // 免运费阈值
+                    this.freeShipping = response.freeShipping
+                    // 运费
+                    this.freight = response.freight
                 })
             },
             // 切换支付方式
@@ -468,7 +484,9 @@
                 this.payType = type
             },
             choseAddress(addressId){
-              this.getSumMoney()
+                this.addressId = addressId
+                this.setFreight()
+                this.getSumMoney()
             },
             // 关闭支付回调
             handleClose() {
@@ -525,7 +543,7 @@
                     }
                 }, 1000)
             },
-        }
+        },
     }
 </script>
 

+ 1 - 1
frontendEle/src/views/shop/reconsume-order.vue

@@ -79,7 +79,7 @@
                     <el-form-item prop="areaSelected">
                         <template slot="label">
                             <span class="text-danger">*</span>
-                            District<!--地区-->
+                            State<!--地区-->
                         </template>
                         <el-cascader
                                 size="large"

+ 7 - 7
frontendEle/src/views/user/dec.vue

@@ -165,13 +165,13 @@
                   </template>
                   <el-input v-model="form.email"></el-input>
                 </el-form-item>
-                <el-form-item>
-                    <template slot="label">
+<!--                <el-form-item>-->
+<!--                    <template slot="label">-->
 
-                        Identity No.<!-- 身份证号 -->
-                    </template>
-                    <el-input v-model="form.insertUserIdCard" maxlength="18"></el-input>
-                </el-form-item>
+<!--                        Identity No.&lt;!&ndash; 身份证号 &ndash;&gt;-->
+<!--                    </template>-->
+<!--                    <el-input v-model="form.insertUserIdCard" maxlength="18"></el-input>-->
+<!--                </el-form-item>-->
 
                 <el-form-item>
                     <template slot="label">
@@ -209,7 +209,7 @@
                 </el-form-item>
                 <el-form-item prop="areaSelected">
                     <template slot="label">
-                        District<!-- 地区 -->
+                        State<!-- 地区 -->
                     </template>
                     <el-cascader
                             :disabled="areaDisabled"

+ 2 - 0
sql/upgrade/1736.sql

@@ -0,0 +1,2 @@
+-- 修改兑换兑换积分、旅游积分配置
+UPDATE AR_DEAL_TYPE SET IS_ENABLE = 0 WHERE ID IN ('316868755701501952', '316872011148300288', '364305038266470400', '365343018452127744');

+ 7 - 0
sql/upgrade/1741.sql

@@ -0,0 +1,7 @@
+-- 增加运费配置
+INSERT INTO `AR_CONFIG` (`CONFIG_NAME`, `TITLE`, `UNIT`, `INPUT_TYPE`, `OPTIONS`, `VALUE`, `TYPE`, `SORT`, `CREATED_AT`, `UPDATED_AT`) VALUES ('freight', '商品运费', '₦', 1, NULL, '1500', 'other', 49, 1521085263, 1637890704);
+
+-- 增加商品免运费阈值配置
+INSERT INTO `AR_CONFIG` (`CONFIG_NAME`, `TITLE`, `UNIT`, `INPUT_TYPE`, `OPTIONS`, `VALUE`, `TYPE`, `SORT`, `CREATED_AT`, `UPDATED_AT`) VALUES ('freeShipping', '商品免运费阈值', '₦', 1, NULL, '150000', 'other', 49, 1521085263, 1637890704);
+
+