Parcourir la source

Merge branch 'master' of http://18.167.157.193:1026/guanli/ngds into feature/1540-theo-auto-mesure-up

theo il y a 3 ans
Parent
commit
708e0297fc
91 fichiers modifiés avec 2371 ajouts et 1215 suppressions
  1. 3 2
      backendApi/config/menu.php
  2. 1 1
      backendApi/config/params.php
  3. 6 6
      backendApi/modules/v1/controllers/BonusController.php
  4. 2 2
      backendApi/modules/v1/controllers/ShopController.php
  5. 1 1
      backendApi/modules/v1/controllers/UserController.php
  6. 1 1
      backendApi/modules/v1/models/lists/atlas/NetworkList.php
  7. 1 1
      backendApi/modules/v1/models/lists/atlas/RelationList.php
  8. 6 6
      backendApi/modules/v1/models/lists/bonus/BalanceList.php
  9. 14 14
      backendApi/modules/v1/models/lists/bonus/FlowBonusList.php
  10. 2 2
      backendApi/modules/v1/models/lists/bonus/PerfMonthList.php
  11. 17 17
      backendApi/modules/v1/models/lists/bonus/PerfOrderList.php
  12. 18 18
      backendApi/modules/v1/models/lists/bonus/PeriodBonusList.php
  13. 2 2
      backendApi/modules/v1/models/lists/bonus/ScoreMonthList.php
  14. 2 2
      backendApi/modules/v1/models/lists/bonus/UserPerfList.php
  15. 2 2
      backendApi/modules/v1/models/lists/finance/BalanceAuditList.php
  16. 5 5
      backendApi/modules/v1/models/lists/finance/HistoryBonusList.php
  17. 8 8
      backendApi/modules/v1/models/lists/finance/RechargeList.php
  18. 2 2
      backendApi/modules/v1/models/lists/finance/WithdrawList.php
  19. 8 8
      backendApi/modules/v1/models/lists/log/UserHandleList.php
  20. 9 9
      backendApi/modules/v1/models/lists/log/UserLoginList.php
  21. 6 6
      backendApi/modules/v1/models/lists/shop/DecOrderList.php
  22. 11 11
      backendApi/modules/v1/models/lists/shop/GoodsList.php
  23. 4 4
      backendApi/modules/v1/models/lists/shop/OrderDecList.php
  24. 11 11
      backendApi/modules/v1/models/lists/shop/OrderList.php
  25. 4 4
      backendApi/modules/v1/models/lists/shop/OrderShopList.php
  26. 5 5
      backendApi/modules/v1/models/lists/shop/OrderStandardList.php
  27. 1 1
      backendApi/modules/v1/models/lists/shop/PackageList.php
  28. 1 1
      backendApi/modules/v1/models/lists/user/DecLevelList.php
  29. 55 55
      backendApi/modules/v1/models/lists/user/IndexList.php
  30. 1 1
      backendApi/modules/v1/models/lists/user/MoveList.php
  31. 3 3
      backendEle/src/components/WithdrawTable.vue
  32. 7 7
      backendEle/src/router/index.js
  33. 3 3
      backendEle/src/views/atlas/network-opt.vue
  34. 2 2
      backendEle/src/views/atlas/relation-opt.vue
  35. 1 1
      backendEle/src/views/bonus/balance-list.vue
  36. 4 4
      backendEle/src/views/bonus/period.vue
  37. 2 2
      backendEle/src/views/finance/balance-audit-list.vue
  38. 1 1
      backendEle/src/views/finance/change-balance-opt.vue
  39. 1 1
      backendEle/src/views/finance/deal-type.vue
  40. 1 1
      backendEle/src/views/finance/recharge-status.vue
  41. 1 1
      backendEle/src/views/finance/withdraw-add.vue
  42. 300 301
      backendEle/src/views/finance/withdraw.vue
  43. 1 1
      backendEle/src/views/shop/goods-add.vue
  44. 2 2
      backendEle/src/views/shop/index.vue
  45. 1 1
      backendEle/src/views/user/change-user-dec-level.vue
  46. 3 3
      backendEle/src/views/user/change-user-dec-role.vue
  47. 2 2
      backendEle/src/views/user/empty-list.vue
  48. 3 3
      backendEle/src/views/user/index.vue
  49. 2 2
      backendEle/src/views/user/move.vue
  50. 6 6
      backendEle/src/views/user/user-add-opt.vue
  51. 1 1
      common/config/params.php
  52. 15 0
      common/helpers/Tool.php
  53. 429 12
      common/libs/export/BaseExport.php
  54. 4 0
      common/models/ApproachDecOrder.php
  55. 1 1
      common/models/ApproachOrder.php
  56. 63 0
      common/models/ApproachOrderCall.php
  57. 1 1
      common/models/Withdraw.php
  58. 11 11
      common/models/forms/AdminAddUserForm.php
  59. 14 14
      common/models/forms/ApproachDeclarationForm.php
  60. 432 0
      common/models/forms/ApproachDeclarationUpgradeForm.php
  61. 23 4
      common/models/forms/ApproachOrderForm.php
  62. 35 35
      common/models/forms/DeclarationForm.php
  63. 6 3
      common/models/forms/DeclarationUpgradeForm.php
  64. 1 1
      common/models/forms/OrderForm.php
  65. 12 11
      common/models/forms/RechargeForm.php
  66. 9 9
      common/models/forms/ShopGoodsForm.php
  67. 3 3
      console/controllers/ShopController.php
  68. 2 2
      frontendApi/config/menu.php
  69. 1 1
      frontendApi/modules/v1/controllers/FinanceController.php
  70. 59 45
      frontendApi/modules/v1/controllers/ShopController.php
  71. 25 6
      frontendApi/modules/v1/controllers/UserController.php
  72. 5 3
      frontendEle/src/components/Uploader.vue
  73. 1 1
      frontendEle/src/router/index.js
  74. BIN
      frontendEle/src/static/img/ngds-logo.jpg
  75. 5 0
      frontendEle/src/utils/tool.js
  76. 1 1
      frontendEle/src/views/atlas/network-opt.vue
  77. 4 4
      frontendEle/src/views/atlas/network.vue
  78. 1 1
      frontendEle/src/views/bonus/index.vue
  79. 75 75
      frontendEle/src/views/config/receive-address-edit.vue
  80. 1 1
      frontendEle/src/views/config/receive-address-list.vue
  81. 2 2
      frontendEle/src/views/finance/recharge-add.vue
  82. 201 205
      frontendEle/src/views/finance/recharge.vue
  83. 1 1
      frontendEle/src/views/finance/transfer-add.vue
  84. 1 1
      frontendEle/src/views/finance/transfer-list.vue
  85. 1 1
      frontendEle/src/views/shop/order-list.vue
  86. 179 178
      frontendEle/src/views/shop/order.vue
  87. 1 1
      frontendEle/src/views/shop/reconsume-order.vue
  88. 4 4
      frontendEle/src/views/user/dec.vue
  89. 1 1
      frontendEle/src/views/user/index.vue
  90. 184 20
      frontendEle/src/views/user/upgrade.vue
  91. 1 0
      sql/upgrade/1462.sql

+ 3 - 2
backendApi/config/menu.php

@@ -48,6 +48,7 @@ return [
             // ['name'=>'报单列表导出', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'dec-order-list-export', 'routePath'=>'shop/dec-order-list-export', 'show'=>0,],
             ['name'=>'Order list', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'order-list', 'routePath'=>'shop/order-list', 'show'=>1,],//订单列表
             ['name'=>'订单列表导出', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'order-list-export', 'routePath'=>'shop/order-list-export', 'show'=>0,],
+            ['name'=>'订单PDF导出', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'order-list-export-pdf', 'routePath'=>'shop/order-list-export-pdf', 'show'=>0,],
             ['name'=>'订单发货', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'order-delivery', 'routePath'=>'shop/order-delivery', 'show'=>0,],
 //            ['name'=>'External mall order list', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'order-shop-list', 'routePath'=>'shop/order-shop-list', 'show'=>1,],//外部商城订单列表
             // ['name'=>'External mall entry list', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'order-dec-list', 'routePath'=>'shop/order-dec-list', 'show'=>1,],//外部商城报单列表
@@ -130,7 +131,7 @@ return [
             //['name'=>'删除审核会员状态', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'status-audit-delete', 'routePath'=>'user/status-audit-delete', 'show'=>0,],
             ['name'=>'Member level adjustment list', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'dec-level-list', 'routePath'=>'user/dec-level-list', 'show'=>1,],//会员级别调整列表
             ['name'=>'修改会员级别', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'change-user-dec-level', 'routePath'=>'user/change-user-dec-level', 'show'=>0,],
-            ['name'=>'Modify entry center level', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'change-user-dec-role', 'routePath'=>'user/change-user-dec-role', 'show'=>1,],//修改报单中心级别
+            ['name'=>'Modify Stockist level', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'change-user-dec-role', 'routePath'=>'user/change-user-dec-role', 'show'=>1,],//修改报单中心级别
             //['name'=>'清空关停会员钱包', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'clear-wallet', 'routePath'=>'user/clear-wallet', 'show'=>0,],
 //            ['name'=>'会员历史年度最高聘级表', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'year-highest-emp-lv', 'routePath'=>'user/year-highest-emp-lv', 'show'=>1,],
 //            ['name'=>'会员历史年度最高聘级表导出', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'user/year-highest-emp-lv-export', 'routePath'=>'user/user/year-highest-emp-lv-export', 'show'=>0,],
@@ -138,7 +139,7 @@ return [
         ]
     ],
     'atlas'=>[
-        'name'=>'Network Atlas',//网络图谱
+        'name'=>'Network Chart',//网络图谱
         'class' => '',
         'icon'=>'el-icon-data-line',
         'controller'=>'atlas',

+ 1 - 1
backendApi/config/params.php

@@ -2,5 +2,5 @@
 return [
     'adminEmail' => 'admin@example.com',
     'noCheckTokenActions' => ['v1/oauth/login', 'v1/oauth/no-login-modify-password', 'v1/oauth/refresh-access-token', 'v1/oauth/refresh-refresh-token', 'v1/oauth/refresh-token', 'v1/site/days-diff', 'v1/site/page-data', 'v1/site/captcha'],
-    'noCheckPermissionActions' => ['oauth/login', 'oauth/no-login-modify-password', 'oauth/refresh-access-token', 'oauth/refresh-refresh-token', 'oauth/refresh-token', 'oauth/info', 'site/base-info', 'site/days-diff', 'site/page-data', 'site/captcha', 'user/full-info', 'user/filter-user', 'user/generate-user-name', 'reconsume/cant-deduct-date', 'user/get-sub-com', 'user/chk-relation', 'user/get-period-num', 'user/company-bank-get', 'user/main-divide', 'user/chk-del-user', 'reconsume/deduct-audit-add', 'finance/perf-apply-get','file/upload-excel', 'user/move-net-type', 'user/move-get', 'user/reg-info-audit-get', 'user/status-audit-get', 'user/status-audit-get-statuses', 'user/close-login-get', 'user/close-dec-get', 'atlas/main-user-info', 'reconsume/change-audit-get', 'reconsume/cant-deduct-month', 'finance/change-balance-type', 'finance/balance-audit-get', 'file/token', 'finance/perf-audit-get', 'finance/invoice-audit-get', 'finance/withdraw-get', 'finance/deal-type-get', 'ad/upload', 'config/reg-type-get', 'config/pact-get', 'user/reg-info-audit-add-opt', 'reconsume/get-flow-deal-type', 'user/status-close-get', 'finance/mult-point'],
+    'noCheckPermissionActions' => ['oauth/login', 'oauth/no-login-modify-password', 'oauth/refresh-access-token', 'oauth/refresh-refresh-token', 'oauth/refresh-token', 'oauth/info', 'site/base-info', 'site/days-diff', 'site/page-data', 'site/captcha', 'user/full-info', 'user/filter-user', 'user/generate-user-name', 'reconsume/cant-deduct-date', 'user/get-sub-com', 'user/chk-relation', 'user/get-period-num', 'user/company-bank-get', 'user/main-divide', 'user/chk-del-user', 'reconsume/deduct-audit-add', 'finance/perf-apply-get','file/upload-excel', 'user/move-net-type', 'user/move-get', 'user/reg-info-audit-get', 'user/status-audit-get', 'user/status-audit-get-statuses', 'user/close-login-get', 'user/close-dec-get', 'atlas/main-user-info', 'reconsume/change-audit-get', 'reconsume/cant-deduct-month', 'finance/change-balance-type', 'finance/balance-audit-get', 'file/token', 'finance/perf-audit-get', 'finance/invoice-audit-get', 'finance/withdraw-get', 'finance/deal-type-get', 'ad/upload', 'config/reg-type-get', 'config/pact-get', 'user/reg-info-audit-add-opt', 'reconsume/get-flow-deal-type', 'user/status-close-get', 'finance/mult-point', 'shop/upload'],
 ];

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

@@ -842,7 +842,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'=> 'Number of settlement periods']], $data['filterTypes']);
+            $data['filterTypes'] = array_merge(['periodNum'=>['isUserTable'=> false, 'name'=> 'Pay Cycle(PC)']], $data['filterTypes']);
         }
 
         return static::notice($data);
@@ -971,13 +971,13 @@ class BonusController extends BaseController {
             $params[':PERIOD_NUM'] = $periodNum;
         }
 
-        try {
+//        try {
             $listObj = new PeriodBonusList();
             $data = $listObj->getList(['condition'=>$condition, 'params'=>$params, 'others'=>['yearMonth'=>$yearMonth]]);
-        } catch (Exception $e) {
-            LoggerTool::info([$e->getFile(), $e->getLine(), $e->getMessage()]);
-            return null;
-        }
+//        } catch (Exception $e) {
+//            LoggerTool::info([$e->getFile(), $e->getLine(), $e->getMessage()]);
+//            return $data;
+//        }
 
         return $data;
     }

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

@@ -411,7 +411,7 @@ class ShopController extends BaseController {
             'PERIOD_NUM'=> 'O.PERIOD_NUM',
             'CREATED_AT'=> 'O.CREATED_AT',
         ]);
-        $filter['condition'] .= ' 1=1 AND O.IS_DELETE=0';
+        $filter['condition'] = !$filter['condition'] ? '1=1 AND O.IS_DELETE=0' : ('O.IS_DELETE=0 ' . $filter['condition']);
         $form = new ShopExportForm();
         $result = $form->run($filter, '订单列表');
         if (!$result) {
@@ -682,7 +682,7 @@ class ShopController extends BaseController {
             'CREATED_AT'=> 'O.CREATED_AT',
         ]);
 
-        $filter['condition'] = ' 1=1 AND O.IS_DELETE=0 AND O.SN=:SN';
+        $filter['condition'] = ' O.IS_DELETE=0 AND O.SN=:SN';
         $filter['params'] = [':SN' => $orderSn];
 
         $form = new ShopExportForm();

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

@@ -1445,7 +1445,7 @@ class UserController extends BaseController
     public function actionChangeUserDecRole()
     {
         if (Yii::$app->request->isPost) {
-            return parent::edit(DecRoleLogForm::class, 'Successfully modified the document entry center level', 'adminChange', [//修改报单中心级别成功
+            return parent::edit(DecRoleLogForm::class, 'Successfully modified the document Stockist level', 'adminChange', [//修改报单中心级别成功
                 'adminChange',
             ], null, function ($form, $result) {
                 //$userName = Info::getUserNameByUserId($result['ID']);

+ 1 - 1
backendApi/modules/v1/models/lists/atlas/NetworkList.php

@@ -105,7 +105,7 @@ class NetworkList extends \common\libs\dataList\DataList implements DataListInte
                     ],
                 ],
                 'PERIOD_AT' => [
-                    'header' => 'Number of joining periods',//加入期数
+                    'header' => 'Joining Period',//加入期数
                     'headerOther' => ['width' => '110'],
                 ],
             ];

+ 1 - 1
backendApi/modules/v1/models/lists/atlas/RelationList.php

@@ -99,7 +99,7 @@ class RelationList extends \common\libs\dataList\DataList implements DataListInt
                     ],
                 ],
                 'PERIOD_AT' => [
-                    'header' => 'Number of joining periods',//加入期数
+                    'header' => 'Joining Period',//加入期数
                     'headerOther' => ['width' => '110'],
                 ],
             ];

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

@@ -347,7 +347,7 @@ class BalanceList extends \common\libs\dataList\DataList implements DataListInte
                         'tag'=>['type'=>'danger', 'size' => 'small', 'class'=>'no-border'],
                     ],
                 ],
-                'PERIOD_AT' => 'Number of joining periods',//加入期数
+                'PERIOD_AT' => 'Joining Period',//加入期数
 //                'DEC_DEC_ROLE_NAME' => [
 //                    'header' => '所属报单中心级别',
 //                    'headerOther' => ['width' => '150'],
@@ -361,14 +361,14 @@ class BalanceList extends \common\libs\dataList\DataList implements DataListInte
 //                    'headerOther' => ['width' => '150'],
 //                ],
                 'MOBILE' => [
-                    'header' => 'Phone number',//手机号码
+                    'header' => 'Phone Number', // 手机号码
                     'value' => function($row) {
                         return "\t".$row['MOBILE'];
                     },
                     'headerOther' => ['width' => '120'],
                 ],
                 'TEL' => [
-                    'header' => 'Alternate phone number',//备用手机号码
+                    'header' => 'Alternate Phone Number', // 备用手机号码
                     'value' => function($row) {
                         return "\t".$row['TEL'];
                     },
@@ -436,12 +436,12 @@ class BalanceList extends \common\libs\dataList\DataList implements DataListInte
 //                'STATUS'=> ['isUserTable'=> true, 'name'=> '会员状态', 'other'=> 'status'],
 //                'STATUS_AT'=> ['isUserTable'=> true, 'name'=> '会员状态变更时间', 'other'=> 'date'],
 //                'HIGHEST_EMP_LV_NAME'=> ['isUserTable'=> false, 'name'=> '历史最高聘级', 'other'=> 'empLevel'],
-                'PERIOD_AT'=> ['isUserTable'=> false, 'name'=> 'Number of joining periods'],//加入期数
+                'PERIOD_AT'=> ['isUserTable'=> false, 'name'=> 'Joining Period'],//加入期数
 //                'DEC_DEC_ROLE_NAME'=> ['isUserTable'=> true, 'name'=> '所属报单中心级别', 'other'=> 'decRole'],
 //                'DEC_USER_NAME'=> ['isUserTable'=> true, 'name'=> '所属报单中心编号'],
 //                'DEC_REAL_NAME'=> ['isUserTable'=> true, 'name'=> '所属报单中心姓名'],
-                'MOBILE'=> ['isUserTable'=> false, 'name'=> 'Phone number'],//手机号码
-                'TEL'=> ['isUserTable'=> false, 'name'=> 'Alternate phone number'],//备用手机号码
+                'MOBILE'=> ['isUserTable'=> false, 'name'=> 'Phone Number'],//手机号码
+                'TEL'=> ['isUserTable'=> false, 'name'=> 'Alternate Phone Number'],//备用手机号码
 //                'AREA'=> ['isUserTable'=> true, 'name'=> '常用地址', 'other'=> 'area'],
 //                'SUB_COM_NAME'=> ['isUserTable'=> true, 'name'=> '所属分公司', 'other'=> 'subCompany'],
 //                'IS_DIRECT_SELLER'=> ['isUserTable'=> true, 'name'=> '是否直销员', 'other'=> 'yesOrNo'],

+ 14 - 14
backendApi/modules/v1/models/lists/bonus/FlowBonusList.php

@@ -64,8 +64,8 @@ class FlowBonusList extends \common\libs\dataList\DataList implements DataListIn
                     },
                     'headerOther' => ['width' => '170'],
                 ],
-                'PERIOD_NUM' => 'Number of periods',//期数
-                'CALC_MONTH' => 'Settlement month',//结算月
+                'PERIOD_NUM' => 'Period Number', // 期数
+                'CALC_MONTH' => 'Bonus Month', // 结算月
                 'DEAL_TYPE_NAME' => [
                     'header' => 'Transaction type',//交易类型
                     'headerOther' => [
@@ -168,7 +168,7 @@ class FlowBonusList extends \common\libs\dataList\DataList implements DataListIn
                     ],
                 ],
                 'AMOUNT' => [
-                    'header' => 'A turnover',//交易额
+                    'header' => 'Debit/Credit', // 交易额
                     'value' => function ($row) {
                         $result = (new Price([
                             'value' => $row['AMOUNT'],
@@ -193,7 +193,7 @@ class FlowBonusList extends \common\libs\dataList\DataList implements DataListIn
                     },
                 ],
                 'TOTAL' => [
-                    'header' => 'Post transaction balance',//交易后余额
+                    'header' => 'New Balance', // 交易后余额
                     'value' => function ($row) {
                         return (new Price([
                             'value' => $row['TOTAL'],
@@ -208,7 +208,7 @@ class FlowBonusList extends \common\libs\dataList\DataList implements DataListIn
                     'headerOther' => ['width' => '110'],
                 ],
                 'REMARK' => [
-                    'header' => 'Note',//备注
+                    'header' => 'Remark',//备注
                     'headerOther' => ['width' => '250'],
                 ],
                 'TRANSFER_SN' => [
@@ -228,22 +228,22 @@ class FlowBonusList extends \common\libs\dataList\DataList implements DataListIn
         if (!$this->filterTypes) {
             $this->filterTypes = [
                 'CREATED_AT' => ['isUserTable' => false, 'name' => 'Creation time', 'other' => 'date'],//创建时间
-                'PERIOD_NUM' => ['isUserTable' => false, 'name' => 'Number of periods'],//期数
-                'CALC_MONTH' => ['isUserTable' => false, 'name' => 'Settlement month', 'other' => 'month'],//结算月
-                'DEAL_TYPE_NAME' => ['isUserTable' => false, 'name' => 'Transaction type', 'other' => 'dealTypes'],//交易类型
-                'USER_NAME' => ['isUserTable' => false, 'name' => 'Member code'],//会员编号
-                'REAL_NAME' => ['isUserTable' => false, 'name' => 'Member name'],//会员姓名
-                'LAST_DEC_LV_NAME' => ['isUserTable' => false, 'name' => 'Member level', 'other' => 'decLevel'],//会员等级
+                'PERIOD_NUM' => ['isUserTable' => false, 'name' => 'Period Number'],//期数
+                'CALC_MONTH' => ['isUserTable' => false, 'name' => 'Bonus Month', 'other' => 'month'],//结算月
+                'DEAL_TYPE_NAME' => ['isUserTable' => false, 'name' => 'Transaction Type', 'other' => 'dealTypes'],//交易类型
+                'USER_NAME' => ['isUserTable' => false, 'name' => 'Member Code'],//会员编号
+                'REAL_NAME' => ['isUserTable' => false, 'name' => 'Member Name'],//会员姓名
+                'LAST_DEC_LV_NAME' => ['isUserTable' => false, 'name' => 'Member Level', 'other' => 'decLevel'],//会员等级
                 'LAST_EMP_LV_NAME' => ['isUserTable' => false, 'name' => 'Rank', 'other' => 'empLevel'],//聘级
 //                'LAST_STATUS_NAME' => ['isUserTable' => false, 'name' => '会员状态', 'other' => 'status'],
 //                'SYSTEM_NAME' => ['isUserTable' => true, 'name' => '体系', 'other' => 'systems'],
                 'IS_DEC' => ['isUserTable' => false, 'name' => 'Declaration center or not', 'other' => 'yesOrNo'],//是否报单中心
 //                'DEC_ROLE_NAME' => ['isUserTable' => true, 'name' => '报单中心级别', 'other' => 'decRole'],
 //                'IS_DIRECT_SELLER' => ['isUserTable' => true, 'name' => '是否直销员', 'other' => 'yesOrNo'],
-                'AMOUNT' => ['isUserTable' => false, 'name' => 'A turnover'],//交易额
-                'TOTAL' => ['isUserTable' => false, 'name' => 'Post transaction balance'],//交易后余额
+                'AMOUNT' => ['isUserTable' => false, 'name' => 'Debit/Credit'],//交易额
+                'TOTAL' => ['isUserTable' => false, 'name' => 'New Balance'], // 交易后余额
                 'ADMIN_NAME' => ['isUserTable' => false, 'name' => 'Operator'],//操作人
-                'REMARK' => ['isUserTable' => false, 'name' => 'Note'],//备注
+                'REMARK' => ['isUserTable' => false, 'name' => 'Remark'],//备注
                 'TRANSFER_SN' => ['isUserTable' => false, 'name' => 'Serial number'],//流水号
             ];
         }

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

@@ -56,7 +56,7 @@ class PerfMonthList extends \common\libs\dataList\DataList implements DataListIn
         if(!$this->columns){
             $this->columns = [
                 'CALC_MONTH' => [
-                    'header' => 'Settlement month',//结算月
+                    'header' => 'Bonus Month',//结算月
                     'headerOther' => [
                         'width' => '100',
                     ],
@@ -218,7 +218,7 @@ class PerfMonthList extends \common\libs\dataList\DataList implements DataListIn
     {
         if(!$this->filterTypes){
             $this->filterTypes = [
-                'CALC_MONTH'=> ['isUserTable'=> false, 'name'=> 'Settlement month'],//结算月
+                'CALC_MONTH'=> ['isUserTable'=> false, 'name'=> 'Bonus Month'],//结算月
                 'USER_NAME'=> ['isUserTable'=> false, 'name'=> 'Member code'],//会员编号
                 'REC_USER_NAME'=> ['isUserTable'=> false, 'name'=> 'Recommender No'],//推荐人编号
                 'CREATED_AT'=> ['isUserTable'=> false, 'name'=> 'Creation time', 'other'=> 'date'],//创建时间

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

@@ -61,13 +61,13 @@ class PerfOrderList extends \common\libs\dataList\DataList implements DataListIn
         if(!$this->columns){
             $this->columns = [
                 'PERIOD_NUM' => [
-                    'header' => 'Number of settlement periods',//结算期数
+                    'header' => 'Pay Cycle(PC)',//结算期数
                     'headerOther' => [
                         'width' => '100',
                     ],
                 ],
                 'SN' => [
-                    'header' => 'Performance sheet No',//业绩单编号
+                    'header' => 'Sales No.',//业绩单编号
                     'value' => function($row) {
                         return "\t".$row['SN'];
                     },
@@ -76,7 +76,7 @@ class PerfOrderList extends \common\libs\dataList\DataList implements DataListIn
                     ],
                 ],
                 'DEC_TYPE' => [
-                    'header' => 'Performance sheet type',//业绩单类型
+                    'header' => 'Type',//业绩单类型
                     'headerOther' => [
                         'width' => '130',
                     ],
@@ -92,7 +92,7 @@ class PerfOrderList extends \common\libs\dataList\DataList implements DataListIn
                     },
                 ],
                 'DEC_STATUS_NAME' => [
-                    'header' => 'Performance sheet status',//业绩单状态
+                    'header' => 'Status',//业绩单状态
                     'headerOther' => [
                         'width' => '110',
                     ],
@@ -110,13 +110,13 @@ class PerfOrderList extends \common\libs\dataList\DataList implements DataListIn
                     ],
                 ],
                 'LAST_REC_USER_NAME' => [
-                    'header' => 'Pioneer No. at settlement',//结算时开拓者编号
+                    'header' => 'Sponsor No. at settlement',//结算时开拓者编号
                     'headerOther' => [
                         'width' => '150',
                     ],
                 ],
                 'LAST_REC_REAL_NAME' => [
-                    'header' => 'Pioneer name at settlement',//结算时开拓者姓名
+                    'header' => 'Sponsor name at settlement',//结算时开拓者姓名
                     'headerOther' => [
                         'width' => '150',
                     ],
@@ -177,18 +177,18 @@ class PerfOrderList extends \common\libs\dataList\DataList implements DataListIn
     {
         if(!$this->filterTypes){
             $this->filterTypes = [
-                'PERIOD_NUM'=> ['isUserTable'=> false, 'name'=> 'Number of settlement periods'],//结算期数
-                'SN'=> ['isUserTable'=> false, 'name'=> 'Performance sheet No'],//业绩单编号
+                'PERIOD_NUM'=> ['isUserTable'=> false, 'name'=> 'Pay Cycle(PC)'], // 结算期数
+                'SN'=> ['isUserTable'=> false, 'name'=> 'Performance sheet No'], // 业绩单编号
                 'DEC_STATUS_NAME'=> ['isUserTable'=> false, 'name'=> 'Performance sheet status','other'=> 'select',
-                 'selectData'=> [['id'=> 1, 'name'=> 'Reviewed'], ['id'=> 2, 'name'=> 'Waste disposal']],],//业绩单状态,已审核,置废
-                'USER_NAME'=> ['isUserTable'=> false, 'name'=> 'Member code'],//会员编号
-                'REAL_NAME'=> ['isUserTable'=> false, 'name'=> 'Member name'],//会员姓名
-                'LAST_REC_USER_NAME'=> ['isUserTable'=> false, 'name'=> 'Pioneer No. at settlement'],//结算时开拓者编号
-                'LAST_REC_REAL_NAME'=> ['isUserTable'=> false, 'name'=> 'Pioneer name at settlement'],//结算时开拓者姓名
-                'PV'=> ['isUserTable'=> false, 'name'=> 'Entry BV'],//报单BV
-                'DEC_AMOUNT'=> ['isUserTable'=> false, 'name'=> 'Entry amount'],//报单金额
-                'DEC_SN'=> ['isUserTable'=> false, 'name'=> 'Entry No'],//报单编号
-                'CREATED_AT'=> ['isUserTable'=> true, 'name'=> 'Creation time', 'other'=> 'date'],//创建时间
+                 'selectData'=> [['id'=> 1, 'name'=> 'Reviewed'], ['id'=> 2, 'name'=> 'Waste disposal']],], // 业绩单状态,已审核,置废
+                'USER_NAME'=> ['isUserTable'=> false, 'name'=> 'Member code'], // 会员编号
+                'REAL_NAME'=> ['isUserTable'=> false, 'name'=> 'Member name'], // 会员姓名
+                'LAST_REC_USER_NAME'=> ['isUserTable'=> false, 'name'=> 'Sponsor No. at settlement'], // 结算时开拓者编号
+                'LAST_REC_REAL_NAME'=> ['isUserTable'=> false, 'name'=> 'Sponsor name at settlement'], // 结算时开拓者姓名
+                'PV'=> ['isUserTable'=> false, 'name'=> 'Entry BV'], // 报单BV
+                'DEC_AMOUNT'=> ['isUserTable'=> false, 'name'=> 'Entry amount'], // 报单金额
+                'DEC_SN'=> ['isUserTable'=> false, 'name'=> 'Entry No'], // 报单编号
+                'CREATED_AT'=> ['isUserTable'=> true, 'name'=> 'Creation time', 'other'=> 'date'], // 创建时间
             ];
         }
         return $this->filterTypes;

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

@@ -76,7 +76,7 @@ class PeriodBonusList extends \common\libs\dataList\DataList implements DataList
             $this->columns = [
                 'ID' => null,
                 'PERIOD_NUM' => [
-                    'header' => 'Number of settlement periods',//结算期数
+                    'header' => 'Pay Cycle(PC)', // 结算期数
                     'headerOther' => [
                         'width' => '150',
                     ],
@@ -85,7 +85,7 @@ class PeriodBonusList extends \common\libs\dataList\DataList implements DataList
                     ],
                 ],
                 'CALCULATED_AT' => [
-                    'header' => 'Settlement time',//结算时间
+                    'header' => 'Date ', // 结算时间
                     'value' => function($row) {
                         return (new DateTime([
                             'value' => $row['CALCULATED_AT'],
@@ -130,19 +130,19 @@ class PeriodBonusList extends \common\libs\dataList\DataList implements DataList
                     ],
                 ],
                 'LAST_MOBILE' => [
-                    'header' => 'phone number',//手机号码
+                    'header' => 'Phone Number',//手机号码
                     'headerOther' => [
                         'width' => '120',
                     ],
                 ],
                 'LAST_PERIOD_AT' => [
-                    'header' => 'Number of joining periods',//加入期数
+                    'header' => 'Joining Period', // 加入期数
                     'headerOther' => [
                         'width' => '100',
                     ],
                 ],
                 'LAST_CREATED_AT' => [
-                    'header' => 'Join time',//加入时间
+                    'header' => 'Joining Date', // 加入时间
                     'value' => function($row) {
                         return (new DateTime([
                             'value' => $row['LAST_CREATED_AT'],
@@ -151,13 +151,13 @@ class PeriodBonusList extends \common\libs\dataList\DataList implements DataList
                     'headerOther' => ['width' => '170'],
                 ],
                 'LAST_REC_USER_NAME' => [
-                    'header' => 'Pioneer No',//开拓者编号
+                    'header' => 'Sponsor No',//开拓者编号
                     'headerOther' => [
                         'width' => '150',
                     ],
                 ],
                 'LAST_REC_REAL_NAME' => [
-                    'header' => 'Pioneer name',//开拓者姓名
+                    'header' => 'Sponsor Name',//开拓者姓名
                     'headerOther' => [
                         'width' => '120',
                     ],
@@ -595,7 +595,7 @@ class PeriodBonusList extends \common\libs\dataList\DataList implements DataList
 //                    ],
 //                ],
                 'CALC_MONTH' => [
-                    'header' => 'Settlement month',//结算月
+                    'header' => 'Bonus Month',//结算月
                     'headerOther' => [
                         'width' => '100',
                     ],
@@ -756,8 +756,8 @@ class PeriodBonusList extends \common\libs\dataList\DataList implements DataList
 //                        'prop'=>'ORI_BONUS_FW',
 //                    ],
 //                ],
-                
-                
+
+
             ];
         }
         return $this->columns;
@@ -775,13 +775,13 @@ class PeriodBonusList extends \common\libs\dataList\DataList implements DataList
                 'LAST_REAL_NAME'=> ['isUserTable'=> false, 'name'=> 'Member name'],//会员姓名
                 'LAST_DEC_LV_NAME'=> ['isUserTable'=> false, 'name'=> 'Member level at settlement', 'other'=> 'decLevel'],//结算时会员级别
                 'LAST_EMP_LV_NAME'=> ['isUserTable'=> false, 'name'=> 'Member rank at settlement', 'other'=> 'empLevel'],//结算时会员聘级
-                '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'],//上级编号
+                'LAST_MOBILE'=> ['isUserTable'=> false, 'name'=> 'Phone Number'],//手机号
+                'LAST_PERIOD_AT'=> ['isUserTable'=> false, 'name'=> 'Joining Period'], // 加入期数
+                'LAST_CREATED_AT'=> ['isUserTable'=> false, 'name'=> 'Joining Date', 'other'=> 'date'], // 加入时间
+                'CALCULATED_AT'=> ['isUserTable'=> false, 'name'=> 'Date', 'other'=> 'date'], // 备份时间
+                'LAST_REC_USER_NAME'=> ['isUserTable'=> false, 'name'=> 'Sponsor No'],//开拓者编号
+                'LAST_REC_REAL_NAME'=> ['isUserTable'=> false, 'name'=> 'Sponsor Name'],//开拓者姓名
+                'LAST_CON_USER_NAME'=> ['isUserTable'=> false, 'name'=> 'Superior Number'],//上级编号
                 'LAST_CON_REAL_NAME'=> ['isUserTable'=> false, 'name'=> 'Name of superior'],//上级姓名
                 'PV_1L'=> ['isUserTable'=> false, 'name'=> 'I. new market performance'],//一市场新增业绩
                 'SURPLUS_1L'=> ['isUserTable'=> false, 'name'=> 'I. market balance performance'],//一市场结余业绩
@@ -798,7 +798,7 @@ class PeriodBonusList extends \common\libs\dataList\DataList implements DataList
                 'BONUS_QY'=> ['isUserTable'=> false, 'name'=> 'Team award'],//团队奖
 //                'BONUS_YC'=> ['isUserTable'=> false, 'name'=> 'Honor Award'],//荣衔奖
 //                'ORI_BONUS_STANDARD'=> ['isUserTable'=> false, 'name'=> 'Team growth Award'],//团队成长奖
-                'CALC_MONTH'=> ['isUserTable'=> false, 'name'=> 'Settlement month'],//结算月
+                'CALC_MONTH'=> ['isUserTable'=> false, 'name'=> 'Bonus Month'],//结算月
             ];
         }
         return $this->filterTypes;

+ 2 - 2
backendApi/modules/v1/models/lists/bonus/ScoreMonthList.php

@@ -47,7 +47,7 @@ class ScoreMonthList extends \common\libs\dataList\DataList implements DataListI
         if(!$this->columns){
             $this->columns = [
                 'CALC_MONTH' => [
-                    'header' => 'Settlement month',//结算月
+                    'header' => 'Bonus Month',//结算月
                     'headerOther' => [
                         'width' => '100',
                     ],
@@ -130,7 +130,7 @@ class ScoreMonthList extends \common\libs\dataList\DataList implements DataListI
     {
         if(!$this->filterTypes){
             $this->filterTypes = [
-                'CALC_MONTH'=> ['isUserTable'=> false, 'name'=> 'Settlement month'],//结算月
+                'CALC_MONTH'=> ['isUserTable'=> false, 'name'=> 'Bonus Month'],//结算月
                 'USER_NAME'=> ['isUserTable'=> false, 'name'=> 'Member code'],//会员编号
                 'CREATED_AT'=> ['isUserTable'=> false, 'name'=> 'Creation time', 'other'=> 'date'],//创建时间
             ];

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

@@ -72,7 +72,7 @@ class UserPerfList extends \common\libs\dataList\DataList implements DataListInt
                     },
                 ],
                 'SURPLUS_1L' => [
-                    'header' => 'Left market residual performance',//一市场剩余业绩
+                    'header' => 'Remainder@Left Leg',//一市场剩余业绩
                     'headerOther' => [
                         'width' => '240',
                     ],
@@ -83,7 +83,7 @@ class UserPerfList extends \common\libs\dataList\DataList implements DataListInt
                     },
                 ],
                 'SURPLUS_2L' => [
-                    'header' => 'Right market residual performance',//二市场剩余业绩
+                    'header' => 'Remainder@Right Leg',//二市场剩余业绩
                     'headerOther' => [
                         'width' => '240',
                     ],

+ 2 - 2
backendApi/modules/v1/models/lists/finance/BalanceAuditList.php

@@ -138,7 +138,7 @@ class BalanceAuditList extends \common\libs\dataList\DataList implements DataLis
                     },
                 ],
                 'CREATE_REMARK' => [
-                    'header' => 'Note',//备注
+                    'header' => 'Remark',//备注
                     'headerOther' => [
                         'width' => '180',
                     ],
@@ -215,7 +215,7 @@ class BalanceAuditList extends \common\libs\dataList\DataList implements DataLis
                 'TYPE_NAME' => ['isUserTable' => false, 'name' => 'Account type', 'other' => 'select', 'selectData' => Tool::formatFilter(BalanceAudit::TYPE, 'name', 'label')],//账户类型
                 'DEAL_TYPE_NAME' => ['isUserTable' => false, 'name' => 'Transaction type', 'other' => 'select', 'selectData' => Tool::formatFilter(DealType::getAllTypesForShow(), 'ID', 'TYPE_NAME')],//交易类型
                 'AMOUNT' => ['isUserTable' => false, 'name' => 'Adjustment amount'],//调整金额
-                'CREATE_REMARK' => ['isUserTable' => false, 'name' => 'Note'],//备注
+                'CREATE_REMARK' => ['isUserTable' => false, 'name' => 'Remark'],//备注
                 'REMARK_IS_SHOW' => ['isUserTable' => false, 'name' => 'Whether the front desk displays comments', 'other' => 'yesOrNo'],//前台是否显示备注
                 'CREATE_ADMIN_NAME' => ['isUserTable' => false, 'name' => 'applicant'],//申请人
                 'CREATED_AT' => ['isUserTable' => false, 'name' => 'Application time', 'other' => 'date'],//申请时间

+ 5 - 5
backendApi/modules/v1/models/lists/finance/HistoryBonusList.php

@@ -282,14 +282,14 @@ class HistoryBonusList extends \common\libs\dataList\DataList implements DataLis
                     'headerOther' => ['width' => '150'],
                 ],
                 'MOBILE' => [
-                    'header' => 'Phone number',//手机号码
+                    'header' => 'Phone Number',//手机号码
                     'value' => function($row) {
                         return "\t".$row['MOBILE'];
                     },
                     'headerOther' => ['width' => '150'],
                 ],
                 'TEL' => [
-                    'header' => 'Alternate phone number',//备用手机号码
+                    'header' => 'Alternate Phone Number',//备用手机号码
                     'value' => function($row) {
                         return "\t".$row['TEL'];
                     },
@@ -372,9 +372,9 @@ class HistoryBonusList extends \common\libs\dataList\DataList implements DataLis
 //                'DEC_DEC_ROLE_NAME' => ['isUserTable' => false, 'name' => '所属报单中心级别', 'other' => 'decRole'],
                 'DEC_USER_NAME' => ['isUserTable' => false, 'name' => 'Code of distributor'],//所属报单中心编号
                 'DEC_REAL_NAME' => ['isUserTable' => false, 'name' => 'Name of distributor'],//所属报单中心姓名
-                'MOBILE' => ['isUserTable' => false, 'name' => 'Phone number'],//手机号码
-                'TEL' => ['isUserTable' => false, 'name' => 'Alternate phone number'],//备用手机号码
-                'AREA' => ['isUserTable' => false, 'name' => 'Commonly used address', 'other' => 'area'],//常用地址
+                'MOBILE' => ['isUserTable' => false, 'name' => 'Phone Number'],//手机号码
+                'TEL' => ['isUserTable' => false, 'name' => 'Alternate Phone Number'],//备用手机号码
+                'AREA' => ['isUserTable' => false, 'name' => 'Commonly Used Address', 'other' => 'area'],//常用地址
 //                'SUB_COM_NAME' => ['isUserTable' => false, 'name' => '所属分公司', 'other' => 'subCompany'],
 //                'IS_DIRECT_SELLER' => ['isUserTable' => false, 'name' => '是否直销员', 'other' => 'yesOrNo'],
                 'BACKUP_AT' => ['isUserTable' => false, 'name' => 'Backup time', 'other' => 'date'],//备份时间

+ 8 - 8
backendApi/modules/v1/models/lists/finance/RechargeList.php

@@ -103,7 +103,7 @@ class RechargeList extends \common\libs\dataList\DataList implements DataListInt
                     'headerOther' => ['width' => '190'],
                 ],
                 'REMARK' => [
-                    'header' => 'Note', // 备注
+                    'header' => 'Remark', // 备注
                     'headerOther' => [
                         'width' => '200',
                     ],
@@ -120,13 +120,13 @@ class RechargeList extends \common\libs\dataList\DataList implements DataListInt
     public function getFilterTypes() {
         if (!$this->filterTypes) {
             $this->filterTypes = [
-                'SN' => ['isUserTable' => false, 'name' => '充值记录流水号'],
-                'USER_NAME' => ['isUserTable' => false, 'name' => '会员编号'],
-                'AUDIT_STATUS' => ['isUserTable' => false, 'name' => '审核状态', 'other' => 'select', 'selectData' => [['id' =>0, 'name' => '待审核'], ['id' => 1, 'name' => '已上传凭证'], ['id' => 2, 'name' => '已审核']]],
-                'RECHARGE_STATUS' => ['isUserTable' => false, 'name' => '充值状态', 'other' => 'select', 'selectData' => [['id' =>0, 'name' => 'New'], ['id' => 1, 'name' => 'Processing'], ['id' => 2, 'name' => 'Success']]],
-                'BANK_NO' => ['isUserTable' => false, 'name' => '汇款账号'],
-                'AMOUNT' => ['isUserTable' => false, 'name' => '充值金额'],
-                'CREATED_AT' => ['isUserTable' => false, 'name' => '申请时间', 'other' => 'date'],
+                'SN' => ['isUserTable' => false, 'name' => 'Recharge record serial number'],// 充值记录流水号
+                'USER_NAME' => ['isUserTable' => false, 'name' => 'Member code'], // 会员编号
+                'AUDIT_STATUS' => ['isUserTable' => false, 'name' => 'Audit status', 'other' => 'select', 'selectData' => [['id' =>0, 'name' => 'To be reviewed'], ['id' => 1, 'name' => 'Voucher uploaded'], ['id' => 2, 'name' => 'Audited']]], // 审核状态  待审核 已上传凭证 已审核
+                'RECHARGE_STATUS' => ['isUserTable' => false, 'name' => 'Recharge State', 'other' => 'select', 'selectData' => [['id' =>0, 'name' => 'New'], ['id' => 1, 'name' => 'Processing'], ['id' => 2, 'name' => 'Success']]], // 充值状态
+                'BANK_NO' => ['isUserTable' => false, 'name' => 'Bank account'],// 汇款账号
+                'AMOUNT' => ['isUserTable' => false, 'name' => 'Recharge amount'],// 充值金额
+                'CREATED_AT' => ['isUserTable' => false, 'name' => 'Apply time', 'other' => 'date'],// 申请时间
             ];
         }
         return $this->filterTypes;

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

@@ -157,7 +157,7 @@ class WithdrawList extends \common\libs\dataList\DataList implements DataListInt
                     },
                 ],
                 'MOBILE' => [
-                    'header' => 'Phone number', // 手机号
+                    'header' => 'Phone Number', // 手机号
                     'headerOther' => ['width' => '150'],
                 ],
                 'UPDATE_ADMIN_NAME' => [
@@ -165,7 +165,7 @@ class WithdrawList extends \common\libs\dataList\DataList implements DataListInt
                     'headerOther' => ['width' => '150'],
                 ],
                 'REMARK' => [
-                    'header' => 'Note', // 备注
+                    'header' => 'Remark', // 备注
                     'headerOther' => [
                         'width' => '200',
                     ],

+ 8 - 8
backendApi/modules/v1/models/lists/log/UserHandleList.php

@@ -50,7 +50,7 @@ class UserHandleList extends \common\libs\dataList\DataList implements DataListI
                 'save_before_content' => null,
                 'save_after_content' => null,
                 'opt_type' => [
-                    'header' => 'Operation type',//操作类型
+                    'header' => 'Operation Type',//操作类型
                     'headerOther' => [
                         'width' => '200',
                     ],
@@ -61,13 +61,13 @@ class UserHandleList extends \common\libs\dataList\DataList implements DataListI
                     },
                 ],
                 'opt_obj_name' => [
-                    'header' => 'Operation object code',//操作对象编号
+                    'header' => 'Operation Object Code',//操作对象编号
                     'headerOther' => [
                         'width' => '130',
                     ],
                 ],
                 'remark' => [
-                    'header' => 'note',//备注
+                    'header' => 'Remark', // 备注
                     'headerOther' => [
                         'width' => '120',
                         'show-overflow-tooltip'=>true,
@@ -81,7 +81,7 @@ class UserHandleList extends \common\libs\dataList\DataList implements DataListI
                     ],
                 ],
                 'created_at' => [
-                    'header' => 'Operation time',//操作时间
+                    'header' => 'Operation Time',//操作时间
                     'value' => function($row) {
                         return (new DateTime([
                             'value' => $row['created_at'],
@@ -135,11 +135,11 @@ class UserHandleList extends \common\libs\dataList\DataList implements DataListI
                 ['id'=>'修改主点位','name'=>'Modify master point'],//修改主点位
             ];
             $this->filterTypes = [
-                'opt_type' => ['isUserTable'=>false, 'name'=>'Operation type', 'other'=> 'select', 'selectData'=> $selectData],//操作类型
-                'opt_obj_name' => ['isUserTable'=>false, 'name'=>'Operation object No'],//操作对象编号
-                'remark' => ['isUserTable'=>false, 'name'=>'note'],//备注
+                'opt_type' => ['isUserTable'=>false, 'name'=>'Operation Type', 'other'=> 'select', 'selectData'=> $selectData],//操作类型
+                'opt_obj_name' => ['isUserTable'=>false, 'name'=>'Operation Object No'],//操作对象编号
+                'remark' => ['isUserTable'=>false, 'name'=>'Remark'], // 备注
                 'user_name' => ['isUserTable'=>false, 'name'=>'Operator'],//操作人
-                'created_at' => ['isUserTable'=>false, 'name'=>'Operation time', 'other'=> 'date'],//操作时间
+                'created_at' => ['isUserTable'=>false, 'name'=>'Operation Time', 'other'=> 'date'],//操作时间
                 'period_num' => ['isUserTable'=>false, 'name'=>'Number of periods'],//操作时间
                 'ip' => ['isUserTable'=>false, 'name'=>'IP address'],//IP地址
                 'device' => ['isUserTable'=>false, 'name'=>'client'],//客户端

+ 9 - 9
backendApi/modules/v1/models/lists/log/UserLoginList.php

@@ -56,7 +56,7 @@ class UserLoginList extends \common\libs\dataList\DataList implements DataListIn
         if(!$this->columns){
             $this->columns = [
                 'opt_type' => [
-                    'header' => 'Operation type',//操作类型
+                    'header' => 'Operation Type',//操作类型
                     'headerOther' => [
                         'width' => '120',
                     ],
@@ -70,7 +70,7 @@ class UserLoginList extends \common\libs\dataList\DataList implements DataListIn
                     },
                 ],
                 'opt_obj' => [
-                    'header' => 'Operation object',//操作对象
+                    'header' => 'Operation Object',//操作对象
                     'headerOther' => [
                         'width' => '120',
                     ],
@@ -103,7 +103,7 @@ class UserLoginList extends \common\libs\dataList\DataList implements DataListIn
                     ],
                 ],
                 'created_at' => [
-                    'header' => 'Operation time',//操作时间
+                    'header' => 'Operation Time',//操作时间
                     'value' => function($row) {
                         return (new DateTime([
                             'value' => $row['created_at'],
@@ -150,14 +150,14 @@ class UserLoginList extends \common\libs\dataList\DataList implements DataListIn
         if(!$this->filterTypes){
             $this->filterTypes = [
 //                'opt_type' => ['isUserTable'=>false, 'name'=>'操作类型', 'other'=> 'select', 'selectData'=> [['id'=> 1, 'name'=> '登录成功'], ['id'=> 0, 'name'=> '登录失败']]],
-                'opt_type' => ['isUserTable'=>false, 'name'=>'Operation type', 'other'=> 'select', 'selectData'=> [['id'=> 1, 'name'=> 'login succeeded'], ['id'=> 0, 'name'=> 'login failed']]],
-                'user_name' => ['isUserTable'=>false, 'name'=>'Object number'],//对象编号
+                'opt_type' => ['isUserTable'=>false, 'name'=>'Operation Type', 'other'=> 'select', 'selectData'=> [['id'=> 1, 'name'=> 'login succeeded'], ['id'=> 0, 'name'=> 'login failed']]],
+                'user_name' => ['isUserTable'=>false, 'name'=>'Object Number'],//对象编号
                 'success_times' => ['isUserTable'=>false, 'name'=>'Login success times'],//登录成功次数
                 'fail_times' => ['isUserTable'=>false, 'name'=>'Number of login failures'],//登录失败次数
-                'created_at' => ['isUserTable'=>false, 'name'=>'Operation time', 'other'=> 'date'],//操作时间
-                'period_num' => ['isUserTable'=>false, 'name'=>'Number of periods'],//期数
-                'ip' => ['isUserTable'=>false, 'name'=>'IP address'],//IP地址
-                'device' => ['isUserTable'=>false, 'name'=>'client'],//客户端
+                'created_at' => ['isUserTable'=>false, 'name'=>'Operation Time', 'other'=> 'date'],//操作时间
+                'period_num' => ['isUserTable'=>false, 'name'=>'Number of Periods'],//期数
+                'ip' => ['isUserTable'=>false, 'name'=>'IP Address'],//IP地址
+                'device' => ['isUserTable'=>false, 'name'=>'Client'],//客户端
                 'user_agent' => ['isUserTable'=>false, 'name'=>'operating system'],//操作系统
                 'request_route' => ['isUserTable'=>false, 'name'=>'Request path'],//请求路径
             ];

+ 6 - 6
backendApi/modules/v1/models/lists/shop/DecOrderList.php

@@ -139,7 +139,7 @@ class DecOrderList extends \common\libs\dataList\DataList implements DataListInt
                     },
                 ],
                 'REMARK' => [
-                    'header' => 'Note',//备注
+                    'header' => 'Remark', // 备注
                     'headerOther' => [
                         'width' => '200',
                     ],
@@ -151,11 +151,11 @@ class DecOrderList extends \common\libs\dataList\DataList implements DataListInt
                     },
                 ],
                 'REC_USER_NAME' => [
-                    'header' => 'Entry pioneer',//报单时开拓者
+                    'header' => 'Entry Sponsor',//报单时开拓者
                     'headerOther' => ['width' => '150'],
                 ],
                 'REC_REAL_NAME' => [
-                    'header' => 'Entry pioneer name',//报单时开拓者姓名
+                    'header' => 'Entry Sponsor Name',//报单时开拓者姓名
                     'headerOther' => ['width' => '150'],
                 ],
                 'CON_USER_NAME' => [
@@ -167,21 +167,21 @@ class DecOrderList extends \common\libs\dataList\DataList implements DataListInt
                     'headerOther' => ['width' => '150'],
                 ],
                 'PROVINCE' => [
-                    'header' => 'state',//
+                    'header' => 'State', // 
                     'headerOther' => ['width' => '120'],
                     'value' => function ($row) use($regionConfig) {
                         return $regionConfig[$row['PROVINCE']]['REGION_NAME'] ?? '';
                     },
                 ],
                 'CITY' => [
-                    'header' => 'local government area',//
+                    'header' => 'Local Government Area', // 
                     'headerOther' => ['width' => '120'],
                     'value' => function ($row) use($regionConfig) {
                         return $regionConfig[$row['CITY']]['REGION_NAME'] ?? '';
                     },
                 ],
                 'COUNTY' => [
-                    'header' => 'city',//
+                    'header' => 'City', // 
                     'headerOther' => ['width' => '120'],
                     'value' => function ($row) use($regionConfig) {
                         return $regionConfig[$row['COUNTY']]['REGION_NAME'] ?? '';

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

@@ -38,7 +38,7 @@ class GoodsList extends \common\libs\dataList\DataList implements DataListInterf
             $this->columns = [
                 'ID' => null,
                 'GOODS_NAME' => [
-                    'header' => 'Products name',//商品名称
+                    'header' => 'Product Name', // 商品名称
                     'headerOther' => ['width' => '200'],
                 ],
                 'GOODS_NO' => [
@@ -53,7 +53,7 @@ class GoodsList extends \common\libs\dataList\DataList implements DataListInterf
                 //     'headerOther' => ['width' => '150'],
                 // ],
                 'SELL_DISCOUNT' => [
-                    'header' => 'Products discount',//商品折扣
+                    'header' => 'Discount Rate',//商品折扣
                     'value' => function($row) {
                         $discount = 0;
                         if ($row['TYPE'] == 1) {
@@ -83,7 +83,7 @@ class GoodsList extends \common\libs\dataList\DataList implements DataListInterf
                     'headerOther' => ['width' => '150'],
                 ],
                 'CATEGORY_TYPE' => [
-                    'header' => 'Products Category',//商品分类
+                    'header' => 'Product Category',//商品分类
                     'value' => function($row) {
                         $categoryType = array_column(ShopGoods::CATEGORY_TYPE, NULL, 'id');
                         return $categoryType[$row['CATEGORY_TYPE']]['name'] ?? '';
@@ -91,7 +91,7 @@ class GoodsList extends \common\libs\dataList\DataList implements DataListInterf
                     'headerOther' => ['width' => '150'],
                 ],
                 'SELL_TYPE' => [
-                    'header' => 'Purchase method',//购买方式
+                    'header' => 'Payment Mode',//购买方式
                     'value' => function($row){
                         $sellType = ShopGoods::SALE_TYPE;
                         $sel = explode(',',$row['SELL_TYPE']);
@@ -174,7 +174,7 @@ class GoodsList extends \common\libs\dataList\DataList implements DataListInterf
                     },
                 ],
                 'STORE_NUMS' => [
-                    'header' => 'Inventory',//库存
+                    'header' => 'Inventory', // 库存
                     'headerOther' => [
                         'width' => '110',
                     ],
@@ -213,13 +213,13 @@ class GoodsList extends \common\libs\dataList\DataList implements DataListInterf
                 //'TYPE' => ['isUserTable' => false, 'name' => '商品来源', 'other' => 'select', 'selectData' => [['id' => 1, 'name' => '国内商品'], ['id' => 2, 'name' => '进口商品']]],
                 //'GIFT_TYPE' => ['isUserTable' => false, 'name' => '商品类型', 'other' => 'select', 'selectData' => [['id' => 1, 'name' => '报单区'], ['id' => 2, 'name' => '复消区'], ['id' => 3, 'name' => '工作室报单'], ['id' => 4, 'name' => '工作室复消']]],
                 'GIFT_TYPE' => ['isUserTable' => false, 'name' => 'Products type', 'other' => 'select', 'selectData' => [['id' => 1, 'name' => 'Entry area'], ['id' => 2, 'name' => 'Reselling area'], ['id' => 3, 'name' => 'Office Entry area'], ['id' => 4, 'name' => 'Office Reselling area']]],
-                'STATUS'=> ['name'=> 'Status', 'other'=> 'select', 'selectData'=> [['id'=> 0, 'name'=> 'Sold out'],['id'=> 1, 'name'=> 'On sale']]],//状态,已下架,已上架
-                'GOODS_NAME'=> ['name'=> 'Products name'],//商品名称
-                'GOODS_NO'=> ['name'=> 'Products code'],//商品编号
+                'STATUS'=> ['name'=> 'Status', 'other'=> 'select', 'selectData'=> [['id'=> 0, 'name'=> 'Sold out'],['id'=> 1, 'name'=> 'On sale']]], // 状态,已下架,已上架
+                'GOODS_NAME'=> ['name'=> 'Product Name'], // 商品名称
+                'GOODS_NO'=> ['name'=> 'Products Code'], // 商品编号
 //                'SELL_TYPE'=> ['name'=> '复消购买方式', 'other'=> 'select', 'selectData'=> [['id'=> 1, 'name'=> '余额购买'],['id'=> 2, 'name'=> '积分购买']]],
-                'SELL_PRICE'=> ['name'=> 'Products Price'],//销售价格
-                'PRICE_PV'=> ['name'=> 'Products BV'],//销售PV
-                'CATEGORY_TYPE' => ['name' => 'Products Category', 'other'=> 'select', 'selectData'=> ShopGoods::CATEGORY_TYPE],//商品分类
+                'SELL_PRICE'=> ['name'=> 'Products Price'], // 销售价格
+                'PRICE_PV'=> ['name'=> 'Products BV'], // 销售PV
+                'CATEGORY_TYPE' => ['name' => 'Product Category', 'other'=> 'select', 'selectData'=> ShopGoods::CATEGORY_TYPE], // 商品分类
             ];
         }
         return $this->filterTypes;

+ 4 - 4
backendApi/modules/v1/models/lists/shop/OrderDecList.php

@@ -56,7 +56,7 @@ class OrderDecList extends \common\libs\dataList\DataList implements DataListInt
                     'headerOther' => ['width' => '200'],
                 ],
                 'CONSIGNEE' => [
-                    'header' => 'consignee',//收货人
+                    'header' => 'Recipient',//收货人
                     'headerOther' => [
                         'width' => '150',
                     ],
@@ -71,21 +71,21 @@ class OrderDecList extends \common\libs\dataList\DataList implements DataListInt
                     'header' => 'Contact 2',//联系方式2
                 ],
                 'PROVINCE' => [
-                    'header' => 'state',//
+                    'header' => 'State', // 
                     'headerOther' => ['width' => '120'],
                     'value' => function ($row) use($regionConfig) {
                         return $regionConfig[$row['PROVINCE']]['REGION_NAME'] ?? '';
                     },
                 ],
                 'CITY' => [
-                    'header' => 'local government area',//地方政府
+                    'header' => 'Local Government Area', // 地方政府
                     'headerOther' => ['width' => '120'],
                     'value' => function ($row) use($regionConfig) {
                         return $regionConfig[$row['CITY']]['REGION_NAME'] ?? '';
                     },
                 ],
                 'COUNTY' => [
-                    'header' => 'city',//市
+                    'header' => 'City', // 区
                     'headerOther' => ['width' => '120'],
                     'value' => function ($row) use($regionConfig) {
                         return $regionConfig[$row['COUNTY']]['REGION_NAME'] ?? '';

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

@@ -90,7 +90,7 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
                     'headerOther' => ['width' => '120'],
                 ],
                 'DEC_USER_NAME' => [
-                    'header' => 'Entry Center',//报单中心
+                    'header' => 'Stockist', // 报单中心
                     'headerOther' => ['width' => '120'],
                 ],
                 'CREATE_USER' => [
@@ -98,7 +98,7 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
                     'headerOther' => ['width' => '120'],
                 ],
                 'CREATE_USER_NAME' => [
-                    'header' => 'Creator name',//创建人姓名
+                    'header' => 'Stockist Name',//创建人姓名
                     'headerOther' => ['width' => '120'],
                 ],
                 'SN' => [
@@ -107,7 +107,7 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
                 ],
 //                'STATUS' => null,
                 'STATUS' => [
-                    'header' => 'Order status',//订单状态
+                    'header' => 'Status',//订单状态
                     'headerOther' => [
                         'width' => '110',
                     ],
@@ -116,19 +116,19 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
                     },
                 ],
                 'SKU_CODE' => [
-                    'header' => 'Inventory code',//存货编码
+                    'header' => 'Product Code',//存货编码
                     'headerOther' => ['width' => '150'],
                 ],
                 'GOODS_TITLE' => [
-                    'header' => 'Inventory name',//存货名称
+                    'header' => 'Product Name', // 存货名称
                     'headerOther' => ['width' => '200'],
                 ],
                 'BUY_NUMS' => [
-                    'header' => 'quantity',//数量
+                    'header' => 'Qty',//数量
                     'headerOther' => ['width' => '100'],
                 ],
                 'CONSIGNEE' => [
-                    'header' => 'consignee',//收货人
+                    'header' => 'Recipient',//收货人
                     'headerOther' => [
                         'width' => '150',
                     ],
@@ -143,21 +143,21 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
                     'header' => 'Contact 2',//联系方式2
                 ],
                 'PROVINCE' => [
-                    'header' => 'state',//
+                    'header' => 'State', // 
                     'headerOther' => ['width' => '120'],
                     'value' => function ($row) use($regionConfig) {
                         return $regionConfig[$row['PROVINCE']]['REGION_NAME'] ?? '';
                     },
                 ],
                 'CITY' => [
-                    'header' => 'local government area',//地方政府
+                    'header' => 'Local Government Area', // 地方政府
                     'headerOther' => ['width' => '120'],
                     'value' => function ($row) use($regionConfig) {
                         return $regionConfig[$row['CITY']]['REGION_NAME'] ?? '';
                     },
                 ],
                 'COUNTY' => [
-                    'header' => 'city',//市
+                    'header' => 'City', // 区
                     'headerOther' => ['width' => '120'],
                     'value' => function ($row) use($regionConfig) {
                         return $regionConfig[$row['COUNTY']]['REGION_NAME'] ?? '';
@@ -369,7 +369,7 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
                 'ORDER_TYPE'=> ['name'=> 'Order Type'],
                 'PERIOD_NUM'=> ['name'=> 'Number of periods'],//期数
                 'CREATED_AT'=> ['name'=> 'Creation time', 'other'=>'date'],//创建时间
-                'STATUS'=> ['name'=> 'Order status', 'other'=> 'select', 'selectData'=> [
+                'STATUS'=> ['name'=> 'Status', 'other'=> 'select', 'selectData'=> [
                     ['id' => \Yii::$app->params['orderStatus']['paid']['value'], 'name' => \Yii::$app->params['orderStatus']['paid']['label']],
                     ['id' => \Yii::$app->params['orderStatus']['notPaid']['value'], 'name' => \Yii::$app->params['orderStatus']['notPaid']['label']],
                     ['id' => \Yii::$app->params['orderStatus']['failPaid']['value'], 'name' => \Yii::$app->params['orderStatus']['failPaid']['label']]

+ 4 - 4
backendApi/modules/v1/models/lists/shop/OrderShopList.php

@@ -65,7 +65,7 @@ class OrderShopList extends \common\libs\dataList\DataList implements DataListIn
                     },
                 ],
                 'CONSIGNEE' => [
-                    'header' => 'consignee',//收货人
+                    'header' => 'Recipient',//收货人
                     'headerOther' => [
                         'width' => '150',
                     ],
@@ -80,21 +80,21 @@ class OrderShopList extends \common\libs\dataList\DataList implements DataListIn
                     'header' => 'Contact 2',//联系方式1
                 ],
                 'PROVINCE' => [
-                    'header' => 'state',//
+                    'header' => 'State', // 
                     'headerOther' => ['width' => '120'],
                     'value' => function ($row) use($regionConfig) {
                         return $regionConfig[$row['PROVINCE']]['REGION_NAME'] ?? '';
                     },
                 ],
                 'CITY' => [
-                    'header' => 'local government area',//地方政府
+                    'header' => 'Local Government Area', // 地方政府
                     'headerOther' => ['width' => '120'],
                     'value' => function ($row) use($regionConfig) {
                         return $regionConfig[$row['CITY']]['REGION_NAME'] ?? '';
                     },
                 ],
                 'COUNTY' => [
-                    'header' => 'city',//市
+                    'header' => 'City', // 区
                     'headerOther' => ['width' => '120'],
                     'value' => function ($row) use($regionConfig) {
                         return $regionConfig[$row['COUNTY']]['REGION_NAME'] ?? '';

+ 5 - 5
backendApi/modules/v1/models/lists/shop/OrderStandardList.php

@@ -48,7 +48,7 @@ class OrderStandardList extends \common\libs\dataList\DataList implements DataLi
         if(!$this->columns){
             $this->columns = [
                 'CALC_MONTH' => [
-                    'header' => 'Settlement month',//结算月
+                    'header' => 'Bonus Month', // 结算月
                 ],
                 'USER_NAME' => [
                     'header' => 'Member code',//会员编号
@@ -66,7 +66,7 @@ class OrderStandardList extends \common\libs\dataList\DataList implements DataLi
                     },
                 ],
                 'CONSIGNEE' => [
-                    'header' => 'consignee',//收货人
+                    'header' => 'Recipient', // 收货人
                     'headerOther' => [
                         'width' => '150',
                     ],
@@ -81,21 +81,21 @@ class OrderStandardList extends \common\libs\dataList\DataList implements DataLi
                     'header' => 'Contact 2',//联系方式2
                 ],
                 'PROVINCE' => [
-                    'header' => 'state',
+                    'header' => 'State',
                     'headerOther' => ['width' => '120'],
                     'value' => function ($row) use($regionConfig) {
                         return $regionConfig[$row['PROVINCE']]['REGION_NAME'] ?? '';
                     },
                 ],
                 'CITY' => [
-                    'header' => 'local government area',//地方行政区
+                    'header' => 'Local Government Area', // 地方行政区
                     'headerOther' => ['width' => '120'],
                     'value' => function ($row) use($regionConfig) {
                         return $regionConfig[$row['CITY']]['REGION_NAME'] ?? '';
                     },
                 ],
                 'COUNTY' => [
-                    'header' => 'city',//市
+                    'header' => 'City', // 区
                     'headerOther' => ['width' => '120'],
                     'value' => function ($row) use($regionConfig) {
                         return $regionConfig[$row['COUNTY']]['REGION_NAME'] ?? '';

+ 1 - 1
backendApi/modules/v1/models/lists/shop/PackageList.php

@@ -70,7 +70,7 @@ class PackageList extends \common\libs\dataList\DataList implements DataListInte
                     },
                 ],
 			'STORE_NUMS' => [
-			    'header' => 'Kitting stock',//库存
+			    'header' => 'Kitting stock', // 库存
 			    'headerOther' => ['width' => '200'],
 			],
                 'AMOUNT' => [

+ 1 - 1
backendApi/modules/v1/models/lists/user/DecLevelList.php

@@ -79,7 +79,7 @@ class DecLevelList extends \common\libs\dataList\DataList implements DataListInt
                     ],
                 ],
                 'ADMIN_NAME' => [
-                    'header' => 'Operation administrator',//操作管理员
+                    'header' => 'Operation Administrator',//操作管理员
 //                    'headerOther' => ['width' => '120'],
                 ],
                 'CREATED_AT' => [

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

@@ -118,7 +118,7 @@ class IndexList extends \common\libs\dataList\DataList implements DataListInterf
                 ],
                 'ALLOW_LOGIN' => ['header' => 'Filter allow login','hidden'=>true],//筛选允许登录
                 'CREATED_AT' => [
-                    'header' => 'Date of accession',//加入日期
+                    'header' => 'Joining Date', // 加入日期
                     'value' => function($row) {
                         return (new DateTime([
                             'value' => $row['CREATED_AT'],
@@ -126,7 +126,7 @@ class IndexList extends \common\libs\dataList\DataList implements DataListInterf
                     },
                     'headerOther' => ['width' => '170'],
                 ],
-                'PERIOD_AT' => 'Number of joining periods',//加入期数
+                'PERIOD_AT' => 'Joining Period',//加入期数
                 'DEC_LV_NAME' => [
                     'header' => 'Real time membership level',//实时会员级别
                     'headerOther' => [
@@ -204,7 +204,7 @@ class IndexList extends \common\libs\dataList\DataList implements DataListInterf
                     'headerOther' => ['width' => '150'],
                 ],
                 'CON_REAL_NAME' => [
-                    'header' => 'Placement name',//安置姓名
+                    'header' => 'Placement Name',//安置姓名
                     'headerOther' => ['width' => '100'],
                 ],
                 'RELATIVE_LOCATION' => [
@@ -243,21 +243,21 @@ class IndexList extends \common\libs\dataList\DataList implements DataListInterf
 //                    },
 //                ],
                 'MOBILE' => [
-                    'header' => 'phone number',//手机号码
+                    'header' => 'Phone Number',//手机号码
                     'value' => function($row) {
                         return "\t".$row['MOBILE'];
                     },
                     'headerOther' => ['width' => '120'],
                 ],
                 'TEL' => [
-                    'header' => 'Alternate Phone number​',//备用手机号码
+                    'header' => 'Alternate Phone Number', // 备用手机号码
                     'value' => function($row) {
                         return "\t".$row['TEL'];
                     },
                     'headerOther' => ['width' => '120'],
                 ],
                 'DEC_USER_NAME' => [
-                    'header' => 'No. of reporting center',//所属报单中心编号
+                    'header' => 'Stockist Code', // 所属报单中心编号
                     'headerOther' => ['width' => '150'],
                 ],
                 'IS_DEC' => [
@@ -333,14 +333,14 @@ class IndexList extends \common\libs\dataList\DataList implements DataListInterf
                     },
                 ],
                 'DEC_ROLE_NAME' => [
-                    'header' => 'Entry center level',//报单中心级别
+                    'header' => 'Stockist Level',//报单中心级别
                     'headerOther' => ['width' => '110'],
                     'value' => function($row) use($decRoleConfig) {
                         return $decRoleConfig[$row['DEC_ROLE_ID']]['ROLE_NAME'] ?? '';
                     },
                 ],
                 'OPEN_BANK_NAME' => [
-                    'header' => 'Deposit bank',//开户银行
+                    'header' => 'Bank Name',//开户银行
                     'headerOther' => ['width' => '110'],
                     'value' => function($row) use($openBankConfig) {
                         return $openBankConfig[$row['OPEN_BANK']]['BANK_NAME'] ?? '';
@@ -403,49 +403,49 @@ class IndexList extends \common\libs\dataList\DataList implements DataListInterf
                         'width' => '200'
                     ],
                 ],
-                'ADDRESS' => [
-                    'header' => 'ID card address',//身份证地址
-                    'value' => function($row) {
-                        return $row['ADDRESS'];
-                    },
-                    'showValue' => function($row) {
-                        return '<div class="addr" title='.$row['ADDRESS'].'>'.$row['ADDRESS'].'</div>';
-                    },
-                    'headerOther' => ['width' => '250'],
-                ],
+//                'ADDRESS' => [
+//                    'header' => 'ID card address',//身份证地址
+//                    'value' => function($row) {
+//                        return $row['ADDRESS'];
+//                    },
+//                    'showValue' => function($row) {
+//                        return '<div class="addr" title='.$row['ADDRESS'].'>'.$row['ADDRESS'].'</div>';
+//                    },
+//                    'headerOther' => ['width' => '250'],
+//                ],
 //                'IS_AUTO_WITHDRAW' => [
 //                    'header' => '提现方式',
 //                    'value' => function($row) {
 //                        return $row['IS_AUTO_WITHDRAW']==0?'手动':'自动';
 //                    },
 //                ],
-                'VERIFIED' => [
-                    'header' => 'Real name authentication',//实名认证
-                    'value' => function($row) {
-                        return (new YesNo([
-                            'value' => $row['VERIFIED'],
-                        ]))->result();
-                    },
-                    'headerOther' => function($row) {
-                        return [
-                            'width' => '120',
-                        ];
-                    },
-                    'valueOther' => function($row) {
-                        return [
-                            'tag'=>['type'=>(isset($row['VERIFIED']) && $row['VERIFIED']) ? 'success' : 'info', 'size' => 'small']
-                        ];
-                    },
-                ],
-                'VERIFIED_AT' => [
-                    'header' => 'Real name certification date',//实名认证日期
-                    'value' => function($row) {
-                        return (new DateTime([
-                            'value' => $row['VERIFIED_AT'],
-                        ]))->result();
-                    },
-                    'headerOther' => ['width' => '170'],
-                ],
+//                'VERIFIED' => [
+//                    'header' => 'Real name authentication',//实名认证
+//                    'value' => function($row) {
+//                        return (new YesNo([
+//                            'value' => $row['VERIFIED'],
+//                        ]))->result();
+//                    },
+//                    'headerOther' => function($row) {
+//                        return [
+//                            'width' => '120',
+//                        ];
+//                    },
+//                    'valueOther' => function($row) {
+//                        return [
+//                            'tag'=>['type'=>(isset($row['VERIFIED']) && $row['VERIFIED']) ? 'success' : 'info', 'size' => 'small']
+//                        ];
+//                    },
+//                ],
+//                'VERIFIED_AT' => [
+//                    'header' => 'Real name certification date',//实名认证日期
+//                    'value' => function($row) {
+//                        return (new DateTime([
+//                            'value' => $row['VERIFIED_AT'],
+//                        ]))->result();
+//                    },
+//                    'headerOther' => ['width' => '170'],
+//                ],
 //                'IS_DIRECT_SELLER' => [
 //                    'header' => '是否直销员',
 //                    'value' => function($row) {
@@ -508,7 +508,7 @@ class IndexList extends \common\libs\dataList\DataList implements DataListInterf
                     'headerOther' => ['width' => '110'],
                 ],
                 'ALLOW_TRANSFER' => [
-                    'header' => 'Transfer function enabled',//转账功能开启
+                    'header' => 'Enable "Transfer"', // 转账功能开启
                     'value' => function($row) {
                         return $row['ALLOW_TRANSFER'] == 1 ? 'on': 'off';//'开启' : '关闭'
                     },
@@ -542,7 +542,7 @@ class IndexList extends \common\libs\dataList\DataList implements DataListInterf
                     },
                 ],
                 'IS_MODIFY_PASSWORD' => [
-                    'header' => 'Password modification status',//密码修改状态
+                    'header' => 'Edit Password', // 密码修改状态
                     'value' => function($row) {
                         return $row['IS_MODIFY_PASSWORD'] == 1 ? 'on': 'off';//'开启' : '关闭'
                     },
@@ -570,12 +570,12 @@ class IndexList extends \common\libs\dataList\DataList implements DataListInterf
     {
         if(!$this->filterTypes){
             $this->filterTypes = [
-                'USER_NAME'=> ['name'=> 'Member code'],//会员编号
-                'REAL_NAME'=> ['name'=> 'Member name'],//会员姓名
+                'USER_NAME'=> ['name'=> 'Member code'], // 会员编号
+                'REAL_NAME'=> ['name'=> 'Member name'], // 会员姓名
 //                'ALLOW_LOGIN'=> ['name'=> '允许登录', 'other'=> 'yesOrNo'],
-                'CREATED_AT'=> ['name'=> 'Date of accession', 'other'=> 'date'],//加入日期
-                'PERIOD_AT'=> ['name'=> 'Number of joining periods'],//加入期数
-                'DEC_LV_NAME'=> ['name'=> 'Real time membership level', 'other'=> 'decLevel'],//实时会员级别
+                'CREATED_AT'=> ['name'=> 'Joining Date', 'other'=> 'date'], // 加入日期
+                'PERIOD_AT'=> ['name'=> 'Joining Period'], // 加入期数
+                'DEC_LV_NAME'=> ['name'=> 'Real time membership level', 'other'=> 'decLevel'], // 实时会员级别
 //                'DEC_LV_UPDATED_AT'=> ['name'=> '实时调整日期', 'other'=> 'date'],
 //                'LAST_DEC_LV_NAME'=> ['name'=> '结算时会员级别', 'other'=> 'decLevel'],
                 'EMP_LV_NAME'=> ['name'=> 'Real time employment', 'other'=> 'empLevel'],//实时聘级
@@ -589,12 +589,12 @@ class IndexList extends \common\libs\dataList\DataList implements DataListInterf
 //                'SPOUSE_IDCARD'=> ['name'=> '配偶身份证号'],
 //                'SYSTEM_NAME'=> ['name'=> '体系名称', 'other'=> 'systems'],
 //                'SUB_COM_NAME'=> ['name'=> '所属分公司', 'other'=> 'subCompany'],
-                'MOBILE'=> ['name'=> 'phone number'],//手机号码
+                'MOBILE'=> ['name'=> 'Phone Number'],//手机号码
 //                'TEL'=> ['name'=> '备用手机号码'],
-                'DEC_USER_NAME'=> ['name'=> 'No. of reporting center'],//所属报单中心编号
+                'DEC_USER_NAME'=> ['name'=> 'Stockist Code'], // 所属报单中心编号
                 'IS_DEC'=> ['name'=> 'Declaration center or not', 'other'=> 'yesOrNo'],//是否报单中心
                 'IS_STUDIO'=> ['name'=> 'Studio or not', 'other'=> 'yesOrNo'],//是否工作室
-                'DEC_ROLE_NAME'=> ['name'=> 'Entry center level', 'other'=> 'decRole'],//报单中心级别
+                'DEC_ROLE_NAME'=> ['name'=> 'Stockist Level', 'other'=> 'decRole'],//报单中心级别
 //                'OPEN_BANK_NAME'=> ['name'=> '开户银行', 'other'=> 'banks'],
 //                'BANK_AREA'=> ['name'=> '银行地区', 'other'=> 'area'],
 //                'BANK_ADDRESS'=> ['name'=> '开户地址'],

+ 1 - 1
backendApi/modules/v1/models/lists/user/MoveList.php

@@ -107,7 +107,7 @@ class MoveList extends \common\libs\dataList\DataList implements DataListInterfa
                     'headerOther' => ['width' => '120'],
                 ],
                 'CREATED_AT' => [
-                    'header' => 'Date of accession',//加入日期
+                    'header' => 'Joining Date', // 加入日期
                     'value' => function($row) {
                         return (new DateTime([
                             'value' => $row['CREATED_AT'],

+ 3 - 3
backendEle/src/components/WithdrawTable.vue

@@ -178,7 +178,7 @@
           {{scope.row.AUDIT_ADMIN_NAME}}
         </template>
       </el-table-column>
-      <el-table-column label="Note" width="150"> <!-- 备注 -->
+      <el-table-column label="Remark" width="150"> <!-- 备注 -->
         <template slot-scope="scope">
           {{scope.row.REMARK}}
         </template>
@@ -332,7 +332,7 @@
           > <!-- 选择日期 -->
           </el-date-picker>
         </el-form-item>
-        <el-form-item label="Note"> <!-- 备注 -->
+        <el-form-item label="Remark"> <!-- 备注 -->
           <el-input v-model="form.createRemark"></el-input>
         </el-form-item>
       </el-form>
@@ -434,7 +434,7 @@
           <el-input v-model="invoiceForm.invoiceRemark" type="textarea"
                     :rows="2"></el-input>
         </el-form-item>
-        <el-form-item label="Note"> <!-- 备注 -->
+        <el-form-item label="Remark"> <!-- 备注 -->
           <el-input v-model="invoiceForm.createRemark"></el-input>
         </el-form-item>
       </el-form>

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

@@ -146,7 +146,7 @@ export const constantRouterMap = [
         component: _import('shop/goods-add'),
         name: 'shop_goods-add',
         meta: {
-          title: 'Products add', // 商品添加
+          title: 'Add Product', // 商品添加
           breadcrumb: [
             {title: 'Dashboard', path: '/dashboard/index'}, // Dashboard
             {title: 'Shopping Mall', path: '/shop/dec-order-list'}, // 商城管理
@@ -461,7 +461,7 @@ export const constantRouterMap = [
         component: _import('user/change-user-dec-role'),
         name: 'user_change-user-dec-role',
         meta: {
-          title: 'Modify entry center level', // 修改报单中心级别
+          title: 'Modify Stockist Level', // 修改报单中心级别
           breadcrumb: [
             {title: 'Dashboard', path: '/dashboard/index'}, // Dashboard
             {title: 'Member management', path: '/user/index'}, // 会员管理
@@ -507,7 +507,7 @@ export const constantRouterMap = [
           title: 'Sponor network', // 开拓网络
           breadcrumb: [
             {title: 'Dashboard', path: '/dashboard/index'}, // Dashboard
-            {title: 'Network Atlas', path: '/atlas/relation-opt'}, // 网络图谱
+            {title: 'Network Chart', path: '/atlas/relation-opt'}, // 网络图谱
           ],
         },
       },
@@ -519,7 +519,7 @@ export const constantRouterMap = [
           title: 'Placement network', // 安置网络
           breadcrumb: [
             {title: 'Dashboard', path: '/dashboard/index'}, // Dashboard
-            {title: 'Network Atlas', path: '/atlas/relation-opt'}, // 网络图谱
+            {title: 'Network Chart', path: '/atlas/relation-opt'}, // 网络图谱
           ],
         },
       },
@@ -531,7 +531,7 @@ export const constantRouterMap = [
           title: '安置链路',
           breadcrumb: [
             {title: 'Dashboard', path: '/dashboard/index'},
-            {title: 'Network Atlas', path: '/atlas/relation-opt'},
+            {title: 'Network Chart', path: '/atlas/relation-opt'},
           ],
         },
       },
@@ -543,7 +543,7 @@ export const constantRouterMap = [
           title: '聘级网络',
           breadcrumb: [
             {title: 'Dashboard', path: '/dashboard/index'},
-            {title: 'Network Atlas', path: '/atlas/relation-opt'},
+            {title: 'Network Chart', path: '/atlas/relation-opt'},
           ],
         },
       },
@@ -555,7 +555,7 @@ export const constantRouterMap = [
       //     title: '聘级网络列表',
       //     breadcrumb: [
       //       {title: 'Dashboard', path: '/dashboard/index'},
-      //       {title: 'Network Atlas', path: '/atlas/relation-opt'},
+      //       {title: 'Network Chart', path: '/atlas/relation-opt'},
       //     ],
       //   },
       // },

+ 3 - 3
backendEle/src/views/atlas/network-opt.vue

@@ -27,9 +27,9 @@
                 <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>
+                <el-tag type="warning"><!-- 聘级 -->Rank:{{data.EMP_LV_NAME}}, {{data.STAR_LV_NAME}}</el-tag>
+<!--                <el-tag type="warning">&lt;!&ndash; 聘级 &ndash;&gt;Star:{{data.STAR_LV_NAME}}</el-tag>-->
+                <el-tag><!-- 加入期数 -->Joining Period:{{data.PERIOD_AT}}</el-tag>
               </span>
             </span>
           </el-tree>

+ 2 - 2
backendEle/src/views/atlas/relation-opt.vue

@@ -26,8 +26,8 @@
                       <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>
+                      <el-tag type="warning">Rank:<!-- 聘级 -->{{data.EMP_LV_NAME}}, {{data.STAR_LV_NAME}}</el-tag>
+<!--                      <el-tag type="warning">Star:&lt;!&ndash; 星级 &ndash;&gt;{{data.STAR_LV_NAME}}</el-tag>-->
                     </span>
                 </span>
           </el-tree>

+ 1 - 1
backendEle/src/views/bonus/balance-list.vue

@@ -43,7 +43,7 @@
             <el-option v-for="(item,key) in statuses" :label="item.label" :value="item.value" :key="key"></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="Note"><!-- 备注 -->
+        <el-form-item label="Remark"><!-- 备注 -->
           <el-input type="textarea" :row="2" placeholder="Please enter the content" v-model="form.remark"><!-- 请输入内容 --></el-input>
         </el-form-item>
       </el-form>

+ 4 - 4
backendEle/src/views/bonus/period.vue

@@ -12,7 +12,7 @@
             <el-tag type="" size="small" class="no-border">{{scope.row.PERIOD_NUM}}</el-tag>
           </template>
         </el-table-column>
-        <el-table-column label="Settlement month" width="100"><!-- 所在结算月 -->
+        <el-table-column label="Bonus Month" width="100"><!-- 所在结算月 -->
           <template slot-scope="scope">
             <el-tag type="warning" size="small" class="no-border">{{scope.row.CALC_YEAR}}-{{scope.row.CALC_MONTH}}
             </el-tag>
@@ -47,7 +47,7 @@
                          :width="50" :stroke-width="3"></el-progress>
           </template>
         </el-table-column>
-        <el-table-column label="Settlement time" width="210"><!-- 结算时间 -->
+        <el-table-column label="Date" width="210"><!-- 结算时间 -->
           <template slot-scope="scope">
             <!-- 开始 -->start:{{tool.formatDate(scope.row.CALCULATE_STARTED_AT)}}<br>
             <!-- 完成 -->complete:{{tool.formatDate(scope.row.CALCULATED_AT)}}
@@ -154,8 +154,8 @@
         permission: permission,
         filterTypes: {
           'periodNum': {isUserTable: false, name: 'Number of periods'},//期数
-          'year': {isUserTable: false, name: 'Settlement year'},//所在结算年
-          'month': {isUserTable: false, name: 'Settlement month'},//所在结算月
+          'year': {isUserTable: false, name: 'Bonus Year'},//所在结算年
+          'month': {isUserTable: false, name: 'Bonus Month'},//所在结算月
           'startTime': {isUserTable: false, name: 'Period start time', other: 'date'},//期数开始时间
           'endTime': {isUserTable: false, name: 'Period end time', other: 'date'},//期数结束时间
           'closedAt': {isUserTable: false, name: 'Closing time', other: 'date'},//封期时间

+ 2 - 2
backendEle/src/views/finance/balance-audit-list.vue

@@ -93,7 +93,7 @@
                          :key="item.ID"></el-option>
             </el-select>
           </el-form-item>
-          <el-form-item label="Note"><!-- 备注 -->
+          <el-form-item label="Remark"><!-- 备注 -->
             <el-input v-model="form.remark"></el-input>
           </el-form-item>
           <el-form-item label="Remarks foreground display"><!-- 备注前台显示 -->
@@ -136,7 +136,7 @@
             <el-switch v-model="form.isShow" active-value="1" inactive-value="0">
             </el-switch>
           </el-form-item>
-          <el-form-item label="Note"><!-- 备注 -->
+          <el-form-item label="Remark"><!-- 备注 -->
             <el-input v-model="form.remark"></el-input>
           </el-form-item>
         </el-form>

+ 1 - 1
backendEle/src/views/finance/change-balance-opt.vue

@@ -35,7 +35,7 @@
                            :key="item.ID"></el-option>
               </el-select>
             </el-form-item>
-            <el-form-item label="Note"><!--备注-->
+            <el-form-item label="Remark"><!--备注-->
               <el-input v-model="form.remark"></el-input>
             </el-form-item>
             <el-form-item label="Note on display"><!--备注前台显示-->

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

@@ -39,7 +39,7 @@
             {{tool.formatDate(scope.row.UPDATED_AT)}}
           </template>
         </el-table-column>
-        <el-table-column label="Note" width="150">
+        <el-table-column label="Remark" width="150">
           <template slot-scope="scope">
             {{scope.row.CREATE_REMARK}}
           </template>

+ 1 - 1
backendEle/src/views/finance/recharge-status.vue

@@ -9,7 +9,7 @@
                                    :value="index"></el-option>
                     </el-select>
                 </el-form-item>
-                <el-form-item label="Note"> <!-- 备注 -->
+                <el-form-item label="Remark"> <!-- 备注 -->
                     <el-input v-model="form.createRemark"></el-input>
                 </el-form-item>
                 <el-form-item>

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

@@ -20,7 +20,7 @@
         <el-form-item label="提现金额">
           <el-input v-model="form.applyAmount" type="number"></el-input>
         </el-form-item>
-        <el-form-item label="Note"> <!-- 备注 -->
+        <el-form-item label="Remark"> <!-- 备注 -->
           <el-input v-model="form.createRemark"></el-input>
         </el-form-item>
         <el-form-item>

+ 300 - 301
backendEle/src/views/finance/withdraw.vue

@@ -144,7 +144,7 @@
               >
               </el-date-picker>
             </el-form-item>
-            <el-form-item label="Note"> <!-- 备注 -->
+            <el-form-item label="Remark"> <!-- 备注 -->
               <el-input v-model="form.createRemark"></el-input>
             </el-form-item>
           </el-form>
@@ -202,313 +202,312 @@ import baseInfo from '@/utils/baseInfo'
 import Pagination from '@/components/Pagination'
 import filterHelper from '../../utils/filterHelper'
 export default {
-    name: 'finance_withdraw',
-    components: {FilterUser, Pagination},
+  name: 'finance_withdraw',
+  components: {FilterUser, Pagination},
 
-    data() {
-        return {
-            activeName: 'all',
-            tableHeaders: null,
-            baseDecLevels: baseInfo.decLevels(),
+  data () {
+    return {
+      activeName: 'all',
+      tableHeaders: null,
+      baseDecLevels: baseInfo.decLevels(),
 
-            allData: null,
-            tableData: null,
-            loading: true,
-            multipleSelection: [],
-            currentPage: 1,
-            totalPages: 1,
-            totalCount: 1,
-            pageSize: 20,
-            tool: tool,
-            permission: permission,
-            regTypes: baseInfo.regTypes(),
-            dialogEditFormVisible: false,
-            dialogEditLoading: false,
-            dialogAuditFormVisible: false,
-            dialogAuditLoading: false,
-            dialogAddInvoiceVisible: false,
-            dialogAddInvoiceLoading: false,
-            auditId: null,
-            form: {
-                id: null,
-                baseInfo: {USER_NAME: null, REG_TYPE: null},
-                amount: null,
-                planPaidAt: null,
-                paidAt: new Date(),
-                createRemark: null,
-            },
-            invoiceForm: {
-                id: null,
-                withdrawId: null,
-                withdrawSn: null,
-                invoiceCode: null,
-                invoiceNum: null,
-                invoiceDate: null,
-                amount: null,
-                taxRate: null,
-                purchaserName: null,
-                purchaserRegisterNum: null,
-                purchaserAddress: null,
-                purchaserBank: null,
-                sellerName: null,
-                sellerRegisterNum: null,
-                sellerAddress: null,
-                sellerBank: null,
-                itemName: null,
-                invoiceRemark: null,
-                createRemark: null,
-            },
-            pickerOptions0: {
-                disabledDate(time) {
-                    return time.getTime() < Date.now();
-                }
-            },
-            pickerOptions1: {
-                disabledDate(time) {
-                    return time.getTime() < Date.now() - 8.64e7;
-                }
-            },
-            auditRemark: '',
-            auditForm: {
-                auditTips: '',
-                auditStatus: null,
-                selectedIds: [],
-                planPaidAt: null,
-                createRemark: null,
-                withdrawAudit: '',
-            },
-            auditTips: '',
-            filterTypes: {},
-            filterModel: {},
-            excelForm: {
-                rowCount: '',
-            },
-            filterStatus: '0',
+      allData: null,
+      tableData: null,
+      loading: true,
+      multipleSelection: [],
+      currentPage: 1,
+      totalPages: 1,
+      totalCount: 1,
+      pageSize: 20,
+      tool: tool,
+      permission: permission,
+      regTypes: baseInfo.regTypes(),
+      dialogEditFormVisible: false,
+      dialogEditLoading: false,
+      dialogAuditFormVisible: false,
+      dialogAuditLoading: false,
+      dialogAddInvoiceVisible: false,
+      dialogAddInvoiceLoading: false,
+      auditId: null,
+      form: {
+        id: null,
+        baseInfo: {USER_NAME: null, REG_TYPE: null},
+        amount: null,
+        planPaidAt: null,
+        paidAt: new Date(),
+        createRemark: null,
+      },
+      invoiceForm: {
+        id: null,
+        withdrawId: null,
+        withdrawSn: null,
+        invoiceCode: null,
+        invoiceNum: null,
+        invoiceDate: null,
+        amount: null,
+        taxRate: null,
+        purchaserName: null,
+        purchaserRegisterNum: null,
+        purchaserAddress: null,
+        purchaserBank: null,
+        sellerName: null,
+        sellerRegisterNum: null,
+        sellerAddress: null,
+        sellerBank: null,
+        itemName: null,
+        invoiceRemark: null,
+        createRemark: null,
+      },
+      pickerOptions0: {
+        disabledDate(time) {
+          return time.getTime() < Date.now();
         }
-    },
-  mounted () {
-      this.getData();
-   /* if (permission.hasPermission(`finance/withdraw-7`)) {
-      this.activeName = 'seven'
-    }
-    if (permission.hasPermission(`finance/withdraw-4`)) {
-      this.activeName = 'four'
-    }
-    if (permission.hasPermission(`finance/withdraw-6`)) {
-      this.activeName = 'six'
-    }
-    if (permission.hasPermission(`finance/withdraw-3`)) {
-      this.activeName = 'three'
-    }
-    if (permission.hasPermission(`finance/withdraw-2`)) {
-      this.activeName = 'two'
-    }
-    if (permission.hasPermission(`finance/withdraw-1`)) {
-      this.activeName = 'one'
-    }
-    if (permission.hasPermission(`finance/withdraw-0`)) {
-      this.activeName = 'zero'
+      },
+      pickerOptions1: {
+        disabledDate(time) {
+          return time.getTime() < Date.now() - 8.64e7;
+        }
+      },
+      auditRemark: '',
+      auditForm: {
+        auditTips: '',
+        auditStatus: null,
+        selectedIds: [],
+        planPaidAt: null,
+        createRemark: null,
+        withdrawAudit: '',
+      },
+      auditTips: '',
+      filterTypes: {},
+      filterModel: {},
+      excelForm: {
+        rowCount: '',
+      },
+      filterStatus: '0',
     }
-    if (permission.hasPermission(`finance/withdraw-0`) && permission.hasPermission(`finance/withdraw-1`) && permission.hasPermission(`finance/withdraw-2`) && permission.hasPermission(`finance/withdraw-3`) && permission.hasPermission(`finance/withdraw-6`) && permission.hasPermission(`finance/withdraw-4`) && permission.hasPermission(`finance/withdraw-7`)) {
-      this.activeName = 'all'
-    }*/
+  },
+  mounted () {
+    this.getData();
+    // if (permission.hasPermission(`finance/withdraw-7`)) {
+    //   this.activeName = 'seven'
+    // }
+    // if (permission.hasPermission(`finance/withdraw-4`)) {
+    //   this.activeName = 'four'
+    // }
+    // if (permission.hasPermission(`finance/withdraw-6`)) {
+    //   this.activeName = 'six'
+    // }
+    // if (permission.hasPermission(`finance/withdraw-3`)) {
+    //   this.activeName = 'three'
+    // }
+    // if (permission.hasPermission(`finance/withdraw-2`)) {
+    //   this.activeName = 'two'
+    // }
+    // if (permission.hasPermission(`finance/withdraw-1`)) {
+    //   this.activeName = 'one'
+    // }
+    // if (permission.hasPermission(`finance/withdraw-0`)) {
+    //   this.activeName = 'zero'
+    // }
+    // if (permission.hasPermission(`finance/withdraw-0`) && permission.hasPermission(`finance/withdraw-1`) && permission.hasPermission(`finance/withdraw-2`) && permission.hasPermission(`finance/withdraw-3`) && permission.hasPermission(`finance/withdraw-6`) && permission.hasPermission(`finance/withdraw-4`) && permission.hasPermission(`finance/withdraw-7`)) {
+    //   this.activeName = 'all'
+    // }
   },
 
-      methods: {
-          handleMuli(command) {
-              if (this.multipleSelection.length < 1) {
-                  this.$message({
-                      message: '请选择要操作的记录',
-                      type: 'warning'
-                  })
-                  return;
-              }
-              this.handleAudit(null, command)
-          },
-          handleAudit(row = null, status) {
-              let title = ''
-              if (status === '2') {
-                  title = '确定要通过审核?备注:'
-              }else if(status === '3'){
-                  title = '确定要设为待付款?备注:'
-              }else if(status === '4'){
-                  title = '确定要设为付款失败?备注:'
-              }else if(status === '6'){
-                  title = '确定要设为已付款?备注:'
-              }else if(status === '7'){
-                  title = '确定要设为已退回?备注:'
-              }
-              this.handleStatusShow(row,status,title);
-          },
-          handleExpand(row, event, column) {
-              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('确定要导出当前表格中的提现数据吗?', 'Hint', {
-                  confirmButtonText: 'confirm', // 确定
-                  cancelButtonText: 'cancel', // 取消
-                  type: 'warning'
-              }).then(() => {
-                  return network.getData('finance/withdraw-export', filterData)
-              }).then(response => {
-                  this.$message({
-                      message: response,
-                      type: 'success'
-                  })
-              }).catch(response => {
-              })
-          },
-          handleAdd() {
-              this.$router.push({path: `/finance/withdraw-add`})
-          },
-          handleExcel() {
-          },
-          handleExcelPaidFalse() {
-              window.open(CDN_BASE_URL + `/files/bonus_withdraw_paid_false.xlsx`)
-          },
-          handleEditShow(row) {
-              this.dialogEditLoading = true
-              this.auditId = row.ID
-              this.dialogEditFormVisible = true
-              let vueObj = this
-              network.getData('finance/withdraw-get', {id: this.auditId}).then(response => {
-                  vueObj.dialogEditLoading = false
-                  vueObj.form = response
-              })
-          },
-          handleEdit() {
-              this.dialogEditFormVisible = false
-              this.$message({
-                  message: '正在修改数据',
-                  type: 'info'
-              })
-              this.loading = true
-              let path = 'finance/withdraw-edit'
-              network.postData(path, this.form).then(response => {
-                  this.$message({
-                      message: response,
-                      type: 'success'
-                  })
-                  this.getData(this.currentPage, this.pageSize)
-              }).catch(response => {
-              })
-          },
-          handleStatusShow(row, status, title, remark = 'Note') { // 备注
-              this.auditForm = {
-                  auditTips: '',
-                  auditStatus: null,
-                  selectedIds: [],
-                  planPaidAt: null,
-                  paidAt: new Date(),
-                  remark: null,
-              }
-              if (row === null) {
-                  for (let val of this.multipleSelection) {
-                      this.auditForm.selectedIds.push(val.ID)
-                  }
-              } else {
-                  this.auditForm.selectedIds.push(row.ID)
-              }
-              if (this.auditForm.selectedIds.length === 0) {
-                  this.$message({
-                      message: '请选择数据',
-                      type: 'warning'
-                  })
-                  return
-              }
-              this.auditRemark = remark
-              this.dialogAuditFormVisible = true
-              this.auditForm.auditTips = title
-              this.auditForm.auditStatus = status
-          },
-          handleStatus() {
-              network.postData('finance/mult-point', {opType: 2}).then(response => {
-                  this.auditForm.withdrawAudit = response.withdrawAudit
-                  this.$confirm('Are you sure to change the state of the selected data?', 'Hint', { // 确定要对所选数据修改状态吗?
-                      confirmButtonText: 'confirm', // 确定
-                      cancelButtonText: 'cancel', // 取消
-                      type: 'warning'
-                  }).then(() => {
-                      return network.postData('finance/withdraw-status', this.auditForm)
-                  }).then(response => {
-                      this.dialogAuditFormVisible = false
-                      this.$message({
-                          message: response,
-                          type: 'success'
-                      })
-                      this.getData(this.currentPage, this.pageSize)
-                  }).catch(response => {
-                      this.dialogAuditFormVisible = false
-                  })
-              })
-          },
-          handleAddInvoiceShow(row) {
-              this.dialogAddInvoiceVisible = true
-              this.auditId = row.INVOICE_ID
-              this.dialogAddInvoiceLoading = true
-              let vueObj = this
-              network.getData('finance/invoice-audit-get', {id: this.auditId}).then(response => {
-                  vueObj.dialogAddInvoiceLoading = false
-                  vueObj.invoiceForm = response
-                  this.invoiceForm.withdrawSn = row.SN
-                  this.invoiceForm.withdrawId = row.ID
-              })
-          },
-          handleAddInvoice() {
-              let path = 'finance/invoice-audit-add'
-              if (this.invoiceForm.id) path = 'finance/invoice-audit-edit'
-              network.postData(path, this.invoiceForm).then(response => {
-                  this.$message({
-                      message: response,
-                      type: 'success'
-                  })
-                  this.dialogAddInvoiceVisible = false
-                  this.getData(this.currentPage, this.pageSize)
-              }).catch(response => {
-              })
-          },
-          handleSelectionChange(val) {
-              this.multipleSelection = val
-          },
-          handleCurrentChange(page) {
-              this.getData(page, this.pageSize)
-          },
-          handleSizeChange(pageSize) {
-              this.getData(this.currentPage, pageSize)
-          },
-          handleFilterStatusClick(tab, event) {
-              filterHelper.clearFilterOption(this)
-              this.getData()
-          },
-          handleFilterUser(filterData) {
-              filterHelper.handleFilterUser(this, filterData)
-          },
-          handleFilter() {
-              this.getData()
-          },
-          getData(page, pageSize) {
-              let filterData = this.filterModel
-              filterData.filterStatus = this.filterStatus != '-1' ? `=,${this.filterStatus}` : ''
-              let vueObj = this
-              network.getPageData(this, 'finance/withdraw', page, pageSize, filterData, function (response) {
-                  vueObj.allData = response
-                  vueObj.filterTypes = response.filterTypes
-              })
-          },
-          onMessageCallback() {
-              this.getData(this.currentPage, this.pageSize)
-          },
+  methods: {
+    handleMuli (command) {
+      if (this.multipleSelection.length < 1) {
+        this.$message({
+          message: '请选择要操作的记录',
+          type: 'warning'
+        })
+        return;
+      }
+      this.handleAudit(null, command)
+    },
+    handleAudit (row = null, status) {
+      let title = ''
+      if (status === '2') {
+        title = '确定要通过审核?备注:'
+      }else if(status === '3') {
+        title = '确定要设为待付款?备注:'
+      }else if(status === '4') {
+        title = '确定要设为付款失败?备注:'
+      }else if(status === '6') {
+        title = '确定要设为已付款?备注:'
+      }else if(status === '7') {
+        title = '确定要设为已退回?备注:'
+      }
+      this.handleStatusShow(row,status,title);
+    },
+    handleExpand (row, event, column) {
+      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('确定要导出当前表格中的提现数据吗?', 'Hint', {
+        confirmButtonText: 'confirm', // 确定
+        cancelButtonText: 'cancel', // 取消
+        type: 'warning'
+      }).then(() => {
+        return network.getData('finance/withdraw-export', filterData)
+      }).then(response => {
+        this.$message({
+          message: response,
+          type: 'success'
+        })
+      }).catch(response => {
+      })
+    },
+    handleAdd () {
+      this.$router.push({path: `/finance/withdraw-add`})
+    },
+    handleExcel () {
+    },
+    handleExcelPaidFalse () {
+      window.open(CDN_BASE_URL + `/files/bonus_withdraw_paid_false.xlsx`)
+    },
+    handleEditShow (row) {
+      this.dialogEditLoading = true
+      this.auditId = row.ID
+      this.dialogEditFormVisible = true
+      let vueObj = this
+      network.getData('finance/withdraw-get', {id: this.auditId}).then(response => {
+        vueObj.dialogEditLoading = false
+        vueObj.form = response
+      })
+    },
+    handleEdit () {
+      this.dialogEditFormVisible = false
+      this.$message({
+        message: '正在修改数据',
+        type: 'info'
+      })
+      this.loading = true
+      let path = 'finance/withdraw-edit'
+      network.postData(path, this.form).then(response => {
+        this.$message({
+          message: response,
+          type: 'success'
+        })
+        this.getData(this.currentPage, this.pageSize)
+      }).catch(response => {
+      })
+    },
+    handleStatusShow(row, status, title, remark = 'Remark') { // 备注
+      this.auditForm = {
+        auditTips: '',
+        auditStatus: null,
+        selectedIds: [],
+        planPaidAt: null,
+        paidAt: new Date(),
+        remark: null,
       }
+      if (row === null) {
+        for (let val of this.multipleSelection) {
+          this.auditForm.selectedIds.push(val.ID)
+        }
+      } else {
+        this.auditForm.selectedIds.push(row.ID)
+      }
+      if (this.auditForm.selectedIds.length === 0) {
+        this.$message({
+          message: '请选择数据',
+          type: 'warning'
+        })
+        return
+      }
+      this.auditRemark = remark
+      this.dialogAuditFormVisible = true
+      this.auditForm.auditTips = title
+      this.auditForm.auditStatus = status
+    },
+    handleStatus () {
+      network.postData('finance/mult-point', {opType: 2}).then(response => {
+        this.auditForm.withdrawAudit = response.withdrawAudit
+        this.$confirm('Are you sure to change the state of the selected data?', 'Hint', { // 确定要对所选数据修改状态吗?
+          confirmButtonText: 'confirm', // 确定
+          cancelButtonText: 'cancel', // 取消
+          type: 'warning'
+        }).then(() => {
+          return network.postData('finance/withdraw-status', this.auditForm)
+        }).then(response => {
+          this.dialogAuditFormVisible = false
+          this.$message({
+            message: response,
+            type: 'success'
+          })
+          this.getData(this.currentPage, this.pageSize)
+        }).catch(response => {
+          this.dialogAuditFormVisible = false
+        })
+      })
+    },
+    handleAddInvoiceShow (row) {
+      this.dialogAddInvoiceVisible = true
+      this.auditId = row.INVOICE_ID
+      this.dialogAddInvoiceLoading = true
+      let vueObj = this
+      network.getData('finance/invoice-audit-get', {id: this.auditId}).then(response => {
+        vueObj.dialogAddInvoiceLoading = false
+        vueObj.invoiceForm = response
+        this.invoiceForm.withdrawSn = row.SN
+        this.invoiceForm.withdrawId = row.ID
+      })
+    },
+    handleAddInvoice () {
+      let path = 'finance/invoice-audit-add'
+      if (this.invoiceForm.id) path = 'finance/invoice-audit-edit'
+      network.postData(path, this.invoiceForm).then(response => {
+        this.$message({
+          message: response,
+          type: 'success'
+        })
+        this.dialogAddInvoiceVisible = false
+        this.getData(this.currentPage, this.pageSize)
+      }).catch(response => {
+      })
+    },
+    handleSelectionChange(val) {
+      this.multipleSelection = val
+    },
+    handleCurrentChange(page) {
+      this.getData(page, this.pageSize)
+    },
+    handleSizeChange(pageSize) {
+      this.getData(this.currentPage, pageSize)
+    },
+    handleFilterStatusClick(tab, event) {
+      filterHelper.clearFilterOption(this)
+      this.getData()
+    },
+    handleFilterUser(filterData) {
+      filterHelper.handleFilterUser(this, filterData)
+    },
+    handleFilter() {
+      this.getData()
+    },
+    getData(page, pageSize) {
+      let filterData = this.filterModel
+      filterData.filterStatus = this.filterStatus != '-1' ? `=,${this.filterStatus}` : ''
+      let vueObj = this
+      network.getPageData(this, 'finance/withdraw', page, pageSize, filterData, function (response) {
+        vueObj.allData = response
+        vueObj.filterTypes = response.filterTypes
+      })
+    },
+    onMessageCallback() {
+      this.getData(this.currentPage, this.pageSize)
+    },
+  }
 }
 </script>
 

+ 1 - 1
backendEle/src/views/shop/goods-add.vue

@@ -3,7 +3,7 @@
         <div class="white-box">
             <el-form ref="form"  label-width="250px" class="form-page">
 
-                <el-form-item label="Products Name"><!-- 商品名称 -->
+                <el-form-item label="Product Name"><!-- 商品名称 -->
                     <el-input v-model="form.goodsName"></el-input>
                 </el-form-item>
                 <!-- <el-form-item label="商品来源">

+ 2 - 2
backendEle/src/views/shop/index.vue

@@ -52,7 +52,7 @@
                     </el-dropdown-menu>
                 </el-dropdown>-->
                 <el-button type="primary" size="small" @click="handlestate" icon="el-icon-plus"
-                           v-if="permission.hasPermission(`shop/goods-add`)"><!-- 商品添加 -->Products add
+                           v-if="permission.hasPermission(`shop/goods-add`)"><!-- 商品添加 -->Add Product
                 </el-button>
 
                 <el-button type="success" size="small" @click="handleExport" v-show="permission.hasPermission(`shop/goods-list-export`)">Export Excel</el-button>
@@ -67,7 +67,7 @@
             <el-form :model="form" label-width="250px" class="form-dialog" v-loading="dialogEditLoading">
 
 
-                    <el-form-item label="Products Name"><!-- 商品名称 -->
+                    <el-form-item label="Product Name"><!-- 商品名称 -->
                         <el-input v-model="form.goodsName"></el-input>
                     </el-form-item>
                     <!-- <el-form-item label="商品来源">

+ 1 - 1
backendEle/src/views/user/change-user-dec-level.vue

@@ -19,7 +19,7 @@
                        :key="key"></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="note"><!-- 备注 -->
+        <el-form-item label="Remark"><!-- 备注 -->
           <el-input type="textarea" :rows="2" placeholder="" v-model="form.remark">
           </el-input>
         </el-form-item>

+ 3 - 3
backendEle/src/views/user/change-user-dec-role.vue

@@ -8,13 +8,13 @@
             allDecRole[userInfo.DEC_ROLE_ID]['ROLE_NAME'] : ''}}
           </el-tag>
         </el-form-item>
-        <el-form-item label="Entry center level"><!-- 报单中心级别 -->
-          <el-select v-model="form.levelId" placeholder="Please select the entry center level"><!-- 请选择报单中心级别 -->
+        <el-form-item label="Stockist Level"><!-- 报单中心级别 -->
+          <el-select v-model="form.levelId" placeholder="Please select the Stockist level"><!-- 请选择报单中心级别 -->
             <el-option v-for="(item,key) in allDecRole" :label="item.ROLE_NAME" :value="item.ID"
                        :key="key"></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="Note"><!-- 备注 -->
+        <el-form-item label="Remark"><!-- 备注 -->
           <el-input type="textarea" :rows="2" placeholder="" v-model="form.remark">
           </el-input>
         </el-form-item>

+ 2 - 2
backendEle/src/views/user/empty-list.vue

@@ -123,7 +123,7 @@
         <el-form-item label="ID"><!-- 身份证号 -->
           <el-input v-model="formModifyProfile.idCard"></el-input>
         </el-form-item>
-        <el-form-item label="phone number"><!-- 手机号 -->
+        <el-form-item label="Phone Number"><!-- 手机号 -->
           <el-input v-model="formModifyProfile.mobile"></el-input>
         </el-form-item>
         <el-form-item label="Bank name"><!-- 银行名称 -->
@@ -335,7 +335,7 @@
               })
               return
           }
-          let isDecTip = isDec === true ? 'set as entry center ':' Cancel entry center ' //'设为报单中心' : '取消报单中心'
+          let isDecTip = isDec === true ? 'set as Stockist ':' Cancel Stockist ' //'设为报单中心' : '取消报单中心'
           this.$confirm(`Are you sure you want to【${isDecTip}】?`, 'Hint', {//`确定要对所选会员【${isDecTip}】吗?`, '提示'
               confirmButtonText: 'confirm', // 确定
               cancelButtonText: 'cancel', // 取消

+ 3 - 3
backendEle/src/views/user/index.vue

@@ -115,7 +115,7 @@
           </el-button>
           <el-dropdown-menu slot="dropdown">
             <el-dropdown-item command="isDec" @click.native="handleIsDecManage(true)">Set as declaration Center<!-- 设为报单中心 --></el-dropdown-item>
-            <el-dropdown-item command="notDec" @click.native="handleIsDecManage(false)">Cancel entry Center<!-- 取消报单中心 -->
+            <el-dropdown-item command="notDec" @click.native="handleIsDecManage(false)">Cancel Stockist<!-- 取消报单中心 -->
             </el-dropdown-item>
           </el-dropdown-menu>
         </el-dropdown>
@@ -218,7 +218,7 @@
         <el-form-item label="Identity No."><!-- 身份证号 -->
           <el-input v-model="formModifyProfile.idCard"></el-input>
         </el-form-item>
-        <el-form-item label="phone number"><!-- 手机号 -->
+        <el-form-item label="Phone Number"><!-- 手机号 -->
           <el-input v-model="formModifyProfile.mobile"></el-input>
         </el-form-item>
         <el-form-item label="Bank name"><!-- 银行名称 -->
@@ -430,7 +430,7 @@
               })
               return
           }
-          let isDecTip = isDec === true ? 'Set as declaration Center' : 'Cancel entry Center'//'设为报单中心' : '取消报单中心'
+          let isDecTip = isDec === true ? 'Set as declaration Center' : 'Cancel Stockist'//'设为报单中心' : '取消报单中心'
           this.$confirm(`Are you sure you want to【${isDecTip}】?`, 'Hint', {//确定要对所选会员【${isDecTip}】吗?`, '提示'
               confirmButtonText: 'confirm', // 确定
               cancelButtonText: 'cancel', // 取消

+ 2 - 2
backendEle/src/views/user/move.vue

@@ -122,7 +122,7 @@
             <el-option label="III. Market" value="3" key="location_3"></el-option><!-- 三市场 -->
           </el-select>
         </el-form-item>
-        <el-form-item label="note"><!-- 备注 -->
+        <el-form-item label="Remark"><!-- 备注 -->
           <el-input v-model="form.remark"></el-input>
         </el-form-item>
       </el-form>
@@ -185,7 +185,7 @@
             <el-option label="III. Market" value="3" key="location_3"></el-option><!-- 三市场 -->
           </el-select>
         </el-form-item>
-        <el-form-item label="note"><!-- 备注 -->
+        <el-form-item label="Remark"><!-- 备注 -->
           <el-input v-model="form.remark"></el-input>
         </el-form-item>
       </el-form>

+ 6 - 6
backendEle/src/views/user/user-add-opt.vue

@@ -27,8 +27,8 @@
             <el-form-item label="Declaration center or not"><!-- 是否报单中心 -->
               <el-switch v-model="form.isDec"></el-switch>
             </el-form-item>
-            <el-form-item label="Entry center level" v-show="form.isDec"><!-- 报单中心级别 -->
-              <el-select v-model="form.decRoleId" placeholder="Please select the entry center level"><!-- 请选择报单中心级别 -->
+            <el-form-item label="Stockist Level" v-show="form.isDec"><!-- 报单中心级别 -->
+              <el-select v-model="form.decRoleId" placeholder="Please select the Stockist level"><!-- 请选择报单中心级别 -->
                 <el-option v-for="(item,index) in allDecRole" :key="index" :label="item.ROLE_NAME"
                            :value="item.ID"></el-option>
               </el-select>
@@ -39,7 +39,7 @@
             <el-form-item>
               <template slot="label">
                 <span class="text-danger">*</span>
-                Entry Center No<!-- 报单中心编号 -->
+                Stockist No<!-- 报单中心编号 -->
               </template>
               <el-tooltip class="item" effect="dark" content="After entering the number, click the blank space to detect the member name of the number" placement="top-start"><!-- 输入编号后点击空白处,可检测该编号的会员姓名 -->
                 <el-input v-model="form.decUserName" @change="handleChkDecUser">
@@ -70,7 +70,7 @@
             <el-form-item>
               <template slot="label">
                 <span class="text-danger">*</span>
-                Pioneer<!-- 开拓人 -->
+                Sponsor<!-- 开拓人 -->
               </template>
               <el-input v-model="form.recUserName" @change="handleChkRecUser">
                 <template slot="append">【{{recRealName}}】</template>
@@ -101,7 +101,7 @@
             </el-form-item>
             <el-form-item>
               <template slot="label">
-                phone number<!-- 手机号 -->
+                Phone Number<!-- 手机号 -->
               </template>
               <el-input v-model="form.mobile" maxlength="11"></el-input>
             </el-form-item>
@@ -125,7 +125,7 @@
                   </el-date-picker>
                 </el-form-item>
 
-                <el-form-item label="Alternate Phone number​" v-show="false"><!-- 备用手机号 -->
+                <el-form-item label="Alternate Phone Number" v-show="false"><!-- 备用手机号 -->
                   <el-input v-model="form.tel" maxlength="11"></el-input>
                 </el-form-item>
 

+ 1 - 1
common/config/params.php

@@ -333,7 +333,7 @@ return [
     'exportModule' => [
         'shop' => ['label' => 'Mall management', 'value'=>'shop'],//商城管理
         'user' => ['label' => 'Member management', 'value'=>'user'],//会员管理
-        'atlas' => ['label' => 'Network Atlas', 'value'=>'atlas'],//网络图谱
+        'atlas' => ['label' => 'Network Chart', 'value'=>'atlas'],//网络图谱
         'reconsume' => ['label' => 'Resale management', 'value'=>'reconsume'],//复销管理
         'bonus' => ['label' => 'Bonus management', 'value'=>'bonus'],//奖金管理
         //'report' => ['label' => '报表管理', 'value'=>'report'],

+ 15 - 0
common/helpers/Tool.php

@@ -9,6 +9,7 @@
 namespace common\helpers;
 
 
+use common\models\ApproachOrderCall;
 use Faker\Provider\Uuid;
 use yii\base\Exception;
 use yii\helpers\Url;
@@ -489,4 +490,18 @@ class Tool {
         $uuid = !$upper ? Uuid::uuid() : strtoupper(Uuid::uuid());
         return str_replace('-', $symbol, $uuid);
     }
+
+    /**
+     * PayStack订单写入MongoDB.
+     * @param $call
+     * @return void
+     * @throws \Exception
+     */
+    public static function approachOrderCall($call)
+    {
+        $model = new ApproachOrderCall();
+        $model->event = $call['event'];
+        $model->data = $call['data'];
+        $model->insert();
+    }
 }

+ 429 - 12
common/libs/export/BaseExport.php

@@ -7,13 +7,24 @@ use common\helpers\Date;
 use common\helpers\Form;
 use common\helpers\http\RemoteUploadApi;
 use common\helpers\Tool;
+use common\helpers\user\Info;
+use common\libs\dataList\column\DateTime;
 use common\libs\dataList\DataList;
+use common\models\ApproachOrder;
+use common\models\ApproachOrderGoods;
 use common\models\Export;
+use common\models\Order;
+use common\models\OrderGoods;
 use common\models\Region;
+use common\models\ShopGoods;
+use common\models\User;
+use mysql_xdevapi\Result;
 use Yii;
 use yii\base\Exception;
 use yii\base\StaticInstanceTrait;
 use yii\base\Component;
+use yii\data\Pagination;
+use yii\db\Query;
 
 class BaseExport extends Component {
     use StaticInstanceTrait;
@@ -246,7 +257,7 @@ class BaseExport extends Component {
      */
     private function _loopWriteData($realFile, &$fileNameUpdated, $page = 0, $counter = 0){
         if(method_exists($this->_listModel, 'getList')){
-            $list = $this->_listModel->getList(['condition'=>$this->params['condition'], 'params'=>isset($this->params['params']) ? $this->params['params'] : [], 'others'=>isset($this->params['others']) ? $this->params['others'] : [], 'page'=>$page, 'pageSize'=>$this->pageSize, 'userId'=>$this->userId]);
+            $list = $this->_listModel->getList(['condition'=>$this->params['condition'], 'params'=> $this->params['params'] ?? [], 'others'=> $this->params['others'] ?? [], 'page'=>$page, 'pageSize'=>$this->pageSize, 'userId'=>$this->userId]);
         } else {
             throw new Exception($this->listModelClass.'的getList方法不存在');
         }
@@ -280,6 +291,88 @@ class BaseExport extends Component {
         return 'finish';
     }
 
+    /**
+     * 循环写入数据
+     */
+    private function _loopWriteDataOrder()
+    {
+        $orderQuery = Order::find()
+            ->alias('O')
+            ->where($this->params['condition'], $this->params['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['params'][':NOT_PAID'] = \Yii::$app->params['orderStatus']['notPaid']['value'];   // 待支付
+        $this->params['params'][':FAIL_PAID'] = \Yii::$app->params['orderStatus']['failPaid']['value'];   // 支付失败
+        $orderStandardQuery = ApproachOrder::find()
+            ->alias('O')
+            ->where($this->params['condition'] . ' AND (O.STATUS = :NOT_PAID OR O.STATUS = :FAIL_PAID)', $this->params['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]);
+        $lists = $query->all();
+
+        if(!empty($lists)){
+            foreach($lists as $columnData) {
+                $CREATE_USER_ID = Info::getUserIdByUserName($columnData['CREATE_USER']);
+                $createUserName = Info::getUserRealNameByUserId($CREATE_USER_ID);
+                $decUserName = Info::getUserNameByUserId($columnData['DEC_ID']);
+
+                $columnAccept = [
+                    'USER_NAME' => $columnData['USER_NAME'],
+                    'DEC_USER_NAME' => $decUserName,
+                    'CREATE_USER' => $columnData['CREATE_USER'],
+                    'CREATE_USER_NAME' => $createUserName,
+                    'SN' => $columnData['SN'],
+                    'STATUS' => \Yii::$app->params['orderStatus'][$columnData['STATUS']]['label'] ?? '',
+                    'SKU_CODE' => $columnData['SKU_CODE'],
+                    'GOODS_TITLE' => $columnData['GOODS_TITLE'],
+                    'BUY_NUMS' => $columnData['BUY_NUMS'],
+                    'CONSIGNEE' => $columnData['CONSIGNEE'],
+                    'MOBILE' => $columnData['MOBILE'],
+                    'TEL' => $columnData['TEL'],
+                    'PROVINCE' => $regionConfig[$columnData['PROVINCE']]['REGION_NAME'] ?? '',
+                    'CITY' => $regionConfig[$columnData['CITY']]['REGION_NAME'] ?? '',
+                    'COUNTY' => $regionConfig[$columnData['COUNTY']]['REGION_NAME'] ?? '',
+                    'ADDRESS' => $columnData['ADDRESS'],
+                    'PERIOD_NUM' => $columnData['PERIOD_NUM'],
+                    'ORDER_TYPE' => ($columnData['ORDER_TYPE'] == 'ZC') ? 'Welcome pack' : (in_array($columnData['PAY_TYPE'], ['cash', 'pay_stack']) ? 'Reselling': 'Points'),
+                    'WAREHOUSE' => $columnData['WAREHOUSE'],
+                    'CREATED_AT' => Date('Y-m-d H:i:s', $columnData['CREATED_AT']),
+                    'PAY_TYPE' => ShopGoods::payTypes()[$columnData['PAY_TYPE']]['name'] ?? ShopGoods::payTypes()['cash']['name'],
+                    'PAY_AT' => Date('Y-m-d H:i:s', $columnData['PAY_AT']),
+                    'DELIVERY_AT' => Date('Y-m-d H:i:s', $columnData['DELIVERY_AT']),
+                    'REAL_PRICE' => $columnData['REAL_PRICE'],
+                    'REAL_PV' => $columnData['REAL_PV'],
+                    'PAY_FREIGHT' => $columnData['PAY_FREIGHT'],
+                    'TAX_RATE' => $columnData['TAX_RATE'],
+                    'TAX_AMOUNT' => Tool::calculateTax($columnData['REAL_PRICE'], $columnData['TAX_RATE'], $columnData['TAX_RATE']),
+                    'EXPRESS_COMPANY' => $columnData['EXPRESS_COMPANY'],
+                    'ORDER_TRACK_NO' => $columnData['ORDER_TRACK_NO'],
+                    'EXPRESS_TYPE' => $columnData['EXPRESS_TYPE'] == 0 ? 'mailing ':' auto pick',
+                    'FRONT_REMARK' => $columnData['FRONT_REMARK'],
+                    'DELIVERY_STATUS_NAME' => \Yii::$app->params['deliveryStatus'][$columnData['DELIVERY_STATUS']]['label'] ?? '',
+                ];
+
+                fputcsv($this->_fp, Tool::arrTextConvert($columnAccept));
+                unset($percent, $columnData, $columnAccept);
+            }
+            unset($list);
+        }
+
+        unset($list);
+        return 'finish';
+    }
+
     /**
      * 完成
      * @return bool
@@ -429,7 +522,48 @@ class BaseExport extends Component {
      * @throws \yii\base\InvalidConfigException
      * @throws \yii\httpclient\Exception
      */
-    public function generatePDF() {
+    public function generateOrderExcel() {
+        $this->getParams();
+        if (!$this->params) {
+            throw new Exception('无法获取需要的参数');
+        }
+        $path = $this->getSaveBasePath() . __DS__ . $this->getSavePath();
+        $path = __DS__ . $path;
+        $realFile = $this->mkdir($path) . __DS__ . $this->getFileName();
+        $this->completed = false;
+        $this->getExportId();
+        $this->getUserId();
+        $fileNameUpdated = false;
+        $this->_fp = fopen($realFile, 'w');
+        @exec('chown -R www:www /'.$realFile);
+        @exec('chmod -R 777 /'.$realFile);
+        // 获取列表数据及表头
+        $this->_listModel = new $this->listModelClass();
+        $this->_listModel->isExport = true;
+        if(method_exists($this->_listModel, 'getExportHeaders')){
+            if(method_exists($this->_listModel, 'exportPrepare')) {//导出数据提前设置参数
+                $this->_listModel->exportPrepare(['condition' => $this->params['condition'], 'params' => $this->params['params'], 'others' => $this->params['others'] ?? [], 'page' => 0, 'pageSize' => 100000, 'userId' => $this->userId]);
+            }
+            $headers = $this->_listModel->getExportHeaders($this->userId);
+            fputcsv($this->_fp, $headers);
+            unset($headers);
+            $this->_updateFirst($realFile, 1);
+        } else {
+            throw new Exception($this->listModelClass.'的getExportHeaders方法不存在');
+        }
+        $this->_loopWriteDataOrder();
+        $this->complete();
+        return true;
+    }
+
+    /**
+     * 生成
+     * @return bool
+     * @throws Exception
+     * @throws \yii\base\InvalidConfigException
+     * @throws \yii\httpclient\Exception
+     */
+    public function generateOrderPDF() {
         $this->getParams();
         if (!$this->params) {
             throw new Exception('无法获取需要的参数');
@@ -447,7 +581,32 @@ class BaseExport extends Component {
         $this->_listModel->isExport = true;
 
         // 查询订单数据
-        $oderList = $this->_loopWriteDataPDF($realFile, $fileNameUpdated);
+//        $oderList = $this->_loopWriteDataPDF($realFile, $fileNameUpdated);
+        $orderQuery = Order::find()
+            ->alias('O')
+            ->where($this->params['condition'], $this->params['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['params'][':NOT_PAID'] = \Yii::$app->params['orderStatus']['notPaid']['value'];   // 待支付
+        $this->params['params'][':FAIL_PAID'] = \Yii::$app->params['orderStatus']['failPaid']['value'];   // 支付失败
+        $orderStandardQuery = ApproachOrder::find()
+            ->alias('O')
+            ->where($this->params['condition'] . ' AND (O.STATUS = :NOT_PAID OR O.STATUS = :FAIL_PAID)', $this->params['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]);
+        $oderList = $query->all();
+
         if ($oderList) {
             $userId = '';
             $userName = '';
@@ -466,17 +625,17 @@ class BaseExport extends Component {
                 $countyName = $value['COUNTY'] ? Region::getCnName($value['COUNTY']) : '';
 
                 $userId = $value['USER_NAME'];
-                $userName = $value['CREATE_USER_NAME'];
+                $userName = $value['REAL_NAME'];
                 $address = $provinceName . $cityName . $countyName . $value['ADDRESS'];
                 $mobile = $value['MOBILE'];
-                $orderAt = $value['PAY_AT'];
+                $orderAt = Date::convert($value['CREATED_AT'],'Y-m-d H:i:s');
                 $orderSn = $value['SN'];
                 // 总价
                 $totalAmount = $value['BUY_NUMS'] * $value['REAL_PRICE'];
                 $orderAmount += $totalAmount;
                 $orderNums += $value['BUY_NUMS'];
                 // 税额
-                $taxAmount = floatval(Tool::formatPrice(($value['REAL_PRICE'] - ($value['REAL_PRICE'] / (1 + $value['TAX_RATE'] / 100))) * $value['BUY_NUMS']));
+                $taxAmount = Tool::calculateTax($value['REAL_PRICE'], $value['TAX_RATE'], $value['BUY_NUMS']);
                 $totalTaxAmount += $taxAmount;
                 $taxAmount = Tool::formatAmount($taxAmount);
                 $totalAmount = Tool::formatAmount($totalAmount);
@@ -568,13 +727,13 @@ ORDER;
                             
                             <table border="1" width="100%" style="padding: 10px 5px; text-align: center;">
                                 <tr>
-                                    <th width="15%" style="font-size: 14px; font-weight: bold; text-align: center;">Product code</th>
-                                    <th width="25%" style="font-size: 14px; font-weight: bold; text-align: center;">Product name</th>
-                                    <th width="15%" style="font-size: 14px; font-weight: bold; text-align: center;">Product price</th>
-                                    <th width="10%" style="font-size: 14px; font-weight: bold; text-align: center;">Quantity</th>
-                                    <th width="10%" style="font-size: 14px; font-weight: bold; text-align: center;">Tax rate</th>
+                                    <th width="15%" style="font-size: 14px; font-weight: bold; text-align: center;">Product Code</th>
+                                    <th width="25%" style="font-size: 14px; font-weight: bold; text-align: center;">Product Name</th>
+                                    <th width="15%" style="font-size: 14px; font-weight: bold; text-align: center;">Product Price</th>
+                                    <th width="10%" style="font-size: 14px; font-weight: bold; text-align: center;">Qty</th>
+                                    <th width="10%" style="font-size: 14px; font-weight: bold; text-align: center;">Tax Rate</th>
                                     <th width="10%" style="font-size: 14px; font-weight: bold; text-align: center;">Tax</th>
-                                    <th width="15%" style="font-size: 14px; font-weight: bold; text-align: center;">Total amount</th>
+                                    <th width="15%" style="font-size: 14px; font-weight: bold; text-align: center;">Total Amount</th>
                                 </tr>
                                 {$orderDetails}
                                 <tr>
@@ -640,6 +799,264 @@ ORDER;
             $pdf->AddPage();
             // 设置字体
             $pdf->SetFont('stsongstdlight', '', 10, '', true);
+//            $image = file_get_contents(\Yii::$app->basePath . '/../frontendEle/src/static/img/ngds-logo.jpg');
+//            $pdf->Image('@' . $image, 165, 5, 20, 10, 'JPG');
+            $pdf->writeHTML($context);
+            $pdf->Output($realFile, 'F');
+
+            $this->_updateFirst($realFile, 1);
+        }
+
+        $this->complete();
+        return true;
+    }
+
+    /**
+     * 生成
+     * @return bool
+     * @throws Exception
+     * @throws \yii\base\InvalidConfigException
+     * @throws \yii\httpclient\Exception
+     */
+    public function generateDecOrderPDF() {
+        $this->getParams();
+        if (!$this->params) {
+            throw new Exception('无法获取需要的参数');
+        }
+        $path = __DS__ . $this->getSaveBasePath() . __DS__ . $this->getSavePath();
+        $realFile = $path . __DS__ . $this->getFileName('.pdf');
+
+        $this->completed = false;
+        $this->getExportId();
+        $this->getUserId();
+        $fileNameUpdated = false;
+
+        // 获取列表数据及表头
+        $this->_listModel = new $this->listModelClass();
+        $this->_listModel->isExport = true;
+
+        // 查询订单数据
+//        $oderList = $this->_loopWriteDataPDF($realFile, $fileNameUpdated);
+        $orderQuery = Order::find()
+            ->alias('O')
+            ->where($this->params['condition'], $this->params['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['params'][':NOT_PAID'] = \Yii::$app->params['orderStatus']['notPaid']['value'];   // 待支付
+        $this->params['params'][':FAIL_PAID'] = \Yii::$app->params['orderStatus']['failPaid']['value'];   // 支付失败
+        $orderStandardQuery = ApproachOrder::find()
+            ->alias('O')
+            ->where($this->params['condition'] . ' AND (O.STATUS = :NOT_PAID OR O.STATUS = :FAIL_PAID)', $this->params['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]);
+        $oderList = $query->all();
+
+        if ($oderList) {
+            $userId = '';
+            $userName = '';
+            $address = '';
+            $mobile = '';
+            $orderAt = '';
+            $orderDetails = '';
+            $orderSn = '';
+            $orderAmount = 0;  // 合计总额
+            $orderNums = 0; // 合计总数
+            $totalTaxAmount = 0; // 合计税额
+            $totalAmount = 0;
+            foreach ($oderList as $key => $value) {
+                $provinceName = $value['PROVINCE'] ? Region::getCnName($value['PROVINCE']) : '';
+                $cityName = $value['CITY'] ? Region::getCnName($value['CITY']) : '';
+                $countyName = $value['COUNTY'] ? Region::getCnName($value['COUNTY']) : '';
+
+                $userId = $value['USER_NAME'];
+                $userName = $value['REAL_NAME'];
+                $address = $provinceName . $cityName . $countyName . $value['ADDRESS'];
+                $mobile = $value['MOBILE'];
+                $orderAt = Date::convert($value['CREATED_AT'],'Y-m-d H:i:s');
+                $orderSn = $value['SN'];
+                // 总价
+                $totalAmount = $value['BUY_NUMS'] * $value['REAL_PRICE'];
+                $orderAmount += $totalAmount;
+                $orderNums += $value['BUY_NUMS'];
+                // 税额
+                $taxAmount = Tool::calculateTax($value['REAL_PRICE'], $value['TAX_RATE'], $value['BUY_NUMS']);
+                $totalTaxAmount += $taxAmount;
+                $taxAmount = Tool::formatAmount($taxAmount);
+                $totalAmount = Tool::formatAmount($totalAmount);
+                // 订单详情
+                $orderDetails .= <<<EOT
+                <tr>
+                    <td>{$value['SKU_CODE']}</td>
+                    <td>{$value['GOODS_TITLE']}</td>
+                    <td style="text-align: right;">{$value['REAL_PRICE']}</td>
+                    <td>{$value['BUY_NUMS']}</td>
+                    <td style="text-align: right;">{$value['TAX_RATE']}</td>
+                    <td style="text-align: right;">{$taxAmount}</td>
+                    <td style="text-align: right;">{$totalAmount}</td> 
+                </tr>
+EOT;
+            }
+
+            // 订单基本信息
+            $orderBase = <<<ORDER
+            <table border="1" style="table-layout: fixed; padding: 10px 20px;" width="100%">
+                <tr>
+                    <td width="30%" style="font-weight: bold; text-align: center; font-size: 14px;">Member code</td>
+                    <td width="70%">{$userId}</td>
+                </tr>
+                <tr>
+                    <td width="30%" style="font-weight: bold; text-align: center; font-size: 14px;">Member name</td>
+                    <td width="70%">{$userName}</td>
+                </tr>
+                <tr>
+                    <td width="30%" style="font-weight: bold; text-align: center; font-size: 14px;">Member address</td>
+                    <td width="70%">{$address}</td>
+                </tr>
+                <tr>
+                    <td width="30%" style="font-weight: bold; text-align: center; font-size: 14px;">Member phone</td>
+                    <td width="70%">{$mobile}</td>
+                </tr>
+                <tr>
+                    <td width="30%" style="font-weight: bold; text-align: center; font-size: 14px;">Order code</td>
+                    <td width="70%">{$orderSn}</td>
+                </tr>
+                <tr>
+                    <td width="30%" style="font-weight: bold; text-align: center; font-size: 14px;">Creation time</td>
+                    <td width="70%">{$orderAt}</td>
+                </tr>
+                <tr>
+                    <td class="bg" style="font-weight: bold; font-size: 14px; text-align: center;">Order detail</td>
+                    <td class="bg"></td>
+                </tr>
+            </table>
+ORDER;
+
+            $l['a_meta_charset'] = 'UTF-8';
+            $l['a_meta_dir'] = 'ltr';
+            $l['a_meta_language'] = 'zh';
+            $l['w_page'] = '页面';
+
+            $orderAmount = Tool::formatAmount($orderAmount);
+            $totalTaxAmount = Tool::formatAmount($totalTaxAmount);
+
+            $context = <<<ORDER
+            <!doctype html>
+            <html lang="en">
+            <head>
+                <meta charset="UTF-8" />
+                <title>Order detail</title>
+                <style>
+                    table {
+                        border-collapse: collapse;
+                    }
+                    table td, table th {
+                        border: 1px solid #ccc;
+                        padding: 5px 5px;
+                        border-collapse: collapse;
+                    }
+                    /*td {*/
+                    /*    padding: 120px;*/
+                    /*}*/
+                    .bg {
+                        background-color: #ccc;
+                    }
+                </style>
+            </head>
+            <body>
+                <div class="content">
+                    <p style="text-align: center; font-weight: bold; font-size: 22px;"><b>Order detail</b><br></p>
+                    <div>
+                        <div style="display: block; width: 100%;">
+                            {$orderBase}
+                            
+                            <table border="1" width="100%" style="padding: 10px 5px; text-align: center;">
+                                <tr>
+                                    <th width="15%" style="font-size: 14px; font-weight: bold; text-align: center;">Product Code</th>
+                                    <th width="25%" style="font-size: 14px; font-weight: bold; text-align: center;">Product Name</th>
+                                    <th width="15%" style="font-size: 14px; font-weight: bold; text-align: center;">Product Price</th>
+                                    <th width="10%" style="font-size: 14px; font-weight: bold; text-align: center;">Qty</th>
+                                    <th width="10%" style="font-size: 14px; font-weight: bold; text-align: center;">Tax Rate</th>
+                                    <th width="10%" style="font-size: 14px; font-weight: bold; text-align: center;">Tax</th>
+                                    <th width="15%" style="font-size: 14px; font-weight: bold; text-align: center;">Total Amount</th>
+                                </tr>
+                                {$orderDetails}
+                                <tr>
+                                    <td colspan="3">Total</td>
+                                    <td>{$orderNums}</td>
+                                    <td></td>
+                                    <td style="text-align: right;">{$totalTaxAmount}</td>
+                                    <td style="text-align: right;">{$orderAmount}</td>
+                                </tr>
+                            </table>
+                        </div>
+                        
+                        <div style="width: 100%; margin-top: 50px; height: 30px;">
+                            <table width="100%" style="border: none; padding: 10px 20px; text-align: center;">
+                                <tr style="border: none;">
+                                    <td width="70%" style="border: none;"></td>
+                                    <td width="30%" style="font-weight: bold; text-align: left; font-size: 14px; border: none;">Signature:</td>
+                                </tr>
+                                <tr style="border: none;">
+                                    <td width="70%" style="border: none;"></td>
+                                    <td width="30%" style="font-weight: bold; text-align: left; font-size: 14px; border: none;">Date:</td>
+                                </tr>
+                            </table>
+                        </div>
+                    </div>
+                </div>
+            </body>
+            </html>
+ORDER;
+
+            require_once (\Yii::$app->vendorPath . '/tecnickcom/tcpdf/tcpdf.php');
+
+            $pdf = new \TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+            // 设置打印模式
+            $pdf->SetCreator(PDF_CREATOR);
+            $pdf->SetAuthor('DaZe');
+            $pdf->SetTitle($orderSn);
+            $pdf->SetSubject('TCPDF Tutorial');
+            $pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+            // 是否显示页眉
+            $pdf->setPrintHeader(false);
+            // 设置页眉字体
+            $pdf->setHeaderFont(Array('dejavusans', '', '12'));
+            // 页眉距离顶部的距离
+            $pdf->SetHeaderMargin('5');
+            // 是否显示页脚
+            $pdf->setPrintFooter(false);
+            // 设置默认等宽字体
+            $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+            // 设置行高
+            $pdf->setCellHeightRatio(1);
+            // 设置左、上、右的间距
+            $pdf->SetMargins('10', '10', '10');
+            // 设置是否自动分页  距离底部多少距离时分页
+            $pdf->SetAutoPageBreak(TRUE, '15');
+            // 设置图像比例因子
+            $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+            if (@file_exists(\Yii::$app->vendorPath . 'tecnickcom/tcpdf/examples/lang/eng.php')) {
+                require_once(\Yii::$app->vendorPath . '/tecnickcom/tcpdf/examples/lang/eng.php');
+                $pdf->setLanguageArray($l);
+            }
+            $pdf->setFontSubsetting(true);
+            $pdf->AddPage();
+            // 设置字体
+            $pdf->SetFont('stsongstdlight', '', 10, '', true);
+            $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+            $image = file_get_contents(\Yii::$app->basePath . '/../frontendEle/src/static/img/ngds-logo.jpg');
+            $pdf->Image('@' . $image, 165, 5, 20, 10, 'JPG');
             $pdf->writeHTML($context);
             $pdf->Output($realFile, 'F');
 

+ 4 - 0
common/models/ApproachDecOrder.php

@@ -30,6 +30,10 @@ use Yii;
  * @property string $UPDATED_AT 更新时间
  * @property int $IS_DEL 是否删除
  * @property int $DELETED_AT 删除时间
+ * @property int $DETAIL_TYPE 类型
+ * @property int $UPGRADE_TYPE 升级类型
+ * @property string $ORI_LV 升级前级别
+ * @property string $UPGRADE_LV 升级后级别
  */
 class ApproachDecOrder extends \common\components\ActiveRecord
 {

+ 1 - 1
common/models/ApproachOrder.php

@@ -67,7 +67,7 @@ class ApproachOrder extends \common\components\ActiveRecord
     public function rules()
     {
         return [
-            [['USER_ID', 'USER_NAME', 'ORDER_TYPE', 'CREATE_USER', 'EMAIL'], 'required'],
+            [['USER_ID', 'USER_NAME', 'ORDER_TYPE', 'CREATE_USER'], 'required'],
             [['ORDER_AMOUNT', 'PV', 'PAY_AMOUNT', 'PAY_PV', 'FREIGHT', 'PAY_FREIGHT'], 'number'],
             [['PAY_AT', 'DELIVERY_STATUS', 'DELIVERY_PERIOD', 'DELIVERY_AT', 'EXPRESS_TYPE', 'PERIOD_NUM', 'STATUS', 'PROVINCE', 'CITY', 'COUNTY', 'CREATED_AT', 'UPDATED_AT', 'IS_DELETE', 'DELETED_AT'], 'integer'],
             [['ID','SN', 'DEC_SN', 'USER_ID', 'ORDER_TRACK_NO','PAY_TYPE'], 'string', 'max' => 32],

+ 63 - 0
common/models/ApproachOrderCall.php

@@ -0,0 +1,63 @@
+<?php
+
+namespace common\models;
+
+use common\components\MongoActiveRecord;
+use Yii;
+
+/**
+ * This is the model class for collection "ar_approach_order_call".
+ *
+ * @property \MongoDB\BSON\ObjectID|string $_id
+ * @property mixed $event
+ * @property mixed $data
+
+ */
+class ApproachOrderCall extends MongoActiveRecord
+{
+    /**
+     * {@inheritdoc}
+     */
+    public static function collectionName()
+    {
+        return 'ar_approach_order_call';
+    }
+
+    /**
+     * @return \yii\mongodb\Connection the MongoDB connection used by this AR class.
+     */
+    public static function getDb()
+    {
+        return Yii::$app->get('dbLog');
+    }
+
+    /**
+     * 获取id
+     * @return string
+     */
+    public function getId() {
+        return (string) $this->_id;
+    }
+    /**
+     * {@inheritdoc}
+     */
+    public function attributes()
+    {
+        return [
+            'id',
+            'data',
+        ];
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function attributeLabels()
+    {
+        return [
+            'event' => 'event',
+            'data' => 'data',
+        ];
+    }
+
+}

+ 1 - 1
common/models/Withdraw.php

@@ -127,7 +127,7 @@ class Withdraw extends \common\components\ActiveRecord {
             'BANK_COUNTY' => '银行地区',
             'P_MONTH' => '表分区标识',
             'AUDIT_STATUS' => '审核状态',
-            'REMARK' => 'Note', // 备注,
+            'REMARK' => 'Remark', // 备注,
             'UPDATE_ADMIN' => '修改管理员',
             'UPDATE_REMARK' => '修改备注',
             'AUDIT_ADMIN' => '审核管理员',

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

@@ -101,12 +101,12 @@ class AdminAddUserForm extends Model {
 
     public function attributeLabels() {
         return [
-            'userName' => 'Member code',//会员编号
-            'nation' => 'nation',//民族
-            'realName' => 'Member name',//会员姓名
+            'userName' => 'Member Code',//会员编号
+            'nation' => 'Nation',//民族
+            'realName' => 'Member Name',//会员姓名
             'idCard' => 'ID',//身份证号
-            'mobile' => 'phone number',//手机号
-            'address' => 'address',//地址
+            'mobile' => 'Phone Number',//手机号
+            'address' => 'Address',//地址
             'openBank' => 'Bank Name',//开户行
             'bankAddress' => 'Account opening sub branch',//开户支行
             'bankNo' => 'bank account',//银行账号
@@ -115,11 +115,11 @@ class AdminAddUserForm extends Model {
             'areaSelected' => 'Location',//所在地区
             'tel' => 'Telephone',//电话
             'isDec' => 'Declaration center or not',//是否报单中心
-            'decUserName' => 'Entry Center No',//报单中心编号
+            'decUserName' => 'Stockist No', // 报单中心编号
             'birthday' => 'birthday',//生日
-            'decRoleId' => 'Entry center level',//报单中心级别
+            'decRoleId' => 'Stockist Level',//报单中心级别
             'conUserName' => 'Contact person Member No',//接点人会员编号
-            'recUserName' => 'Pioneer Member No',
+            'recUserName' => 'Sponsor Member No',
             'location' => 'Resettlement area',//安置区域
         ];
     }
@@ -130,7 +130,7 @@ class AdminAddUserForm extends Model {
      */
     public function issetDec($attribute) {
         if (!$decUser = User::find()->select('ID')->where('IS_DEC=1 AND USER_NAME=:USER_NAME', [':USER_NAME' => $this->decUserName])->asArray()->one()) {
-            $this->addError($attribute, 'Entry center does not exist');//报单中心不存在
+            $this->addError($attribute, 'Stockist does not exist');//报单中心不存在
         } else {
             $this->_decId = $decUser['ID'];
         }
@@ -142,7 +142,7 @@ class AdminAddUserForm extends Model {
      */
     public function issetDecRoleId($attribute) {
         if ($this->isDec && !$this->decRoleId) {
-            $this->addError($attribute, 'Entry center level cannot be empty');//报单中心级别不能为空
+            $this->addError($attribute, 'Stockist level cannot be empty');//报单中心级别不能为空
         }
     }
 
@@ -338,7 +338,7 @@ class AdminAddUserForm extends Model {
                 throw new Exception('Failed to reduce the number of superior member contacts');//减少上级会员接点数量失败
             }
             if(!UserInfo::updateAllCounters(['REC_NUM'=> -1], "USER_ID=:USER_ID", [':USER_ID'=>$userInfo['REC_UID']])){
-                throw new Exception('Failed to reduce the number of recommended pioneers');//减少开拓人推荐数量失败
+                throw new Exception('Failed to reduce the number of recommended Sponsor');//减少开拓人推荐数量失败
             }
             // 删除会员信息
             if(!UserInfo::deleteAll('USER_ID=:USER_ID', [':USER_ID' => $this->_delUserId])){

+ 14 - 14
common/models/forms/ApproachDeclarationForm.php

@@ -147,9 +147,9 @@ class ApproachDeclarationForm extends Model
             'insertUserName' => 'Member user name',//会员用户名
             'password' => 'Login password',//登陆密码
             'payPassword' => 'Payment password',//支付密码
-            'realName' => 'Member name',//会员姓名
+            'realName' => 'Member Name',//会员姓名
             'insertUserIdCard' => 'ID',//身份证号
-            'mobile' => 'phone number',//手机号
+            'mobile' => 'Phone Number',//手机号
             'openBank' => 'openBank',//开户行
             'bankAddress' => 'bankAddress',//开户支行
             'bankNo' => 'bankNo',//银行账号
@@ -158,12 +158,12 @@ class ApproachDeclarationForm extends Model
             'bankCounty' => 'bankCounty',//银行县区
             'conUserName' => 'Instructor user name',//指导老师用户名
             'recUserName' => 'Developer user name',//开拓人用户名
-            'decUserName' => 'Entry center user name',//报单中心用户名
+            'decUserName' => 'Stockist user name',//报单中心用户名
             'conUid' => 'Instructor member ID',//指导老师会员ID
-            'recUid' => 'Pioneer member ID',//'开拓人会员ID
+            'recUid' => 'Sponsor member ID',//'开拓人会员ID
             'location' => 'market',//市场
             'consignee' => 'consignee',//收货人
-            'acceptMobile' => 'Consignee is phone number',//收货人手机
+            'acceptMobile' => 'Recipient Phone Number',//收货人手机
             'province' => 'Receiving Province',//收货省
             'city' => 'Receiving City',//收货市
             'county' => 'Receiving area / county',//收货区县
@@ -192,7 +192,7 @@ class ApproachDeclarationForm extends Model
      */
     public function issetDec($attribute){
         if (!$decUser = User::find()->select('ID')->where('IS_DEC=1 AND USER_NAME=:USER_NAME', [':USER_NAME' => $this->decUserName])->asArray()->one()) {
-            $this->addError($attribute, 'Entry center does not exist');//报单中心不存在
+            $this->addError($attribute, 'Stockist does not exist');//报单中心不存在
             return false;
         } else {
             // 判断报单中心是否在新加入会员的安置网上级中
@@ -205,7 +205,7 @@ class ApproachDeclarationForm extends Model
 //            exit;
             if (!isset($flipParent[$this->decUserName])) {
                 //$this->addError($attribute, '为' . $this->insertUserName . '报单,报单中心' . $this->decUserName . '不在' . $this->insertUserName . '的安置网上级中');
-                $this->addError($attribute, 'To' . $this->insertUserName . 'Entry,Entry Center' . $this->decUserName . 'not in exist' . $this->insertUserName . 'in the placement superiors');
+                $this->addError($attribute, 'To' . $this->insertUserName . 'Entry, Stockist' . $this->decUserName . 'not in exist' . $this->insertUserName . 'in the placement superiors');
                 return ;
             }
             $this->_decId = $decUser['ID'];
@@ -294,10 +294,10 @@ class ApproachDeclarationForm extends Model
                 if(!$recUserTemp){
                     if($this->insertUserName){
                         //$this->addError($attribute, '为'.$this->insertUserName.'报单,开拓人'.$this->recUserName.'不存在');
-                        $this->addError($attribute, 'To'.$this->insertUserName.'Entry,Pioneer'.$this->recUserName.'not in exist');
+                        $this->addError($attribute, 'To'.$this->insertUserName.'Entry, Sponsor'.$this->recUserName.'not in exist');
                     } else {
                        // $this->addError($attribute, '开拓人'.$this->recUserName.'不存在');
-                        $this->addError($attribute, 'Pioneer'.$this->recUserName.'not in exist');
+                        $this->addError($attribute, 'Sponsor'.$this->recUserName.'not in exist');
                     }
 
                     return ;
@@ -327,7 +327,7 @@ class ApproachDeclarationForm extends Model
                 $this->loopFindParentToNetwork($this->insertUserName);
                 if (!$this->recUserIsInNetworkParent()) {
                    // $this->addError($attribute, '为' . $this->insertUserName . '报单,开拓人' . $this->recUserName . '不在' . $this->insertUserName . '的安置网上级中');
-                    $this->addError($attribute, 'To' . $this->insertUserName . 'Entry,Pioneer' . $this->recUserName . 'not in exist' . $this->insertUserName . 'in the placement superiors');
+                    $this->addError($attribute, 'To' . $this->insertUserName . 'Entry, Sponsor' . $this->recUserName . 'not in exist' . $this->insertUserName . 'in the placement superiors');
                     return ;
                 }
             }
@@ -481,7 +481,7 @@ class ApproachDeclarationForm extends Model
                 $recUserTemp = UserInfo::findOneAsArray('USER_NAME=:USER_NAME', [':USER_NAME' => $this->recUserName]);
                 if(!$recUserTemp){
 //                    $this->addError($attribute, '为'.$this->insertUserName.'报单,开拓人'.$this->recUserName.'不存在');
-                    $this->addError($attribute, 'To'.$this->insertUserName.'Entry,Pioneer'.$this->recUserName.'not in exist');
+                    $this->addError($attribute, 'To'.$this->insertUserName.'Entry, Sponsor'.$this->recUserName.'not in exist');
                     return ;
                 }
                 $recUserTemp['CON_NUM'] = UserNetwork::firstFloorChildNum($recUserTemp['USER_ID']);
@@ -506,13 +506,13 @@ class ApproachDeclarationForm extends Model
             // 判断接点会员的下级会员是否大于三个,如果大于三个则不允许
             if($conUser['CON_NUM'] >= 3){
 //                $this->addError($attribute, '为'.$this->insertUserName.'报单,指导老师'.$this->conUserName.'下级点位已满');
-                $this->addError($attribute, 'To'.$this->insertUserName.'Entry,Pioneer'.$this->conUserName.'lower level is full');
+                $this->addError($attribute, 'To'.$this->insertUserName.'Entry, Sponsor'.$this->conUserName.'lower level is full');
                 return;
             }
             // 判断指导老师相应的区位是否已满
             if($conUser['LOCATION'.$this->location]){
 //                $this->addError($attribute, '为'.$this->insertUserName.'报单,指导老师'.$this->conUserName.'该市场已存在会员');
-                $this->addError($attribute, 'To'.$this->insertUserName.'Entry,Pioneer'.$this->conUserName.'Members already exist in this market');
+                $this->addError($attribute, 'To'.$this->insertUserName.'Entry, Sponsor'.$this->conUserName.'Members already exist in this market');
                 return;
             }
 //            if($conUser['CON_NUM'] == 0 && $this->location != 1){
@@ -558,7 +558,7 @@ class ApproachDeclarationForm extends Model
                 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->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->recUserName) $this->addError($attribute, 'For the first purchase, the Sponsor 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');//首购必须填写加入会员的市场
             }
         } else {

+ 432 - 0
common/models/forms/ApproachDeclarationUpgradeForm.php

@@ -0,0 +1,432 @@
+<?php
+namespace common\models\forms;
+
+use common\components\Model;
+use common\helpers\Cache;
+use common\helpers\Date;
+use common\helpers\Form;
+use common\helpers\user\Cash;
+use common\helpers\user\Info;
+use common\models\ApproachDecOrder;
+use common\models\ApproachOrder;
+use common\models\ApproachOrderGoods;
+use common\models\Config;
+use common\models\DeclarationLevel;
+use common\models\DeclarationPackage;
+use common\models\DecLevelLog;
+use common\models\DecOrder;
+use common\models\EmployLevel;
+use common\models\Order;
+use common\models\OrderGoods;
+use common\models\Period;
+use common\models\ReceiveAddress;
+use common\models\Region;
+use common\models\ShopGoods;
+use common\models\User;
+use common\models\UserInfo;
+use common\models\UserNetwork;
+use yii\base\Exception;
+
+/**
+ * 升级管理,进行升级
+ */
+class ApproachDeclarationUpgradeForm extends Model
+{
+    public $type;
+    public $decLv;
+    public $decWay;
+    public $packageId;
+    public $goodsId;
+    public $goodsNum;
+    public $insertUserName;
+    public $consignee;
+    public $acceptMobile;
+    public $province;
+    public $city;
+    public $county;
+    public $lgaName;
+    public $cityName;
+    public $address;
+    public $nowPerf;
+    public $nextPerf;
+    public $decUserName;
+    public $remark;
+    public $payType;
+    // 传过来的全部数据
+    public $allData;
+    private $_decId;
+    public $_insertUserId;
+    private $_decAmount;
+    private $_decPv;
+    private $_orderGoods;
+    
+    const TYPE_ZC = 'ZC';
+    private $_userForm = null;
+    // 全部的安置网上级
+    private $_tempNetworkParentUser = [];
+
+    /**
+     * @inheritdoc
+     */
+    public function rules()
+    {
+        return [
+            [['remark','type','decLv','decWay','packageId','goodsId', 'goodsNum', 'insertUserName','consignee','acceptMobile','province',/*'city','county',*/'lgaName','cityName','address','nowPerf','nextPerf'], 'trim'],
+            [['type','decLv','decWay','insertUserName','nowPerf','province',/*'city','county',*/'address','acceptMobile'], 'required'],
+            [['decUserName'], 'issetDec'], // 必须是报单中心
+            [['decWay'], 'hasProduct'],// 必须选择商品
+            [['decLv'], 'alreadyMaxDec'], //判断要升级用户是否已经是最高级
+        ];
+    }
+
+    public function attributeLabels()
+    {
+        return [
+            'type' => 'Upgrade type',//升级类型
+            'decLv' => 'Upgrade level',//升级级别
+            'decWay' => 'Declaration method',//报单方式
+            'packageId' => 'Upgrade package',//升级套餐
+            'goodsId' => 'Product ID',//商品ID
+            'goodsNum' => 'Product quantity',//商品数量
+            'insertUserName' => 'Member number to be upgraded',//要升级的会员编号
+            'consignee' => 'consignee',//收货人
+            'acceptMobile' => 'The phone number of Consignee',//收货人手机
+            'province' => 'Receiving Province',//收货省
+            'city' => 'Receiving City',//收货市
+            'county' => 'Receiving area / county',//收货区县
+            'lgaName' => 'Local Government Area',
+            'cityName' => 'City',
+            'address' => 'Receiving detailed address',//收货详细地址
+        ];
+    }
+
+    /**
+     * 添加报单
+     * @param $allData
+     * @throws Exception
+     * @throws \yii\db\Exception
+     */
+    public function add($allData){
+        if(!$this->validate()){
+            return null;
+        }
+        // 首购单
+        if($this->type == self::TYPE_ZC){
+            //报单商品及PV判断
+            $decLevelConfig = Cache::getDecLevelConfig();
+            $decLevel = $decLevelConfig[$this->decLv];
+            $toDecLevel = $this->decLv;
+            if(!$this->decLv){
+                throw new Exception('Please select upgrade level');//请选择升级级别
+            }
+            $baseInfo = Info::baseInfoZhByUserName($this->insertUserName);
+            $userId = $baseInfo['ID'];
+            $userDecPvSum = User::sumDevPvByUserId($userId); // 用户所有报单PV总和
+            if ($userDecPvSum != $this->nowPerf) {
+                throw new Exception('Please contact the customer service personnel to check the performance of upgraded members');//请联系客服人员核对升级会员业绩
+            }
+            // 获取用户是否是观察期
+            $observe = Config::getConfigByType('observe'); // 获取观察期配置信息
+            $observeLimit = $observe['observePeriodLimit']['value']; // 月份限制
+            $isObserve = User::checkIsObserve($baseInfo['CREATED_AT'], $observeLimit); // 判断用户是否再观察期中
+            $diffPerf = $isObserve ? $this->nowPerf : 0; // 观察期内升级要加上用户累计的PV,全额则基础PV为0,全额购买
+            if ($this->decWay != 2) {
+                throw new Exception('The upgrade method is incorrect. Please contact the customer service personnel');//升级方式不正确,请联系客服人员
+            }
+            if($this->decWay==1) {
+                // 先不加套餐升级方式
+                // $decPackage = DeclarationPackage::findOneAsArray('ID=:ID', [':ID'=>$this->packageId]);
+                // $this->_decAmount = $decPackage['AMOUNT'];
+                // $this->_decPv = $decPackage['PV'];
+                // $this->_orderGoods[] = [
+                //     'GOODS_ID' => $this->packageId,
+                //     'PRICE' => $this->_decAmount,
+                //     'REAL_PRICE' => $this->_decAmount,
+                //     'PV' => $this->_decPv,
+                //     'REAL_PV' => $this->_decPv,
+                //     'BUY_NUMS' => 1,
+                //     'SKU_CODE' => $decPackage['PACKAGE_NO'],
+                //     'GOODS_TITLE' => $decPackage['PACKAGE_NAME']
+                // ];
+            } else {
+                $ids = $this->goodsId;
+                $totalAmount = 0;
+                $totalPv = 0;
+                foreach ($this->goodsNum as $k => $v) {
+                    if ($v) {
+                        $goods = ShopGoods::findOneAsArray('ID=:ID AND STATUS=1',[':ID'=> $ids[$k]]);
+                        if($goods['STORE_NUMS']>0){
+                            $totalAmount += $goods['SELL_PRICE'] * intval($v);
+                            $totalPv += $goods['PRICE_PV'] * intval($v);
+                            $this->_orderGoods[] = [
+                                'GOODS_ID' => $goods['ID'],
+                                'PRICE' => $goods['SELL_PRICE'],
+                                'REAL_PRICE' => $goods['SELL_PRICE'],
+                                'PV' => $goods['PRICE_PV'],
+                                'REAL_PV' => $goods['PRICE_PV'],
+                                'POINT' => $goods['POINT'],
+                                'BUY_NUMS' => intval($v),
+                                'SKU_CODE' => $goods['GOODS_NO'],
+                                'GOODS_TITLE' => $goods['GOODS_NAME'],
+                                'EMAIL' => Info::getUserEmailByUserId(\Yii::$app->user->id) ?? '',
+                                'TAX_RATE' => $goods['TAX_RATE'],
+                            ];
+                        }
+                    }
+                }
+                // 这里特殊是用户原报单PV之和+用户购买的商品总PV
+                $checkPv = $totalPv + $diffPerf;
+                if($checkPv < $decLevel['PERF']) {
+                    throw new Exception('Total PV cannot be less than the selected level PV');//总PV不能小于所选级别PV
+                }
+                foreach ($decLevelConfig as $key=>$val){
+                    if($checkPv>=$val['PERF']){
+                        $toDecLevel = $key;
+                    }
+                }
+                if($this->decLv!=$toDecLevel){
+                    throw new Exception('The total PV cannot exceed the PV value of the next level under the selected level');//总PV不能超过已选级别下一个级别的PV值
+                }
+                $this->_decAmount = $totalAmount;
+                $this->_decPv = $totalPv;
+            }
+
+            $baseInfo = Info::baseInfoZhByUserName($this->insertUserName);
+            $this->_insertUserId = $baseInfo['ID']; // 被报单人,通过insername 查找用户id
+            $insertConId = $baseInfo['CON_UID'];
+            $insertRecId = $baseInfo['REC_UID'];
+            $decResult = $this->addDecOrder($insertConId, $insertRecId, $baseInfo['DEC_LV'], $isObserve, $this->remark);
+            if (!$decResult) {
+                throw new Exception("operation failed");//操作失败
+            }
+            return $decResult;
+        }
+        return true;
+    }
+
+    /**
+     * 添加报单订单
+     * @throws Exception|\Throwable
+     */
+    public function addDecOrder($insertConId, $insertRecId, $oriDecLv, $isObserve, $remark = ''): ApproachOrder
+    {
+        $warehouse = Region::getWarehouseByCode($this->province);//仓库
+        if(!$warehouse){
+            throw new Exception('Delivery is temporarily not supported in the region. Contact customer service for details');//地区暂时不支持配送,具体联系客服
+        }
+
+        $upgradeType = $isObserve ? 1 : 2; // 1补差  2全额
+        $periodObj = Period::instance();
+        $nowPeriodNum = $periodObj->getNowPeriodNum();
+        $nowCalcMonth = $periodObj->getYearMonth($nowPeriodNum);
+        $ord = date('Ymd').substr(implode(NULL, array_map('ord', str_split(substr(uniqid(), 7, 13), 1))), 0, 10);
+
+        // 加入报单信息
+        $db = \Yii::$app->db;
+        $transaction = $db->beginTransaction();
+        try {
+            $decOrderModel = new ApproachDecOrder();
+            $decOrderModel->DEC_SN = 'DS'.$ord;
+            $decOrderModel->ORDER_SN = 'OS'.$ord;
+            $decOrderModel->TYPE = $this->type;
+            $decOrderModel->USER_ID = \Yii::$app->user->id; // 报单人
+            $decOrderModel->TO_USER_ID = $this->_insertUserId; // 被报单人
+            $decOrderModel->DEC_AMOUNT = $this->_decAmount;
+            $decOrderModel->DEC_PV = $this->_decPv;
+            $decOrderModel->PERIOD_NUM = $nowPeriodNum;
+            $decOrderModel->CALC_MONTH = $nowCalcMonth;
+            $decOrderModel->P_CALC_MONTH = Date::ociToDate($nowCalcMonth, Date::OCI_TIME_FORMAT_SHORT_MONTH);
+            $decOrderModel->PAID_WALLET = 'cash';
+            $decOrderModel->CON_USER_ID = $insertConId;
+            $decOrderModel->REC_USER_ID = $insertRecId;
+            $decOrderModel->DEC_ID = $this->_decId;
+            $decOrderModel->IS_DEL = 0;
+            $decOrderModel->DETAIL_TYPE = 2;
+            $decOrderModel->CREATED_AT = Date::nowTime();
+            $decOrderModel->UPGRADE_TYPE = $upgradeType;
+            $decOrderModel->REMARK = $remark;
+            $decOrderModel->ORI_LV = $oriDecLv; // 变更前的级别
+            $decOrderModel->UPGRADE_LV = $this->decLv; // 变更后的级别
+            if (!$decOrderModel->save()) {
+                $transaction->rollBack();
+                throw new Exception(Form::formatErrorsForApi($decOrderModel->getErrors()));
+            }
+
+            $orderModel = new ApproachOrder();
+            $orderModel->SN = 'OS' . $ord;
+            $orderModel->DEC_SN = 'DS' . $ord;
+            $orderModel->ORDER_TYPE = $this->type;
+            $orderModel->USER_ID = $this->_insertUserId;
+            $orderModel->USER_NAME = $this->insertUserName; // 要升级的用户
+            $orderModel->ORDER_AMOUNT = $this->_decAmount;
+            $orderModel->PV = $this->_decPv;
+            $orderModel->PAY_AMOUNT = $this->_decAmount;
+            $orderModel->PAY_PV = $this->_decPv;
+            $orderModel->PAY_AT = 0;
+            $orderModel->PAY_TYPE = 'pay_stack';
+            $orderModel->PERIOD_NUM = $nowPeriodNum;
+            $orderModel->P_CALC_MONTH = Date::ociToDate($nowCalcMonth, Date::OCI_TIME_FORMAT_SHORT_MONTH);
+            $orderModel->FREIGHT = 0;
+            $orderModel->PAY_FREIGHT = 0;
+            $orderModel->CONSIGNEE = $this->consignee;
+            $orderModel->MOBILE = $this->acceptMobile;
+            $orderModel->PROVINCE = $this->province;
+            $orderModel->LGA_NAME = $this->lgaName;
+            $orderModel->CITY_NAME = $this->cityName;
+            $orderModel->ADDRESS = $this->address;
+            $orderModel->WAREHOUSE = $warehouse;
+            $orderModel->STATUS = \Yii::$app->params['orderStatus']['notPaid']['value'];
+            $orderModel->CREATED_AT = Date::nowTime();
+            $orderModel->CREATE_USER = Info::getUserNameByUserId(\Yii::$app->user->id);
+            $orderModel->EMAIL = Info::getUserEmailByUserId(\Yii::$app->user->id) ?? '';
+            if(!$orderModel->save()){
+                $transaction->rollBack();
+                throw new Exception(Form::formatErrorsForApi($orderModel->getErrors()));
+            }
+
+            foreach ($this->goodsNum as $k => $v) {
+                if ($v) {
+                    $goods = ShopGoods::findOneAsArray('ID=:ID',[':ID'=> $this->goodsId[$k]]);
+                    $storenums = $goods['STORE_NUMS'] - $this->goodsNum[$k];
+                    if($goods['STATUS']==1){
+                        if($goods['STORE_NUMS'] >=$this->goodsNum[$k]) {
+                            $data = ShopGoods::find()->where(['ID' => $this->goodsId[$k]])->one();
+                            $data->STORE_NUMS = $storenums;
+                            $data->update();
+
+                            if ($storenums==0) {
+                                $data->STATUS = 0;
+                                $data->UPDATED_AT = Date::nowTime();
+                                $data->update();
+                            }
+                        } else {
+                            throw new Exception("product".$goods['GOODS_NAME']."Insufficient inventory");//"商品".$goods['GOODS_NAME']."库存不足"
+                        }
+                    } else {
+                        throw new Exception("product".$goods['GOODS_NAME']."Removed from the shelf");// "商品".$goods['GOODS_NAME']."已下架"
+                    }
+                }
+            }
+
+            // 加入商品到订单商品表
+            foreach($this->_orderGoods as $key=>$value){
+                $this->_orderGoods[$key]['ORDER_SN'] = $orderModel->SN;
+                $this->_orderGoods[$key]['P_CALC_MONTH'] = Date::ociToDate($nowCalcMonth, Date::OCI_TIME_FORMAT_SHORT_MONTH);
+            }
+            ApproachOrderGoods::batchInsert($this->_orderGoods);
+
+            //写入收货地址信息
+            $addressModel = new ReceiveAddress();
+            $addressModel->USER_ID = $this->_insertUserId;
+            $addressModel->USER_NAME = $this->insertUserName;
+            $addressModel->CONSIGNEE = $this->consignee;
+            $addressModel->MOBILE = $this->acceptMobile;
+            $addressModel->PROVINCE = $this->province;
+            $addressModel->LGA_NAME = $this->lgaName;
+            $addressModel->CITY_NAME = $this->cityName;
+            $addressModel->ADDRESS = $this->address;
+            $addressModel->IS_DEFAULT = 0;
+            if (!$addressModel->save()) {
+                $transaction->rollBack();
+                throw new Exception(Form::formatErrorsForApi($addressModel->getErrors()));
+            }
+
+            $transaction->commit();
+
+            return $orderModel;
+        } catch(Exception $e) {
+            $transaction->rollBack();
+            throw new Exception($e->getMessage());
+        }
+    }
+
+    /**
+     * 判断报单中心是否存在
+     * @param $attribute
+     * @return false|void
+     */
+    public function issetDec($attribute){
+        $decUser = User::find()
+        ->select('ID')
+        ->where('IS_DEC=1 AND USER_NAME=:USER_NAME', [':USER_NAME' => $this->decUserName])
+        ->asArray()
+        ->one();
+        if (!$decUser) {
+            $this->addError($attribute, 'Entry center does not exist');//报单中心不存在
+            return false;
+        } else {
+            // 判断报单中心是否在新加入会员的安置网上级中
+            $this->loopFindParentToNetwork($this->insertUserName);
+            //反转数组,in_array搜索错误
+            //in_array($this->decUserName, $this->_tempNetworkParentUser[$this->insertUserName]);
+//            $flipParent = array_flip(array_filter($this->_tempNetworkParentUser[$this->insertUserName]));
+//            if (!isset($flipParent[$this->decUserName])) {
+////                $this->addError($attribute, '为' . $this->insertUserName . '升级报单,报单中心' . $this->decUserName . '不在' . $this->insertUserName . '的安置网上级中');
+//                $this->addError($attribute, 'by' . $this->insertUserName . 'Upgrade declaration, declaration Center' . $this->decUserName . 'be not in' . $this->insertUserName . 'Online level of resettlement');
+//                return ;
+//            }
+            $this->_decId = $decUser['ID'];
+        }
+    }
+
+
+    // 判断是否已选择商品或套餐
+    public function hasProduct($attribute) {
+        if ($this->decWay==1 && empty($this->packageId)) {
+            $this->addError($attribute, 'Purchase package upgrade, please select package');//购买套餐升级,请选择套餐
+            return false;
+        }
+        if ($this->decWay!=1 && empty($this->goodsId)) {
+            $this->addError($attribute, 'Purchase product upgrade, please select product');//购买商品升级,请选择商品'
+            return false;
+        }
+
+        return true;
+    }
+
+    // 判断要升级的会员,是否已是最高级别
+    public function alreadyMaxDec($attribute) {
+        $baseInfo = Info::baseInfoZhByUserName($this->insertUserName);
+        $userDecId = $baseInfo['DEC_LV'];// 用户当前的级别
+        $maxPerfInfo = DeclarationLevel::getMaxDecPref(); 
+        $maxDecId = $maxPerfInfo['ID']; // 级别配置中最高级别ID
+        if ($maxDecId == $userDecId) {
+            $this->addError($attribute, 'It is already the highest level and no upgrade is required');//已是最高级别,无需升级
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * 寻找被升级人的上级
+     * @param null $conUserName
+     * @return bool
+     */
+    private function loopFindParentToNetwork($conUserName = null) {
+        if($conUserName == null ){
+            $conUserName = $this->insertUserName;
+        }
+        $baseUser = Info::getBaseUserByUserName($conUserName);
+        $userNetworkInfo = UserNetwork::findOneAsArray('USER_ID=:USER_ID', [':USER_ID' => $baseUser['ID']]);
+        unset($baseUser);
+        $allParentUserIdsArr = explode(',', $userNetworkInfo['PARENT_UIDS']);
+        unset($userNetworkInfo);
+        $allParentUserIds = array_reverse($allParentUserIdsArr);
+        unset($allParentUserIdsArr);
+        if($allParentUserIds){
+            foreach($allParentUserIds as $parentUserId) {
+                $parentBaseUser = Info::getBaseUserById($parentUserId);
+                if (is_null($parentBaseUser)) {
+                    continue;
+                }
+                $this->_tempNetworkParentUser[$this->insertUserName][] = $parentBaseUser['USER_NAME'] ;
+
+                unset($parentUserId, $parentBaseUser);
+            }
+        }
+        unset($allParentUserIds);
+        
+        return true;
+    }
+}

+ 23 - 4
common/models/forms/ApproachOrderForm.php

@@ -15,6 +15,7 @@ use common\models\ApproachDecOrder;
 use common\models\ApproachOrder;
 use common\models\ApproachOrderGoods;
 use common\models\DealType;
+use common\models\DecLevelLog;
 use common\models\DecOrder;
 use common\models\Order;
 use common\models\OrderGoods;
@@ -319,12 +320,30 @@ class ApproachOrderForm extends Model
             }
             OrderGoods::batchInsert($approachOrderGoods);
             // 同步报单
-            $approachDecOrder = ApproachDecOrder::findAllAsArray('ORDER_SN = :ORDER_SN', [':ORDER_SN' => $this->sn]);
+            $approachDecOrder = ApproachDecOrder::findOneAsArray('ORDER_SN = :ORDER_SN', [':ORDER_SN' => $this->sn]);
             if ($approachDecOrder) {
-                foreach ($approachDecOrder as &$decOrder) {
-                    unset($decOrder['STATUS']);
+                unset($approachDecOrder['STATUS']);
+                // 同步报单
+                DecOrder::insertOne($approachDecOrder);
+
+                // 会员升级 报单类型:2会员升级单
+                if ($approachDecOrder['DETAIL_TYPE'] == 2) {
+                    // 为被升级人进行升级操作
+                    $decLevelLog = new DecLevelLog();
+                    $decLog = [
+                        'userId' => $approachDecOrder['TO_USER_ID'],//会员ID
+                        'fromId' => $approachDecOrder['ORI_LV'], // 变动前的级别
+                        'levelId' => $approachDecOrder['UPGRADE_LV'],// 变动后的级别
+                        'actionId' => $approachDecOrder['USER_ID'],
+                        'remark' => $approachDecOrder['REMARK'],
+                        'lvPv' => $this->_model->PV,
+                    ];
+                    $modifyDecLv = $decLevelLog->frontendChange($decLog);
+                    if (empty($modifyDecLv)) {
+                        $transaction->rollBack();
+                        throw new Exception("Failed to upgrade for member");//为会员升级失败
+                    }
                 }
-                DecOrder::batchInsert($approachDecOrder);
             }
 
             // 删除中间表

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

@@ -131,34 +131,34 @@ class DeclarationForm extends Model
     public function attributeLabels()
     {
         return [
-            'type' => 'Entry type',//报单类型
-            'decLv' => 'Entry level',//报单级别
+            'type' => 'Entry type', // 报单类型
+            'decLv' => 'Entry level', // 报单级别
             //'decPv' => '报单PV',
-            'decWay' => 'Entry method',//报单方式
-            'packageId' => 'Entry Package',//报单套餐
-            'goodsId' => 'product ID',//商品ID
-            'goodsNum' => 'Product quantity',//商品数量
+            'decWay' => 'Entry method', // 报单方式
+            'packageId' => 'Entry Package', // 报单套餐
+            'goodsId' => 'product ID', // 商品ID
+            'goodsNum' => 'Product quantity', // 商品数量
             //'addType' => '新增会员方式',
-            'insertUserName' => 'Member user name',//会员用户名
-            'password' => 'Login password',//登陆密码
-            'payPassword' => 'Payment password',//支付密码
-            'realName' => 'Member name',//会员姓名
-            'insertUserIdCard' => 'ID',//身份证号
-            'mobile' => 'phone number',//手机号
-            'openBank' => 'openBank',//开户行
-            'bankAddress' => 'bankAddress',//开户支行
-            'bankNo' => 'bankNo',//银行账号
-            'bankProvince' => 'bankProvince',//银行省份
-            'bankCity' => 'bankCity',//银行城市
-            'bankCounty' => 'bankCounty',//银行县区
-            'conUserName' => 'Instructor user name',//指导老师用户名
-            'recUserName' => 'Developer user name',//开拓人用户名
-            'decUserName' => 'Entry center user name',//报单中心用户名
-            'conUid' => 'Instructor member ID',//指导老师会员ID
-            'recUid' => 'Pioneer member ID',//'开拓人会员ID
-            'location' => 'market',//市场
-            'consignee' => 'consignee',//收货人
-            'acceptMobile' => 'Consignee is phone number',//收货人手机
+            'insertUserName' => 'Member user name', // 会员用户名
+            'password' => 'Login password', // 登陆密码
+            'payPassword' => 'Payment password', // 支付密码
+            'realName' => 'Member name', // 会员姓名
+            'insertUserIdCard' => 'ID', // 身份证号
+            'mobile' => 'Phone Number', // 手机号
+            'openBank' => 'openBank', // 开户行
+            'bankAddress' => 'bankAddress', // 开户支行
+            'bankNo' => 'bankNo', // 银行账号
+            'bankProvince' => 'bankProvince', // 银行省份
+            'bankCity' => 'bankCity', // 银行城市
+            'bankCounty' => 'bankCounty', // 银行县区
+            'conUserName' => 'Instructor user name', // 指导老师用户名
+            'recUserName' => 'Developer user name', // 开拓人用户名
+            'decUserName' => 'Stockist user name', // 报单中心用户名
+            'conUid' => 'Instructor Member ID', // 指导老师会员ID
+            'recUid' => 'Sponsor Member ID', // 开拓人会员ID
+            'location' => 'market', // 市场
+            'consignee' => 'Recipient', // 收货人
+            'acceptMobile' => 'Recipient Phone Number', // 收货人手机
             'province' => 'Receiving Province',//收货省
             'city' => 'Receiving City',//收货市
             'county' => 'Receiving area / county',//收货区县
@@ -187,7 +187,7 @@ class DeclarationForm extends Model
      */
     public function issetDec($attribute){
         if (!$decUser = User::find()->select('ID')->where('IS_DEC=1 AND USER_NAME=:USER_NAME', [':USER_NAME' => $this->decUserName])->asArray()->one()) {
-            $this->addError($attribute, 'Entry center does not exist');//报单中心不存在
+            $this->addError($attribute, 'Stockist does not exist');//报单中心不存在
             return false;
         } else {
             // 判断报单中心是否在新加入会员的安置网上级中
@@ -200,7 +200,7 @@ class DeclarationForm extends Model
 //            exit;
             if (!isset($flipParent[$this->decUserName])) {
                 //$this->addError($attribute, '为' . $this->insertUserName . '报单,报单中心' . $this->decUserName . '不在' . $this->insertUserName . '的安置网上级中');
-                $this->addError($attribute, 'To' . $this->insertUserName . 'Entry,Entry Center' . $this->decUserName . 'not in exist' . $this->insertUserName . 'in the placement superiors');
+                $this->addError($attribute, 'To' . $this->insertUserName . 'Entry, Stockist' . $this->decUserName . 'not in exist' . $this->insertUserName . 'in the placement superiors');
                 return ;
             }
             $this->_decId = $decUser['ID'];
@@ -289,10 +289,10 @@ class DeclarationForm extends Model
                 if(!$recUserTemp){
                     if($this->insertUserName){
                         //$this->addError($attribute, '为'.$this->insertUserName.'报单,开拓人'.$this->recUserName.'不存在');
-                        $this->addError($attribute, 'To'.$this->insertUserName.'Entry,Pioneer'.$this->recUserName.'not in exist');
+                        $this->addError($attribute, 'To'.$this->insertUserName.'Entry, Sponsor'.$this->recUserName.'not in exist');
                     } else {
                        // $this->addError($attribute, '开拓人'.$this->recUserName.'不存在');
-                        $this->addError($attribute, 'Pioneer'.$this->recUserName.'not in exist');
+                        $this->addError($attribute, 'Sponsor'.$this->recUserName.'not in exist');
                     }
 
                     return ;
@@ -322,7 +322,7 @@ class DeclarationForm extends Model
                 $this->loopFindParentToNetwork($this->insertUserName);
                 if (!$this->recUserIsInNetworkParent()) {
                    // $this->addError($attribute, '为' . $this->insertUserName . '报单,开拓人' . $this->recUserName . '不在' . $this->insertUserName . '的安置网上级中');
-                    $this->addError($attribute, 'To' . $this->insertUserName . 'Entry,Pioneer' . $this->recUserName . 'not in exist' . $this->insertUserName . 'in the placement superiors');
+                    $this->addError($attribute, 'To' . $this->insertUserName . 'Entry, Sponsor' . $this->recUserName . 'not in exist' . $this->insertUserName . 'in the placement superiors');
                     return ;
                 }
             }
@@ -491,7 +491,7 @@ class DeclarationForm extends Model
                 $recUserTemp = UserInfo::findOneAsArray('USER_NAME=:USER_NAME', [':USER_NAME' => $this->recUserName]);
                 if(!$recUserTemp){
 //                    $this->addError($attribute, '为'.$this->insertUserName.'报单,开拓人'.$this->recUserName.'不存在');
-                    $this->addError($attribute, 'To'.$this->insertUserName.'Entry,Pioneer'.$this->recUserName.'not in exist');
+                    $this->addError($attribute, 'To'.$this->insertUserName.'Entry, Sponsor'.$this->recUserName.'not in exist');
                     return ;
                 }
                 $recUserTemp['CON_NUM'] = UserNetwork::firstFloorChildNum($recUserTemp['USER_ID']);
@@ -516,13 +516,13 @@ class DeclarationForm extends Model
             // 判断接点会员的下级会员是否大于三个,如果大于三个则不允许
             if($conUser['CON_NUM'] >= 3){
 //                $this->addError($attribute, '为'.$this->insertUserName.'报单,指导老师'.$this->conUserName.'下级点位已满');
-                $this->addError($attribute, 'To'.$this->insertUserName.'Entry,Pioneer'.$this->conUserName.'lower level is full');
+                $this->addError($attribute, 'To'.$this->insertUserName.'Entry, Sponsor'.$this->conUserName.'lower level is full');
                 return;
             }
             // 判断指导老师相应的区位是否已满
             if($conUser['LOCATION'.$this->location]){
 //                $this->addError($attribute, '为'.$this->insertUserName.'报单,指导老师'.$this->conUserName.'该市场已存在会员');
-                $this->addError($attribute, 'To'.$this->insertUserName.'Entry,Pioneer'.$this->conUserName.'Members already exist in this market');
+                $this->addError($attribute, 'To'.$this->insertUserName.'Entry, Sponsor'.$this->conUserName.'Members already exist in this market');
                 return;
             }
 //            if($conUser['CON_NUM'] == 0 && $this->location != 1){
@@ -568,7 +568,7 @@ class DeclarationForm extends Model
                 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->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->recUserName) $this->addError($attribute, 'For the first purchase, the Sponsor 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');//首购必须填写加入会员的市场
             }
         } else {

+ 6 - 3
common/models/forms/DeclarationUpgradeForm.php

@@ -86,7 +86,7 @@ class DeclarationUpgradeForm extends Model
             'goodsNum' => 'Product quantity',//商品数量
             'insertUserName' => 'Member number to be upgraded',//要升级的会员编号
             'consignee' => 'consignee',//收货人
-            'acceptMobile' => 'The phone number of Consignee',//收货人手机
+            'acceptMobile' => 'The Phone Number of Consignee',//收货人手机
             'province' => 'Receiving Province',//收货省
             'city' => 'Receiving City',//收货市
             'county' => 'Receiving area / county',//收货区县
@@ -165,7 +165,9 @@ class DeclarationUpgradeForm extends Model
                                 'POINT' => $goods['POINT'],
                                 'BUY_NUMS' => intval($v),
                                 'SKU_CODE' => $goods['GOODS_NO'],
-                                'GOODS_TITLE' => $goods['GOODS_NAME']
+                                'GOODS_TITLE' => $goods['GOODS_NAME'],
+                                'EMAIL' => Info::getUserEmailByUserId(\Yii::$app->user->id) ?? '',
+                                'TAX_RATE' => $goods['TAX_RATE'],
                             ];
                         }
                     }
@@ -378,7 +380,7 @@ class DeclarationUpgradeForm extends Model
         ->asArray()
         ->one();
         if (!$decUser) {
-            $this->addError($attribute, 'Entry center does not exist');//报单中心不存在
+            $this->addError($attribute, 'Stockist does not exist');//报单中心不存在
             return false;
         } else {
             // 判断报单中心是否在新加入会员的安置网上级中
@@ -443,6 +445,7 @@ class DeclarationUpgradeForm extends Model
         if($allParentUserIds){
             foreach($allParentUserIds as $parentUserId) {
                 $parentBaseUser = Info::getBaseUserById($parentUserId);
+                if (is_null($parentBaseUser)) continue;
                 $this->_tempNetworkParentUser[$this->insertUserName][] = $parentBaseUser['USER_NAME'] ;
 
                 unset($parentUserId, $parentBaseUser);

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

@@ -109,7 +109,7 @@ class OrderForm extends Model
             'city' => '市',
             'county' => '区',
             'lgaName' => 'lga name',
-            'cityName' => 'city name',
+            'cityName' => 'City Name',
             'detailaddress' => '收货详细地址',
             'email' => 'Email',
         ];

+ 12 - 11
common/models/forms/RechargeForm.php

@@ -43,10 +43,11 @@ class RechargeForm extends Model {
         return [
             [['userName', 'idCard', 'applyAmount', 'auditStatus', 'remark', 'selectedIds', 'sn','amount', 'bankRealName', 'bankNo'], 'trim'],
             [['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' => '会员不存在'],
+            [['selectedIds'], 'exist', 'targetClass' => Recharge::class, 'targetAttribute' => 'ID', 'message' => 'Recharge does not exist'], // 充值申请不存在
+            [['userName'], 'exist', 'targetClass' => UserInfo::class, 'targetAttribute' => 'USER_NAME', 'message' => 'Member does not exist'],// 会员不存在
             [['applyAmount'], 'price'],
             [['applyAmount'], 'isApplyAmount'],
+            [['applyAmount'], 'number', 'max' => 10000000000, 'min' => 1],
             [['selectedIds'], 'isSelected'],
             //[['sn'], 'isSn'],
         ];
@@ -71,11 +72,11 @@ class RechargeForm extends Model {
      */
     public function attributeLabels() {
         return [
-            'selectedIds' => '充值申请ID',
-            'userName' => '会员编号',
-            'applyAmount' => '申请充值的金额',
-            'openBank' => '汇款银行',
-            'bankNo' => '汇款账号',
+            'selectedIds' => 'RechargeID',// 充值申请ID
+            'userName' => 'Member code',// 会员编号
+            'applyAmount' => 'Apply Amount', // 申请充值的金额
+            'openBank' => 'Bank name',// 汇款银行
+            'bankNo' => 'Bank account', // 汇款账号
 //            'bankAddress' => '银行支行',
 //            'bankProvince' => '银行省',
 //            'bankCity' => '银行市',
@@ -90,22 +91,22 @@ class RechargeForm extends Model {
      */
     public function isApplyAmount($attribute) {
         if ($this->applyAmount <= 0) {
-            $this->addError('scenario', '充值金额必须大于0');
+            $this->addError('scenario', 'The recharge amount must be greater than 0'); // 充值金额必须大于0
         }
         if ((int)($this->applyAmount)!=$this->applyAmount) {
-            $this->addError('scenario', '充值金额必须是整数');
+            $this->addError('scenario', 'The recharge amount must be an integer');// 充值金额必须是整数
         }
         if ($this->scenario == 'addByUser') {
             $this->_userId = \Yii::$app->user->id;
         } elseif ($this->scenario == 'addByAdmin') {
             $userInfo = UserInfo::findOneAsArray(['USER_NAME' => $this->userName]);
             if (!$userInfo) {
-                $this->addError('scenario', $this->userName . '会员不存在');
+                $this->addError('scenario', $this->userName . 'Member does not exist');// 会员不存在
             }else{
                 $this->_userId = $userInfo['USER_ID'];
             }
         } else {
-            $this->addError($attribute, '场景不存在');
+            $this->addError($attribute, 'Scenes does not exist'); // 场景不存在
             return false;
         }
     }

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

@@ -69,20 +69,20 @@ class ShopGoodsForm extends Model
         return [
             'selectedIds' => '商品ID',
             'id' => '产品ID',
-            'goodsName' => '商品名称',
-            'sellDiscount' => '会员折扣',
-            'giftType' => '商品类型',
-            'categoryType' => '商品分类',
+            'goodsName' => 'Product Name', // 商品名称
+            'sellDiscount' => 'Discount Rate', // 会员折扣
+            'giftType' => 'Product Type', // 商品类型
+            'categoryType' => 'Product Category', // 商品分类
             'sellType' => '出售方式',
-            'goodsNo' => '产品编号',
+            'goodsNo' => 'Product Code', // 产品编号
             'unit' => '单位',
             'cover' => '封面',
-            'sellPrice' => '销售价格',
+            'sellPrice' => 'Price', // 销售价格
             'sellPriceStandard' => '标准价格',
-            'marketPrice' => '市场价格',
-            'pricePv' => '销售PV',
+            'marketPrice' => 'Market Price', // 市场价格
+            'pricePv' => 'BV', // 销售PV
             //'point' => '兑换积分',
-            'storeNums' => '库存',
+            'storeNums' => 'Inventory', // 库存
             'content' => '产品详情',
             'listOrder' => '排序',
             'taxRate' => '税率',

+ 3 - 3
console/controllers/ShopController.php

@@ -47,7 +47,7 @@ class ShopController extends BaseController
         $factory = ShopExport::factory($taskId);
         $factory->listModelClass = OrderList::class;
         try {
-            if ($factory->generate()) {
+            if ($factory->generateOrderExcel()) {
                 Yii::$app->swooleAsyncTimer->pushAsyncResultToAdmin($factory->getUserId(), '订单列表导出成功');
             }
             unset($factory);
@@ -93,7 +93,7 @@ class ShopController extends BaseController
         $factory = ShopExport::factory($taskId);
         $factory->listModelClass = OrderList::class;
         try {
-            if ($factory->generatePDF()) {
+            if ($factory->generateOrderPDF()) {
                 Yii::$app->swooleAsyncTimer->pushAsyncResultToAdmin($factory->getUserId(), '订单列表导出成功');
             }
             unset($factory);
@@ -117,7 +117,7 @@ class ShopController extends BaseController
         $factory = ShopExport::factory($taskId);
         $factory->listModelClass = OrderList::class;
         try {
-            if ($factory->generatePDF()) {
+            if ($factory->generateDecOrderPDF()) {
                 Yii::$app->swooleAsyncTimer->pushAsyncResultToAdmin($factory->getUserId(), '订单列表导出成功');
             }
             unset($factory);

+ 2 - 2
frontendApi/config/menu.php

@@ -55,7 +55,7 @@ return [
         ]
     ],
     'atlas'=>[
-        'name'=>'Network Atlas',
+        'name'=>'Network Chart',
         'class' => '',
         'icon'=>'el-icon-data-line',
         'controller'=>'atlas',
@@ -85,7 +85,7 @@ return [
             ['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'=>'Apply for recharge', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'recharge-add', 'routePath'=>'finance/recharge-add', 'show'=>0,], // 申请充值
             ['name'=>'Transfer record list', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'transfer-list', 'routePath'=>'finance/transfer-list', 'show'=>1,'allow'=>'transferRecordSwitch'],
             ['name'=>'Apply for Transfer', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'transfer-add', 'routePath'=>'finance/transfer-add', 'show'=>1,'allow'=>'transferSwitch'], // 我要转账
         ]

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

@@ -522,7 +522,7 @@ class FinanceController extends BaseController {
             $formModel = new RechargeForm();
             $formModel->scenario = 'addByUser';
             if ($formModel->load(\Yii::$app->request->post(), '') && $formModel->add()) {
-                return static::notice('充值申请已提交,请等待审核');
+                return static::notice('Recharge application has been submitted, please wait for review.');// 充值申请已提交,请等待审核
             } else {
                 return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
             }

+ 59 - 45
frontendApi/modules/v1/controllers/ShopController.php

@@ -191,48 +191,55 @@ class ShopController extends BaseController {
     /**
      * PayStack支付成功的webhook.
      * @throws \yii\web\HttpException
+     * @throws \Exception
      */
     public function actionVerifyApproachOrder() {
         if (\Yii::$app->request->isPost) {
             $request = \Yii::$app->request->post();
             // TODO:支付webhook回调日志
             LoggerTool::info($request);
-            $data = $request['data'];
-            $status = $request['data']['status'] ?? 'false';
-            // 订单状态
-            $orderStatus = ($status == 'success') ? \Yii::$app->params['orderStatus']['paid']['value'] : \Yii::$app->params['orderStatus']['failPaid']['value'];
-
-            $customFields = $data['metadata']['custom_fields'][0] ?? [];
-            $oderSn = $customFields['value'] ?? '';
-
-            $formModel = new ApproachOrderForm();
-            $formModel->scenario = 'verifyPayStack';
-            $load = [
-                'sn' => $oderSn,
-                'scenario' => 'verifyPayStack',
-                'status' => $orderStatus,
-                'note' => [
-                    'id' => $data['id'],
-                    'domain' => $data['domain'],
-                    'status' => $data['status'],
-                    'reference' => $data['reference'],
-                    'amount' => $data['amount'],
-                    'created_at' => $data['created_at'],
-                    'paid_at' => $data['paid_at'],
-                    'channel' => $data['channel'],
-                    'currency' => $data['currency'],
-                    'ip_address' => $data['ip_address'],
-                    'metadata' => $data['metadata'],
-                    'customer' => $data['customer'],
-                    'email' => $data['customer']['email'] ?? '',
-                ],
-            ];
-
-            if ($formModel->load($load, '') && $order = $formModel->verifyPayStack()) {
-                LoggerTool::error($order);
-                return http_response_code(200);
-            } else {
-                LoggerTool::error(Form::formatErrorsForApi($formModel->getErrors()));
+//            Tool::approachOrderCall($request);
+            try {
+                $data = $request['data'];
+                $status = $request['data']['status'] ?? 'false';
+                // 订单状态
+                $orderStatus = ($status == 'success') ? \Yii::$app->params['orderStatus']['paid']['value'] : \Yii::$app->params['orderStatus']['failPaid']['value'];
+
+                $customFields = $data['metadata']['custom_fields'][0] ?? [];
+                $oderSn = $customFields['value'] ?? '';
+
+                $formModel = new ApproachOrderForm();
+                $formModel->scenario = 'verifyPayStack';
+                $load = [
+                    'sn' => $oderSn,
+                    'scenario' => 'verifyPayStack',
+                    'status' => $orderStatus,
+                    'note' => [
+                        'id' => $data['id'],
+                        'domain' => $data['domain'],
+                        'status' => $data['status'],
+                        'reference' => $data['reference'],
+                        'amount' => $data['amount'],
+                        'created_at' => $data['created_at'],
+                        'paid_at' => $data['paid_at'],
+                        'channel' => $data['channel'],
+                        'currency' => $data['currency'],
+                        'ip_address' => $data['ip_address'],
+                        'metadata' => $data['metadata'],
+                        'customer' => $data['customer'],
+                        'email' => $data['customer']['email'] ?? '',
+                    ],
+                ];
+
+                if ($formModel->load($load, '') && $order = $formModel->verifyPayStack()) {
+                    LoggerTool::error($order);
+                    return http_response_code(200);
+                } else {
+                    LoggerTool::error(Form::formatErrorsForApi($formModel->getErrors()));
+                    return http_response_code(500);
+                }
+            } catch (\Exception $e) {
+                LoggerTool::error(sprintf('actionVerifyApproachOrderError: File[%s], Line:[%s], Message[%s]', $e->getFile(), $e->getLine(), $e->getMessage()));
                 return http_response_code(500);
             }
         }
@@ -487,7 +494,7 @@ class ShopController extends BaseController {
         $uname = Info::getUserNameByUserId(\Yii::$app->user->id);
         $orderSn = \Yii::$app->request->get('orderSn');
 
-        $condition = " AND ORDER_TYPE='FX' AND (USER_ID=:USER_ID OR CREATE_USER='$uname') AND SN=:SN";
+        $condition = " AND (USER_ID=:USER_ID OR CREATE_USER='$uname') AND SN=:SN AND O.IS_DELETE = 0";
         $params = [
             ':USER_ID' => \Yii::$app->user->id,
             ':SN' => $orderSn,
@@ -503,6 +510,9 @@ class ShopController extends BaseController {
             ],
         ]);
         if (!$data['list']) {
+            $condition .= ' AND (O.STATUS = :NOT_PAID OR O.STATUS = :FAIL_PAID)';
+            $params[':NOT_PAID'] = \Yii::$app->params['orderStatus']['notPaid']['value'];   // 待支付
+            $params[':FAIL_PAID'] = \Yii::$app->params['orderStatus']['failPaid']['value'];   // 支付失败
             $data = ApproachOrder::lists($condition, $params, [
                 'select' => 'O.*,U.REAL_NAME,OG.*,OG.CATEGORY_TYPE',
                 'orderBy' => 'O.CREATED_AT DESC',
@@ -633,9 +643,9 @@ ORDER;
                             
                             <table border="1" width="100%" style="padding: 10px 5px; text-align: center;">
                                 <tr>
-                                    <th width="15%" style="font-size: 14px; font-weight: bold; text-align: center;">Product code</th>
-                                    <th width="25%" style="font-size: 14px; font-weight: bold; text-align: center;">Product name</th>
-                                    <th width="15%" style="font-size: 14px; font-weight: bold; text-align: center;">Product price</th>
+                                    <th width="15%" style="font-size: 14px; font-weight: bold; text-align: center;">Product Code</th>
+                                    <th width="25%" style="font-size: 14px; font-weight: bold; text-align: center;">Product Name</th>
+                                    <th width="15%" style="font-size: 14px; font-weight: bold; text-align: center;">Product Price</th>
                                     <th width="10%" style="font-size: 14px; font-weight: bold; text-align: center;">Qty</th>
                                     <th width="10%" style="font-size: 14px; font-weight: bold; text-align: center;">Tax rate</th>
                                     <th width="10%" style="font-size: 14px; font-weight: bold; text-align: center;">Tax</th>
@@ -704,6 +714,8 @@ ORDER;
         $pdf->AddPage();
         // 设置字体
         $pdf->SetFont('stsongstdlight', '', 10, '', true);
+//        $image = file_get_contents(\Yii::$app->basePath . '/../frontendEle/src/static/img/ngds-logo.jpg');
+//        $pdf->Image('@' . $image, 165, 5, 20, 10, 'JPG');
         $pdf->writeHTML($context);
 
         ob_clean();
@@ -877,13 +889,13 @@ ORDER;
                             
                             <table border="1" width="100%" style="padding: 10px 20px; text-align: center;">
                                 <tr>
-                                    <th width="15%" style="font-size: 14px; font-weight: bold; text-align: center;">Product code</th>
-                                    <th width="25%" style="font-size: 14px; font-weight: bold; text-align: center;">Product name</th>
-                                    <th width="15%" style="font-size: 14px; font-weight: bold; text-align: center;">Product price</th>
+                                    <th width="15%" style="font-size: 14px; font-weight: bold; text-align: center;">Product Code</th>
+                                    <th width="25%" style="font-size: 14px; font-weight: bold; text-align: center;">Product Name</th>
+                                    <th width="15%" style="font-size: 14px; font-weight: bold; text-align: center;">Product Price</th>
                                     <th width="10%" style="font-size: 14px; font-weight: bold; text-align: center;">Qty</th>
-                                    <th width="10%" style="font-size: 14px; font-weight: bold; text-align: center;">Tax rate</th>
+                                    <th width="10%" style="font-size: 14px; font-weight: bold; text-align: center;">Tax Rate</th>
                                     <th width="10%" style="font-size: 14px; font-weight: bold; text-align: center;">Tax</th>
-                                    <th width="15%" style="font-size: 14px; font-weight: bold; text-align: center;">Total amount</th>
+                                    <th width="15%" style="font-size: 14px; font-weight: bold; text-align: center;">Total Amount</th>
                                 </tr>
                                 {$orderDetails}
                                 <tr>
@@ -948,6 +960,8 @@ ORDER;
         $pdf->AddPage();
         // 设置字体
         $pdf->SetFont('stsongstdlight', '', 10, '', true);
+//        $image = file_get_contents(\Yii::$app->basePath . '/../frontendEle/src/static/img/ngds-logo.jpg');
+//        $pdf->Image('@' . $image, 165, 5, 20, 10, 'JPG');
         $pdf->writeHTML($context);
 
         ob_clean();

+ 25 - 6
frontendApi/modules/v1/controllers/UserController.php

@@ -10,12 +10,14 @@ namespace frontendApi\modules\v1\controllers;
 
 use common\helpers\Cache;
 use common\helpers\Form;
+use common\helpers\Tool;
 use common\helpers\user\Info;
 use common\models\Config;
 use common\models\DeclarationLevel;
 use common\models\DeclarationPackage;
 use common\models\DecOrder;
 use common\models\forms\ApproachDeclarationLoopForm;
+use common\models\forms\ApproachDeclarationUpgradeForm;
 use common\models\forms\DeclarationForm;
 use common\models\forms\DeclarationLoopForm;
 use common\models\forms\UploadForm;
@@ -296,12 +298,19 @@ class UserController extends BaseController {
         }
         // 开始升级
         if (\Yii::$app->request->isPost) {
-            $formModel = new DeclarationUpgradeForm();
             $post = \Yii::$app->request->post();
+            // 根据支付方式区分逻辑
+            $payMethod = \Yii::$app->request->post('payType', '');
+            if ($payMethod === 'pay_stack') {
+                $formModel = new ApproachDeclarationUpgradeForm();
+            } else {
+                unset($post['payType']);
+                $formModel = new DeclarationUpgradeForm();
+            }
+
             $post['type'] = DeclarationForm::TYPE_ZC;
-            $allData['data'][] = $post;
-            if ($formModel->load($post, '') && $formModel->add($post)) {
-                return static::notice('Upgrade declaration succeeded');//升级报单成功
+            if ($formModel->load($post, '') && $result = $formModel->add($post)) {
+                return static::notice($result);// Upgrade declaration succeeded升级报单成功
             } else {
                 return static::notice(Form::formatErrorsForApi($formModel->getErrors()),400);
             }
@@ -328,9 +337,19 @@ class UserController extends BaseController {
         }
         $query_condition.= ")";
 
-        $allGoods = ShopGoods::find()->where("STATUS=1 ".$query_condition)->orderBy('SORT ASC')->asArray()->all();
+        $allGoods = ShopGoods::find()->where("STATUS=1 AND CATEGORY_TYPE=1 " . $query_condition)->orderBy('SORT ASC')->asArray()->all();
+        foreach ($allGoods as &$goods) {
+            $goods['TAX'] = Tool::calculateTax($goods['SELL_PRICE'], $goods['TAX_RATE']);
+        }
 
-        return static::notice(['allDecPackage' => $allDecPackage,'allGoods' => $allGoods,'decUserName'=>$decUserName]);
+        return static::notice([
+            'allDecPackage' => $allDecPackage,
+            'allGoods' => $allGoods,
+            'decUserName'=>$decUserName,
+            'payList' => ShopGoods::payTypes(),
+            'sellType' => ShopGoods::CATEGORY_TYPE,
+            'categoryType' => ShopGoods::CATEGORY_TYPE[0]['id'],
+        ]);
     }
 
     /**

+ 5 - 3
frontendEle/src/components/Uploader.vue

@@ -13,8 +13,10 @@
         :disabled="uploaderDisabled"
         :style="`width:${width};height:${height};`"
     >
-      <img v-if="uploaderImageUrl" :src="uploaderImageUrl" class="image-preview"
-           :style="`width:${width};height:${height};display: block;`">
+      <i v-if="uploaderImageUrl" class="el-icon-plus uploader-icon" :style="`line-height:${height};background-image: ${uploaderImageUrl}`">
+        <img :src="uploaderImageUrl" class="image-preview"
+             :style="`width:${width};height:${height};display: block;margin-top:-${height}`">
+      </i>
       <i v-else class="el-icon-plus uploader-icon"
          :style="`width:${width};height:${height};line-height:${height};`"></i>
     </el-upload>
@@ -151,4 +153,4 @@
     color: #8c939d;
     text-align: center;
   }
-</style>
+</style>

+ 1 - 1
frontendEle/src/router/index.js

@@ -259,7 +259,7 @@ export const constantRouterMap = [
                     title: 'Placement network',
                     breadcrumb: [
                         {title: 'Dashboard', path: '/dashboard/index'},
-                        {title: 'Network Atlas', path: '/atlas/network'},
+                        {title: 'Network Chart', path: '/atlas/network'},
                     ],
                 },
             },

BIN
frontendEle/src/static/img/ngds-logo.jpg


+ 5 - 0
frontendEle/src/utils/tool.js

@@ -210,6 +210,11 @@ let tool = {
         if (hasStatusBar) return window.innerHeight - 320
         return window.innerHeight - 260
     },
+  // 计算商品税额
+  calculateTax(amount, taxRate, count = 1) {
+      let taxAmount = (amount - amount / (1 + taxRate / 100)) * count
+      return Math.round(taxAmount * 100) / 100
+  },
 }
 
 export default tool

+ 1 - 1
frontendEle/src/views/atlas/network-opt.vue

@@ -208,7 +208,7 @@
         //this.getData(this.currentPage, this.pageSize, false)
       },
       handleExport(){
-        this.$confirm(`确定要导出当前数据吗?`, 'Hint', {
+        this.$confirm(`Are you sure you want to export the current data?`, 'Hint', { // 确定要导出当前数据吗?
           confirmButtonText: 'confirm', // 确定
           cancelButtonText: 'cancel', // 取消
           type: 'warning'

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

@@ -24,9 +24,9 @@
             <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>
+            <el-tag type="warning">Rank: {{data.EMP_LV_NAME}}, {{data.STAR_LV_NAME}}</el-tag>
+<!--            <el-tag type="warning">Star: {{data.STAR_LV_NAME}}</el-tag>-->
+            <el-tag>Joining Period: {{data.PERIOD_AT}}</el-tag>
           </span>
         </span>
       </el-tree>
@@ -167,7 +167,7 @@ export default {
       //this.getData(this.currentPage, this.pageSize, false)
     },
     handleExport (){
-      this.$confirm(`确定要导出当前数据吗?`, 'Hint', {
+      this.$confirm(`Are you sure you want to export the current data?`, 'Hint', { // 确定要导出当前数据吗?
         confirmButtonText: 'confirm', // 确定
         cancelButtonText: 'cancel', // 取消
         type: 'warning'

+ 1 - 1
frontendEle/src/views/bonus/index.vue

@@ -69,7 +69,7 @@
             {{tool.formatPrice(scope.row.TOTAL)}}
           </template>
         </el-table-column>
-        <el-table-column label="Note" prop="REMARK"></el-table-column><!-- 备注 -->
+        <el-table-column label="Remark" prop="REMARK"></el-table-column><!-- 备注 -->
       </el-table>
       <div slot="footer" class="dialog-footer">
         <pagination :total="totalCount" :page_size="pageSize" @size-change="handleSizeChange" @current-change="handleCurrentChange"></pagination>

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

@@ -12,7 +12,7 @@
         <el-form-item>
           <template slot="label">
             <span class="text-danger">*</span>
-            Phone number<!-- 手机号 -->
+            Phone Number<!-- 手机号 -->
           </template>
           <el-input v-model="form.mobile"></el-input>
         </el-form-item>
@@ -63,41 +63,55 @@
 </template>
 
 <script>
-  import Vue from 'vue'
-  import store from '@/utils/vuexStore'
-  import network from '@/utils/network'
-  import tool from '@/utils/tool'
-  import userInfo from '@/utils/userInfo'
+import Vue from 'vue'
+import store from '@/utils/vuexStore'
+import network from '@/utils/network'
+import tool from '@/utils/tool'
+import userInfo from '@/utils/userInfo'
 
-  export default {
-    name: 'config_receive-address-edit',
-    mounted() {
-      if (this.$route.name === 'config_receive-address-add'){
-        this.loading = false
-      } else {
-        this.getData()
-      }
-      console.log(this.regionData)
-    },
-    data() {
-      return {
-        regionData: store.state.regionInfo.regionData,
-        form: {
-          consignee: '',
-          mobile: '',
-          areaSelected: [],
-          address: '',
-          isDefault: false,
-        },
-        loading: true,
-        submitButtonStat: false,
+export default {
+  name: 'config_receive-address-edit',
+  mounted () {
+    if (this.$route.name === 'config_receive-address-add') {
+      this.loading = false
+    } else {
+      this.getData()
+    }
+    console.log(this.regionData)
+  },
+  data () {
+    return {
+      regionData: store.state.regionInfo.regionData,
+      form: {
+        consignee: '',
+        mobile: '',
+        areaSelected: [],
+        address: '',
+        isDefault: false,
+      },
+      loading: true,
+      submitButtonStat: false,
+    }
+  },
+  methods: {
+    onSubmit () {
+      this.submitButtonStat = true
+      let path = 'config/receive-address-add'
+      let postData = {
+        consignee: this.form.consignee,
+        mobile: this.form.mobile,
+        province: this.form.areaSelected[0] ? this.form.areaSelected[0] : '',
+        // city: this.form.areaSelected[1] ? this.form.areaSelected[1] : '',
+        // county: this.form.areaSelected[2] ? this.form.areaSelected[2] : '',
+        lgaName: this.form.lgaName,
+        cityName: this.form.cityName,
+        address: this.form.address,
+        isDefault: this.form.isDefault,
       }
-    },
-    methods: {
-      onSubmit() {
-        this.submitButtonStat = true
-        let path = 'config/receive-address-add'
-        let postData = {
+      if (this.$route.name === 'config_receive-address-edit'){
+        path = 'config/receive-address-edit'
+        postData = {
+          id: this.$route.params.id,
           consignee: this.form.consignee,
           mobile: this.form.mobile,
           province: this.form.areaSelected[0] ? this.form.areaSelected[0] : '',
@@ -108,49 +122,35 @@
           address: this.form.address,
           isDefault: this.form.isDefault,
         }
-        if (this.$route.name === 'config_receive-address-edit'){
-          path = 'config/receive-address-edit'
-          postData = {
-            id: this.$route.params.id,
-            consignee: this.form.consignee,
-            mobile: this.form.mobile,
-            province: this.form.areaSelected[0] ? this.form.areaSelected[0] : '',
-            // city: this.form.areaSelected[1] ? this.form.areaSelected[1] : '',
-            // county: this.form.areaSelected[2] ? this.form.areaSelected[2] : '',
-            lgaName: this.form.lgaName,
-            cityName: this.form.cityName,
-            address: this.form.address,
-            isDefault: this.form.isDefault,
-          }
-        }
-        return network.postData(path, postData).then(response => {
-          this.$message({
-            message: response,
-            type: 'success'
-          })
-          this.submitButtonStat = false
-          this.$router.go(-1)
-        }).catch(() => {
-          this.submitButtonStat = false
-        })
-      },
-      getData() {
-        network.getData(`config/receive-address-one/${this.$route.params.id}`).then(response=>{
-          console.log(response)
-          this.form.consignee = response.CONSIGNEE
-          this.form.mobile = response.MOBILE
-          this.form.areaSelected[0] = response.PROVINCE
-          // this.form.areaSelected[1] = response.CITY
-          // this.form.areaSelected[2] = response.COUNTY
-          this.form.lgaName = response.LGA_NAME
-          this.form.cityName = response.CITY_NAME
-          this.form.address = response.ADDRESS
-          this.form.isDefault = response.IS_DEFAULT === '1' ? true : false
-          this.loading = false
+      }
+      return network.postData(path, postData).then(response => {
+        this.$message({
+          message: response,
+          type: 'success'
         })
-      },
-    }
+        this.submitButtonStat = false
+        this.$router.go(-1)
+      }).catch(() => {
+        this.submitButtonStat = false
+      })
+    },
+    getData () {
+      network.getData(`config/receive-address-one/${this.$route.params.id}`).then(response => {
+        console.log(response)
+        this.form.consignee = response.CONSIGNEE
+        this.form.mobile = response.MOBILE
+        this.form.areaSelected[0] = response.PROVINCE
+        // this.form.areaSelected[1] = response.CITY
+        // this.form.areaSelected[2] = response.COUNTY
+        this.form.lgaName = response.LGA_NAME
+        this.form.cityName = response.CITY_NAME
+        this.form.address = response.ADDRESS
+        this.form.isDefault = response.IS_DEFAULT === '1' ? true : false
+        this.loading = false
+      })
+    },
   }
+}
 </script>
 
 <style scoped>

+ 1 - 1
frontendEle/src/views/config/receive-address-list.vue

@@ -3,7 +3,7 @@
     <div class="white-box">
       <el-table class="table-box" ref="multipleTable" :data="tableData" stripe style="width: 100%;">
         <el-table-column label="Consignee" prop="CONSIGNEE" width="150"></el-table-column><!-- 收货人 -->
-        <el-table-column label="Phone number" prop="MOBILE" width="150"></el-table-column><!-- 手机号码 -->
+        <el-table-column label="Phone Number" prop="MOBILE" width="150"></el-table-column><!-- 手机号码 -->
 
         <el-table-column label="Address" prop="ADDRESS" ></el-table-column><!-- 详细地址 -->
 

+ 2 - 2
frontendEle/src/views/finance/recharge-add.vue

@@ -3,7 +3,7 @@
         <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-input v-model="form.applyAmount" type="number" min="1" max="10000000000"></el-input>
                 </el-form-item>
                 <el-form-item label="Bank account">
                     <el-input v-model="form.bankNo"></el-input>
@@ -40,7 +40,7 @@ export default {
   data(){
     return{
       form:{
-        applyAmount: '',
+        applyAmount: 0,
         bankNo: '',
         bankAddress: '',
         openBank: '',

+ 201 - 205
frontendEle/src/views/finance/recharge.vue

@@ -1,215 +1,211 @@
 <template>
+  <div v-loading="loading">
+    <div class="white-box">
+      <el-table class="withdraw-table" :data="tableData" stripe style="width: 100%;">
+        <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 Amount" prop="AMOUNT">
+        </el-table-column>
+
+        <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>
+        </el-table-column>
+        <el-table-column label="Bank name" prop="OPEN_BANK_NAME">
+        </el-table-column>
+
+        <el-table-column label="Bank account" prop="BANK_NO">
+        </el-table-column>
+
+        <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-table>
+      <div class="white-box-footer">
+        <el-button type="primary" size="small" @click="handleAdd">Recharge</el-button><!-- 充值 -->
+        <pagination :total="totalCount" :page_size="pageSize" @size-change="handleSizeChange" @current-change="handleCurrentChange"></pagination>
+      </div>
+      <el-dialog title="Upload voucher" :visible.sync="dialogAddInvoiceVisible"><!-- 上传凭证 -->
+        <div v-loading="dialogAddInvoiceLoading">
+          <el-alert type="warning" :closable="false">
+            <slot name="title">
+              <pre v-html="message"></pre>
+            </slot>
+          </el-alert>
+
+          <leo-uploader :requestRoute="'finance/prove-add?id='+auditId" :defaultImageUrl="defaultImageUrl" width="160px" height="160px"
+                        :uploaderSuccessCanChange="true" @on-success="handleSuccess"></leo-uploader>
+        </div>
+      </el-dialog>
 
-        <div v-loading="loading">
-            <div class="white-box">
-                <el-table class="withdraw-table" :data="tableData" stripe style="width: 100%;">
-
-                    <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 Amount" prop="AMOUNT">
-
-                    </el-table-column>
-
-                    <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>
-                    </el-table-column>
-                    <el-table-column label="Bank name" prop="OPEN_BANK_NAME">
-
-                    </el-table-column>
-
-                    <el-table-column label="Bank account" prop="BANK_NO">
-
-                    </el-table-column>
-
-                    <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-table>
-                <div class="white-box-footer">
-                    <el-button type="primary" size="small" @click="handleAdd">Recharge</el-button><!-- 充值 -->
-                    <pagination :total="totalCount" :page_size="pageSize" @size-change="handleSizeChange" @current-change="handleCurrentChange"></pagination>
-                </div>
-                <el-dialog title="Upload voucher" :visible.sync="dialogAddInvoiceVisible"><!-- 上传凭证 -->
-                    <div v-loading="dialogAddInvoiceLoading">
-                        <el-alert type="warning" :closable="false">
-                            <slot name="title">
-                                <pre v-html="message"></pre>
-                            </slot>
-                        </el-alert>
-
-                        <leo-uploader :requestRoute="'finance/prove-add?id='+auditId" :defaultImageUrl="defaultImageUrl" width="480px" height="320px"
-                                      :uploaderSuccessCanChange="false" @on-success="handleSuccess"></leo-uploader>
-                    </div>
-                </el-dialog>
-
-                <el-dialog title="View voucher" :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><!-- 确定 -->
-                    </div>
-                </el-dialog>
-            </div>
+      <el-dialog title="View voucher" :visible.sync="dialogInvoiceVisible"><!-- 查看充值凭证 -->
+        <div v-loading="dialogInvoiceLoading" style="">
+          <a :href="urlimg" target="_blank"><img :src="urlimg" alt="" style="min-height: 200px;max-height: 200px;min-width: 200px; max-width: 200px"></a>
+        </div>
+        <div slot="footer" class="dialog-footer">
+          <el-button @click="uploadAgain(auditId)">Upload Again</el-button><!-- 确定 -->
+          <el-button @click="dialogInvoiceVisible = false">Confirm</el-button><!-- 确定 -->
         </div>
+      </el-dialog>
+    </div>
+  </div>
 </template>
 
 <script>
-
-    import network from '@/utils/network'
-    import baseInfo from '@/utils/baseInfo'
-    import store from '@/utils/vuexStore'
-    import tool from '@/utils/tool'
-    import LeoFilter from '@/components/Filter'
-    import LeoUploader from '@/components/Uploader'
-    import Pagination from '@/components/Pagination'
-    export default {
-        name: "recharge",
-        components: {LeoFilter, LeoUploader,Pagination},
-        mounted() {
-            this.getData();
-        },
-
-        data() {
-            return {
-                loading: false,
-                form:{
-
-                },
-                tableData:null,
-                list: null,
-                currentPage: 1,
-                totalPages: 1,
-                totalCount: 1,
-                pageSize: 20,
-                tool: tool,
-                dialogAddInvoiceVisible: false,
-                dialogAddInvoiceLoading: false,
-                dialogInvoiceVisible: false,
-                dialogInvoiceLoading: false,
-                defaultImageUrl: null,
-                addInvoiceTips: '',
-                requestRoute: '',
-                uploadId: null,
-                invoiceUrl:[],
-                auditId: null,
-                message:'',
-                submitButtonStat: false,
-                id:'',
-                dialogImageUrl: '',
-                dialogVisible: false,
-                disabled: false,
-                file:null,
-                urlimg:'',
-                postid:''
-            }
-        },
-        methods:{
-            handleCurrentChange (page) {
-                this.getData(page, this.pageSize)
-            },
-            handleSizeChange (pageSize) {
-                this.getData(this.currentPage, pageSize)
-            },
-            getData (page, pageSize) {
-                network.getPageData(this, '/finance/recharge', page, pageSize, {type: this.type}, function (response) {
-                    this.loading = false;
-                    this.list = response.list;
-                    let settingObj=this.list;
-                    let settingArr = Object.keys(settingObj).map(key => {
-                        //console.log(key); //为每个键名
-                        return settingObj[key];  //把每个对象返回出去生成一个新的数组中相当于0:{id:1}
-                    } );
-                    this.tableData=settingArr;
-
-                    console.log(this.tableData)
-
-                });
-            },
-            handleAdd() {
-                this.$router.push({path: `/finance/recharge-add`})
-            },
-            handlePictureCardPreview(file) {
-                this.dialogImageUrl = file.url;
-                this.dialogVisible = true;
-                this.file=file;
-                // console.log(file);
-
-            },
-            getFile(){
-                let data={
-                    uploadToken:this.uploadToken,
-                    file:this.file,
-                    id:this.auditId
-
-                }
-                console.log(data)
-                if(this.uploadToken){
-                    network.postData('finance/prove-add',data)
-                        .then(response=>{
-                            console.log(response);
-                        })
-                }
-            },
-            handleAddInvoiceShow(row) {
-
-                this.dialogAddInvoiceLoading = true
-                this.auditId = row.ID
-                console.log(this.auditId)
-                //this.requestRoute = 'finance/prove-add/' + this.auditId
-                this.dialogAddInvoiceVisible = true
-                this.loading = false;
-                let vueObj = this
-                network.getData('finance/prove-add',{id: this.auditId}).then(response => {
-                    console.log(response)
-                    vueObj.dialogAddInvoiceLoading = false
-                    //vueObj.invoiceUrl = response
-                    vueObj.uploadToken=response;
-                })
-
-
-            },
-            handleSuccess(response, file) {
-                this.getData()
-                this.$message({
-                    message: 'Successful!',
-                    type: 'success'
-                })
-                //this.form.image = imageUrl;
-            },
-            handleInvoiceShow(row) {
-                this.dialogInvoiceLoading = true
-                this.uploadId = row.ID
-                this.dialogInvoiceVisible = true
-
-                network.getData('finance/recharge', {id: this.uploadId}).then(response => {
-                    console.log(response)
-                    this.dialogInvoiceLoading = false
-                    let invoiceUrl = response.list;
-                    console.log(row)
-                    this.urlimg=row.BANK_PROVE
-
-
-                })
-            },
-
-        }
+import network from '@/utils/network'
+import baseInfo from '@/utils/baseInfo'
+import store from '@/utils/vuexStore'
+import tool from '@/utils/tool'
+import LeoFilter from '@/components/Filter'
+import LeoUploader from '@/components/Uploader'
+import Pagination from '@/components/Pagination'
+export default {
+  name: 'recharge',
+  components: {LeoFilter, LeoUploader, Pagination},
+  mounted () {
+    this.getData();
+  },
+
+  data () {
+    return {
+      loading: false,
+      form: {
+      },
+      tableData: null,
+      list: null,
+      currentPage: 1,
+      totalPages: 1,
+      totalCount: 1,
+      pageSize: 20,
+      tool: tool,
+      dialogAddInvoiceVisible: false,
+      dialogAddInvoiceLoading: false,
+      dialogInvoiceVisible: false,
+      dialogInvoiceLoading: false,
+      defaultImageUrl: null,
+      addInvoiceTips: '',
+      requestRoute: '',
+      uploadId: null,
+      invoiceUrl: [],
+      auditId: null,
+      message: '',
+      submitButtonStat: false,
+      id: '',
+      dialogImageUrl: '',
+      dialogVisible: false,
+      disabled: false,
+      file: null,
+      urlimg: '',
+      postid: ''
     }
+  },
+  methods: {
+    handleCurrentChange (page) {
+      this.getData(page, this.pageSize)
+    },
+    handleSizeChange (pageSize) {
+      this.getData(this.currentPage, pageSize)
+    },
+    getData (page, pageSize) {
+      network.getPageData(this, '/finance/recharge', page, pageSize, {type: this.type}, function (response) {
+        this.loading = false;
+        this.list = response.list;
+        let settingObj = this.list;
+        let settingArr = Object.keys(settingObj).map(key => {
+          // console.log(key); // 为每个键名
+          return settingObj[key]; // 把每个对象返回出去生成一个新的数组中相当于0:{id:1}
+        } );
+        this.tableData = settingArr;
+        console.log(this.tableData)
+      });
+    },
+    uploadAgain (auditId) {
+      this.dialogInvoiceVisible = false
+      // console.log(auditId)
+      let row = {
+        ID: auditId
+      }
+      this.handleAddInvoiceShow(row)
+    },
+    handleAdd () {
+      this.$router.push({path: `/finance/recharge-add`})
+    },
+    handlePictureCardPreview (file) {
+      this.dialogImageUrl = file.url;
+      this.dialogVisible = true;
+      this.file = file;
+      // console.log(file);
+    },
+    getFile () {
+      let data = {
+        uploadToken: this.uploadToken,
+        file: this.file,
+        id: this.auditId
+      }
+      // console.log(data)
+      if (this.uploadToken) {
+        network.postData('finance/prove-add', data)
+          .then(response => {
+            console.log(response);
+          })
+      }
+    },
+    handleAddInvoiceShow: function (row) {
+      this.dialogAddInvoiceLoading = true
+      this.auditId = row.ID
+      this.defaultImageUrl = row.BANK_PROVE
+      // console.log(this.auditId)
+      // this.requestRoute = 'finance/prove-add/' + this.auditId
+      this.dialogAddInvoiceVisible = true
+      this.loading = false;
+      let vueObj = this
+      network.getData('finance/prove-add', {id: this.auditId}).then(response => {
+        // console.log(response)
+        vueObj.dialogAddInvoiceLoading = false
+        // vueObj.invoiceUrl = response
+        vueObj.uploadToken = response;
+      })
+      this.getData()
+    },
+    handleSuccess (response, file) {
+      this.getData()
+      this.$message({
+        message: 'Successful!',
+        type: 'success'
+      })
+      // this.form.image = imageUrl;
+      this.getData()
+    },
+    handleInvoiceShow (row) {
+      this.dialogInvoiceLoading = true
+      this.uploadId = row.ID
+      this.dialogInvoiceVisible = true
+
+      network.getData('finance/recharge', {id: this.uploadId}).then(response => {
+        // console.log(response)
+        this.dialogInvoiceLoading = false
+        let invoiceUrl = response.list;
+        // console.log(row)
+        this.urlimg = row.BANK_PROVE
+        this.auditId = row.ID
+      })
+    },
+  }
+}
 </script>
 
 <style scoped>

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

@@ -38,7 +38,7 @@
         <el-form-item label="Actual amount transferred into" v-show="fee!=='0'"> <!-- 实际到账金额 -->
           <el-tag type="warning">{{realAmount}} NGN</el-tag> <!-- 元 -->
         </el-form-item>
-        <el-form-item label="Note" style="margin-top: 25px;"> <!-- 备注 -->
+        <el-form-item label="Remark" style="margin-top: 25px;"> <!-- 备注 -->
           <el-input v-model="form.remark"></el-input>
         </el-form-item>
         <el-form-item>

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

@@ -27,7 +27,7 @@
             {{tool.formatDate(scope.row.CREATED_AT)}}<br>
           </template>
         </el-table-column>
-        <el-table-column label="Note" prop="REMARK"></el-table-column> <!-- 备注 -->
+        <el-table-column label="Remark" prop="REMARK"></el-table-column> <!-- 备注 -->
       </el-table>
       <div class="white-box-footer">
         <!--<el-button type="primary" size="small" @click="handleAdd">我要转账</el-button>-->

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

@@ -23,7 +23,7 @@
                 <el-table-column width="120" label="Member Code" prop="USER_NAME"></el-table-column><!--会员编号-->
                 <el-table-column width="120" label="Member Name" prop="REAL_NAME"></el-table-column><!--会员姓名-->
                 <el-table-column width="130" label="Recipient name" prop="CONSIGNEE"></el-table-column><!--收货人-->
-                <el-table-column width="120" label="Phone number" prop="MOBILE"></el-table-column><!--收货电话-->
+                <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="CREATED_AT"></el-table-column>

+ 179 - 178
frontendEle/src/views/shop/order.vue

@@ -1,193 +1,192 @@
 <template>
   <div>
-      <div v-loading="loading">
-          <div class="white-box">
-              <div class="table">
-                  <el-table
-                    :data="goods"
-                    style="width: 100%"
-                    show-summary
-                    :summary-method="getSummaries">
-                     <el-table-column label="Product Name" prop="GOODS_NAME"><!--商品名称-->
-                    </el-table-column>
+    <div v-loading="loading">
+      <div class="white-box">
+        <div class="table">
+          <el-table
+            :data="goods"
+            style="width: 100%"
+            show-summary
+            :summary-method="getSummaries">
+             <el-table-column label="Product Name" prop="GOODS_NAME"><!--商品名称-->
+            </el-table-column>
 
-                    <el-table-column label="Product picture" ><!--图片-->
-                        <template slot-scope="scope">
-                            <img :src="scope.row.COVER" alt="" style="width:100%">
-                        </template>
-                    </el-table-column>
+            <el-table-column label="Product picture" ><!--图片-->
+              <template slot-scope="scope">
+                <img :src="scope.row.COVER" alt="" style="width:100%">
+              </template>
+            </el-table-column>
 
-                    <el-table-column label="Product price" prop="member_price"><!--商品价格-->
-                        <template slot-scope="scope">
-                            <span>{{ Math.round(scope.row.member_price * 100) / 100 }}</span>
-                        </template>
-                    </el-table-column>
-                    <el-table-column label="Member BV" prop="member_pv" v-if="category_type === 1"><!--会员PV-->
-                        <template slot-scope="scope">
-                            <span>{{ Math.round(scope.row.member_pv * 100) / 100 }}</span>
-                        </template>
-                    </el-table-column>
-                    <el-table-column label="Tax rate" prop="TAX_RATE"><!--税率-->
-                        <template slot-scope="scope">
-                            <span>{{ Math.round(scope.row.TAX_RATE * 100) / 100 }}</span>
-                        </template>
-                    </el-table-column>
+            <el-table-column label="Product price" prop="member_price"><!--商品价格-->
+              <template slot-scope="scope">
+                <span>{{ Math.round(scope.row.member_price * 100) / 100 }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="Member BV" prop="member_pv" v-if="category_type === 1"><!--会员PV-->
+              <template slot-scope="scope">
+                <span>{{ Math.round(scope.row.member_pv * 100) / 100 }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="Tax rate" prop="TAX_RATE"><!--税率-->
+              <template slot-scope="scope">
+                <span>{{ Math.round(scope.row.TAX_RATE * 100) / 100 }}</span>
+              </template>
+            </el-table-column>
 
-                    <el-table-column label="Tax" prop="tax_amount_plus"><!--税额-->
-                      <template slot-scope="scope">
-                        <span>{{ Math.round(scope.row.tax_amount_plus * 100) / 100 }}</span>
-                      </template>
-                    </el-table-column>
+            <el-table-column label="Tax" prop="tax_amount_plus"><!--税额-->
+              <template slot-scope="scope">
+                <span>{{ Math.round(scope.row.tax_amount_plus * 100) / 100 }}</span>
+              </template>
+            </el-table-column>
 <!--                    <el-table-column label="库存" prop="STORE_NUMS">-->
 <!--                    </el-table-column>-->
 
-                    <el-table-column label="Quantity" prop="chose_num"><!--数量-->
+            <el-table-column label="Quantity" prop="chose_num"><!--数量-->
 
-                    </el-table-column>
-                    <el-table-column label="Total Amount" prop="member_price_plus"><!--合计金额-->
-                        <template slot-scope="scope">
-                            <span>{{ Math.round(scope.row.member_price_plus * 100) / 100 }}</span>
-                        </template>
-                    </el-table-column>
-                    <el-table-column label="Total BV" prop="member_pv_plus" v-if="category_type === 1"><!--合计PV-->
-                        <template slot-scope="scope">
-                            <span>{{ Math.round(scope.row.member_pv_plus * 100) / 100 }}</span>
-                        </template>
-                    </el-table-column>
-                  </el-table>
-              </div>
-              <div class="address_box">
-                Please select the shipping address:	<!--  请选择收货地址 -->
-                <el-radio-group v-model="addressId" @change='choseAddress'>
-                    <div v-for="(item , index) in all_address" :key='index' class="address">
-                        <el-radio :label="item.ID" >
-                          Full address:{{item.ADDRESS}}, {{item.CITY_NAME}}, {{item.LGA_NAME}}, {{item.PROVINCE_NAME}}  &nbsp;&nbsp;&nbsp;&nbsp;
-                          <!-- 详细地址 -->  &nbsp;&nbsp;
-                          <!-- 收件人姓名 -->  Recipient name:{{item.CONSIGNEE}}&nbsp;&nbsp;&nbsp;&nbsp;
-                           <!-- 手机号码 --> Phone number:{{item.MOBILE}}
-                        </el-radio>
-                    </div>
-                    <div class="address">
-                      <el-radio label="100000000000000000">Self Pick-up</el-radio><!--自提-->
-                    </div>
-                </el-radio-group>
-              </div>
-              <div class="address_box">
-                Please select payment method:<!-- 请选择支付方式 -->
-                <el-radio-group v-model="payType" @change='chosePayType'>
-                    <div v-for="(item, index) in payList" :key='index' class="address">
-                        <el-radio :label="item.label">{{ item.name }}</el-radio>
-                    </div>
-                </el-radio-group>
-              </div>
-
-              <div class="box address_box">
-                Total orders:<!-- 订单合计 -->
-                  <div class="sum">
-                    <div class="sum_box" v-if="category_type === 1">
-                        <div>Freight</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>
-                  </div>
+            </el-table-column>
+            <el-table-column label="Total Amount" prop="member_price_plus"><!--合计金额-->
+              <template slot-scope="scope">
+                <span>{{ Math.round(scope.row.member_price_plus * 100) / 100 }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="Total BV" prop="member_pv_plus" v-if="category_type === 1"><!--合计PV-->
+              <template slot-scope="scope">
+                <span>{{ Math.round(scope.row.member_pv_plus * 100) / 100 }}</span>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+        <div class="address_box">
+          Please select the shipping address:	<!--  请选择收货地址 -->
+          <el-radio-group v-model="addressId" @change='choseAddress'>
+            <div v-for="(item , index) in all_address" :key='index' class="address">
+              <el-radio :label="item.ID" >
+                Full address:{{item.ADDRESS}}, {{item.CITY_NAME}}, {{item.LGA_NAME}}, {{item.PROVINCE_NAME}}  &nbsp;&nbsp;&nbsp;&nbsp;
+                <!-- 详细地址 -->  &nbsp;&nbsp;
+                <!-- 收件人姓名 -->  Recipient name:{{item.CONSIGNEE}}&nbsp;&nbsp;&nbsp;&nbsp;
+                <!-- 手机号码 --> Phone Number:{{item.MOBILE}}
+              </el-radio>
+            </div>
+            <div class="address">
+              <el-radio label="100000000000000000">Self Pick-up</el-radio><!--自提-->
+            </div>
+          </el-radio-group>
+          </div>
+          <div class="address_box">
+            Please select payment method:<!-- 请选择支付方式 -->
+            <el-radio-group v-model="payType" @change='chosePayType'>
+              <div v-for="(item, index) in payList" :key='index' class="address">
+                <el-radio :label="item.label">{{ item.name }}</el-radio>
               </div>
+            </el-radio-group>
+          </div>
 
-              <div class="box address_box">
-                Account Balance:	<!-- 账户余额 -->
-                <div class="sum">
-                    <div v-if="category_type === 1">
-<!--                        <div class="sum_box">-->
-<!--                            <div>账户积分</div>-->
-<!--                            <div>{{ balance.points }}</div>-->
-<!--                        </div>-->
-                        <div class="sum_box">
-                            <div>Account Balance</div><!-- 账户余额 -->
-                            <div>₦ {{ balance.cash }} NGN</div>
-                        </div>
-<!--                        <div class="sum_box">-->
-<!--                            <div>Exchange points</div>&lt;!&ndash; 兑换点数 &ndash;&gt;-->
-<!--                            <div>{{ balance.exchange }}</div>-->
-<!--                        </div>-->
-                    </div>
-
-                    <div v-if="category_type === 4">
-                        <div class="sum_box">
-                            <div>Travel bonus</div><!-- 旅游积分 -->
-                            <div>{{ balance.tourism_points }}</div>
-                        </div>
-                    </div>
-
-                    <div v-if="category_type === 5">
-                        <div class="sum_box">
-                            <div>Car House bonus</div><!-- 名车积分 -->
-                            <div>{{ balance.garage_points }}</div>
-                        </div>
-                    </div>
+          <div class="box address_box">
+            Total orders:<!-- 订单合计 -->
+              <div class="sum">
+                <div class="sum_box" v-if="category_type === 1">
+                  <div>Freight</div><!-- 运费 -->
+                  <div>
+                    <span v-if="category_type === 1">{{ prefixSign }}</span>
+                      {{ pointFreight }}
+                    <span v-if="category_type === 1">{{ unit }}</span>
                   </div>
                 </div>
-
-                <div>
-                    <el-button type="danger" @click="cancelOrder()">Go Back</el-button>
-                    <el-button type="primary" @click="goToAccounts()" :loading="submitButtonStat">Pay</el-button><!--去结算-->
+                <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>
               </div>
           </div>
 
-        <el-dialog title="Pay" v-if="visible" :visible.sync="visible" width="30%" v-loading="payStackLoading" :before-close="handleClose">
-            <section>
-<!--                <h1>Lorem Ipsum Dolor Sit Amet</h1>-->
-                <div class="formcontainer">
-                    <el-divider></el-divider>
-                    <div class="container">
-                        <el-form :model="form">
-                            <el-form-item label="Email" label-width="100px" required>
-                                <el-input v-model="form.email" autocomplete="off"></el-input>
-                            </el-form-item>
-                            <el-form-item label="Amount" label-width="100px" required>
-                                <el-input v-model="form.amount" autocomplete="off" readonly></el-input>
-                            </el-form-item>
-                        </el-form>
-                    </div>
-                </div>
-            </section>
+          <div class="box address_box">
+            Account Balance:	<!-- 账户余额 -->
+            <div class="sum">
+              <div v-if="category_type === 1">
+  <!--              <div class="sum_box">-->
+  <!--                  <div>账户积分</div>-->
+  <!--                  <div>{{ balance.points }}</div>-->
+  <!--              </div>-->
+              <div class="sum_box">
+                <div>Account Balance</div><!-- 账户余额 -->
+                <div>₦ {{ balance.cash }} NGN</div>
+              </div>
+  <!--            <div class="sum_box">-->
+  <!--              <div>Exchange points</div>&lt;!&ndash; 兑换点数 &ndash;&gt;-->
+  <!--              <div>{{ balance.exchange }}</div>-->
+  <!--            </div>-->
+            </div>
 
-            <paystack
-                :firstname="form.firstname"
-                :lastname="form.lastname"
-                :amount="form.amount * 100"
-                :email="form.email"
-                :metadata="form.metadata"
-                :currency="form.currency"
-                :paystackkey="form.publicKey"
-                :reference="reference"
-                :callback="processPayment"
-                :close="processClose"
-            >
-                <el-button type="primary" size="small">Pay</el-button>
+            <div v-if="category_type === 4">
+              <div class="sum_box">
+                <div>Travel bonus</div><!-- 旅游积分 -->
+                <div>{{ balance.tourism_points }}</div>
+              </div>
+            </div>
 
-            </paystack>
-            <el-button type="danger" size="small" class="cancelButton" @click="handleClose">Cancel</el-button>
-        </el-dialog>
+            <div v-if="category_type === 5">
+              <div class="sum_box">
+                <div>Car House bonus</div><!-- 名车积分 -->
+                <div>{{ balance.garage_points }}</div>
+              </div>
+            </div>
+          </div>
+        </div>
 
-        <el-dialog title="Tips" :visible.sync="payDialog" :show-close="false" width="350px" :close="handleOrderList">
-          <el-result icon="success" title="the order is successful">
-            <template slot="extra">
-              <span style="color: #008efa; font-size: 30px;">{{ countdown }}</span>
-            </template>
-          </el-result>
-        </el-dialog>
+        <div>
+          <el-button type="danger" @click="cancelOrder()">Go Back</el-button>
+          <el-button type="primary" @click="goToAccounts()" :loading="submitButtonStat">Pay</el-button><!--去结算-->
+        </div>
+      </div>
     </div>
+
+    <el-dialog title="Pay" v-if="visible" :visible.sync="visible" width="30%" v-loading="payStackLoading" :before-close="handleClose">
+      <section>
+  <!--      <h1>Lorem Ipsum Dolor Sit Amet</h1>-->
+        <div class="formcontainer">
+          <el-divider></el-divider>
+          <div class="container">
+            <el-form :model="form">
+              <el-form-item label="Email" label-width="100px" required>
+                <el-input v-model="form.email" autocomplete="off"></el-input>
+              </el-form-item>
+              <el-form-item label="Amount" label-width="100px" required>
+                <el-input v-model="form.amount" autocomplete="off" readonly></el-input>
+              </el-form-item>
+            </el-form>
+          </div>
+        </div>
+      </section>
+      <paystack
+          :firstname="form.firstname"
+          :lastname="form.lastname"
+          :amount="form.amount * 100"
+          :email="form.email"
+          :metadata="form.metadata"
+          :currency="form.currency"
+          :paystackkey="form.publicKey"
+          :reference="reference"
+          :callback="processPayment"
+          :close="processClose"
+          :channels="channels"
+      >
+        <el-button type="primary" size="small">Pay</el-button>
+      </paystack>
+      <el-button type="danger" size="small" class="cancelButton" @click="handleClose">Cancel</el-button>
+    </el-dialog>
+
+    <el-dialog title="Tips" :visible.sync="payDialog" :show-close="false" width="350px" :close="handleOrderList">
+      <el-result icon="success" title="the order is successful">
+        <template slot="extra">
+          <span style="color: #008efa; font-size: 30px;">{{ countdown }}</span>
+        </template>
+      </el-result>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
@@ -199,7 +198,7 @@ import paystack from 'vue-paystack'
 
 export default{
   name: 'order',
-  data (){
+  data: function () {
     return {
       loading: true,
       goods: [],
@@ -226,6 +225,8 @@ export default{
       countdown: 5,
       visible: false,
       payStackLoading: false,
+      // channels: ['card', 'bank', 'USSD', 'QR'],
+      channels: ['card', 'bank'],
       form: {
         publicKey: PAY_STACK_PUBLIC_KEY,
         currency: PAY_STACK_CURRENCY,
@@ -254,11 +255,11 @@ export default{
     let option = sessionStorage.getItem('order_goods');
     this.category_type = parseInt(sessionStorage.getItem('category_type'))
     await this.getShowCart();
-    if (option){
+    if (option) {
       let pageGoodsList = JSON.parse(option);
       // console.log(pageGoodsList);
       let pageList;
-      for ( let i in pageGoodsList ) {
+      for (let i in pageGoodsList) {
         pageList = pageGoodsList[i];
         if (!pageList) continue;
 
@@ -289,12 +290,12 @@ export default{
     }
   },
   methods:{
-    cancelOrder(){
+    cancelOrder () {
       history.go(-1)
     },
     setFreight () {
       // 如果地址为自提,则运费为0
-      if (this.addressId == '100000000000000000') {
+      if (this.addressId === '100000000000000000') {
         this.pointFreight = Number(0)
       } else {
         this.pointFreight = Number(this.freight)
@@ -360,12 +361,12 @@ export default{
 
       this.submitButtonStat = true
       // let path = 'sure-order'
-      this.$prompt('Please enter your payment password', 'Hint', {//'请输入支付密码', '提示'
-        confirmButtonText: 'Confirm',//确定
-        cancelButtonText: 'Cancel',//取消
+      this.$prompt('Please enter your payment password', 'Hint', { // '请输入支付密码', '提示'
+        confirmButtonText: 'Confirm', // 确定
+        cancelButtonText: 'Cancel', // 取消
         inputType: 'password',
         inputPattern: /\S+/,
-        inputErrorMessage: 'Please enter your payment password'//请输入支付密码
+        inputErrorMessage: 'Please enter your payment password' // 请输入支付密码
       }).then(({value}) => {
         this.payPassword = value
         let params = {

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

@@ -72,7 +72,7 @@
                     <el-form-item>
                         <template slot="label">
                             <span class="text-danger">*</span>
-                            Phone number<!--手机号-->
+                            Phone Number<!--手机号-->
                         </template>
                         <el-input v-model="addrform.acceptMobile"></el-input>
                     </el-form-item>

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

@@ -156,7 +156,7 @@
                 <el-form-item>
                     <template slot="label">
 
-                        Phone number<!-- 会员手机 -->
+                        Phone Number<!-- 会员手机 -->
                     </template>
                     <el-input v-model="form.mobile"></el-input>
                 </el-form-item>
@@ -195,7 +195,7 @@
                 <el-form-item>
                     <template slot="label">
 
-                        Phone number<!-- 收货人手机 -->
+                        Phone Number<!-- 收货人手机 -->
                     </template>
                     <el-input v-model="form.acceptMobile"></el-input>
                 </el-form-item>
@@ -256,7 +256,7 @@
 
                 <div class="hr-tip"><span>Pay Info<!-- 支付信息 --></span></div>
                 <el-form-item label="Payment method" required><!-- 支付方式 -->
-                    <el-radio-group v-model="form.payMethod" @change="payMethodChange">
+                    <el-radio-group v-model="form.payType" @change="payMethodChange">
                         <el-radio v-for="(item, index) in payList" :key='index' :label="item.label">{{ item.name }}</el-radio>
                     </el-radio-group>
                 </el-form-item>
@@ -317,7 +317,7 @@
     import network from '@/utils/network'
     import baseInfo from '@/utils/baseInfo'
     import store from '@/utils/vuexStore'
-     import tool from '@/utils/tool'
+    import tool from '@/utils/tool'
     import userInfo from '@/utils/userInfo'
     import { PAY_STACK_PUBLIC_KEY, PAY_STACK_CURRENCY } from '@/utils/config'
     import paystack from 'vue-paystack'

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

@@ -19,7 +19,7 @@
 <!--            <el-form-item label="Identity No.">&lt;!&ndash; 身份证号 &ndash;&gt;-->
 <!--              <el-input v-model="infoData.ID_CARD" :disabled="true"></el-input>-->
 <!--            </el-form-item>-->
-            <el-form-item label="Phone number"><!-- 手机号 -->
+            <el-form-item label="Phone Number"><!-- 手机号 -->
               <el-input v-model="infoData.MOBILE" :disabled="true"></el-input>
             </el-form-item>
             <el-form-item label="Email"><!-- Email -->

+ 184 - 20
frontendEle/src/views/user/upgrade.vue

@@ -55,7 +55,7 @@
                     <template slot="label">
                         Upgrade purchase product<!-- 升级购买商品 -->
                     </template>
-                    <el-tabs type="border-card" v-model="decWay" style="position: relative;width: 600px;">
+                    <el-tabs type="border-card" v-model="decWay" style="position: relative;width: 100%;">
                         <!--<el-tab-pane name="1">
                             <span slot="label">套餐</span>
                             <el-table class="table-box" :data="_tableData" stripe style="width: 100%;" highlight-current-row @current-change="handleCurrentChange">
@@ -97,19 +97,29 @@
                                         width="55">
                                 </el-table-column>
 
-                                <el-table-column label="product name" prop="GOODS_NAME"><!-- 商品名称 -->
+                                <el-table-column label="product Name" prop="GOODS_NAME"><!-- 商品名称 -->
 
                                 </el-table-column>
-                                <el-table-column label="product code" prop="GOODS_NO"><!-- 商品编号 -->
+                                <el-table-column label="product Code" prop="GOODS_NO"><!-- 商品编号 -->
 
                                 </el-table-column>
-                                <el-table-column label="product price" prop="SELL_PRICE"><!-- 产品价格 -->
+                                <el-table-column label="product Price" prop="SELL_PRICE"><!-- 产品价格 -->
 
                                 </el-table-column>
                                 <el-table-column label="product BV" prop="PRICE_PV"><!-- BV价格 -->
 
                                 </el-table-column>
-                                <el-table-column label="quantity" width="150"><!-- 数量 -->
+                                <el-table-column label="Tax Rate"><!--税率-->
+                                    <template slot-scope="scope">
+                                        <span>{{ Math.round(scope.row.TAX_RATE * 100) / 100 }}</span>
+                                    </template>
+                                </el-table-column>
+                                <el-table-column label="Tax"><!--税额-->
+                                    <template slot-scope="scope">
+                                        <span>{{ Math.round(scope.row.TAX * 100) / 100 }}</span>
+                                    </template>
+                                </el-table-column>
+                                <el-table-column label="Qty" width="150"><!-- 数量 -->
                                     <template slot-scope="scope">
                                         <el-input-number size="mini" v-model="numList[scope.$index]"  :min="0" :max="Number(scope.row.STORE_NUMS)" @change="value=>{handleChange(value,scope.row.ID)}"></el-input-number>
                                     </template>
@@ -118,8 +128,8 @@
                             <div class="white-box-footer flex">
                                 <el-button @click="getSum()">Total calculation<!-- 计算合计 --></el-button>
                                 <div class='flex data' style="flex:1;justify-content: flex-end;">
-                                    <div style="margin-right:2rem"><!-- 商品价格 -->product price:{{sell_price_sum}}</div>
-                                    <div><!-- 商品PV -->product BV:{{price_pv_sum}}</div>
+                                    <div style="margin-right:2rem"><!-- 商品价格 -->product price:{{sell_price_sum}}</div>
+                                    <div><!-- 商品PV -->product BV:{{price_pv_sum}}</div>
                                 </div>
                             </div>
                         </el-tab-pane>
@@ -133,7 +143,7 @@
                 </el-form-item>
                 <el-form-item v-if="!isMax">
                     <template slot="label">
-                         Phone number<!-- 收货人手机 -->
+                         Phone Number<!-- 收货人手机 -->
                     </template>
                     <el-input v-model="form.acceptMobile"></el-input>
                 </el-form-item>
@@ -168,11 +178,60 @@
                 <el-form-item v-if="!isMax" label="note"><!-- 备注 -->
                     <el-input type="textarea" v-model="form.remark"></el-input>
                 </el-form-item>
+
+                <el-form-item v-if="!isMax" label="Payment method" required><!-- 支付方式 -->
+                  <el-radio-group v-model="form.payType" @change="payMethodChange">
+                    <el-radio v-for="(item, index) in payList" :key='index' :label="item.label">{{ item.name }}</el-radio>
+                  </el-radio-group>
+                </el-form-item>
+
                 <el-form-item v-if="!isMax">
                     <el-button type="primary" @click="onSubmit" :loading="submitButtonStat">SAVE<!-- 保存 --></el-button>
                 </el-form-item>
             </el-form>
         </div>
+        <el-dialog title="Pay" v-if="visible" :visible.sync="visible" width="30%" v-loading="payStackLoading" :before-close="handleClose">
+          <section>
+            <div class="formcontainer">
+              <el-divider></el-divider>
+              <div class="container">
+                <el-form :model="PayStackForm">
+                  <el-form-item label="Email" label-width="100px" required>
+                    <el-input v-model="PayStackForm.email" autocomplete="off"></el-input>
+                  </el-form-item>
+                  <el-form-item label="Amount" label-width="100px" required>
+                    <el-input v-model="PayStackForm.amount" autocomplete="off" readonly></el-input>
+                  </el-form-item>
+                </el-form>
+              </div>
+            </div>
+          </section>
+
+          <paystack
+            :firstname="PayStackForm.firstname"
+            :lastname="PayStackForm.lastname"
+            :amount="PayStackForm.amount * 100"
+            :email="PayStackForm.email"
+            :metadata="PayStackForm.metadata"
+            :currency="PayStackForm.currency"
+            :paystackkey="PayStackForm.publicKey"
+            :reference="reference"
+            :callback="processPayment"
+            :close="processClose"
+          >
+            <el-button type="primary" size="small">Pay</el-button>
+
+          </paystack>
+          <el-button type="danger" size="small" class="cancelButton" @click="handleClose">Cancel</el-button>
+        </el-dialog>
+
+        <el-dialog title="Tips" :visible.sync="payDialog" :show-close="false" width="350px" :close="handleOrderList">
+          <el-result icon="success" title="the order is successful">
+            <template slot="extra">
+              <span style="color: #008efa; font-size: 30px;">{{ countdown }}</span>
+            </template>
+          </el-result>
+        </el-dialog>
     </div>
 </template>
 
@@ -181,7 +240,10 @@
     import network from '@/utils/network'
     import baseInfo from '@/utils/baseInfo'
     import store from '@/utils/vuexStore'
-     import tool from '@/utils/tool'
+    import tool from '@/utils/tool'
+    import userInfo from '@/utils/userInfo'
+    import { PAY_STACK_PUBLIC_KEY, PAY_STACK_CURRENCY } from '@/utils/config'
+    import paystack from 'vue-paystack'
 
     export default {
         name: 'user_upgrade',
@@ -199,6 +261,13 @@
                 return this.tableData.filter(item=>{
                     return item.LEVEL_ID == this.form.decLv
                 })
+            },
+            reference() {
+                let text = "";
+                let possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
+                for (let i = 0; i < 10; i++)
+                    text += possible.charAt(Math.floor(Math.random() * possible.length));
+                return text;
             }
         },
 
@@ -240,7 +309,7 @@
                     lgaName:'',
                     cityName:'',
                     acceptMobile:'',
-
+                    payType: '',
                 },
                 num: 1,
                 tableData:null,
@@ -254,9 +323,37 @@
                 goodsNums:[],
                 numList: [],
                 sell_price_sum:0.00,
-                price_pv_sum:0.00
+                price_pv_sum:0.00,
+                payList: [],
+                sn: '',
+                payDialog: false,
+                countdown: 5,
+                visible: false,
+                payStackLoading: false,
+                PayStackForm: {
+                    publicKey: PAY_STACK_PUBLIC_KEY,
+                    currency: PAY_STACK_CURRENCY,
+                    firstname: userInfo.userName(),
+                    lastname: '',
+                    email: userInfo.userEmail(),
+                    amount: 0,  // kobo
+                    orderSn: '',
+                    metadata: {
+                        cart_id: this.sn,
+                        custom_fields: [
+                            {
+                                display_name: 'orderSn',
+                                variable_name: 'orderSn',
+                                value: this.sn
+                            },
+                        ]
+                    },
+                },
             }
         },
+        components: {
+            paystack
+        },
         methods: {
             // 获取要升级的会员信息
             upgradeInfo() {
@@ -306,6 +403,10 @@
                     }
                     this.tableDatas=settingObj1;
 
+                  // 支付方式
+                  this.payList = response.sellType[0]['sell_type']
+                  // 支付方式的第一项默认选中
+                  this.form.payType = Object.values(this.payList)[0]['label']
                 }).catch(() => {
                 });
             },
@@ -388,17 +489,27 @@
                     lgaName: this.form.lgaName,
                     cityName: this.form.cityName,
                     nowPerf:this.nowPerf,
-                    nextPerf:this.nextPerf
+                    nextPerf:this.nextPerf,
+                    payType: this.form.payType,
                 }
 
                 return network.postData(path, postData).then(response => {
-                    console.log(response);
-                    this.$message({
-                        message: response,
-                        type: 'success'
-                    })
-                    this.submitButtonStat = false
-                    this.$router.go(-1)
+                    // 非PayStack支付
+                    if (this.form.payType !== 'pay_stack') {
+                        this.$message({
+                          message: response,
+                          type: 'success'
+                        })
+                        this.submitButtonStat = false
+                        this.$router.push({path: `/shop/order-list`})
+                    } else {
+                        // PayStack支付
+                        this.submitButtonStat = false
+                        this.PayStackForm.orderSn = response.SN
+                        this.PayStackForm.amount = response.ORDER_AMOUNT
+                        this.PayStackForm.metadata.custom_fields[0].value = response.SN
+                        this.visible = true
+                    }
                 }).catch(() => {
                     this.submitButtonStat = false
                 })
@@ -436,6 +547,54 @@
                     })
                 }
             },
+            // 切换支付方式
+            payMethodChange(type) {
+                this.form.payType = type
+            },
+            // 关闭支付回调
+            handleClose() {
+                let _this = this
+                _this.$confirm('Confirm to close?').then(() => {
+                    return network.postData('shop/delete-approach-order', {orderSn: this.PayStackForm.orderSn}).then(() => {
+                        // 关闭支付模态框
+                        _this.visible = false
+                    })
+                }).catch(() => {
+                    // 关闭支付模态框
+                    _this.visible = false
+                })
+            },
+            // 支付成功回调
+            processPayment(response) {
+                // 关闭支付页面
+                this.visible = false
+                this.payStackLoading = false
+
+                // 显示支付成功模态框
+                this.payDialog = true
+                this.handleCountdown()
+            },
+            // 关闭支付回调
+            processClose() {
+                // 关闭支付模态框
+                this.visible = false
+            },
+            // 支付tips结束,跳转到报单列表
+            handleOrderList() {
+                this.$router.push({path: `/shop/dec-order-list`})
+            },
+            // 启动倒计时
+            handleCountdown() {
+                //创建定时器
+                setInterval(() => {
+                    // 每隔1秒把time的值减一,赋值给span标签
+                    this.countdown--
+                    if (this.countdown === 0) {
+                        // 倒计时结束,跳转到报单列表
+                        this.$router.push({path: `/shop/dec-order-list`})
+                    }
+                }, 1000)
+            },
         }
     }
 </script>
@@ -473,7 +632,8 @@
         padding-right: 30px;}
     .el-tabs--border-card{
         position: relative;
-    width: 600px;
+      width: 100%;
+    /*width: 600px;*/
     }
     .flex{
         display: flex;
@@ -481,4 +641,8 @@
     .form-page{
         width:100% !important;
     }
+    .payButton {
+      border: none;
+      padding: 0;
+    }
 </style>

+ 1 - 0
sql/upgrade/1462.sql

@@ -0,0 +1 @@
+UPDATE `AR_CONFIG` SET `TITLE` = '每月个人总消费PV条件' WHERE CONFIG_NAME='monthPcsPvFxCondition' LIMIT 1;