소스 검색

Merge branch 'new-version' of http://18.167.157.193:1026/guanli/aklast into feature/1347-dd-userUpgrade

root 3 년 전
부모
커밋
07516f2392

+ 492 - 491
backendApi/config/menu.php

@@ -1,492 +1,493 @@
-<?php
-/**
- * Created by PhpStorm.
- * User: Leo
- * Date: 2017/9/3
- * Time: 下午3:23
- */
-return [
-//    'navigation' => [
-//        'name'=>'导航',
-//        'class' => 'list-header',
-//    ],
-    'dashboard'=>[
-        'name'=>'控制台',
-        'class' => '',
-        'icon'=>'el-icon-guide',
-        'controller'=>'dashboard',
-        'action'=>'index',
-        'routePath'=>'dashboard/index',
-        'show'=>1,
-        'child'=>[
-            ['name'=>'总累计', 'class'=>'', 'icon'=>'', 'controller'=>'dashboard', 'action'=>'total-item', 'routePath'=>'dashboard/total-item', 'show'=>0,],
-            ['name'=>'会员月注册数量', 'class'=>'', 'icon'=>'', 'controller'=>'dashboard', 'action'=>'reg-num', 'routePath'=>'dashboard/reg-num', 'show'=>0,],
-            ['name'=>'月奖金量', 'class'=>'', 'icon'=>'', 'controller'=>'dashboard', 'action'=>'bonus-num', 'routePath'=>'dashboard/bonus-num', 'show'=>0,],
-            ['name'=>'月提现量', 'class'=>'', 'icon'=>'', 'controller'=>'dashboard', 'action'=>'withdraw-num', 'routePath'=>'dashboard/withdraw-num', 'show'=>0,],
-        ]
-    ],
-    'shop'=>[
-        'name'=>'商城管理',
-        'class' => '',
-        'icon'=>'el-icon-goods',
-        'controller'=>'shop',
-        'action'=>'',
-        'routePath'=>'shop',
-        'show'=>1,
-        'child'=>[
-            ['name'=>'商品列表', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'index', 'routePath'=>'shop/index', 'show'=>1,],
-            // 新添加的商品操作  --- stat
-            ['name'=>'添加商品', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'goods-add', 'routePath'=>'shop/goods-add', 'show'=>0,],
-            ['name'=>'编辑商品', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'goods-edit', 'routePath'=>'shop/goods-edit', 'show'=>0,],
-            ['name'=>'删除商品', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'goods-delete', 'routePath'=>'shop/goods-delete', 'show'=>0,],
-            // 新添加的商品操作 ---stop
-            ['name'=>'商品列表导出', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'goods-list-export', 'routePath'=>'shop/goods-list-export', 'show'=>0,],
-            ['name'=>'套餐管理', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'package', 'routePath'=>'shop/package', 'show'=>1,],
-            ['name'=>'报单列表', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'dec-order-list', 'routePath'=>'shop/dec-order-list', 'show'=>1,],
-            ['name'=>'报单列表导出', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'dec-order-list-export', 'routePath'=>'shop/dec-order-list-export', 'show'=>0,],
-            ['name'=>'订单列表', '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'=>'订单发货', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'order-delivery', 'routePath'=>'shop/order-delivery', 'show'=>0,],
-            ['name'=>'外部商城订单列表', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'order-shop-list', 'routePath'=>'shop/order-shop-list', 'show'=>1,],
-            ['name'=>'外部商城报单列表', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'order-dec-list', 'routePath'=>'shop/order-dec-list', 'show'=>1,],
-            ['name'=>'外部商城达标订单列表', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'order-standard-list', 'routePath'=>'shop/order-standard-list', 'show'=>1,],
-        ]
-    ],
-    'user'=>[
-        'name'=>'会员管理',
-        'class' => '',
-        'icon'=>'el-icon-user',
-        'controller'=>'user',
-        'action'=>'',
-        'routePath'=>'user',
-        'show'=>1,
-        'child'=>[
-            ['name'=>'会员列表', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'index', 'routePath'=>'user/index', 'show'=>1,],
-            ['name'=>'登录到前台', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'login-to-frontend', 'routePath'=>'user/login-to-frontend', 'show'=>0,],
-            ['name'=>'指定会员管理登录管理', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'batch-close-login', 'routePath'=>'user/batch-close-login', 'show'=>0,],
-            ['name'=>'按条件登录管理', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'close-login', 'routePath'=>'user/close-login', 'show'=>0,],
-            ['name'=>'会员地区登录管理', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'close-area-login', 'routePath'=>'user/close-area-login', 'show'=>0,],
-            //['name'=>'会员运作管理', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'is-operating', 'routePath'=>'user/is-operating', 'show'=>0,],
-//            ['name'=>'会员团队领导人管理', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'is-group', 'routePath'=>'user/is-group', 'show'=>0,],
-            ['name'=>'会员报单中心管理', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'is-dec', 'routePath'=>'user/is-dec', 'show'=>0,],
-            ['name'=>'会员工作室管理', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'is-studio', 'routePath'=>'user/is-studio', 'show'=>0,],
-            ['name'=>'会员转账比例修改', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'change-transfer-prop', 'routePath'=>'user/change-transfer-prop', 'show'=>0,],
-//            ['name'=>'指定会员管理报单管理', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'batch-close-dec', 'routePath'=>'user/batch-close-dec', 'show'=>0,],
-//            ['name'=>'按条件报单管理', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'close-dec', 'routePath'=>'user/close-dec', 'show'=>0,],
-//            ['name'=>'会员地区报单管理', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'close-area-dec', 'routePath'=>'user/close-area-dec', 'show'=>0,],
-            ['name'=>'会员列表导出', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'index-export', 'routePath'=>'user/index-export', 'show'=>0,],
-            ['name'=>'图谱管理', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'is-atlas', 'routePath'=>'user/is-atlas', 'show'=>0,],
-            ['name'=>'充值管理', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'is-recharge', 'routePath'=>'user/is-recharge', 'show'=>0,],
-            ['name'=>'修改密码', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'modify-password', 'routePath'=>'user/modify-password', 'show'=>0,],
-            ['name'=>'查看个人资料', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'profile-get', 'routePath'=>'user/profile-get', 'show'=>0,],
-            ['name'=>'修改个人资料', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'modify-profile', 'routePath'=>'user/modify-profile', 'show'=>0,],
-            ['name'=>'会员状态', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'modify-status', 'routePath'=>'user/modify-status', 'show'=>0,],
-            ['name'=>'密码修改状态', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'is-modify-password-status', 'routePath'=>'user/is-modify-password-status', 'show'=>0,],
-            ['name'=>'空单操作', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'user-add-opt', 'routePath'=>'user/user-add-opt', 'show'=>1,],
-            ['name'=>'空单添加', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'user-add', 'routePath'=>'user/user-add', 'show'=>0,],
-            ['name'=>'空单列表', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'empty-list', 'routePath'=>'user/empty-list', 'show'=>1,],
-//            ['name'=>'空单批量1导入', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'import-users-to-excel-table', 'routePath'=>'user/import-users-to-excel-table', 'show'=>0,],
-//            ['name'=>'空单批量2添加', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'import-users-add', 'routePath'=>'user/import-users-add', 'show'=>0,],
-//            ['name'=>'空单删除', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'user-del', 'routePath'=>'user/user-del', 'show'=>0,],
-            //['name'=>'点位绑定', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'bind', 'routePath'=>'user/bind', 'show'=>1,],
-            //['name'=>'点位绑定添加', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'bind-add', 'routePath'=>'user/bind-add', 'show'=>0,],
-            //['name'=>'点位绑定编辑', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'bind-edit', 'routePath'=>'user/bind-edit', 'show'=>0,],
-            //['name'=>'点位绑定撤销', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'bind-delete', 'routePath'=>'user/bind-delete', 'show'=>0,],
-            //['name'=>'点位绑定导出', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'bind-export', 'routePath'=>'user/bind-export', 'show'=>0,],
-            //['name'=>'点位合作', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'teamwork', 'routePath'=>'user/teamwork', 'show'=>1,],
-            //['name'=>'点位合作添加', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'teamwork-add', 'routePath'=>'user/teamwork-add', 'show'=>0,],
-            //['name'=>'点位合作编辑', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'teamwork-edit', 'routePath'=>'user/teamwork-edit', 'show'=>0,],
-            //['name'=>'点位合作导出', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'teamwork-export', 'routePath'=>'user/teamwork-export', 'show'=>0,],
-            //['name'=>'体系管理', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'system', 'routePath'=>'user/system', 'show'=>1,],
-            //['name'=>'体系添加', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'system-add', 'routePath'=>'user/system-add', 'show'=>0,],
-            //['name'=>'体系编辑', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'system-edit', 'routePath'=>'user/system-edit', 'show'=>0,],
-            //['name'=>'体系撤销', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'system-delete', 'routePath'=>'user/system-delete', 'show'=>0,],
-            //['name'=>'体系恢复', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'system-renew', 'routePath'=>'user/system-renew', 'show'=>0,],
-            //['name'=>'体系导出', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'system-export', 'routePath'=>'user/system-export', 'show'=>0,],
-            //['name'=>'团队领导人列表', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'group', 'routePath'=>'user/group', 'show'=>1,],
-            //['name'=>'团队领导人列表导出', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'group-export', 'routePath'=>'user/group-export', 'show'=>0,],
-            ['name'=>'移网管理', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'move', 'routePath'=>'user/move', 'show'=>1,],
-            ['name'=>'申请移网', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'move-add', 'routePath'=>'user/move-add', 'show'=>0,],
-            ['name'=>'移网修改并审核', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'move-pass', 'routePath'=>'user/move-pass', 'show'=>0,],
-            ['name'=>'移网审核', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'move-audit', 'routePath'=>'user/move-audit', 'show'=>0,],
-            ['name'=>'移网导出', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'move-export', 'routePath'=>'user/move-export', 'show'=>0,],
-            ['name'=>'移网审核删除', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'move-delete', 'routePath'=>'user/move-delete', 'show'=>0,],
-            //['name'=>'注册信息报表', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'reg-info', 'routePath'=>'user/reg-info', 'show'=>1,],
-            //['name'=>'修改注册信息', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'reg-info-edit', 'routePath'=>'user/reg-info-edit', 'show'=>0,],
-            //['name'=>'注册信息审核列表', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'reg-info-audit', 'routePath'=>'user/reg-info-audit', 'show'=>1,],
-            //['name'=>'注册信息添加操作', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'reg-info-audit-add-opt', 'routePath'=>'user/reg-info-audit-add-opt', 'show'=>0,],
-            //['name'=>'注册信息添加', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'reg-info-audit-add', 'routePath'=>'user/reg-info-audit-add', 'show'=>0,],
-            //['name'=>'注册信息批量1导入', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'import-reg-info-to-excel-table', 'routePath'=>'user/import-reg-info-to-excel-table', 'show'=>0,],
-            //['name'=>'注册信息批量2添加', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'import-reg-info', 'routePath'=>'user/import-reg-info', 'show'=>0,],
-            //['name'=>'审核注册信息', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'reg-info-audit-audit', 'routePath'=>'user/reg-info-audit-audit', 'show'=>0,],
-            //['name'=>'删除审核注册信息', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'reg-info-audit-delete', 'routePath'=>'user/reg-info-audit-delete', 'show'=>0,],
-            //['name'=>'会员状态管理', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'status-audit-list', 'routePath'=>'user/status-audit-list', 'show'=>1,],
-            //['name'=>'会员状态管理导出', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'user/status-audit-export', 'routePath'=>'user/user/status-audit-export', 'show'=>0,],
-            //['name'=>'申请修改会员状态', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'status-audit-add', 'routePath'=>'user/status-audit-add', 'show'=>0,],
-            //['name'=>'审核会员状态', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'status-audit', 'routePath'=>'user/status-audit', 'show'=>0,],
-            //['name'=>'删除审核会员状态', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'status-audit-delete', 'routePath'=>'user/status-audit-delete', 'show'=>0,],
-            ['name'=>'会员级别调整列表', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'change-user-dec-level', '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'=>'修改报单中心级别', '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,],
-            //['name'=>'修改会员前台显示聘级', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'change-show-emp-level', 'routePath'=>'user/change-show-emp-level', 'show'=>1,],
-        ]
-    ],
-    'atlas'=>[
-        'name'=>'网络图谱',
-        'class' => '',
-        'icon'=>'el-icon-data-line',
-        'controller'=>'atlas',
-        'action'=>'',
-        'routePath'=>'atlas',
-        'show'=>1,
-        'child'=>[
-            ['name'=>'开拓网络', 'class'=>'', 'icon'=>'', 'controller'=>'atlas', 'action'=>'relation-opt', 'routePath'=>'atlas/relation-opt', 'show'=>1,],
-            ['name'=>'开拓网络图', 'class'=>'', 'icon'=>'', 'controller'=>'atlas', 'action'=>'relation', 'routePath'=>'atlas/relation', 'show'=>0,],
-            ['name'=>'开拓网络列表', 'class'=>'', 'icon'=>'', 'controller'=>'atlas', 'action'=>'relation-list', 'routePath'=>'atlas/relation-list', 'show'=>0,],
-            ['name'=>'开拓网络列表导出', 'class'=>'', 'icon'=>'', 'controller'=>'atlas', 'action'=>'relation-list-export', 'routePath'=>'atlas/relation-list-export', 'show'=>0,],
-            ['name'=>'安置网络', 'class'=>'', 'icon'=>'', 'controller'=>'atlas', 'action'=>'network-opt', 'routePath'=>'atlas/network-opt', 'show'=>1,],
-            ['name'=>'安置网络图', 'class'=>'', 'icon'=>'', 'controller'=>'atlas', 'action'=>'network', 'routePath'=>'atlas/network', 'show'=>0,],
-            ['name'=>'安置网络列表', 'class'=>'', 'icon'=>'', 'controller'=>'atlas', 'action'=>'network-list', 'routePath'=>'atlas/network-list', 'show'=>0,],
-            ['name'=>'安置网络列表导出', 'class'=>'', 'icon'=>'', 'controller'=>'atlas', 'action'=>'network-list-export', 'routePath'=>'atlas/network-list-export', 'show'=>0,],
-        ]
-    ],
-//    'reconsume'=>[
-//        'name'=>'复销管理',
-//        'class' => '',
-//        'icon'=>'el-icon-shopping-bag-1',
-//        'controller'=>'reconsume',
-//        'action'=>'',
-//        'routePath'=>'reconsume',
-//        'show'=>1,
-//        'child'=>[
-//            ['name'=>'复销池余额列表', 'class'=>'', 'icon'=>'', 'controller'=>'reconsume', 'action'=>'pool-list', 'routePath'=>'reconsume/pool-list', 'show'=>1,],
-////            ['name'=>'手动扣除月复销', 'class'=>'', 'icon'=>'', 'controller'=>'reconsume', 'action'=>'deduct', 'routePath'=>'reconsume/deduct', 'show'=>1,],
-//            ['name'=>'复销余额调整审核', 'class'=>'', 'icon'=>'', 'controller'=>'reconsume', 'action'=>'change-audit-list', 'routePath'=>'reconsume/change-audit-list', 'show'=>1,],
-//            ['name'=>'复销余额调整审核导出', 'class'=>'', 'icon'=>'', 'controller'=>'reconsume', 'action'=>'change-audit-list-export', 'routePath'=>'reconsume/change-audit-list-export', 'show'=>0,],
-//            ['name'=>'修改并通过审核余额调整', 'class'=>'', 'icon'=>'', 'controller'=>'reconsume', 'action'=>'change-audit-pass', 'routePath'=>'reconsume/change-audit-pass', 'show'=>0,],
-//            ['name'=>'审核余额调整', 'class'=>'', 'icon'=>'', 'controller'=>'reconsume', 'action'=>'change-audit', 'routePath'=>'reconsume/change-audit', 'show'=>0,],
-//            ['name'=>'申请余额调整', 'class'=>'', 'icon'=>'', 'controller'=>'reconsume', 'action'=>'change-audit-add', 'routePath'=>'reconsume/change-audit-add', 'show'=>0,],
-//            ['name'=>'删除余额调整', 'class'=>'', 'icon'=>'', 'controller'=>'reconsume', 'action'=>'change-audit-delete', 'routePath'=>'reconsume/change-audit-delete', 'show'=>0,],
-//            //['name'=>'扣除复销审核', 'class'=>'', 'icon'=>'', 'controller'=>'reconsume', 'action'=>'deduct-audit-list', 'routePath'=>'reconsume/deduct-audit-list', 'show'=>1,],
-//            ['name'=>'手动扣除月复销', 'class'=>'', 'icon'=>'', 'controller'=>'reconsume', 'action'=>'deduct-audit-add', 'routePath'=>'reconsume/deduct-audit-add', 'show'=>0,],
-//            ['name'=>'复销流水', 'class'=>'', 'icon'=>'', 'controller'=>'reconsume', 'action'=>'flow-list', 'routePath'=>'reconsume/flow-list', 'show'=>1,],
-//        ]
-//    ],
-    'bonus'=>[
-        'name'=>'奖金管理',
-        'class' => '',
-        'icon'=>'el-icon-coin',
-        'controller'=>'bonus',
-        'action'=>'',
-        'routePath'=>'bonus',
-        'show'=>1,
-        'child'=>[
-            ['name'=>'封期管理', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'period', 'routePath'=>'bonus/period', 'show'=>1,],
-            ['name'=>'封期操作', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'close-period', 'routePath'=>'bonus/close-period', 'show'=>0,],
-            ['name'=>'生成业绩单', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'perf-period', 'routePath'=>'bonus/perf-period', 'show'=>0,],
-            ['name'=>'结算操作', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'calc-period', 'routePath'=>'bonus/calc-period', 'show'=>0,],
-            ['name'=>'挂网操作', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'send-period', 'routePath'=>'bonus/send-period', 'show'=>0,],
-            ['name'=>'会员奖金余额', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'balance-list', 'routePath'=>'bonus/balance-list', 'show'=>1,],
-            ['name'=>'会员奖金余额导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'balance-export', 'routePath'=>'bonus/balance-export', 'show'=>0,],
-//            ['name'=>'申请发放年度奖', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'cf-lx-apply', 'routePath'=>'bonus/cf-lx-apply', 'show'=>0,],
-//            ['name'=>'年度奖金发放审核', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'cf-lx-audit-list', 'routePath'=>'bonus/cf-lx-audit-list', 'show'=>1,],
-//            ['name'=>'年度奖发放审核操作', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'cf-lx-audit', 'routePath'=>'bonus/cf-lx-audit', 'show'=>0,],
-            //['name'=>'期奖金明细', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'period-detail', 'routePath'=>'bonus/period-detail', 'show'=>0,],
-            ['name'=>'最新奖金', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'new-period-bonus', 'routePath'=>'bonus/new-period-bonus', 'show'=>1,],
-            ['name'=>'最新奖金导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'new-period-bonus-export', 'routePath'=>'bonus/new-period-bonus-export', 'show'=>0,],
-            ['name'=>'往期奖金', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'other-period-bonus', 'routePath'=>'bonus/other-period-bonus', 'show'=>1,],
-            ['name'=>'往期奖金导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'other-period-bonus-export', 'routePath'=>'bonus/other-period-bonus-export', 'show'=>0,],
-            ['name'=>'奖金流水', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-bonus', 'routePath'=>'bonus/flow-bonus', 'show'=>1,],
-            ['name'=>'奖金流水导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-bonus-export', 'routePath'=>'bonus/flow-bonus-export', 'show'=>0,],
-//            ['name'=>'车房养老奖流水', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-cf', 'routePath'=>'bonus/flow-cf', 'show'=>1,],
-//            ['name'=>'车房养老奖流水导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-cf-export', 'routePath'=>'bonus/flow-cf-export', 'show'=>0,],
-//            ['name'=>'领袖分红奖流水', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-lx', 'routePath'=>'bonus/flow-lx', 'show'=>1,],
-//            ['name'=>'领袖分红奖流水导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-lx-export', 'routePath'=>'bonus/flow-lx-export', 'show'=>0,],
-            ['name'=>'复消积分流水', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-rp', 'routePath'=>'bonus/flow-rp', 'show'=>1,],
-            ['name'=>'复消积分流水导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-rp-export', 'routePath'=>'bonus/flow-rp-export', 'show'=>0,],
-            ['name'=>'兑换点数流水', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-exchange', 'routePath'=>'bonus/flow-exchange', 'show'=>1,],
-            ['name'=>'兑换点数流水导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-exchange-export', 'routePath'=>'bonus/flow-exchange-export', 'show'=>0,],
-            ['name'=>'会员余额流水', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-balance', 'routePath'=>'bonus/flow-balance', 'show'=>1,],
-            ['name'=>'会员余额流水导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-balance-export', 'routePath'=>'bonus/flow-balance-export', 'show'=>0,],
-//            ['name'=>'区域津贴核算', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'calc-qy', 'routePath'=>'bonus/calc-qy', 'show'=>1,],
-//            ['name'=>'区域津贴补发列表', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'resend-qy-list', 'routePath'=>'bonus/resend-qy-list', 'show'=>1,],
-//            ['name'=>'区域津贴补发列表导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'resend-qy-list-export', 'routePath'=>'bonus/resend-qy-list-export', 'show'=>0,],
-//            ['name'=>'申请补发区域津贴', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'resend-qy', 'routePath'=>'bonus/resend-qy', 'show'=>0,],
-//            ['name'=>'补发区域津贴审核列表', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'resend-qy-audit-list', 'routePath'=>'bonus/resend-qy-audit-list', 'show'=>1,],
-//            ['name'=>'补发区域津贴审核列表导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'resend-qy-audit-list-export', 'routePath'=>'bonus/resend-qy-audit-list-export', 'show'=>0,],
-//            ['name'=>'补发区域津贴审核操作', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'resend-qy-audit', 'routePath'=>'bonus/resend-qy-audit', 'show'=>0,],
-//            ['name'=>'补发区域津贴审核删除', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'resend-qy-audit-delete', 'routePath'=>'bonus/resend-qy-audit-delete', 'show'=>0,],
-            ['name'=>'团队奖向下追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-down-qy', 'routePath'=>'bonus/trace-down-qy', 'show'=>1,],
-            ['name'=>'团队奖下追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-down-qy-export', 'routePath'=>'bonus/trace-down-qy-export', 'show'=>0,],
-            ['name'=>'团队奖向上追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-qy', 'routePath'=>'bonus/trace-up-qy', 'show'=>1,],
-            ['name'=>'团队奖向上追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-qy-export', 'routePath'=>'bonus/trace-up-qy-export', 'show'=>0,],
-            ['name'=>'荣衔奖向下追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-down-yc', 'routePath'=>'bonus/trace-down-yc', 'show'=>1,],
-            ['name'=>'荣衔奖向下追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-down-yc-export', 'routePath'=>'bonus/trace-down-yc-export', 'show'=>0,],
-            ['name'=>'荣衔奖贴向上追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-yc', 'routePath'=>'bonus/trace-up-yc', 'show'=>1,],
-            ['name'=>'荣衔奖向上追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-yc-export', 'routePath'=>'bonus/trace-up-yc-export', 'show'=>0,],
-            ['name'=>'服务奖向下追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-down-bd', 'routePath'=>'bonus/trace-down-bd', 'show'=>1,],
-            ['name'=>'服务奖向下追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-down-bd-export', 'routePath'=>'bonus/trace-down-bd-export', 'show'=>0,],
-            ['name'=>'服务奖贴向上追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-bd', 'routePath'=>'bonus/trace-up-bd', 'show'=>1,],
-            ['name'=>'服务奖向上追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-bd-export', 'routePath'=>'bonus/trace-up-bd-export', 'show'=>0,],
-            ['name'=>'推广奖向下追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-down-tg', 'routePath'=>'bonus/trace-down-tg', 'show'=>1,],
-            ['name'=>'推广奖向下追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-down-tg-export', 'routePath'=>'bonus/trace-down-tg-export', 'show'=>0,],
-            ['name'=>'推广奖贴向上追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-tg', 'routePath'=>'bonus/trace-up-tg', 'show'=>1,],
-            ['name'=>'推广奖向上追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-tg-export', 'routePath'=>'bonus/trace-up-tg-export', 'show'=>0,],
-            ['name'=>'消费奖向下追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-down-xf', 'routePath'=>'bonus/trace-down-xf', 'show'=>1,],
-            ['name'=>'消费奖向下追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-down-xf-export', 'routePath'=>'bonus/trace-down-xf-export', 'show'=>0,],
-            ['name'=>'消费奖贴向上追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-xf', 'routePath'=>'bonus/trace-up-xf', 'show'=>1,],
-            ['name'=>'消费奖向上追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-xf-export', 'routePath'=>'bonus/trace-up-xf-export', 'show'=>0,],
-            ['name'=>'业绩奖向下追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-down-yj', 'routePath'=>'bonus/trace-down-yj', 'show'=>1,],
-            ['name'=>'业绩奖向下追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-down-yj-export', 'routePath'=>'bonus/trace-down-yj-export', 'show'=>0,],
-            ['name'=>'业绩奖贴向上追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-yj', 'routePath'=>'bonus/trace-up-yj', 'show'=>1,],
-            ['name'=>'业绩奖向上追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-yj-export', 'routePath'=>'bonus/trace-up-yj-export', 'show'=>0,],
-            ['name'=>'共享奖向下追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-down-gx', 'routePath'=>'bonus/trace-down-gx', 'show'=>1,],
-            ['name'=>'共享奖向下追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-down-gx-export', 'routePath'=>'bonus/trace-down-gx-export', 'show'=>0,],
-            ['name'=>'共享奖贴向上追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-gx', 'routePath'=>'bonus/trace-up-gx', 'show'=>1,],
-            ['name'=>'共享奖向上追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-gx-export', 'routePath'=>'bonus/trace-up-gx-export', 'show'=>0,],
-            ['name'=>'管理奖向下追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-down-gl', 'routePath'=>'bonus/trace-down-gl', 'show'=>1,],
-            ['name'=>'管理奖向下追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-down-gl-export', 'routePath'=>'bonus/trace-down-gl-export', 'show'=>0,],
-            ['name'=>'管理奖贴向上追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-gl', 'routePath'=>'bonus/trace-up-gl', 'show'=>1,],
-            ['name'=>'管理奖向上追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-gl-export', 'routePath'=>'bonus/trace-up-gl-export', 'show'=>0,],
-            ['name'=>'用户业绩', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'user-perf', 'routePath'=>'bonus/user-perf', 'show'=>1,],
-            ['name'=>'荣衔业绩', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'yc-perf', 'routePath'=>'bonus/yc-perf', 'show'=>1,],
-            ['name'=>'达标业绩', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'perf-standard', 'routePath'=>'bonus/perf-standard', 'show'=>1,],
-            ['name'=>'达标业绩导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'perf-standard-export', 'routePath'=>'bonus/perf-standard-export', 'show'=>0,],
-//            ['name'=>'复销奖向下追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-down-fx', 'routePath'=>'bonus/trace-down-fx', 'show'=>1,],
-//            ['name'=>'复销奖向下追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-down-fx-export', 'routePath'=>'bonus/trace-down-fx-export', 'show'=>0,],
-//            ['name'=>'复销奖向上追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-fx', 'routePath'=>'bonus/trace-up-fx', 'show'=>1,],
-//            ['name'=>'复销奖向上追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-fx-export', 'routePath'=>'bonus/trace-up-fx-export', 'show'=>0,],
-//            ['name'=>'报单中心补贴追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-bt', 'routePath'=>'bonus/trace-bt', 'show'=>1,],
-//            ['name'=>'报单中心补贴追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-bt-export', 'routePath'=>'bonus/trace-bt-export', 'show'=>0,],
-//            ['name'=>'报单中心货补追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-fl', 'routePath'=>'bonus/trace-fl', 'show'=>1,],
-//            ['name'=>'报单中心货补追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-fl-export', 'routePath'=>'bonus/trace-fl-export', 'show'=>0,],
-//            ['name'=>'区域业绩提成追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-fw', 'routePath'=>'bonus/trace-fw', 'show'=>1,],
-//            ['name'=>'区域业绩提成追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-fw-export', 'routePath'=>'bonus/trace-fw-export', 'show'=>0,],
-            ['name'=>'业绩单', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'perf-order', 'routePath'=>'bonus/perf-order', 'show'=>1,],
-            ['name'=>'业绩单导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'perf-order-export', 'routePath'=>'bonus/perf-order-export', 'show'=>0,],
-//            ['name'=>'会员实时业绩', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'real-time-perf', 'routePath'=>'bonus/real-time-perf', 'show'=>1,],
-            ['name'=>'期业绩', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'perf-period-list', 'routePath'=>'bonus/perf-period-list', 'show'=>1,],
-            ['name'=>'期业绩导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'perf-period-list-export', 'routePath'=>'bonus/perf-period-list-export', 'show'=>0,],
-            ['name'=>'月业绩', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'perf-month', 'routePath'=>'bonus/perf-month', 'show'=>1,],
-            ['name'=>'月业绩导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'perf-month-export', 'routePath'=>'bonus/perf-month-export', 'show'=>0,],
-            ['name'=>'月积分', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'score-month', 'routePath'=>'bonus/score-month', 'show'=>1,],
-            ['name'=>'月积分导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'score-month-export', 'routePath'=>'bonus/score-month-export', 'show'=>0,],
-        ]
-    ],
-    /*'report'=>[
-        'name'=>'报表管理',
-        'class' => '',
-        'icon'=>'el-icon-data-analysis',
-        'controller'=>'report',
-        'action'=>'',
-        'routePath'=>'report',
-        'show'=>1,
-        'child'=>[
-        ]
-    ],*/
-    'finance'=>[
-        'name'=>'财务管理',
-        'class' => '',
-        'icon'=>'el-icon-bank-card',
-        'controller'=>'finance',
-        'action'=>'',
-        'routePath'=>'finance',
-        'show'=>1,
-        'child'=>[
-            ['name'=>'会员余额调整列表', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'balance-audit-list', 'routePath'=>'finance/balance-audit-list', 'show'=>1,],
-            ['name'=>'会员余额调整列表导出', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'balance-audit-list-export', 'routePath'=>'finance/balance-audit-list-export', 'show'=>0,],
-            ['name'=>'修改并通过审核余额调整', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'balance-audit-pass', 'routePath'=>'finance/balance-audit-pass', 'show'=>0,],
-            ['name'=>'审核会员余额调整', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'balance-audit', 'routePath'=>'finance/balance-audit', 'show'=>0,],
-            ['name'=>'删除审核会员余额调整', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'balance-audit-delete', 'routePath'=>'finance/balance-audit-delete', 'show'=>0,],
-            ['name'=>'申请调整会员余额操作', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'change-balance-opt', 'routePath'=>'finance/change-balance-opt', 'show'=>0,],
-            ['name'=>'申请调整会员余额', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'change-balance', 'routePath'=>'finance/change-balance', 'show'=>0,],
-            ['name'=>'申请调整会员余额批量1导入', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'import-change-balance-to-excel-table', 'routePath'=>'finance/import-change-balance-to-excel-table', 'show'=>0,],
-            ['name'=>'申请调整会员余额批量2添加', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'import-change-balance', 'routePath'=>'finance/import-change-balance', 'show'=>0,],
-//            ['name'=>'会员业绩调整列表', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'perf-audit-list', 'routePath'=>'finance/perf-audit-list', 'show'=>1,],
-//            ['name'=>'会员业绩调整列表导出', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'perf-audit-list-export', 'routePath'=>'finance/perf-audit-list-export', 'show'=>0,],
-            ['name'=>'修改并通过审核业绩调整', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'perf-audit-pass', 'routePath'=>'finance/perf-audit-pass', 'show'=>0,],
-            ['name'=>'审核会员业绩调整', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'perf-audit', 'routePath'=>'finance/perf-audit', 'show'=>0,],
-            ['name'=>'删除审核调整会员业绩', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'perf-audit-delete', 'routePath'=>'finance/perf-audit-delete', 'show'=>0,],
-            ['name'=>'申请调整会员业绩', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'perf-apply', 'routePath'=>'finance/perf-apply', 'show'=>0,],
-            ['name'=>'转账记录列表', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'transfer-list', 'routePath'=>'finance/transfer-list', 'show'=>1,],
-            ['name'=>'转账记录列表导出', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'transfer-list-export', 'routePath'=>'finance/transfer-list-export', 'show'=>0,],
-            ['name'=>'提现管理', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'withdraw', 'routePath'=>'finance/withdraw', 'show'=>1,],
-//            ['name'=>'提现管理-待传发票', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'withdraw-0', 'routePath'=>'finance/withdraw-0', 'show'=>0,],
-//            ['name'=>'提现管理-提现待审核', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'withdraw-0', 'routePath'=>'finance/withdraw-0', 'show'=>0,],
-//            ['name'=>'提现管理-提现已审核', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'withdraw-2', 'routePath'=>'finance/withdraw-2', 'show'=>0,],
-//            ['name'=>'提现管理-提现待付款', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'withdraw-3', 'routePath'=>'finance/withdraw-3', 'show'=>0,],
-//            ['name'=>'提现管理-提现已付款', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'withdraw-6', 'routePath'=>'finance/withdraw-6', 'show'=>0,],
-//            ['name'=>'提现管理-付款失败', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'withdraw-4', 'routePath'=>'finance/withdraw-4', 'show'=>0,],
-//            ['name'=>'提现管理-提现退回', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'withdraw-7', 'routePath'=>'finance/withdraw-7', 'show'=>0,],
-            ['name'=>'审核提现信息', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'withdraw-status', 'routePath'=>'finance/withdraw-status', 'show'=>0,],
-            //['name'=>'发票信息添加', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'invoice-audit-add', 'routePath'=>'finance/invoice-audit-add', 'show'=>0,],
-            //['name'=>'发票信息编辑', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'invoice-audit-edit', 'routePath'=>'finance/invoice-audit-edit', 'show'=>0,],
-            //['name'=>'标记付款失败批量1导入', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'import-withdraws-to-excel-table', 'routePath'=>'finance/import-withdraws-to-excel-table', 'show'=>0,],
-            //['name'=>'标记付款失败批量2添加', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'import-withdraws-paid-false', 'routePath'=>'finance/import-withdraws-paid-false', 'show'=>0,],
-//            ['name'=>'发票管理', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'invoice-audit', 'routePath'=>'finance/invoice-audit', 'show'=>1,],
-//            ['name'=>'发票审核', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'invoice-audit-audit', 'routePath'=>'finance/invoice-audit-audit', 'show'=>0,],
-//            ['name'=>'发票删除', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'invoice-audit-delete', 'routePath'=>'finance/invoice-audit-delete', 'show'=>0,],
-            //['name'=>'填写发票', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'invoice-audit-add', 'routePath'=>'finance/invoice-audit-add', 'show'=>0,],
-            //['name'=>'发票流水', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'invoice-flow', 'routePath'=>'finance/invoice-flow', 'show'=>1,],
-            //['name'=>'发票调整管理', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'invoice-balance-audit', 'routePath'=>'finance/invoice-balance-audit', 'show'=>1,],
-            //['name'=>'发票调整添加', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'invoice-balance-audit-add', 'routePath'=>'finance/invoice-balance-audit-add', 'show'=>0,],
-            ['name'=>'提现导出', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'withdraw-export', 'routePath'=>'finance/withdraw-export', 'show'=>0,],
-            ['name'=>'交易类型管理', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'deal-type', 'routePath'=>'finance/deal-type', 'show'=>1,],
-            ['name'=>'交易类型添加', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'deal-type-add', 'routePath'=>'finance/deal-type-add', 'show'=>0,],
-            ['name'=>'交易类型修改', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'deal-type-edit', 'routePath'=>'finance/deal-type-edit', 'show'=>0,],
-            ['name'=>'历史奖金余额', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'history-bonus', 'routePath'=>'finance/history-bonus', 'show'=>1,],
-            ['name'=>'历史奖金余额导出', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'history-bonus-export', 'routePath'=>'finance/history-bonus-export', 'show'=>0,],
-            ['name'=>'充值管理', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'recharge', 'routePath'=>'finance/recharge', 'show'=>1,],
-            ['name'=>'充值导出', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'recharge-export', 'routePath'=>'finance/recharge-export', 'show'=>0,],
-            //['name'=>'充值管理-充值待审核', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'recharge-0', 'routePath'=>'finance/recharge-0', 'show'=>0,],
-            //['name'=>'充值管理-充值已审核', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'recharge-1', 'routePath'=>'finance/recharge-1', 'show'=>0,],
-            //['name'=>'充值管理-充值已驳回', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'recharge-2', 'routePath'=>'finance/recharge-2', 'show'=>0,],
-            ['name'=>'审核充值信息', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'recharge-status', 'routePath'=>'finance/recharge-status', 'show'=>0,],
-        ]
-    ],
-    'article'=>[
-        'name'=>'文章管理',
-        'class' => '',
-        'icon'=>'el-icon-collection',
-        'controller'=>'article',
-        'action'=>'',
-        'routePath'=>'article',
-        'show'=>1,
-        'child'=>[
-            ['name'=>'分类管理', 'class'=>'', 'icon'=>'', 'controller'=>'article', 'action'=>'category', 'routePath'=>'article/category', 'show'=>1,],
-            ['name'=>'添加分类', 'class'=>'', 'icon'=>'', 'controller'=>'article', 'action'=>'category-add', 'routePath'=>'article/category-add', 'show'=>0,],
-            ['name'=>'删除分类', 'class'=>'', 'icon'=>'', 'controller'=>'article', 'action'=>'category-delete', 'routePath'=>'article/category-delete', 'show'=>0,],
-            ['name'=>'分类排序', 'class'=>'', 'icon'=>'', 'controller'=>'article', 'action'=>'category-sort', 'routePath'=>'article/category-sort', 'show'=>0,],
-            ['name'=>'文章列表', 'class'=>'', 'icon'=>'', 'controller'=>'article', 'action'=>'index', 'routePath'=>'article/index', 'show'=>1,],
-            ['name'=>'添加文章', 'class'=>'', 'icon'=>'', 'controller'=>'article', 'action'=>'add', 'routePath'=>'article/add', 'show'=>0,],
-            ['name'=>'编辑文章', 'class'=>'', 'icon'=>'', 'controller'=>'article', 'action'=>'edit', 'routePath'=>'article/edit', 'show'=>0,],
-            ['name'=>'删除文章', 'class'=>'', 'icon'=>'', 'controller'=>'article', 'action'=>'article-delete', 'routePath'=>'article/article-delete', 'show'=>0,],
-
-        ]
-    ],
-//    'message'=>[
-//        'name'=>'站内信管理',
-//        'class' => '',
-//        'icon'=>'fa fa-envelope-o',
-//        'controller'=>'message',
-//        'action'=>'',
-//        'routePath'=>'message',
-//        'show'=>1,
-//        'child'=>[
-//            ['name'=>'站内信列表', 'class'=>'', 'icon'=>'', 'controller'=>'message', 'action'=>'list', 'routePath'=>'message/list', 'show'=>1,],
-//            ['name'=>'添加站内信', 'class'=>'', 'icon'=>'', 'controller'=>'message', 'action'=>'add', 'routePath'=>'message/add', 'show'=>0,],
-//            ['name'=>'删除站内信', 'class'=>'', 'icon'=>'', 'controller'=>'message', 'action'=>'delete', 'routePath'=>'message/delete', 'show'=>0,],
-//        ]
-//    ],
-    'file'=>[
-        'name'=>'文件管理',
-        'class' => '',
-        'icon'=>'el-icon-files',
-        'controller'=>'file',
-        'action'=>'',
-        'routePath'=>'file',
-        'show'=>1,
-        'child'=>[
-            ['name'=>'导出文件', 'class'=>'', 'icon'=>'', 'controller'=>'file', 'action'=>'export', 'routePath'=>'file/export', 'show'=>1,],
-            ['name'=>'删除文件', 'class'=>'', 'icon'=>'', 'controller'=>'file', 'action'=>'export-delete', 'routePath'=>'file/export-delete', 'show'=>0,],
-
-        ]
-    ],
-//    'sys' => [
-//        'name'=>'系统相关',
-//        'class' => 'list-header',
-//    ],
-    'admin'=>[
-        'name'=>'管理员管理',
-        'class' => '',
-        'icon'=>'el-icon-coordinate',
-        'controller'=>'admin',
-        'action'=>'',
-        'routePath'=>'admin',
-        'show'=>1,
-        'child'=>[
-            ['name'=>'管理员角色列表', 'class'=>'', 'icon'=>'', 'controller'=>'admin', 'action'=>'role', 'routePath'=>'admin/role', 'show'=>1,],
-            ['name'=>'添加管理员角色', 'class'=>'', 'icon'=>'', 'controller'=>'admin', 'action'=>'role-add', 'routePath'=>'admin/role-add', 'show'=>0,],
-            ['name'=>'编辑管理员角色', 'class'=>'', 'icon'=>'', 'controller'=>'admin', 'action'=>'role-edit', 'routePath'=>'admin/role-edit', 'show'=>0,],
-            ['name'=>'删除管理员角色', 'class'=>'', 'icon'=>'', 'controller'=>'admin', 'action'=>'role-delete', 'routePath'=>'admin/role-delete', 'show'=>0,],
-            ['name'=>'管理员权限', 'class'=>'', 'icon'=>'', 'controller'=>'admin', 'action'=>'role-permission', 'routePath'=>'admin/role-permission', 'show'=>0,],
-            ['name'=>'管理员列表字段权限', 'class'=>'', 'icon'=>'', 'controller'=>'admin', 'action'=>'role-column', 'routePath'=>'admin/role-column', 'show'=>0,],
-            ['name'=>'管理员列表', 'class'=>'', 'icon'=>'', 'controller'=>'admin', 'action'=>'index', 'routePath'=>'admin/index', 'show'=>1,],
-            ['name'=>'添加管理员', 'class'=>'', 'icon'=>'', 'controller'=>'admin', 'action'=>'add', 'routePath'=>'admin/add', 'show'=>0,],
-            ['name'=>'编辑管理员', 'class'=>'', 'icon'=>'', 'controller'=>'admin', 'action'=>'edit', 'routePath'=>'admin/edit', 'show'=>0,],
-            ['name'=>'删除管理员', 'class'=>'', 'icon'=>'', 'controller'=>'admin', 'action'=>'admin-delete', 'routePath'=>'admin/admin-delete', 'show'=>0,],
-            ['name'=>'重置密码', 'class'=>'', 'icon'=>'', 'controller'=>'admin', 'action'=>'change-password', 'routePath'=>'admin/change-password', 'show'=>1,],
-        ]
-    ],
-    'ad'=>[
-        'name'=>'广告管理',
-        'class' => '',
-        'icon'=>'el-icon-picture-outline',
-        'controller'=>'ad',
-        'action'=>'',
-        'routePath'=>'ad',
-        'show'=>1,
-        'child'=>[
-            ['name'=>'广告位', 'class'=>'', 'icon'=>'', 'controller'=>'ad', 'action'=>'location', 'routePath'=>'ad/location', 'show'=>1,],
-            ['name'=>'广告列表', 'class'=>'', 'icon'=>'', 'controller'=>'ad', 'action'=>'list', 'routePath'=>'ad/list', 'show'=>0,],
-            ['name'=>'添加广告', 'class'=>'', 'icon'=>'', 'controller'=>'ad', 'action'=>'add', 'routePath'=>'ad/add', 'show'=>0,],
-            ['name'=>'编辑广告', 'class'=>'', 'icon'=>'', 'controller'=>'ad', 'action'=>'edit', 'routePath'=>'ad/edit', 'show'=>0,],
-            ['name'=>'删除广告', 'class'=>'', 'icon'=>'', 'controller'=>'ad', 'action'=>'ad-delete', 'routePath'=>'ad/ad-delete', 'show'=>0,],
-        ]
-    ],
-    'log'=>[
-        'name'=>'日志管理',
-        'class' => '',
-        'icon'=>'el-icon-collection',
-        'controller'=>'log',
-        'action'=>'',
-        'routePath'=>'log',
-        'show'=>1,
-        'child'=>[
-            ['name'=>'管理员登录日志', 'class'=>'', 'icon'=>'', 'controller'=>'log', 'action'=>'admin-login', 'routePath'=>'log/admin-login', 'show'=>1,],
-            ['name'=>'会员登录日志', 'class'=>'', 'icon'=>'', 'controller'=>'log', 'action'=>'user-login', 'routePath'=>'log/user-login', 'show'=>1,],
-            ['name'=>'管理员操作日志', 'class'=>'', 'icon'=>'', 'controller'=>'log', 'action'=>'admin-handle', 'routePath'=>'log/admin-handle', 'show'=>1,],
-            ['name'=>'会员操作日志', 'class'=>'', 'icon'=>'', 'controller'=>'log', 'action'=>'user-handle', 'routePath'=>'log/user-handle', 'show'=>1,],
-            ['name'=>'系统日志', 'class'=>'', 'icon'=>'', 'controller'=>'log', 'action'=>'system', 'routePath'=>'log/system', 'show'=>1,],
-
-        ]
-    ],
-    'config' => [
-        'name'=>'设置管理',
-        'class' => '',
-        'icon'=>'el-icon-set-up',
-        'controller'=>'config',
-        'action'=>'',
-        'routePath'=>'config',
-        'show'=>1,
-        'child'=>[
-            ['name'=>'站点设置', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'base', 'routePath'=>'config/base', 'show'=>1,],
-            ['name'=>'奖金设置', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'bonus-opt', 'routePath'=>'config/bonus-opt', 'show'=>1,],
-            ['name'=>'奖金基本配置', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'bonus', 'routePath'=>'config/bonus', 'show'=>0,],
-            ['name'=>'区域/复销奖配置', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'bonus-dec-level', 'routePath'=>'config/bonus-dec-level', 'show'=>0,],
-            ['name'=>'育成/车房/养老配置', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'bonus-emp-level', 'routePath'=>'config/bonus-emp-level', 'show'=>0,],
-            ['name'=>'期数配置', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'period', 'routePath'=>'config/period', 'show'=>1,],
-//            ['name'=>'会员注册类型配置', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'reg-type', 'routePath'=>'config/reg-type', 'show'=>1,],
-//            ['name'=>'会员注册类型编辑', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'reg-type-edit', 'routePath'=>'config/reg-type-edit', 'show'=>0,],
-//            ['name'=>'维护注册协议', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'pact-edit', 'routePath'=>'config/pact-edit', 'show'=>0,],
-            ['name'=>'第三方接口', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'api-opt', 'routePath'=>'config/api-opt', 'show'=>1,],
-            ['name'=>'OCR接口编辑', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'ocr-api-edit', 'routePath'=>'config/ocr-api-edit', 'show'=>0,],
-            ['name'=>'短信接口编辑', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'ocr-api-edit', 'routePath'=>'config/ocr-api-edit', 'show'=>0,],
-            ['name'=>'短信管理', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'sms', 'routePath'=>'config/sms', 'show'=>1,],
-            ['name'=>'积分配置', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'score', 'routePath'=>'config/score', 'show'=>1,],
-            ['name'=>'转账配置', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'transfer', 'routePath'=>'config/transfer', 'show'=>1,],
-            ['name'=>'其他配置', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'other', 'routePath'=>'config/other', 'show'=>1,],
-            ['name'=>'会员级别配置', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'dec-level', 'routePath'=>'config/dec-level', 'show'=>1,],
-            ['name'=>'添加会员级别', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'dec-level-add', 'routePath'=>'config/dec-level-add', 'show'=>0,],
-            ['name'=>'编辑会员级别', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'dec-level-edit', 'routePath'=>'config/dec-level-edit', 'show'=>0,],
-            ['name'=>'会员聘级配置', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'emp-level', 'routePath'=>'config/emp-level', 'show'=>1,],
-            ['name'=>'添加会员聘级', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'emp-level-add', 'routePath'=>'config/emp-level-add', 'show'=>0,],
-            ['name'=>'编辑会员聘级', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'emp-level-edit', 'routePath'=>'config/emp-level-edit', 'show'=>0,],
-            ['name'=>'报单中心级别配置', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'dec-role', 'routePath'=>'config/dec-role', 'show'=>1,],
-            ['name'=>'编辑报单中心级别', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'dec-role-edit', 'routePath'=>'config/dec-role-edit', 'show'=>0,],
-        ],
-    ],
+<?php
+/**
+ * Created by PhpStorm.
+ * User: Leo
+ * Date: 2017/9/3
+ * Time: 下午3:23
+ */
+return [
+//    'navigation' => [
+//        'name'=>'导航',
+//        'class' => 'list-header',
+//    ],
+    'dashboard'=>[
+        'name'=>'控制台',
+        'class' => '',
+        'icon'=>'el-icon-guide',
+        'controller'=>'dashboard',
+        'action'=>'index',
+        'routePath'=>'dashboard/index',
+        'show'=>1,
+        'child'=>[
+            ['name'=>'总累计', 'class'=>'', 'icon'=>'', 'controller'=>'dashboard', 'action'=>'total-item', 'routePath'=>'dashboard/total-item', 'show'=>0,],
+            ['name'=>'会员月注册数量', 'class'=>'', 'icon'=>'', 'controller'=>'dashboard', 'action'=>'reg-num', 'routePath'=>'dashboard/reg-num', 'show'=>0,],
+            ['name'=>'月奖金量', 'class'=>'', 'icon'=>'', 'controller'=>'dashboard', 'action'=>'bonus-num', 'routePath'=>'dashboard/bonus-num', 'show'=>0,],
+            ['name'=>'月提现量', 'class'=>'', 'icon'=>'', 'controller'=>'dashboard', 'action'=>'withdraw-num', 'routePath'=>'dashboard/withdraw-num', 'show'=>0,],
+        ]
+    ],
+    'shop'=>[
+        'name'=>'商城管理',
+        'class' => '',
+        'icon'=>'el-icon-goods',
+        'controller'=>'shop',
+        'action'=>'',
+        'routePath'=>'shop',
+        'show'=>1,
+        'child'=>[
+            ['name'=>'商品列表', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'index', 'routePath'=>'shop/index', 'show'=>1,],
+            // 新添加的商品操作  --- stat
+            ['name'=>'添加商品', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'goods-add', 'routePath'=>'shop/goods-add', 'show'=>0,],
+            ['name'=>'编辑商品', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'goods-edit', 'routePath'=>'shop/goods-edit', 'show'=>0,],
+            ['name'=>'删除商品', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'goods-delete', 'routePath'=>'shop/goods-delete', 'show'=>0,],
+            // 新添加的商品操作 ---stop
+            ['name'=>'商品列表导出', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'goods-list-export', 'routePath'=>'shop/goods-list-export', 'show'=>0,],
+            ['name'=>'套餐管理', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'package', 'routePath'=>'shop/package', 'show'=>1,],
+            ['name'=>'报单列表', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'dec-order-list', 'routePath'=>'shop/dec-order-list', 'show'=>1,],
+            ['name'=>'报单列表导出', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'dec-order-list-export', 'routePath'=>'shop/dec-order-list-export', 'show'=>0,],
+            ['name'=>'订单列表', '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'=>'订单发货', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'order-delivery', 'routePath'=>'shop/order-delivery', 'show'=>0,],
+            ['name'=>'外部商城订单列表', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'order-shop-list', 'routePath'=>'shop/order-shop-list', 'show'=>1,],
+            ['name'=>'外部商城报单列表', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'order-dec-list', 'routePath'=>'shop/order-dec-list', 'show'=>1,],
+            ['name'=>'外部商城达标订单列表', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'order-standard-list', 'routePath'=>'shop/order-standard-list', 'show'=>1,],
+        ]
+    ],
+    'user'=>[
+        'name'=>'会员管理',
+        'class' => '',
+        'icon'=>'el-icon-user',
+        'controller'=>'user',
+        'action'=>'',
+        'routePath'=>'user',
+        'show'=>1,
+        'child'=>[
+            ['name'=>'会员列表', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'index', 'routePath'=>'user/index', 'show'=>1,],
+            ['name'=>'登录到前台', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'login-to-frontend', 'routePath'=>'user/login-to-frontend', 'show'=>0,],
+            ['name'=>'指定会员管理登录管理', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'batch-close-login', 'routePath'=>'user/batch-close-login', 'show'=>0,],
+            ['name'=>'按条件登录管理', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'close-login', 'routePath'=>'user/close-login', 'show'=>0,],
+            ['name'=>'会员地区登录管理', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'close-area-login', 'routePath'=>'user/close-area-login', 'show'=>0,],
+            //['name'=>'会员运作管理', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'is-operating', 'routePath'=>'user/is-operating', 'show'=>0,],
+//            ['name'=>'会员团队领导人管理', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'is-group', 'routePath'=>'user/is-group', 'show'=>0,],
+            ['name'=>'会员报单中心管理', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'is-dec', 'routePath'=>'user/is-dec', 'show'=>0,],
+            ['name'=>'会员工作室管理', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'is-studio', 'routePath'=>'user/is-studio', 'show'=>0,],
+            ['name'=>'会员转账比例修改', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'change-transfer-prop', 'routePath'=>'user/change-transfer-prop', 'show'=>0,],
+//            ['name'=>'指定会员管理报单管理', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'batch-close-dec', 'routePath'=>'user/batch-close-dec', 'show'=>0,],
+//            ['name'=>'按条件报单管理', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'close-dec', 'routePath'=>'user/close-dec', 'show'=>0,],
+//            ['name'=>'会员地区报单管理', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'close-area-dec', 'routePath'=>'user/close-area-dec', 'show'=>0,],
+            ['name'=>'会员列表导出', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'index-export', 'routePath'=>'user/index-export', 'show'=>0,],
+            ['name'=>'图谱管理', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'is-atlas', 'routePath'=>'user/is-atlas', 'show'=>0,],
+            ['name'=>'充值管理', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'is-recharge', 'routePath'=>'user/is-recharge', 'show'=>0,],
+            ['name'=>'修改密码', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'modify-password', 'routePath'=>'user/modify-password', 'show'=>0,],
+            ['name'=>'查看个人资料', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'profile-get', 'routePath'=>'user/profile-get', 'show'=>0,],
+            ['name'=>'修改个人资料', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'modify-profile', 'routePath'=>'user/modify-profile', 'show'=>0,],
+            ['name'=>'会员状态', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'modify-status', 'routePath'=>'user/modify-status', 'show'=>0,],
+            ['name'=>'密码修改状态', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'is-modify-password-status', 'routePath'=>'user/is-modify-password-status', 'show'=>0,],
+            ['name'=>'空单操作', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'user-add-opt', 'routePath'=>'user/user-add-opt', 'show'=>1,],
+            ['name'=>'空单添加', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'user-add', 'routePath'=>'user/user-add', 'show'=>0,],
+            ['name'=>'空单列表', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'empty-list', 'routePath'=>'user/empty-list', 'show'=>1,],
+//            ['name'=>'空单批量1导入', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'import-users-to-excel-table', 'routePath'=>'user/import-users-to-excel-table', 'show'=>0,],
+//            ['name'=>'空单批量2添加', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'import-users-add', 'routePath'=>'user/import-users-add', 'show'=>0,],
+//            ['name'=>'空单删除', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'user-del', 'routePath'=>'user/user-del', 'show'=>0,],
+            //['name'=>'点位绑定', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'bind', 'routePath'=>'user/bind', 'show'=>1,],
+            //['name'=>'点位绑定添加', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'bind-add', 'routePath'=>'user/bind-add', 'show'=>0,],
+            //['name'=>'点位绑定编辑', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'bind-edit', 'routePath'=>'user/bind-edit', 'show'=>0,],
+            //['name'=>'点位绑定撤销', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'bind-delete', 'routePath'=>'user/bind-delete', 'show'=>0,],
+            //['name'=>'点位绑定导出', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'bind-export', 'routePath'=>'user/bind-export', 'show'=>0,],
+            //['name'=>'点位合作', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'teamwork', 'routePath'=>'user/teamwork', 'show'=>1,],
+            //['name'=>'点位合作添加', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'teamwork-add', 'routePath'=>'user/teamwork-add', 'show'=>0,],
+            //['name'=>'点位合作编辑', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'teamwork-edit', 'routePath'=>'user/teamwork-edit', 'show'=>0,],
+            //['name'=>'点位合作导出', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'teamwork-export', 'routePath'=>'user/teamwork-export', 'show'=>0,],
+            //['name'=>'体系管理', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'system', 'routePath'=>'user/system', 'show'=>1,],
+            //['name'=>'体系添加', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'system-add', 'routePath'=>'user/system-add', 'show'=>0,],
+            //['name'=>'体系编辑', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'system-edit', 'routePath'=>'user/system-edit', 'show'=>0,],
+            //['name'=>'体系撤销', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'system-delete', 'routePath'=>'user/system-delete', 'show'=>0,],
+            //['name'=>'体系恢复', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'system-renew', 'routePath'=>'user/system-renew', 'show'=>0,],
+            //['name'=>'体系导出', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'system-export', 'routePath'=>'user/system-export', 'show'=>0,],
+            //['name'=>'团队领导人列表', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'group', 'routePath'=>'user/group', 'show'=>1,],
+            //['name'=>'团队领导人列表导出', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'group-export', 'routePath'=>'user/group-export', 'show'=>0,],
+            ['name'=>'移网管理', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'move', 'routePath'=>'user/move', 'show'=>1,],
+            ['name'=>'申请移网', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'move-add', 'routePath'=>'user/move-add', 'show'=>0,],
+            ['name'=>'移网修改并审核', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'move-pass', 'routePath'=>'user/move-pass', 'show'=>0,],
+            ['name'=>'移网审核', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'move-audit', 'routePath'=>'user/move-audit', 'show'=>0,],
+            ['name'=>'移网导出', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'move-export', 'routePath'=>'user/move-export', 'show'=>0,],
+            ['name'=>'移网审核删除', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'move-delete', 'routePath'=>'user/move-delete', 'show'=>0,],
+            //['name'=>'注册信息报表', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'reg-info', 'routePath'=>'user/reg-info', 'show'=>1,],
+            //['name'=>'修改注册信息', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'reg-info-edit', 'routePath'=>'user/reg-info-edit', 'show'=>0,],
+            //['name'=>'注册信息审核列表', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'reg-info-audit', 'routePath'=>'user/reg-info-audit', 'show'=>1,],
+            //['name'=>'注册信息添加操作', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'reg-info-audit-add-opt', 'routePath'=>'user/reg-info-audit-add-opt', 'show'=>0,],
+            //['name'=>'注册信息添加', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'reg-info-audit-add', 'routePath'=>'user/reg-info-audit-add', 'show'=>0,],
+            //['name'=>'注册信息批量1导入', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'import-reg-info-to-excel-table', 'routePath'=>'user/import-reg-info-to-excel-table', 'show'=>0,],
+            //['name'=>'注册信息批量2添加', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'import-reg-info', 'routePath'=>'user/import-reg-info', 'show'=>0,],
+            //['name'=>'审核注册信息', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'reg-info-audit-audit', 'routePath'=>'user/reg-info-audit-audit', 'show'=>0,],
+            //['name'=>'删除审核注册信息', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'reg-info-audit-delete', 'routePath'=>'user/reg-info-audit-delete', 'show'=>0,],
+            //['name'=>'会员状态管理', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'status-audit-list', 'routePath'=>'user/status-audit-list', 'show'=>1,],
+            //['name'=>'会员状态管理导出', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'user/status-audit-export', 'routePath'=>'user/user/status-audit-export', 'show'=>0,],
+            //['name'=>'申请修改会员状态', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'status-audit-add', 'routePath'=>'user/status-audit-add', 'show'=>0,],
+            //['name'=>'审核会员状态', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'status-audit', 'routePath'=>'user/status-audit', 'show'=>0,],
+            //['name'=>'删除审核会员状态', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'status-audit-delete', 'routePath'=>'user/status-audit-delete', 'show'=>0,],
+            ['name'=>'会员级别调整列表', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'change-user-dec-level', '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'=>'修改报单中心级别', '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,],
+            //['name'=>'修改会员前台显示聘级', 'class'=>'', 'icon'=>'', 'controller'=>'user', 'action'=>'change-show-emp-level', 'routePath'=>'user/change-show-emp-level', 'show'=>1,],
+        ]
+    ],
+    'atlas'=>[
+        'name'=>'网络图谱',
+        'class' => '',
+        'icon'=>'el-icon-data-line',
+        'controller'=>'atlas',
+        'action'=>'',
+        'routePath'=>'atlas',
+        'show'=>1,
+        'child'=>[
+            ['name'=>'开拓网络', 'class'=>'', 'icon'=>'', 'controller'=>'atlas', 'action'=>'relation-opt', 'routePath'=>'atlas/relation-opt', 'show'=>1,],
+            ['name'=>'开拓网络图', 'class'=>'', 'icon'=>'', 'controller'=>'atlas', 'action'=>'relation', 'routePath'=>'atlas/relation', 'show'=>0,],
+            ['name'=>'开拓网络列表', 'class'=>'', 'icon'=>'', 'controller'=>'atlas', 'action'=>'relation-list', 'routePath'=>'atlas/relation-list', 'show'=>0,],
+            ['name'=>'开拓网络列表导出', 'class'=>'', 'icon'=>'', 'controller'=>'atlas', 'action'=>'relation-list-export', 'routePath'=>'atlas/relation-list-export', 'show'=>0,],
+            ['name'=>'安置网络', 'class'=>'', 'icon'=>'', 'controller'=>'atlas', 'action'=>'network-opt', 'routePath'=>'atlas/network-opt', 'show'=>1,],
+            ['name'=>'安置网络图', 'class'=>'', 'icon'=>'', 'controller'=>'atlas', 'action'=>'network', 'routePath'=>'atlas/network', 'show'=>0,],
+            ['name'=>'安置网络列表', 'class'=>'', 'icon'=>'', 'controller'=>'atlas', 'action'=>'network-list', 'routePath'=>'atlas/network-list', 'show'=>0,],
+            ['name'=>'安置网络列表导出', 'class'=>'', 'icon'=>'', 'controller'=>'atlas', 'action'=>'network-list-export', 'routePath'=>'atlas/network-list-export', 'show'=>0,],
+        ]
+    ],
+//    'reconsume'=>[
+//        'name'=>'复销管理',
+//        'class' => '',
+//        'icon'=>'el-icon-shopping-bag-1',
+//        'controller'=>'reconsume',
+//        'action'=>'',
+//        'routePath'=>'reconsume',
+//        'show'=>1,
+//        'child'=>[
+//            ['name'=>'复销池余额列表', 'class'=>'', 'icon'=>'', 'controller'=>'reconsume', 'action'=>'pool-list', 'routePath'=>'reconsume/pool-list', 'show'=>1,],
+////            ['name'=>'手动扣除月复销', 'class'=>'', 'icon'=>'', 'controller'=>'reconsume', 'action'=>'deduct', 'routePath'=>'reconsume/deduct', 'show'=>1,],
+//            ['name'=>'复销余额调整审核', 'class'=>'', 'icon'=>'', 'controller'=>'reconsume', 'action'=>'change-audit-list', 'routePath'=>'reconsume/change-audit-list', 'show'=>1,],
+//            ['name'=>'复销余额调整审核导出', 'class'=>'', 'icon'=>'', 'controller'=>'reconsume', 'action'=>'change-audit-list-export', 'routePath'=>'reconsume/change-audit-list-export', 'show'=>0,],
+//            ['name'=>'修改并通过审核余额调整', 'class'=>'', 'icon'=>'', 'controller'=>'reconsume', 'action'=>'change-audit-pass', 'routePath'=>'reconsume/change-audit-pass', 'show'=>0,],
+//            ['name'=>'审核余额调整', 'class'=>'', 'icon'=>'', 'controller'=>'reconsume', 'action'=>'change-audit', 'routePath'=>'reconsume/change-audit', 'show'=>0,],
+//            ['name'=>'申请余额调整', 'class'=>'', 'icon'=>'', 'controller'=>'reconsume', 'action'=>'change-audit-add', 'routePath'=>'reconsume/change-audit-add', 'show'=>0,],
+//            ['name'=>'删除余额调整', 'class'=>'', 'icon'=>'', 'controller'=>'reconsume', 'action'=>'change-audit-delete', 'routePath'=>'reconsume/change-audit-delete', 'show'=>0,],
+//            //['name'=>'扣除复销审核', 'class'=>'', 'icon'=>'', 'controller'=>'reconsume', 'action'=>'deduct-audit-list', 'routePath'=>'reconsume/deduct-audit-list', 'show'=>1,],
+//            ['name'=>'手动扣除月复销', 'class'=>'', 'icon'=>'', 'controller'=>'reconsume', 'action'=>'deduct-audit-add', 'routePath'=>'reconsume/deduct-audit-add', 'show'=>0,],
+//            ['name'=>'复销流水', 'class'=>'', 'icon'=>'', 'controller'=>'reconsume', 'action'=>'flow-list', 'routePath'=>'reconsume/flow-list', 'show'=>1,],
+//        ]
+//    ],
+    'bonus'=>[
+        'name'=>'奖金管理',
+        'class' => '',
+        'icon'=>'el-icon-coin',
+        'controller'=>'bonus',
+        'action'=>'',
+        'routePath'=>'bonus',
+        'show'=>1,
+        'child'=>[
+            ['name'=>'预算月业绩', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'prepare-period', 'routePath'=>'bonus/prepare-period', 'show'=>1,],
+            ['name'=>'封期管理', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'period', 'routePath'=>'bonus/period', 'show'=>1,],
+            ['name'=>'封期操作', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'close-period', 'routePath'=>'bonus/close-period', 'show'=>0,],
+            ['name'=>'生成业绩单', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'perf-period', 'routePath'=>'bonus/perf-period', 'show'=>0,],
+            ['name'=>'结算操作', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'calc-period', 'routePath'=>'bonus/calc-period', 'show'=>0,],
+            ['name'=>'挂网操作', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'send-period', 'routePath'=>'bonus/send-period', 'show'=>0,],
+            ['name'=>'会员奖金余额', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'balance-list', 'routePath'=>'bonus/balance-list', 'show'=>1,],
+            ['name'=>'会员奖金余额导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'balance-export', 'routePath'=>'bonus/balance-export', 'show'=>0,],
+//            ['name'=>'申请发放年度奖', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'cf-lx-apply', 'routePath'=>'bonus/cf-lx-apply', 'show'=>0,],
+//            ['name'=>'年度奖金发放审核', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'cf-lx-audit-list', 'routePath'=>'bonus/cf-lx-audit-list', 'show'=>1,],
+//            ['name'=>'年度奖发放审核操作', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'cf-lx-audit', 'routePath'=>'bonus/cf-lx-audit', 'show'=>0,],
+            //['name'=>'期奖金明细', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'period-detail', 'routePath'=>'bonus/period-detail', 'show'=>0,],
+            ['name'=>'最新奖金', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'new-period-bonus', 'routePath'=>'bonus/new-period-bonus', 'show'=>1,],
+            ['name'=>'最新奖金导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'new-period-bonus-export', 'routePath'=>'bonus/new-period-bonus-export', 'show'=>0,],
+            ['name'=>'往期奖金', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'other-period-bonus', 'routePath'=>'bonus/other-period-bonus', 'show'=>1,],
+            ['name'=>'往期奖金导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'other-period-bonus-export', 'routePath'=>'bonus/other-period-bonus-export', 'show'=>0,],
+            ['name'=>'奖金流水', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-bonus', 'routePath'=>'bonus/flow-bonus', 'show'=>1,],
+            ['name'=>'奖金流水导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-bonus-export', 'routePath'=>'bonus/flow-bonus-export', 'show'=>0,],
+//            ['name'=>'车房养老奖流水', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-cf', 'routePath'=>'bonus/flow-cf', 'show'=>1,],
+//            ['name'=>'车房养老奖流水导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-cf-export', 'routePath'=>'bonus/flow-cf-export', 'show'=>0,],
+//            ['name'=>'领袖分红奖流水', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-lx', 'routePath'=>'bonus/flow-lx', 'show'=>1,],
+//            ['name'=>'领袖分红奖流水导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-lx-export', 'routePath'=>'bonus/flow-lx-export', 'show'=>0,],
+            ['name'=>'复消积分流水', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-rp', 'routePath'=>'bonus/flow-rp', 'show'=>1,],
+            ['name'=>'复消积分流水导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-rp-export', 'routePath'=>'bonus/flow-rp-export', 'show'=>0,],
+            ['name'=>'兑换点数流水', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-exchange', 'routePath'=>'bonus/flow-exchange', 'show'=>1,],
+            ['name'=>'兑换点数流水导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-exchange-export', 'routePath'=>'bonus/flow-exchange-export', 'show'=>0,],
+            ['name'=>'会员余额流水', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-balance', 'routePath'=>'bonus/flow-balance', 'show'=>1,],
+            ['name'=>'会员余额流水导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'flow-balance-export', 'routePath'=>'bonus/flow-balance-export', 'show'=>0,],
+//            ['name'=>'区域津贴核算', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'calc-qy', 'routePath'=>'bonus/calc-qy', 'show'=>1,],
+//            ['name'=>'区域津贴补发列表', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'resend-qy-list', 'routePath'=>'bonus/resend-qy-list', 'show'=>1,],
+//            ['name'=>'区域津贴补发列表导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'resend-qy-list-export', 'routePath'=>'bonus/resend-qy-list-export', 'show'=>0,],
+//            ['name'=>'申请补发区域津贴', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'resend-qy', 'routePath'=>'bonus/resend-qy', 'show'=>0,],
+//            ['name'=>'补发区域津贴审核列表', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'resend-qy-audit-list', 'routePath'=>'bonus/resend-qy-audit-list', 'show'=>1,],
+//            ['name'=>'补发区域津贴审核列表导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'resend-qy-audit-list-export', 'routePath'=>'bonus/resend-qy-audit-list-export', 'show'=>0,],
+//            ['name'=>'补发区域津贴审核操作', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'resend-qy-audit', 'routePath'=>'bonus/resend-qy-audit', 'show'=>0,],
+//            ['name'=>'补发区域津贴审核删除', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'resend-qy-audit-delete', 'routePath'=>'bonus/resend-qy-audit-delete', 'show'=>0,],
+            ['name'=>'团队奖向下追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-down-qy', 'routePath'=>'bonus/trace-down-qy', 'show'=>1,],
+            ['name'=>'团队奖下追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-down-qy-export', 'routePath'=>'bonus/trace-down-qy-export', 'show'=>0,],
+            ['name'=>'团队奖向上追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-qy', 'routePath'=>'bonus/trace-up-qy', 'show'=>1,],
+            ['name'=>'团队奖向上追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-qy-export', 'routePath'=>'bonus/trace-up-qy-export', 'show'=>0,],
+            ['name'=>'荣衔奖向下追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-down-yc', 'routePath'=>'bonus/trace-down-yc', 'show'=>1,],
+            ['name'=>'荣衔奖向下追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-down-yc-export', 'routePath'=>'bonus/trace-down-yc-export', 'show'=>0,],
+            ['name'=>'荣衔奖贴向上追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-yc', 'routePath'=>'bonus/trace-up-yc', 'show'=>1,],
+            ['name'=>'荣衔奖向上追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-yc-export', 'routePath'=>'bonus/trace-up-yc-export', 'show'=>0,],
+            ['name'=>'服务奖向下追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-down-bd', 'routePath'=>'bonus/trace-down-bd', 'show'=>1,],
+            ['name'=>'服务奖向下追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-down-bd-export', 'routePath'=>'bonus/trace-down-bd-export', 'show'=>0,],
+            ['name'=>'服务奖贴向上追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-bd', 'routePath'=>'bonus/trace-up-bd', 'show'=>1,],
+            ['name'=>'服务奖向上追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-bd-export', 'routePath'=>'bonus/trace-up-bd-export', 'show'=>0,],
+            ['name'=>'推广奖向下追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-down-tg', 'routePath'=>'bonus/trace-down-tg', 'show'=>1,],
+            ['name'=>'推广奖向下追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-down-tg-export', 'routePath'=>'bonus/trace-down-tg-export', 'show'=>0,],
+            ['name'=>'推广奖贴向上追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-tg', 'routePath'=>'bonus/trace-up-tg', 'show'=>1,],
+            ['name'=>'推广奖向上追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-tg-export', 'routePath'=>'bonus/trace-up-tg-export', 'show'=>0,],
+            ['name'=>'消费奖向下追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-down-xf', 'routePath'=>'bonus/trace-down-xf', 'show'=>1,],
+            ['name'=>'消费奖向下追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-down-xf-export', 'routePath'=>'bonus/trace-down-xf-export', 'show'=>0,],
+            ['name'=>'消费奖贴向上追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-xf', 'routePath'=>'bonus/trace-up-xf', 'show'=>1,],
+            ['name'=>'消费奖向上追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-xf-export', 'routePath'=>'bonus/trace-up-xf-export', 'show'=>0,],
+            ['name'=>'业绩奖向下追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-down-yj', 'routePath'=>'bonus/trace-down-yj', 'show'=>1,],
+            ['name'=>'业绩奖向下追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-down-yj-export', 'routePath'=>'bonus/trace-down-yj-export', 'show'=>0,],
+            ['name'=>'业绩奖贴向上追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-yj', 'routePath'=>'bonus/trace-up-yj', 'show'=>1,],
+            ['name'=>'业绩奖向上追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-yj-export', 'routePath'=>'bonus/trace-up-yj-export', 'show'=>0,],
+            ['name'=>'共享奖向下追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-down-gx', 'routePath'=>'bonus/trace-down-gx', 'show'=>1,],
+            ['name'=>'共享奖向下追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-down-gx-export', 'routePath'=>'bonus/trace-down-gx-export', 'show'=>0,],
+            ['name'=>'共享奖贴向上追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-gx', 'routePath'=>'bonus/trace-up-gx', 'show'=>1,],
+            ['name'=>'共享奖向上追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-gx-export', 'routePath'=>'bonus/trace-up-gx-export', 'show'=>0,],
+            ['name'=>'管理奖向下追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-down-gl', 'routePath'=>'bonus/trace-down-gl', 'show'=>1,],
+            ['name'=>'管理奖向下追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-down-gl-export', 'routePath'=>'bonus/trace-down-gl-export', 'show'=>0,],
+            ['name'=>'管理奖贴向上追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-gl', 'routePath'=>'bonus/trace-up-gl', 'show'=>1,],
+            ['name'=>'管理奖向上追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-gl-export', 'routePath'=>'bonus/trace-up-gl-export', 'show'=>0,],
+            ['name'=>'用户业绩', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'user-perf', 'routePath'=>'bonus/user-perf', 'show'=>1,],
+            ['name'=>'荣衔业绩', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'yc-perf', 'routePath'=>'bonus/yc-perf', 'show'=>1,],
+            ['name'=>'达标业绩', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'perf-standard', 'routePath'=>'bonus/perf-standard', 'show'=>1,],
+            ['name'=>'达标业绩导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'perf-standard-export', 'routePath'=>'bonus/perf-standard-export', 'show'=>0,],
+//            ['name'=>'复销奖向下追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-down-fx', 'routePath'=>'bonus/trace-down-fx', 'show'=>1,],
+//            ['name'=>'复销奖向下追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-down-fx-export', 'routePath'=>'bonus/trace-down-fx-export', 'show'=>0,],
+//            ['name'=>'复销奖向上追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-fx', 'routePath'=>'bonus/trace-up-fx', 'show'=>1,],
+//            ['name'=>'复销奖向上追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-up-fx-export', 'routePath'=>'bonus/trace-up-fx-export', 'show'=>0,],
+//            ['name'=>'报单中心补贴追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-bt', 'routePath'=>'bonus/trace-bt', 'show'=>1,],
+//            ['name'=>'报单中心补贴追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-bt-export', 'routePath'=>'bonus/trace-bt-export', 'show'=>0,],
+//            ['name'=>'报单中心货补追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-fl', 'routePath'=>'bonus/trace-fl', 'show'=>1,],
+//            ['name'=>'报单中心货补追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-fl-export', 'routePath'=>'bonus/trace-fl-export', 'show'=>0,],
+//            ['name'=>'区域业绩提成追溯', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-fw', 'routePath'=>'bonus/trace-fw', 'show'=>1,],
+//            ['name'=>'区域业绩提成追溯导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'trace-fw-export', 'routePath'=>'bonus/trace-fw-export', 'show'=>0,],
+            ['name'=>'业绩单', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'perf-order', 'routePath'=>'bonus/perf-order', 'show'=>1,],
+            ['name'=>'业绩单导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'perf-order-export', 'routePath'=>'bonus/perf-order-export', 'show'=>0,],
+//            ['name'=>'会员实时业绩', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'real-time-perf', 'routePath'=>'bonus/real-time-perf', 'show'=>1,],
+            ['name'=>'期业绩', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'perf-period-list', 'routePath'=>'bonus/perf-period-list', 'show'=>1,],
+            ['name'=>'期业绩导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'perf-period-list-export', 'routePath'=>'bonus/perf-period-list-export', 'show'=>0,],
+            ['name'=>'月业绩', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'perf-month', 'routePath'=>'bonus/perf-month', 'show'=>1,],
+            ['name'=>'月业绩导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'perf-month-export', 'routePath'=>'bonus/perf-month-export', 'show'=>0,],
+            ['name'=>'月积分', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'score-month', 'routePath'=>'bonus/score-month', 'show'=>1,],
+            ['name'=>'月积分导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'score-month-export', 'routePath'=>'bonus/score-month-export', 'show'=>0,],
+        ]
+    ],
+    /*'report'=>[
+        'name'=>'报表管理',
+        'class' => '',
+        'icon'=>'el-icon-data-analysis',
+        'controller'=>'report',
+        'action'=>'',
+        'routePath'=>'report',
+        'show'=>1,
+        'child'=>[
+        ]
+    ],*/
+    'finance'=>[
+        'name'=>'财务管理',
+        'class' => '',
+        'icon'=>'el-icon-bank-card',
+        'controller'=>'finance',
+        'action'=>'',
+        'routePath'=>'finance',
+        'show'=>1,
+        'child'=>[
+            ['name'=>'会员余额调整列表', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'balance-audit-list', 'routePath'=>'finance/balance-audit-list', 'show'=>1,],
+            ['name'=>'会员余额调整列表导出', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'balance-audit-list-export', 'routePath'=>'finance/balance-audit-list-export', 'show'=>0,],
+            ['name'=>'修改并通过审核余额调整', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'balance-audit-pass', 'routePath'=>'finance/balance-audit-pass', 'show'=>0,],
+            ['name'=>'审核会员余额调整', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'balance-audit', 'routePath'=>'finance/balance-audit', 'show'=>0,],
+            ['name'=>'删除审核会员余额调整', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'balance-audit-delete', 'routePath'=>'finance/balance-audit-delete', 'show'=>0,],
+            ['name'=>'申请调整会员余额操作', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'change-balance-opt', 'routePath'=>'finance/change-balance-opt', 'show'=>0,],
+            ['name'=>'申请调整会员余额', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'change-balance', 'routePath'=>'finance/change-balance', 'show'=>0,],
+            ['name'=>'申请调整会员余额批量1导入', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'import-change-balance-to-excel-table', 'routePath'=>'finance/import-change-balance-to-excel-table', 'show'=>0,],
+            ['name'=>'申请调整会员余额批量2添加', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'import-change-balance', 'routePath'=>'finance/import-change-balance', 'show'=>0,],
+//            ['name'=>'会员业绩调整列表', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'perf-audit-list', 'routePath'=>'finance/perf-audit-list', 'show'=>1,],
+//            ['name'=>'会员业绩调整列表导出', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'perf-audit-list-export', 'routePath'=>'finance/perf-audit-list-export', 'show'=>0,],
+            ['name'=>'修改并通过审核业绩调整', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'perf-audit-pass', 'routePath'=>'finance/perf-audit-pass', 'show'=>0,],
+            ['name'=>'审核会员业绩调整', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'perf-audit', 'routePath'=>'finance/perf-audit', 'show'=>0,],
+            ['name'=>'删除审核调整会员业绩', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'perf-audit-delete', 'routePath'=>'finance/perf-audit-delete', 'show'=>0,],
+            ['name'=>'申请调整会员业绩', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'perf-apply', 'routePath'=>'finance/perf-apply', 'show'=>0,],
+            ['name'=>'转账记录列表', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'transfer-list', 'routePath'=>'finance/transfer-list', 'show'=>1,],
+            ['name'=>'转账记录列表导出', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'transfer-list-export', 'routePath'=>'finance/transfer-list-export', 'show'=>0,],
+            ['name'=>'提现管理', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'withdraw', 'routePath'=>'finance/withdraw', 'show'=>1,],
+//            ['name'=>'提现管理-待传发票', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'withdraw-0', 'routePath'=>'finance/withdraw-0', 'show'=>0,],
+//            ['name'=>'提现管理-提现待审核', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'withdraw-0', 'routePath'=>'finance/withdraw-0', 'show'=>0,],
+//            ['name'=>'提现管理-提现已审核', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'withdraw-2', 'routePath'=>'finance/withdraw-2', 'show'=>0,],
+//            ['name'=>'提现管理-提现待付款', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'withdraw-3', 'routePath'=>'finance/withdraw-3', 'show'=>0,],
+//            ['name'=>'提现管理-提现已付款', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'withdraw-6', 'routePath'=>'finance/withdraw-6', 'show'=>0,],
+//            ['name'=>'提现管理-付款失败', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'withdraw-4', 'routePath'=>'finance/withdraw-4', 'show'=>0,],
+//            ['name'=>'提现管理-提现退回', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'withdraw-7', 'routePath'=>'finance/withdraw-7', 'show'=>0,],
+            ['name'=>'审核提现信息', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'withdraw-status', 'routePath'=>'finance/withdraw-status', 'show'=>0,],
+            //['name'=>'发票信息添加', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'invoice-audit-add', 'routePath'=>'finance/invoice-audit-add', 'show'=>0,],
+            //['name'=>'发票信息编辑', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'invoice-audit-edit', 'routePath'=>'finance/invoice-audit-edit', 'show'=>0,],
+            //['name'=>'标记付款失败批量1导入', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'import-withdraws-to-excel-table', 'routePath'=>'finance/import-withdraws-to-excel-table', 'show'=>0,],
+            //['name'=>'标记付款失败批量2添加', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'import-withdraws-paid-false', 'routePath'=>'finance/import-withdraws-paid-false', 'show'=>0,],
+//            ['name'=>'发票管理', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'invoice-audit', 'routePath'=>'finance/invoice-audit', 'show'=>1,],
+//            ['name'=>'发票审核', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'invoice-audit-audit', 'routePath'=>'finance/invoice-audit-audit', 'show'=>0,],
+//            ['name'=>'发票删除', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'invoice-audit-delete', 'routePath'=>'finance/invoice-audit-delete', 'show'=>0,],
+            //['name'=>'填写发票', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'invoice-audit-add', 'routePath'=>'finance/invoice-audit-add', 'show'=>0,],
+            //['name'=>'发票流水', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'invoice-flow', 'routePath'=>'finance/invoice-flow', 'show'=>1,],
+            //['name'=>'发票调整管理', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'invoice-balance-audit', 'routePath'=>'finance/invoice-balance-audit', 'show'=>1,],
+            //['name'=>'发票调整添加', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'invoice-balance-audit-add', 'routePath'=>'finance/invoice-balance-audit-add', 'show'=>0,],
+            ['name'=>'提现导出', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'withdraw-export', 'routePath'=>'finance/withdraw-export', 'show'=>0,],
+            ['name'=>'交易类型管理', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'deal-type', 'routePath'=>'finance/deal-type', 'show'=>1,],
+            ['name'=>'交易类型添加', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'deal-type-add', 'routePath'=>'finance/deal-type-add', 'show'=>0,],
+            ['name'=>'交易类型修改', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'deal-type-edit', 'routePath'=>'finance/deal-type-edit', 'show'=>0,],
+            ['name'=>'历史奖金余额', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'history-bonus', 'routePath'=>'finance/history-bonus', 'show'=>1,],
+            ['name'=>'历史奖金余额导出', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'history-bonus-export', 'routePath'=>'finance/history-bonus-export', 'show'=>0,],
+            ['name'=>'充值管理', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'recharge', 'routePath'=>'finance/recharge', 'show'=>1,],
+            ['name'=>'充值导出', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'recharge-export', 'routePath'=>'finance/recharge-export', 'show'=>0,],
+            //['name'=>'充值管理-充值待审核', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'recharge-0', 'routePath'=>'finance/recharge-0', 'show'=>0,],
+            //['name'=>'充值管理-充值已审核', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'recharge-1', 'routePath'=>'finance/recharge-1', 'show'=>0,],
+            //['name'=>'充值管理-充值已驳回', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'recharge-2', 'routePath'=>'finance/recharge-2', 'show'=>0,],
+            ['name'=>'审核充值信息', 'class'=>'', 'icon'=>'', 'controller'=>'finance', 'action'=>'recharge-status', 'routePath'=>'finance/recharge-status', 'show'=>0,],
+        ]
+    ],
+    'article'=>[
+        'name'=>'文章管理',
+        'class' => '',
+        'icon'=>'el-icon-collection',
+        'controller'=>'article',
+        'action'=>'',
+        'routePath'=>'article',
+        'show'=>1,
+        'child'=>[
+            ['name'=>'分类管理', 'class'=>'', 'icon'=>'', 'controller'=>'article', 'action'=>'category', 'routePath'=>'article/category', 'show'=>1,],
+            ['name'=>'添加分类', 'class'=>'', 'icon'=>'', 'controller'=>'article', 'action'=>'category-add', 'routePath'=>'article/category-add', 'show'=>0,],
+            ['name'=>'删除分类', 'class'=>'', 'icon'=>'', 'controller'=>'article', 'action'=>'category-delete', 'routePath'=>'article/category-delete', 'show'=>0,],
+            ['name'=>'分类排序', 'class'=>'', 'icon'=>'', 'controller'=>'article', 'action'=>'category-sort', 'routePath'=>'article/category-sort', 'show'=>0,],
+            ['name'=>'文章列表', 'class'=>'', 'icon'=>'', 'controller'=>'article', 'action'=>'index', 'routePath'=>'article/index', 'show'=>1,],
+            ['name'=>'添加文章', 'class'=>'', 'icon'=>'', 'controller'=>'article', 'action'=>'add', 'routePath'=>'article/add', 'show'=>0,],
+            ['name'=>'编辑文章', 'class'=>'', 'icon'=>'', 'controller'=>'article', 'action'=>'edit', 'routePath'=>'article/edit', 'show'=>0,],
+            ['name'=>'删除文章', 'class'=>'', 'icon'=>'', 'controller'=>'article', 'action'=>'article-delete', 'routePath'=>'article/article-delete', 'show'=>0,],
+
+        ]
+    ],
+//    'message'=>[
+//        'name'=>'站内信管理',
+//        'class' => '',
+//        'icon'=>'fa fa-envelope-o',
+//        'controller'=>'message',
+//        'action'=>'',
+//        'routePath'=>'message',
+//        'show'=>1,
+//        'child'=>[
+//            ['name'=>'站内信列表', 'class'=>'', 'icon'=>'', 'controller'=>'message', 'action'=>'list', 'routePath'=>'message/list', 'show'=>1,],
+//            ['name'=>'添加站内信', 'class'=>'', 'icon'=>'', 'controller'=>'message', 'action'=>'add', 'routePath'=>'message/add', 'show'=>0,],
+//            ['name'=>'删除站内信', 'class'=>'', 'icon'=>'', 'controller'=>'message', 'action'=>'delete', 'routePath'=>'message/delete', 'show'=>0,],
+//        ]
+//    ],
+    'file'=>[
+        'name'=>'文件管理',
+        'class' => '',
+        'icon'=>'el-icon-files',
+        'controller'=>'file',
+        'action'=>'',
+        'routePath'=>'file',
+        'show'=>1,
+        'child'=>[
+            ['name'=>'导出文件', 'class'=>'', 'icon'=>'', 'controller'=>'file', 'action'=>'export', 'routePath'=>'file/export', 'show'=>1,],
+            ['name'=>'删除文件', 'class'=>'', 'icon'=>'', 'controller'=>'file', 'action'=>'export-delete', 'routePath'=>'file/export-delete', 'show'=>0,],
+
+        ]
+    ],
+//    'sys' => [
+//        'name'=>'系统相关',
+//        'class' => 'list-header',
+//    ],
+    'admin'=>[
+        'name'=>'管理员管理',
+        'class' => '',
+        'icon'=>'el-icon-coordinate',
+        'controller'=>'admin',
+        'action'=>'',
+        'routePath'=>'admin',
+        'show'=>1,
+        'child'=>[
+            ['name'=>'管理员角色列表', 'class'=>'', 'icon'=>'', 'controller'=>'admin', 'action'=>'role', 'routePath'=>'admin/role', 'show'=>1,],
+            ['name'=>'添加管理员角色', 'class'=>'', 'icon'=>'', 'controller'=>'admin', 'action'=>'role-add', 'routePath'=>'admin/role-add', 'show'=>0,],
+            ['name'=>'编辑管理员角色', 'class'=>'', 'icon'=>'', 'controller'=>'admin', 'action'=>'role-edit', 'routePath'=>'admin/role-edit', 'show'=>0,],
+            ['name'=>'删除管理员角色', 'class'=>'', 'icon'=>'', 'controller'=>'admin', 'action'=>'role-delete', 'routePath'=>'admin/role-delete', 'show'=>0,],
+            ['name'=>'管理员权限', 'class'=>'', 'icon'=>'', 'controller'=>'admin', 'action'=>'role-permission', 'routePath'=>'admin/role-permission', 'show'=>0,],
+            ['name'=>'管理员列表字段权限', 'class'=>'', 'icon'=>'', 'controller'=>'admin', 'action'=>'role-column', 'routePath'=>'admin/role-column', 'show'=>0,],
+            ['name'=>'管理员列表', 'class'=>'', 'icon'=>'', 'controller'=>'admin', 'action'=>'index', 'routePath'=>'admin/index', 'show'=>1,],
+            ['name'=>'添加管理员', 'class'=>'', 'icon'=>'', 'controller'=>'admin', 'action'=>'add', 'routePath'=>'admin/add', 'show'=>0,],
+            ['name'=>'编辑管理员', 'class'=>'', 'icon'=>'', 'controller'=>'admin', 'action'=>'edit', 'routePath'=>'admin/edit', 'show'=>0,],
+            ['name'=>'删除管理员', 'class'=>'', 'icon'=>'', 'controller'=>'admin', 'action'=>'admin-delete', 'routePath'=>'admin/admin-delete', 'show'=>0,],
+            ['name'=>'重置密码', 'class'=>'', 'icon'=>'', 'controller'=>'admin', 'action'=>'change-password', 'routePath'=>'admin/change-password', 'show'=>1,],
+        ]
+    ],
+    'ad'=>[
+        'name'=>'广告管理',
+        'class' => '',
+        'icon'=>'el-icon-picture-outline',
+        'controller'=>'ad',
+        'action'=>'',
+        'routePath'=>'ad',
+        'show'=>1,
+        'child'=>[
+            ['name'=>'广告位', 'class'=>'', 'icon'=>'', 'controller'=>'ad', 'action'=>'location', 'routePath'=>'ad/location', 'show'=>1,],
+            ['name'=>'广告列表', 'class'=>'', 'icon'=>'', 'controller'=>'ad', 'action'=>'list', 'routePath'=>'ad/list', 'show'=>0,],
+            ['name'=>'添加广告', 'class'=>'', 'icon'=>'', 'controller'=>'ad', 'action'=>'add', 'routePath'=>'ad/add', 'show'=>0,],
+            ['name'=>'编辑广告', 'class'=>'', 'icon'=>'', 'controller'=>'ad', 'action'=>'edit', 'routePath'=>'ad/edit', 'show'=>0,],
+            ['name'=>'删除广告', 'class'=>'', 'icon'=>'', 'controller'=>'ad', 'action'=>'ad-delete', 'routePath'=>'ad/ad-delete', 'show'=>0,],
+        ]
+    ],
+    'log'=>[
+        'name'=>'日志管理',
+        'class' => '',
+        'icon'=>'el-icon-collection',
+        'controller'=>'log',
+        'action'=>'',
+        'routePath'=>'log',
+        'show'=>1,
+        'child'=>[
+            ['name'=>'管理员登录日志', 'class'=>'', 'icon'=>'', 'controller'=>'log', 'action'=>'admin-login', 'routePath'=>'log/admin-login', 'show'=>1,],
+            ['name'=>'会员登录日志', 'class'=>'', 'icon'=>'', 'controller'=>'log', 'action'=>'user-login', 'routePath'=>'log/user-login', 'show'=>1,],
+            ['name'=>'管理员操作日志', 'class'=>'', 'icon'=>'', 'controller'=>'log', 'action'=>'admin-handle', 'routePath'=>'log/admin-handle', 'show'=>1,],
+            ['name'=>'会员操作日志', 'class'=>'', 'icon'=>'', 'controller'=>'log', 'action'=>'user-handle', 'routePath'=>'log/user-handle', 'show'=>1,],
+            ['name'=>'系统日志', 'class'=>'', 'icon'=>'', 'controller'=>'log', 'action'=>'system', 'routePath'=>'log/system', 'show'=>1,],
+
+        ]
+    ],
+    'config' => [
+        'name'=>'设置管理',
+        'class' => '',
+        'icon'=>'el-icon-set-up',
+        'controller'=>'config',
+        'action'=>'',
+        'routePath'=>'config',
+        'show'=>1,
+        'child'=>[
+            ['name'=>'站点设置', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'base', 'routePath'=>'config/base', 'show'=>1,],
+            ['name'=>'奖金设置', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'bonus-opt', 'routePath'=>'config/bonus-opt', 'show'=>1,],
+            ['name'=>'奖金基本配置', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'bonus', 'routePath'=>'config/bonus', 'show'=>0,],
+            ['name'=>'区域/复销奖配置', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'bonus-dec-level', 'routePath'=>'config/bonus-dec-level', 'show'=>0,],
+            ['name'=>'育成/车房/养老配置', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'bonus-emp-level', 'routePath'=>'config/bonus-emp-level', 'show'=>0,],
+            ['name'=>'期数配置', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'period', 'routePath'=>'config/period', 'show'=>1,],
+//            ['name'=>'会员注册类型配置', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'reg-type', 'routePath'=>'config/reg-type', 'show'=>1,],
+//            ['name'=>'会员注册类型编辑', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'reg-type-edit', 'routePath'=>'config/reg-type-edit', 'show'=>0,],
+//            ['name'=>'维护注册协议', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'pact-edit', 'routePath'=>'config/pact-edit', 'show'=>0,],
+            ['name'=>'第三方接口', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'api-opt', 'routePath'=>'config/api-opt', 'show'=>1,],
+            ['name'=>'OCR接口编辑', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'ocr-api-edit', 'routePath'=>'config/ocr-api-edit', 'show'=>0,],
+            ['name'=>'短信接口编辑', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'ocr-api-edit', 'routePath'=>'config/ocr-api-edit', 'show'=>0,],
+            ['name'=>'短信管理', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'sms', 'routePath'=>'config/sms', 'show'=>1,],
+            ['name'=>'积分配置', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'score', 'routePath'=>'config/score', 'show'=>1,],
+            ['name'=>'转账配置', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'transfer', 'routePath'=>'config/transfer', 'show'=>1,],
+            ['name'=>'其他配置', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'other', 'routePath'=>'config/other', 'show'=>1,],
+            ['name'=>'会员级别配置', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'dec-level', 'routePath'=>'config/dec-level', 'show'=>1,],
+            ['name'=>'添加会员级别', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'dec-level-add', 'routePath'=>'config/dec-level-add', 'show'=>0,],
+            ['name'=>'编辑会员级别', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'dec-level-edit', 'routePath'=>'config/dec-level-edit', 'show'=>0,],
+            ['name'=>'会员聘级配置', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'emp-level', 'routePath'=>'config/emp-level', 'show'=>1,],
+            ['name'=>'添加会员聘级', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'emp-level-add', 'routePath'=>'config/emp-level-add', 'show'=>0,],
+            ['name'=>'编辑会员聘级', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'emp-level-edit', 'routePath'=>'config/emp-level-edit', 'show'=>0,],
+            ['name'=>'报单中心级别配置', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'dec-role', 'routePath'=>'config/dec-role', 'show'=>1,],
+            ['name'=>'编辑报单中心级别', 'class'=>'', 'icon'=>'', 'controller'=>'config', 'action'=>'dec-role-edit', 'routePath'=>'config/dec-role-edit', 'show'=>0,],
+        ],
+    ],
 ];

+ 2 - 0
backendApi/config/urlManagerRules.php

@@ -298,8 +298,10 @@ return [
         'controller' => 'v1/bonus',
         'extraPatterns' => [
             'GET period' => 'period',
+            'GET prepare-period' => 'prepare-period',
             'GET close-period/<periodNum>' => 'close-period',
             'GET perf-period/<periodNum>' => 'perf-period',
+            'GET prepare-perf-period/<periodNum>' => 'prepare-perf-period',
             'GET calc-period/<periodNum>' => 'calc-period',
             'GET send-period/<periodNum>' => 'send-period',
             'GET perf' => 'perf',

+ 2826 - 2764
backendApi/modules/v1/controllers/BonusController.php

@@ -1,2765 +1,2827 @@
-<?php
-/**
- * Created by PhpStorm.
- * User: leo
- * Date: 2018/2/24
- * Time: 下午12:48
- */
-
-namespace backendApi\modules\v1\controllers;
-
-use backendApi\modules\v1\models\Admin;
-use backendApi\modules\v1\models\exportForms\BonusExportForm;
-use backendApi\modules\v1\models\lists\bonus\BalanceList;
-use backendApi\modules\v1\models\lists\bonus\FlowBalanceList;
-use backendApi\modules\v1\models\lists\bonus\FlowBonusList;
-use backendApi\modules\v1\models\lists\bonus\FlowExchangePointsList;
-use backendApi\modules\v1\models\lists\bonus\FlowReconsumePointsList;
-use backendApi\modules\v1\models\lists\bonus\FlowWalletList;
-use backendApi\modules\v1\models\lists\bonus\PerfMonthList;
-use backendApi\modules\v1\models\lists\bonus\PerfOrderList;
-use backendApi\modules\v1\models\lists\bonus\PerfPeriodList;
-use backendApi\modules\v1\models\lists\bonus\PerfStandardList;
-use backendApi\modules\v1\models\lists\bonus\PeriodBonusList;
-use backendApi\modules\v1\models\lists\bonus\ScoreMonthList;
-use backendApi\modules\v1\models\lists\bonus\TraceDownBdList;
-use backendApi\modules\v1\models\lists\bonus\TraceDownGlList;
-use backendApi\modules\v1\models\lists\bonus\TraceDownGxList;
-use backendApi\modules\v1\models\lists\bonus\TraceDownQyList;
-use backendApi\modules\v1\models\lists\bonus\TraceDownTgList;
-use backendApi\modules\v1\models\lists\bonus\TraceDownXfList;
-use backendApi\modules\v1\models\lists\bonus\TraceDownYcList;
-use backendApi\modules\v1\models\lists\bonus\TraceDownYjList;
-use backendApi\modules\v1\models\lists\bonus\TraceUpBdList;
-use backendApi\modules\v1\models\lists\bonus\TraceUpGlList;
-use backendApi\modules\v1\models\lists\bonus\TraceUpGxList;
-use backendApi\modules\v1\models\lists\bonus\TraceUpQyList;
-use backendApi\modules\v1\models\lists\bonus\TraceUpTgList;
-use backendApi\modules\v1\models\lists\bonus\TraceUpXfList;
-use backendApi\modules\v1\models\lists\bonus\TraceUpYcList;
-use backendApi\modules\v1\models\lists\bonus\TraceUpYjList;
-use backendApi\modules\v1\models\lists\bonus\UserPerfList;
-use common\helpers\Cache;
-use common\helpers\Date;
-use common\helpers\Tool;
-use common\helpers\user\Info;
-use common\helpers\user\Perf;
-use common\models\CalcBonus;
-use common\models\CFLXAudit;
-use common\models\forms\ResendQYForm;
-use common\models\forms\SendCFAndLXForm;
-use common\models\PerfMonth;
-use common\models\PerfOrder;
-use common\models\PerfPeriod;
-use common\models\ResendQYAudit;
-use common\models\User;
-use common\models\UserInfo;
-use common\models\UserNetwork;
-use Yii;
-use common\helpers\Form;
-use common\models\Config;
-use common\models\FlowBonus;
-use common\models\FlowExchangePoints;
-use common\models\forms\PeriodForm;
-use common\models\Period;
-use Exception;
-
-class BonusController extends BaseController {
-    public $modelClass = FlowBonus::class;
-
-    public function behaviors() {
-        $behaviors = parent::behaviors();
-        //$behaviors['contentNegotiator']['formats']['text/html'] = Response::FORMAT_JSON;
-        return $behaviors;
-    }
-
-    /**
-     * 期数列表
-     * @return mixed
-     * @throws \yii\base\InvalidConfigException
-     * @throws \yii\httpclient\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionPeriod() {
-        $filter = $this->filterCondition([
-            'periodNum' => 'PERIOD_NUM',
-            'year' => 'CALC_YEAR',
-            'month' => 'CALC_MONTH',
-            'startTime' => 'START_TIME',
-            'endTime' => 'END_TIME',
-            'closedAt' => 'CLOSED_AT',
-            'perfStartedAt' => 'PERF_STARTED_AT',
-            'perfedAt' => 'PERFED_AT',
-            'calStartedAt' => 'CALCULATE_STARTED_AT',
-            'calculatedAt' => 'CALCULATED_AT',
-            'sendStartedAt' => 'SEND_STARTED_AT',
-            'sentAt' => 'SENT_AT',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-        $periodObj = Period::instance();
-        $nowPeriodNum = $periodObj->getNowPeriodNum();
-        $condition .= ' AND PERIOD_NUM<=:PERIOD_NUM';
-        $params[':PERIOD_NUM'] = $nowPeriodNum;
-        $data = Period::lists($condition, $params, ['orderBy' => 'PERIOD_NUM DESC']);
-        foreach ($data['list'] as $key => $value) {
-            // 是否可封期
-            $data['list'][$key]['IS_CAN_CLOSE'] = $periodObj->isCanClose($value['PERIOD_NUM']);
-            // 是否可生成业绩单
-            $data['list'][$key]['IS_CAN_PERF'] = $periodObj->isCanPerf($value['PERIOD_NUM']);
-            // 是否可结算
-            $data['list'][$key]['IS_CAN_CALC'] = $periodObj->isCanCalc($value['PERIOD_NUM']);
-            // 是否可挂网
-            $data['list'][$key]['IS_CAN_SENT'] = $periodObj->isCanSend($value['PERIOD_NUM']);
-            // 操作数据按钮是否可用
-            $data['list'][$key]['BUTTON_IS_CAN'] = $periodObj->isCanClose($value['PERIOD_NUM']) || $periodObj->isCanPerf($value['PERIOD_NUM']) || $periodObj->isCanCalc($value['PERIOD_NUM']) || $periodObj->isCanSend($value['PERIOD_NUM']);
-        }
-        return static::notice($data);
-    }
-
-    /**
-     * 封期
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionClosePeriod() {
-        $periodNum = \Yii::$app->request->get('periodNum');
-        if (!$periodNum) {
-            return static::notice('期数不存在', 400);
-        }
-        $formModel = new PeriodForm();
-        if ($formModel->load(Yii::$app->request->get(), '') && $formModel->closePeriod()) {
-            // Log::adminHandle('第' . $periodNum . '期封期成功');
-            return static::notice('封期成功');
-        } else {
-            return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
-        }
-    }
-
-    /**
-     * 计算业绩并生成业绩单
-     * @return mixed
-     * @throws \yii\web\HttpException
-     */
-    public function actionPerfPeriod() {
-        $periodNum = \Yii::$app->request->get('periodNum');
-        if (!$periodNum) {
-            return static::notice('期数不存在', 400);
-        }
-        $formModel = new PeriodForm();
-        $formModel->scenario = 'perf';
-        if ($formModel->load(Yii::$app->request->get(), '') && $formModel->perfWebToAsync()) {
-            // Log::adminHandle('第' . $periodNum . '期封生成业绩单');
-            return static::notice('生成业绩单已开始处理,请等待');
-        } else {
-            return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
-        }
-    }
-
-    /**
-     * 结算封期
-     * @return mixed
-     * @throws \yii\web\HttpException
-     */
-    public function actionCalcPeriod() {
-        $periodNum = \Yii::$app->request->get('periodNum');
-        if (!$periodNum) {
-            return static::notice('期数不存在', 400);
-        }
-        $formModel = new PeriodForm();
-        $formModel->scenario = 'calc';
-        if ($formModel->load(Yii::$app->request->get(), '') && $formModel->calcWebToAsync()) {
-            // Log::adminHandle('第' . $periodNum . '期结算');
-            return static::notice('结算已开始处理,请等待');
-        } else {
-            return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
-        }
-    }
-
-    /**
-     * 挂网
-     * @return mixed
-     * @throws \yii\web\HttpException
-     */
-    public function actionSendPeriod() {
-        $periodNum = \Yii::$app->request->get('periodNum');
-        if (!$periodNum) {
-            return static::notice('期数不存在', 400);
-        }
-        $formModel = new PeriodForm();
-        $formModel->scenario = 'send';
-        if ($formModel->load(Yii::$app->request->get(), '') && $formModel->sendWebToAsync()) {
-            // Log::adminHandle('第' . $periodNum . '期挂网');
-            return static::notice('挂网已开始处理,请等待');
-        } else {
-            return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
-        }
-    }
-
-    /**
-     * 查看业绩
-     * @return mixed
-     * @throws \yii\web\HttpException
-     */
-    public function actionPerf() {
-        // 获取当前年月
-        $period = Period::instance();
-        $yearMonth = $period->getNowYearMonth();
-        $yearMonth = Yii::$app->request->get('yearMonth', $yearMonth);
-        //$filter = $this->filterCondition(Perf::tableName(), ['periodNum'=>'P.PERIOD_NUM', 'userName'=>'UI.USER_NAME']);
-        $condition = '';
-        $params = [];
-        $data = PerfPeriod::lists($condition, $params, [
-            'select' => 'P.*, UI.USER_NAME',
-            'yearMonth' => $yearMonth,
-            'from' => PerfPeriod::tableName() . ' AS P',
-            'join' => [
-                ['LEFT JOIN', UserInfo::tableName() . ' AS UI', 'P.USER_ID=UI.USER_ID']
-            ],
-            'orderBy' => 'P.PERIOD_NUM DESC',
-        ]);
-        $data['request'] = [];
-        $data['request']['yearMonth'] = $yearMonth;
-        return static::notice($data);
-    }
-
-    /**
-     * 奖金流水
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionFlowBonus() {
-        $filter = $this->filterCondition([
-            'USER_NAME' => 'U.USER_NAME',
-            'REAL_NAME' => 'U.REAL_NAME',
-            'IS_DEC' => 'U.IS_DEC',
-            'userIds' => 'USER_ID',
-            'CREATED_AT' => 'FB.CREATED_AT',
-            'PERIOD_NUM' => 'PERIOD_NUM',
-            'CALC_MONTH' => 'CALC_MONTH',
-            'DEAL_TYPE_NAME' => 'DEAL_TYPE_ID',
-            'LAST_DEC_LV_NAME' => 'LAST_DEC_LV',
-            'LAST_EMP_LV_NAME' => 'LAST_EMP_LV',
-//            'LAST_STATUS_NAME' => 'LAST_STATUS',
-            'AMOUNT' => 'AMOUNT',
-            'TOTAL' => 'TOTAL',
-            'ADMIN_NAME' => 'ADMIN_NAME',
-            'REMARK' => 'REMARK',
-            'TRANSFER_SN' => 'TRANSFER_SN',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-        $listObj = new FlowBonusList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
-        return static::notice($data);
-    }
-
-    /**
-     * 奖金流水
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionFlowBonusExport() {
-        $filter = $this->filterCondition([
-            'USER_NAME' => 'U.USER_NAME',
-            'REAL_NAME' => 'U.REAL_NAME',
-            'IS_DEC' => 'U.IS_DEC',
-            'userIds' => 'USER_ID',
-            'CREATED_AT' => 'FB.CREATED_AT',
-            'PERIOD_NUM' => 'PERIOD_NUM',
-            'CALC_MONTH' => 'CALC_MONTH',
-            'DEAL_TYPE_NAME' => 'DEAL_TYPE_ID',
-            'LAST_DEC_LV_NAME' => 'LAST_DEC_LV',
-            'LAST_EMP_LV_NAME' => 'LAST_EMP_LV',
-            'LAST_STATUS_NAME' => 'LAST_STATUS',
-            'AMOUNT' => 'AMOUNT',
-            'TOTAL' => 'TOTAL',
-            'ADMIN_NAME' => 'ADMIN_NAME',
-            'REMARK' => 'REMARK',
-            'TRANSFER_SN' => 'TRANSFER_SN',
-        ]);
-        $form = new BonusExportForm();
-        $result = $form->run($filter, '奖金流水');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-    /**
-     * 复消积分流水
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionFlowRp() {
-        $filter = $this->filterCondition([
-            'userIds' => 'USER_ID',
-            'CREATED_AT' => 'CREATED_AT',
-            'PERIOD_NUM' => 'PERIOD_NUM',
-            'CALC_MONTH' => 'CALC_MONTH',
-            'DEAL_TYPE_NAME' => 'DEAL_TYPE_ID',
-            'LAST_DEC_LV_NAME' => 'LAST_DEC_LV',
-            'LAST_EMP_LV_NAME' => 'LAST_EMP_LV',
-            'AMOUNT' => 'AMOUNT',
-            'TOTAL' => 'TOTAL',
-            'ADMIN_NAME' => 'ADMIN_NAME',
-            'REMARK' => 'REMARK',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-        $listObj = new FlowReconsumePointsList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
-        return static::notice($data);
-    }
-
-    /**
-     * 复消积分流水导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionFlowRpExport() {
-        $filter = $this->filterCondition([
-            'userIds' => 'USER_ID',
-            'CREATED_AT' => 'CREATED_AT',
-            'PERIOD_NUM' => 'PERIOD_NUM',
-            'CALC_MONTH' => 'CALC_MONTH',
-            'DEAL_TYPE_NAME' => 'DEAL_TYPE_ID',
-            'LAST_DEC_LV_NAME' => 'LAST_DEC_LV',
-            'LAST_EMP_LV_NAME' => 'LAST_EMP_LV',
-            'AMOUNT' => 'AMOUNT',
-            'TOTAL' => 'TOTAL',
-            'ADMIN_NAME' => 'ADMIN_NAME',
-            'REMARK' => 'REMARK',
-        ]);
-        $form = new BonusExportForm();
-        $result = $form->run($filter, '复消积分流水');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-
-    /**
-     * 会员余额流水 
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionFlowBalance() {
-        $filter = $this->filterCondition([
-            'USER_NAME' => 'USER_NAME',
-            'REAL_NAME' => 'REAL_NAME',
-            'CALC_MONTH' => 'CALC_MONTH',
-            'PERIOD_NUM' => 'PERIOD_NUM',
-            'TRANSFER_SN' => 'TRANSFER_SN',
-            'CREATED_AT' => 'FW.CREATED_AT',
-            'AMOUNT' => 'AMOUNT',
-            'TOTAL' => 'TOTAL',
-            'REMARK' => 'REMARK',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-        $listObj = new FlowBalanceList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
-        return static::notice($data);
-    }
-
-    /**
-     * 会员余额流水导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionFlowBalanceExport() {
-        $filter = $this->filterCondition([
-            'USER_NAME' => 'USER_NAME',
-            'REAL_NAME' => 'REAL_NAME',
-            'CALC_MONTH' => 'CALC_MONTH',
-            'PERIOD_NUM' => 'PERIOD_NUM',
-            'TRANSFER_SN' => 'TRANSFER_SN',
-            'CREATED_AT' => 'FW.CREATED_AT',
-            'AMOUNT' => 'AMOUNT',
-            'TOTAL' => 'TOTAL',
-            'REMARK' => 'REMARK',
-        ]);
-        $form = new BonusExportForm();
-        $result = $form->run($filter, '会员余额流水');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-
-    /**
-     * 兑换点数流水
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionFlowExchange() {
-        $filter = $this->filterCondition([
-            'userIds' => 'USER_ID',
-            'CREATED_AT' => 'CREATED_AT',
-            'PERIOD_NUM' => 'PERIOD_NUM',
-            'CALC_MONTH' => 'CALC_MONTH',
-            'DEAL_TYPE_NAME' => 'DEAL_TYPE_ID',
-            'LAST_DEC_LV_NAME' => 'LAST_DEC_LV',
-            'LAST_EMP_LV_NAME' => 'LAST_EMP_LV',
-            'AMOUNT' => 'AMOUNT',
-            'TOTAL' => 'TOTAL',
-            'ADMIN_NAME' => 'ADMIN_NAME',
-            'REMARK' => 'REMARK',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-        $listObj = new FlowExchangePointsList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
-        return static::notice($data);
-    }
-
-    /**
-     * 兑换点数流水导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionFlowExchangeExport() {
-        $filter = $this->filterCondition([
-            'userIds' => 'USER_ID',
-            'CREATED_AT' => 'CREATED_AT',
-            'PERIOD_NUM' => 'PERIOD_NUM',
-            'CALC_MONTH' => 'CALC_MONTH',
-            'DEAL_TYPE_NAME' => 'DEAL_TYPE_ID',
-            'LAST_DEC_LV_NAME' => 'LAST_DEC_LV',
-            'LAST_EMP_LV_NAME' => 'LAST_EMP_LV',
-            'AMOUNT' => 'AMOUNT',
-            'TOTAL' => 'TOTAL',
-            'ADMIN_NAME' => 'ADMIN_NAME',
-            'REMARK' => 'REMARK',
-        ]);
-        $form = new BonusExportForm();
-        $result = $form->run($filter, '兑换点数流水');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-    /**
-     * 现金钱包流水
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionFlowWallet() {
-        $filter = $this->filterCondition([
-            'USER_NAME' => 'U.USER_NAME',
-            'REAL_NAME' => 'U.REAL_NAME',
-            'IS_DEC' => 'U.IS_DEC',
-            'userIds' => 'USER_ID',
-            'CREATED_AT' => 'CREATED_AT',
-            'PERIOD_NUM' => 'PERIOD_NUM',
-            'CALC_MONTH' => 'CALC_MONTH',
-            'AMOUNT' => 'AMOUNT',
-            'TOTAL' => 'TOTAL',
-            'ADMIN_NAME' => 'ADMIN_NAME',
-            'REMARK' => 'REMARK',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-        $listObj = new FlowWalletList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
-        return static::notice($data);
-    }
-
-    /**
-     * 现金钱包流水导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionFlowWalletExport() {
-        $filter = $this->filterCondition([
-            'USER_NAME' => 'U.USER_NAME',
-            'REAL_NAME' => 'U.REAL_NAME',
-            'IS_DEC' => 'U.IS_DEC',
-            'userIds' => 'USER_ID',
-            'CREATED_AT' => 'CREATED_AT',
-            'PERIOD_NUM' => 'PERIOD_NUM',
-            'CALC_MONTH' => 'CALC_MONTH',
-            'AMOUNT' => 'AMOUNT',
-            'TOTAL' => 'TOTAL',
-            'ADMIN_NAME' => 'ADMIN_NAME',
-            'REMARK' => 'REMARK',
-        ]);
-        $form = new BonusExportForm();
-        $result = $form->run($filter, '现金钱包流水');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-    /**
-     * 车房流水
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionFlowCf() {
-        $filter = $this->filterCondition([
-            'userIds' => 'USER_ID',
-            'CREATED_AT' => 'CREATED_AT',
-            'PERIOD_NUM' => 'PERIOD_NUM',
-            'CALC_MONTH' => 'CALC_MONTH',
-            'DEAL_TYPE_NAME' => 'DEAL_TYPE_ID',
-            'LAST_DEC_LV_NAME' => 'LAST_DEC_LV',
-            'LAST_EMP_LV_NAME' => 'LAST_EMP_LV',
-            'LAST_STATUS_NAME' => 'LAST_STATUS',
-            'AMOUNT' => 'AMOUNT',
-            'TOTAL' => 'TOTAL',
-            'ADMIN_NAME' => 'ADMIN_NAME',
-            'REMARK' => 'REMARK',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-        $listObj = new FlowCfList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
-        return static::notice($data);
-    }
-
-    /**
-     * 车房养老奖流水导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionFlowCfExport() {
-        $filter = $this->filterCondition([
-            'userIds' => 'USER_ID',
-            'CREATED_AT' => 'CREATED_AT',
-            'PERIOD_NUM' => 'PERIOD_NUM',
-            'CALC_MONTH' => 'CALC_MONTH',
-            'DEAL_TYPE_NAME' => 'DEAL_TYPE_ID',
-            'LAST_DEC_LV_NAME' => 'LAST_DEC_LV',
-            'LAST_EMP_LV_NAME' => 'LAST_EMP_LV',
-            'LAST_STATUS_NAME' => 'LAST_STATUS',
-            'AMOUNT' => 'AMOUNT',
-            'TOTAL' => 'TOTAL',
-            'ADMIN_NAME' => 'ADMIN_NAME',
-            'REMARK' => 'REMARK',
-        ]);
-        $form = new BonusExportForm();
-        $result = $form->run($filter, '车房养老奖流水');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-    /**
-     * 领袖分红流水
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionFlowLx() {
-        $filter = $this->filterCondition([
-            'userIds' => 'USER_ID',
-            'CREATED_AT' => 'CREATED_AT',
-            'PERIOD_NUM' => 'PERIOD_NUM',
-            'CALC_MONTH' => 'CALC_MONTH',
-            'DEAL_TYPE_NAME' => 'DEAL_TYPE_ID',
-            'LAST_DEC_LV_NAME' => 'LAST_DEC_LV',
-            'LAST_EMP_LV_NAME' => 'LAST_EMP_LV',
-            'LAST_STATUS_NAME' => 'LAST_STATUS',
-            'AMOUNT' => 'AMOUNT',
-            'TOTAL' => 'TOTAL',
-            'ADMIN_NAME' => 'ADMIN_NAME',
-            'REMARK' => 'REMARK',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-        $listObj = new FlowLxList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
-        return static::notice($data);
-    }
-
-    /**
-     * 导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionFlowLxExport() {
-        $filter = $this->filterCondition([
-            'userIds' => 'USER_ID',
-            'CREATED_AT' => 'CREATED_AT',
-            'PERIOD_NUM' => 'PERIOD_NUM',
-            'CALC_MONTH' => 'CALC_MONTH',
-            'DEAL_TYPE_NAME' => 'DEAL_TYPE_ID',
-            'LAST_DEC_LV_NAME' => 'LAST_DEC_LV',
-            'LAST_EMP_LV_NAME' => 'LAST_EMP_LV',
-            'LAST_STATUS_NAME' => 'LAST_STATUS',
-            'AMOUNT' => 'AMOUNT',
-            'TOTAL' => 'TOTAL',
-            'ADMIN_NAME' => 'ADMIN_NAME',
-            'REMARK' => 'REMARK',
-        ]);
-        $form = new BonusExportForm();
-        $result = $form->run($filter, '领袖分红奖流水');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-    /**
-     * 车房养老奖和领袖分红年度发放审核列表
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionCfLxAuditList() {
-        $filter = $this->filterCondition([
-            'userIds' => 'CFLXA.USER_ID',
-            'CF' => 'CFLXA.CF',
-            'LX' => 'CFLXA.LX',
-            'CREATE_ADMIN_NAME' => 'ADM.ADMIN_NAME',
-            'CREATED_AT' => 'CFLXA.CREATED_AT',
-            'AUDIT_ADMIN_NAME' => 'ADMA.ADMIN_NAME',
-            'AUDITED_AT' => 'CFLXA.AUDITED_AT',
-            'CREATE_REMARK' => 'CFLXA.CREATE_REMARK',
-            'filterStatus' => 'CFLXA.AUDIT_STATUS',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-        $listObj = new CfLxAuditList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
-        return static::notice($data);
-    }
-
-    /**
-     * 车房养老奖和领袖分红年度发放审核导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionCfLxAuditExport() {
-        $filter = $this->filterCondition([
-            'userIds' => 'CFLXA.USER_ID',
-            'CF' => 'CFLXA.CF',
-            'LX' => 'CFLXA.LX',
-            'CREATE_ADMIN_NAME' => 'ADM.ADMIN_NAME',
-            'CREATED_AT' => 'CFLXA.CREATED_AT',
-            'AUDIT_ADMIN_NAME' => 'ADMA.ADMIN_NAME',
-            'AUDITED_AT' => 'CFLXA.AUDITED_AT',
-            'CREATE_REMARK' => 'CFLXA.CREATE_REMARK',
-            'filterStatus' => 'CFLXA.AUDIT_STATUS',
-        ]);
-        $form = new BonusExportForm();
-        $result = $form->run($filter, '年度奖金发放审核');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-    /**
-     * 申请发放车房养老奖和领袖分红
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionCfLxApply() {
-        if (Yii::$app->request->isPost) {
-            $formModel = new SendCFAndLXForm();
-            $formModel->scenario = 'apply';
-            if ($formModel->load(Yii::$app->request->post(), '') && $result = $formModel->apply()) {
-                if(!empty($result['logs'])){
-                    return static::notice('申请成功,请在年度奖管理中审核');
-                }else{
-                    return static::notice('申请失败,无符合发放条件会员',400);
-                }
-            } else {
-                return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
-            }
-        }
-        return static::notice('非法请求', 400);
-    }
-
-    /**
-     * 审核车房养老奖和领袖分红
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionCfLxAudit() {
-        $formModel = new SendCFAndLXForm();
-        $formModel->scenario = 'audit';
-        if ($formModel->load(Yii::$app->request->post(), '') && $result = $formModel->audit()) {
-            return static::notice('审核年度奖申请完成');
-        }
-        return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
-    }
-
-    /**
-     * 删除车房领袖审核信息
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionCfLxAuditDelete() {
-        $sendCFAndLXForm = new SendCFAndLXForm();
-        $result = static::delete(CFLXAudit::class, function ($selected) use ($sendCFAndLXForm) {
-            $sendCFAndLXForm->beforeDelete($selected);
-            // Log::adminHandle('删除审核会员余额信息');
-        }, function ($selected) use ($sendCFAndLXForm) {
-            $sendCFAndLXForm->delete($selected);
-            // Log::adminHandle('删除审核会员余额信息');
-        }, true);
-        return $result;
-    }
-
-    /**
-     * 查看所传期数的各项奖金
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionPeriodDetail() {
-        $periodNum = \Yii::$app->request->get('periodNum');
-        $period = Period::instance();
-        $periodInfo = $period->setPeriodNum($periodNum);
-        $yearMonth = $period->getYearMonth($periodNum);
-//        $filter = $this->filterCondition('UT', [
-//            'userName' => 'UI.USER_NAME',
-//        ]);
-        $condition = '';
-        $params = [];
-        $condition .= ' AND C.PERIOD_NUM=:PERIOD_NUM';
-        $params[':PERIOD_NUM'] = $periodNum;
-        if (!$period->isClosed($periodNum)) {
-            return static::notice('该期不能查看');
-        }
-        $data = CalcBonus::lists($condition, $params, [
-            'yearMonth' => $yearMonth,
-            'select' => 'C.*,UI.USER_NAME',
-            'from' => CalcBonus::tableName() . ' AS C',
-            'join' => [
-                ['LEFT JOIN', UserInfo::tableName() . ' AS UI', 'C.USER_ID=UI.USER_ID'],
-            ],
-            'orderBy' => 'C.CREATED_AT DESC',
-        ]);
-        $data['periodInfo'] = $periodInfo;
-        return static::notice($data);
-    }
-
-    /**
-     * 获取最新一期结算的奖金
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionNewPeriodBonus() {
-        $periodNum = Period::calculatedMaxPeriodNum();
-        $data = $this->_periodBonus($periodNum);
-        return static::notice($data);
-    }
-
-    /**
-     * 最新一期奖金导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionNewPeriodBonusExport() {
-        $filter = $this->filterCondition([
-            'LAST_USER_NAME' => 'CB.LAST_USER_NAME',
-            'LAST_REAL_NAME' => 'CB.LAST_REAL_NAME',
-            'LAST_DEC_LV_NAME' => 'CB.LAST_DEC_LV',
-            'LAST_EMP_LV_NAME' => 'CB.LAST_EMP_LV',
-            'LAST_MOBILE' => 'CB.LAST_MOBILE',
-            'LAST_PERIOD_AT' => 'CB.LAST_PERIOD_AT',
-            'LAST_CREATED_AT' => 'CB.LAST_CREATED_AT',
-            'LAST_REC_USER_NAME' => 'CB.LAST_REC_USER_NAME',
-            'LAST_REC_REAL_NAME' => 'CB.LAST_REC_REAL_NAME',
-            'LAST_CON_USER_NAME' => 'CB.LAST_CON_USER_NAME',
-            'LAST_CON_REAL_NAME' => 'CB.LAST_CON_REAL_NAME',
-            'BONUS_BD' => 'CB.BONUS_BD',
-            'BONUS_TG' => 'CB.BONUS_TG',
-            'BONUS_YJ' => 'CB.BONUS_YJ',
-            'BONUS_GX' => 'CB.BONUS_GX',
-            // 'BONUS_GL' => 'CB.BONUS_BS',
-            'BONUS_GL' => 'CB.BONUS_GL',
-            'BONUS_QY' => 'CB.BONUS_QY',
-            'BONUS_YC' => 'CB.BONUS_YC',
-            'PV_1L' => 'CB.PV_1L',
-            'SURPLUS_1L' => 'CB.SURPLUS_1L',
-            'PV_2L' => 'CB.PV_2L',
-            'SURPLUS_2L' => 'CB.SURPLUS_2L',
-            'PV_3L' => 'CB.PV_3L',
-            'SURPLUS_3L' => 'CB.SURPLUS_3L',
-            'CALCULATED_AT' => 'CB.CALCULATED_AT',
-            'CALC_MONTH' => 'CB.CALC_MONTH',
-            'BONUS_QY_MONTH' => 'CB.BONUS_QY_MONTH',
-        ]);
-        $periodNum = Period::calculatedMaxPeriodNum();
-        $period = Period::instance();
-        $yearMonth = $period->getYearMonth($periodNum);
-        $filter['condition'] .= ' AND PERIOD_NUM=:PERIOD_NUM';
-        $filter['params'][':PERIOD_NUM'] = $periodNum;
-        $form = new BonusExportForm();
-        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth]]), '最新奖金');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-    /**
-     * 获取往期已结算的奖金
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionOtherPeriodBonus() {
-        $periodNumRequest = \Yii::$app->request->get('periodNum');
-        if(!$periodNumRequest){
-            $periodNum = Period::calculatedMaxPeriodNum();
-            //return static::notice('请填写期数',400);
-        }else{
-            $periodNum = explode(",", $periodNumRequest)[1];
-        }
-        $data = $this->_periodBonus($periodNum,false);
-        if( isset($data['filterTypes']) && is_array($data['filterTypes']) ) {
-            $data['filterTypes'] = array_merge(['periodNum'=>['isUserTable'=> false, 'name'=> '结算期数']], $data['filterTypes']);
-        }
-
-        return static::notice($data);
-    }
-
-    /**
-     * 往期奖金导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionOtherPeriodBonusExport() {
-        $filter = $this->filterCondition([
-            'periodNum' => 'CB.PERIOD_NUM',
-            'LAST_USER_NAME' => 'CB.LAST_USER_NAME',
-            'LAST_REAL_NAME' => 'CB.LAST_REAL_NAME',
-            'LAST_DEC_LV_NAME' => 'CB.LAST_DEC_LV',
-            'LAST_EMP_LV_NAME' => 'CB.LAST_EMP_LV',
-            'LAST_MOBILE' => 'CB.LAST_MOBILE',
-            'LAST_PERIOD_AT' => 'CB.LAST_PERIOD_AT',
-            'LAST_CREATED_AT' => 'CB.LAST_CREATED_AT',
-            'LAST_REC_USER_NAME' => 'CB.LAST_REC_USER_NAME',
-            'LAST_REC_REAL_NAME' => 'CB.LAST_REC_REAL_NAME',
-            'LAST_CON_USER_NAME' => 'CB.LAST_CON_USER_NAME',
-            'LAST_CON_REAL_NAME' => 'CB.LAST_CON_REAL_NAME',
-            'BONUS_BD' => 'CB.BONUS_BD',
-            'BONUS_TG' => 'CB.BONUS_TG',
-            'BONUS_YJ' => 'CB.BONUS_YJ',
-            'BONUS_GX' => 'CB.BONUS_GX',
-            'BONUS_GL' => 'CB.BONUS_GL',
-            // 'BONUS_GL' => 'CB.BONUS_BS',
-            'BONUS_QY' => 'CB.BONUS_QY',
-            'BONUS_YC' => 'CB.BONUS_YC',
-            'PV_1L' => 'CB.PV_1L',
-            'SURPLUS_1L' => 'CB.SURPLUS_1L',
-            'PV_2L' => 'CB.PV_2L',
-            'SURPLUS_2L' => 'CB.SURPLUS_2L',
-            'PV_3L' => 'CB.PV_3L',
-            'SURPLUS_3L' => 'CB.SURPLUS_3L',
-            'CALCULATED_AT' => 'CB.CALCULATED_AT',
-            'CALC_MONTH' => 'CB.CALC_MONTH',
-            'BONUS_QY_MONTH' => 'CB.BONUS_QY_MONTH',
-        ]);
-        $periodNumRequest = \Yii::$app->request->get('periodNum');
-        if(!$periodNumRequest){
-            $periodNum = Period::calculatedMaxPeriodNum();
-        }else{
-            $periodNum = explode(",", $periodNumRequest)[1];
-        }
-//        if(!isset($filter['params'][':PERIODNUM'])){
-//            return static::notice('请填写期数',400);
-//        }
-//        $periodNum = $filter['params'][':PERIODNUM'];
-        $period = Period::instance();
-        $yearMonth = $period->getYearMonth($periodNum);
-//        $filter['condition'] .= ' AND CB.PERIOD_NUM=:PERIOD_NUM';
-//        $filter['params'][':PERIOD_NUM'] = $periodNum;
-        $form = new BonusExportForm();
-        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth]]), '往期奖金');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-    /**
-     * 获取筛选类型
-     * @return mixed
-     * @throws \yii\web\HttpException
-     */
-    public function actionOtherPeriodBonusFilterTypes(){
-        $listObj = new PeriodBonusList();
-        $filterTypes = $listObj->getFilterTypes();
-        $filterTypes = array_merge(['periodNum'=>['isUserTable'=> false, 'name'=> '结算期数']], $filterTypes);
-        return static::notice($filterTypes);
-    }
-
-    /**
-     * 期数对应的奖金
-     * @param $periodNum
-     * @param $periodFilter
-     * @return array
-     * @throws \yii\base\Exception
-     * @throws \yii\db\Exception
-     */
-    private function _periodBonus($periodNum,$periodFilter = true) {
-        $filter = $this->filterCondition([
-            'periodNum' => 'CB.PERIOD_NUM',
-            'LAST_USER_NAME' => 'CB.LAST_USER_NAME',
-            'LAST_REAL_NAME' => 'CB.LAST_REAL_NAME',
-            'LAST_DEC_LV_NAME' => 'CB.LAST_DEC_LV',
-            'LAST_EMP_LV_NAME' => 'CB.LAST_EMP_LV',
-            'LAST_MOBILE' => 'CB.LAST_MOBILE',
-            'LAST_PERIOD_AT' => 'CB.LAST_PERIOD_AT',
-            'LAST_CREATED_AT' => 'CB.LAST_CREATED_AT',
-            'LAST_REC_USER_NAME' => 'CB.LAST_REC_USER_NAME',
-            'LAST_REC_REAL_NAME' => 'CB.LAST_REC_REAL_NAME',
-            'LAST_CON_USER_NAME' => 'CB.LAST_CON_USER_NAME',
-            'LAST_CON_REAL_NAME' => 'CB.LAST_CON_REAL_NAME',
-            'BONUS_BD' => 'CB.BONUS_BD',
-            'BONUS_TG' => 'CB.BONUS_TG',
-            'BONUS_XF' => 'CB.BONUS_XF',
-            'BONUS_YJ' => 'CB.BONUS_YJ',
-            'BONUS_GX' => 'CB.BONUS_GX',
-            'BONUS_GL' => 'CB.BONUS_GL',
-            // 'BONUS_GL' => 'CB.BONUS_BS',
-            'BONUS_QY' => 'CB.BONUS_QY',
-            'BONUS_YC' => 'CB.BONUS_YC',
-            'ORI_BONUS_STANDARD' => 'CB.ORI_BONUS_STANDARD',
-            'PV_1L' => 'CB.PV_1L',
-            'SURPLUS_1L' => 'CB.SURPLUS_1L',
-            'PV_2L' => 'CB.PV_2L',
-            'SURPLUS_2L' => 'CB.SURPLUS_2L',
-            'PV_3L' => 'CB.PV_3L',
-            'SURPLUS_3L' => 'CB.SURPLUS_3L',
-            'CALCULATED_AT' => 'CB.CALCULATED_AT',
-            'CALC_MONTH' => 'CB.CALC_MONTH',
-            'BONUS_QY_MONTH' => 'CB.BONUS_QY_MONTH',
-        ]);
-        $period = Period::instance();
-        $yearMonth = $period->getYearMonth($periodNum);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-        if($periodFilter){
-            $condition .= ' AND CB.PERIOD_NUM=:PERIOD_NUM';
-            $params[':PERIOD_NUM'] = $periodNum;
-        }
-        $listObj = new PeriodBonusList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params, 'others'=>['yearMonth'=>$yearMonth]]);
-        return $data;
-    }
-
-    /**
-     * 团队奖奖金向下追溯
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceDownQy() {
-        $periodNum = Yii::$app->request->get('periodNum');
-        if (!$periodNum) return static::notice('请填写期数', 400);
-        $userName = Yii::$app->request->get('userName');
-        if (!$userName) return static::notice('请填写会员编号', 400);
-        $period = Period::instance();
-        if (!$period->isCalculated($periodNum)) {
-            return static::notice([]);
-        }
-        $yearMonth = $period->getYearMonth($periodNum);
-
-        $filter = $this->filterCondition([
-            'decType' => 'PO.DEC_TYPE',
-            'periodNum' => 'PO.PERIOD_NUM',
-        ]);
-        $qyFilter = $this->_qyFilterCondition($filter['request']);
-        $filter = array_merge($filter, $qyFilter);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-        $listObj = new TraceDownQyList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params, 'others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]);
-        return static::notice($data);
-    }
-
-    /**
-     * 获取
-     * @param $request
-     * @return array|string[]
-     */
-    private function _qyFilterCondition($request) {
-        //根据USER_NAME获取USER_ID
-        $user = User::find()->select('ID')->where('USER_NAME=:USER_NAME', ['USER_NAME'=>$request['userName']])->asArray()->one();
-        if( !$user ) return [];
-
-        //找到这个会员的LOCATION_TAG
-        $userNetwork = UserNetwork::find()->select(['LOCATION_TAG'])->where('USER_ID=:USER_ID', ['USER_ID'=>$user['ID']])->asArray()->one();
-        $searchLocationTag = $userNetwork['LOCATION_TAG'];
-        if( isset($request['location']) && $request['location'] ) {
-            $searchLocationTag .= $request['location'];
-        }
-
-        return [
-            'LOCATION_TAG' => 'LIKE ' . $searchLocationTag . '%'
-        ];
-    }
-
-    /**
-     * 团队奖向下追溯导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceDownQyExport() {
-        $periodNum = Yii::$app->request->get('periodNum');
-        if (!$periodNum) return static::notice('请填写期数', 400);
-        $userName = Yii::$app->request->get('userName');
-        if (!$userName) return static::notice('请填写会员编号', 400);
-        $period = Period::instance();
-        if (!$period->isCalculated($periodNum)) {
-            return static::notice([]);
-        }
-        $yearMonth = $period->getYearMonth($periodNum);
-        $filter = $this->filterCondition([
-            'decType' => 'PO.DEC_TYPE',
-            'periodNum' => 'PO.PERIOD_NUM',
-        ]);
-        $qyFilter = $this->_qyFilterCondition($filter['request']);
-        $filter = array_merge($filter, $qyFilter);
-
-        $form = new BonusExportForm();
-        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]), '团队奖向下追溯');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-    /**
-     * 团队奖向上追溯
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceUpQy() {
-        $periodNum = Yii::$app->request->get('periodNum');
-        if (!$periodNum) return static::notice('请填写期数', 400);
-        if (!$userName = Yii::$app->request->get('userName')) return static::notice('请填写会员编号', 400);
-        if(!$userId = Info::getUserIdByUserName($userName))  return static::notice('会员不存在', 400);
-        //会员是否有业绩单
-        if(!PerfOrder::find()->where('USER_ID=:USER_ID AND PERIOD_NUM=:PERIOD_NUM',[':USER_ID'=>$userId,':PERIOD_NUM'=>$periodNum])->exists()){
-            return static::notice('该会员本期没有业绩单', 400);
-        }
-        $listObj = new TraceUpQyList();
-        $data = $listObj->getList(['condition'=>'', 'params'=>[], 'others'=>['userId'=>$userId, 'periodNum'=>$periodNum]]);
-        return static::notice($data);
-    }
-
-    /**
-     * 团队奖向上追溯导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceUpQyExport() {
-        $periodNum = Yii::$app->request->get('periodNum');
-        if (!$periodNum) return static::notice('请填写期数', 400);
-        if (!$userName = Yii::$app->request->get('userName')) return static::notice('请填写会员编号', 400);
-        if(!$userId = Info::getUserIdByUserName($userName))  return static::notice('会员不存在', 400);
-        //会员是否有业绩单
-        if(!PerfOrder::find()->where('USER_ID=:USER_ID AND PERIOD_NUM=:PERIOD_NUM',[':USER_ID'=>$userId,':PERIOD_NUM'=>$periodNum])->exists()){
-            return static::notice('该会员本期没有业绩单', 400);
-        }
-        $form = new BonusExportForm();
-        $result = $form->run(array_merge(['condition'=>'', 'params'=>[]], ['others'=>['userId'=>$userId, 'periodNum'=>$periodNum]]), '团队奖向上追溯');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-    /**
-     * 荣衔奖向下追溯
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceDownYc() {
-        $periodNum = Yii::$app->request->get('periodNum');
-        if (!$periodNum) return static::notice([]);
-        $period = Period::instance();
-        $yearMonth = $period->getYearMonth($periodNum);
-
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-            'periodNum' => 'CBY.PERIOD_NUM',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-
-        $listObj = new TraceDownYcList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params, 'others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]);
-
-        return static::notice($data);
-    }
-
-    /**
-     * 荣衔奖向下追溯导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceDownYcExport() {
-        $periodNum = Yii::$app->request->get('periodNum');
-        if (!$periodNum) return static::notice([]);
-        $period = Period::instance();
-        $yearMonth = $period->getYearMonth($periodNum);
-
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-            'periodNum' => 'CBY.PERIOD_NUM',
-        ]);
-        $form = new BonusExportForm();
-        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]), '荣衔奖向下追溯');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-    /**
-     * 服务奖向下追溯
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceDownBd() {
-        $periodNum = Yii::$app->request->get('periodNum');
-        if (!$periodNum) return static::notice([]);
-        $period = Period::instance();
-        $yearMonth = $period->getYearMonth($periodNum);
-
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-            'periodNum' => 'CBB.PERIOD_NUM',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-
-        $listObj = new TraceDownBdList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params, 'others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]);
-
-        return static::notice($data);
-    }
-
-    /**
-     * 服务奖向下追溯导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceDownBdExport() {
-        $periodNum = Yii::$app->request->get('periodNum');
-        if (!$periodNum) return static::notice([]);
-        $period = Period::instance();
-        $yearMonth = $period->getYearMonth($periodNum);
-
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-            'periodNum' => 'CBB.PERIOD_NUM',
-        ]);
-        $form = new BonusExportForm();
-        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]), '服务奖向下追溯');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-
-    /**
-     * 推广奖向下追溯
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceDownTg() {
-        $periodNum = Yii::$app->request->get('periodNum');
-        if (!$periodNum) return static::notice([]);
-        $period = Period::instance();
-        $yearMonth = $period->getYearMonth($periodNum);
-
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-            'periodNum' => 'CTG.PERIOD_NUM',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-
-        $listObj = new TraceDownTgList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params, 'others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]);
-
-        return static::notice($data);
-    }
-
-    /**
-     * 推广奖向下追溯导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceDownTgExport() {
-        $periodNum = Yii::$app->request->get('periodNum');
-        if (!$periodNum) return static::notice([]);
-        $period = Period::instance();
-        $yearMonth = $period->getYearMonth($periodNum);
-
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-            'periodNum' => 'CTG.PERIOD_NUM',
-        ]);
-        $form = new BonusExportForm();
-        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]), '推广奖向下追溯');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-    /**
-     * 消费奖向下追溯
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceDownXf() {
-        $periodNum = Yii::$app->request->get('periodNum');
-        if (!$periodNum) return static::notice([]);
-        $period = Period::instance();
-        $yearMonth = $period->getYearMonth($periodNum);
-
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-            'periodNum' => 'CXF.PERIOD_NUM',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-
-        $listObj = new TraceDownXfList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params, 'others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]);
-
-        return static::notice($data);
-    }
-
-    /**
-     * 消费奖向下追溯导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceDownXfExport() {
-        $periodNum = Yii::$app->request->get('periodNum');
-        if (!$periodNum) return static::notice([]);
-        $period = Period::instance();
-        $yearMonth = $period->getYearMonth($periodNum);
-
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-            'periodNum' => 'CXF.PERIOD_NUM',
-        ]);
-        $form = new BonusExportForm();
-        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]), '推广奖向下追溯');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-    /**
-     * 业绩奖向下追溯
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceDownYj() {
-        $periodNum = Yii::$app->request->get('periodNum');
-        if (!$periodNum) return static::notice([]);
-        $period = Period::instance();
-        $yearMonth = $period->getYearMonth($periodNum);
-
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-            'periodNum' => 'CYJ.PERIOD_NUM',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-
-        $listObj = new TraceDownYjList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params, 'others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]);
-
-        return static::notice($data);
-    }
-
-    /**
-     * 业绩奖向下追溯导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceDownYjExport() {
-        $periodNum = Yii::$app->request->get('periodNum');
-        if (!$periodNum) return static::notice([]);
-        $period = Period::instance();
-        $yearMonth = $period->getYearMonth($periodNum);
-
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-            'periodNum' => 'CYJ.PERIOD_NUM',
-        ]);
-        $form = new BonusExportForm();
-        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]), '业绩奖向下追溯');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-    /**
-     * 共享奖向下追溯
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceDownGx() {
-        $periodNum = Yii::$app->request->get('periodNum');
-        if (!$periodNum) return static::notice([]);
-        $period = Period::instance();
-        $yearMonth = $period->getYearMonth($periodNum);
-
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-            'periodNum' => 'CGX.PERIOD_NUM',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-
-        $listObj = new TraceDownGxList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params, 'others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]);
-
-        return static::notice($data);
-    }
-
-    /**
-     * 共享奖向下追溯导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceDownGxExport() {
-        $periodNum = Yii::$app->request->get('periodNum');
-        if (!$periodNum) return static::notice([]);
-        $period = Period::instance();
-        $yearMonth = $period->getYearMonth($periodNum);
-
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-            'periodNum' => 'CGX.PERIOD_NUM',
-        ]);
-        $form = new BonusExportForm();
-        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]), '共享奖向下追溯');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-    /**
-     * 管理奖向下追溯
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceDownGl() {
-        $periodNum = Yii::$app->request->get('periodNum');
-        if (!$periodNum) return static::notice([]);
-        $period = Period::instance();
-        $yearMonth = $period->getYearMonth($periodNum);
-
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-            'periodNum' => 'CGL.PERIOD_NUM',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-
-        $listObj = new TraceDownGlList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params, 'others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]);
-
-        return static::notice($data);
-    }
-
-    /**
-     * 管理奖向下追溯导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceDownGlExport() {
-        $periodNum = Yii::$app->request->get('periodNum');
-        if (!$periodNum) return static::notice([]);
-        $period = Period::instance();
-        $yearMonth = $period->getYearMonth($periodNum);
-
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-            'periodNum' => 'CGL.PERIOD_NUM',
-        ]);
-        $form = new BonusExportForm();
-        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]), '管理奖向下追溯');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-    /**
-     * 荣衔奖向上追溯
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceUpYc() {
-        $periodNum = Yii::$app->request->get('periodNum');
-        if (!$periodNum) return static::notice([]);
-        $period = Period::instance();
-        $yearMonth = $period->getYearMonth($periodNum);
-
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-            'periodNum' => 'CBY.PERIOD_NUM',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-
-        $listObj = new TraceUpYcList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params, 'others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]);
-
-        return static::notice($data);
-    }
-
-    /**
-     * 荣衔奖向上追溯导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceUpYcExport() {
-        $periodNum = Yii::$app->request->get('periodNum');
-        if (!$periodNum) return static::notice([]);
-        $period = Period::instance();
-        $yearMonth = $period->getYearMonth($periodNum);
-
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-            'periodNum' => 'CBY.PERIOD_NUM',
-        ]);
-        $form = new BonusExportForm();
-        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]), '荣衔奖向上追溯');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-
-    /**
-     * 服务奖向上追溯
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceUpBd() {
-        $periodNum = Yii::$app->request->get('periodNum');
-        if (!$periodNum) return static::notice([]);
-        $period = Period::instance();
-        $yearMonth = $period->getYearMonth($periodNum);
-
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-            'periodNum' => 'CBB.PERIOD_NUM',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-
-        $listObj = new TraceUpBdList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params, 'others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]);
-
-        return static::notice($data);
-    }
-
-    /**
-     * 服务奖向上追溯导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceUpBdExport() {
-        $periodNum = Yii::$app->request->get('periodNum');
-        if (!$periodNum) return static::notice([]);
-        $period = Period::instance();
-        $yearMonth = $period->getYearMonth($periodNum);
-
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-            'periodNum' => 'CBY.PERIOD_NUM',
-        ]);
-        $form = new BonusExportForm();
-        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]), '荣衔奖向上追溯');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-    /**
-     * 推广奖向上追溯
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceUpTg() {
-        $periodNum = Yii::$app->request->get('periodNum');
-        if (!$periodNum) return static::notice([]);
-        $period = Period::instance();
-        $yearMonth = $period->getYearMonth($periodNum);
-
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-            'periodNum' => 'CTG.PERIOD_NUM',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-
-        $listObj = new TraceUpTgList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params, 'others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]);
-
-        return static::notice($data);
-    }
-
-    /**
-     * 推广奖向上追溯导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceUpTgExport() {
-        $periodNum = Yii::$app->request->get('periodNum');
-        if (!$periodNum) return static::notice([]);
-        $period = Period::instance();
-        $yearMonth = $period->getYearMonth($periodNum);
-
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-            'periodNum' => 'CTG.PERIOD_NUM',
-        ]);
-        $form = new BonusExportForm();
-        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]), '荣衔奖向上追溯');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-    /**
-     * 消费奖向上追溯
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceUpXf() {
-        $periodNum = Yii::$app->request->get('periodNum');
-        if (!$periodNum) return static::notice([]);
-        $period = Period::instance();
-        $yearMonth = $period->getYearMonth($periodNum);
-
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-            'periodNum' => 'CXF.PERIOD_NUM',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-
-        $listObj = new TraceUpXfList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params, 'others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]);
-
-        return static::notice($data);
-    }
-
-    /**
-     * 推广奖向上追溯导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceUpXfExport() {
-        $periodNum = Yii::$app->request->get('periodNum');
-        if (!$periodNum) return static::notice([]);
-        $period = Period::instance();
-        $yearMonth = $period->getYearMonth($periodNum);
-
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-            'periodNum' => 'CXF.PERIOD_NUM',
-        ]);
-        $form = new BonusExportForm();
-        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]), '荣衔奖向上追溯');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-    /**
-     * 业绩奖向上追溯
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceUpYj() {
-        $periodNum = Yii::$app->request->get('periodNum');
-        if (!$periodNum) return static::notice([]);
-        $period = Period::instance();
-        $yearMonth = $period->getYearMonth($periodNum);
-
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-            'periodNum' => 'CYJ.PERIOD_NUM',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-
-        $listObj = new TraceUpYjList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params, 'others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]);
-
-        return static::notice($data);
-    }
-
-    /**
-     * 业绩奖向上追溯导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceUpYjExport() {
-        $periodNum = Yii::$app->request->get('periodNum');
-        if (!$periodNum) return static::notice([]);
-        $period = Period::instance();
-        $yearMonth = $period->getYearMonth($periodNum);
-
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-            'periodNum' => 'CYJ.PERIOD_NUM',
-        ]);
-        $form = new BonusExportForm();
-        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]), '荣衔奖向上追溯');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-    /**
-     * 共享奖向上追溯
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceUpGx() {
-        $periodNum = Yii::$app->request->get('periodNum');
-        if (!$periodNum) return static::notice([]);
-        $period = Period::instance();
-        $yearMonth = $period->getYearMonth($periodNum);
-
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-            'periodNum' => 'CGX.PERIOD_NUM',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-
-        $listObj = new TraceUpGxList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params, 'others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]);
-
-        return static::notice($data);
-    }
-
-    /**
-     * 共享奖向上追溯导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceUpGxExport() {
-        $periodNum = Yii::$app->request->get('periodNum');
-        if (!$periodNum) return static::notice([]);
-        $period = Period::instance();
-        $yearMonth = $period->getYearMonth($periodNum);
-
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-            'periodNum' => 'CGX.PERIOD_NUM',
-        ]);
-        $form = new BonusExportForm();
-        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]), '荣衔奖向上追溯');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-    /**
-     * 管理奖向上追溯
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceUpGl() {
-        $periodNum = Yii::$app->request->get('periodNum');
-        if (!$periodNum) return static::notice([]);
-        $period = Period::instance();
-        $yearMonth = $period->getYearMonth($periodNum);
-
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-            'periodNum' => 'CGL.PERIOD_NUM',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-
-        $listObj = new TraceUpGlList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params, 'others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]);
-
-        return static::notice($data);
-    }
-
-    /**
-     * 管理奖向上追溯导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceUpGlExport() {
-        $periodNum = Yii::$app->request->get('periodNum');
-        if (!$periodNum) return static::notice([]);
-        $period = Period::instance();
-        $yearMonth = $period->getYearMonth($periodNum);
-
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-            'periodNum' => 'CGL.PERIOD_NUM',
-        ]);
-        $form = new BonusExportForm();
-        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]), '荣衔奖向上追溯');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-
-    /**
-     * 复销奖向下追溯
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceDownFx() {
-        $periodNum = Yii::$app->request->get('periodNum');
-        if (!$periodNum) return static::notice([]);
-        $period = Period::instance();
-        $yearMonth = $period->getYearMonth($periodNum);
-
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-            'periodNum' => 'CBF.PERIOD_NUM',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-
-        $listObj = new TraceDownFxList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params, 'others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]);
-
-        return static::notice($data);
-    }
-
-    /**
-     * 复销奖向下追溯导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceDownFxExport() {
-        $periodNum = Yii::$app->request->get('periodNum');
-        if (!$periodNum) return static::notice([]);
-        $period = Period::instance();
-        $yearMonth = $period->getYearMonth($periodNum);
-
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-            'periodNum' => 'CBF.PERIOD_NUM',
-        ]);
-        $form = new BonusExportForm();
-        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]), '复销奖向下追溯');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-    /**
-     * 复销奖向上追溯
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceUpFx() {
-        $periodNum = Yii::$app->request->get('periodNum');
-        if (!$periodNum) return static::notice([]);
-        $period = Period::instance();
-        $yearMonth = $period->getYearMonth($periodNum);
-
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-            'periodNum' => 'CBF.PERIOD_NUM',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-
-        $listObj = new TraceUpFxList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params, 'others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]);
-
-        return static::notice($data);
-    }
-
-    /**
-     * 复销奖向上追溯导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceUpFxExport() {
-        $periodNum = Yii::$app->request->get('periodNum');
-        if (!$periodNum) return static::notice([]);
-        $period = Period::instance();
-        $yearMonth = $period->getYearMonth($periodNum);
-
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-            'periodNum' => 'CBF.PERIOD_NUM',
-        ]);
-        $form = new BonusExportForm();
-        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]), '复销奖向上追溯');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-    /**
-     * 核算会员区域津贴
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionCalcQy() {
-        $periodNum = Yii::$app->request->get('periodNum');
-        $userName = Yii::$app->request->get('userName');
-        $period = Period::instance();
-        $yearMonth = $period->getYearMonth($periodNum);
-        if (!$userId = Info::getUserIdByUserName($userName)) {
-            return static::notice('会员不存在', 400);
-        }
-        $data = CalcBonus::findUseSlaves()->yearMonth($yearMonth)->where('PERIOD_NUM=:PERIOD_NUM AND USER_ID=:USER_ID', [':PERIOD_NUM' => $periodNum, ':USER_ID' => $userId])->asArray()->one();
-        if ($data) {
-            $data['REAL_NAME'] = Info::getUserRealNameByUserId($userId);
-            $data['LAST_DEC_LV_NAME'] = Cache::getDecLevelConfig()[$data['LAST_DEC_LV']]['LEVEL_NAME']??'';
-            $data['LAST_EMP_LV_NAME'] = Cache::getEmpLevelConfig()[$data['LAST_EMP_LV']]['LEVEL_NAME']??'';
-            $data['LAST_STATUS_NAME'] = \Yii::$app->params['userStatus'][$data['LAST_STATUS']]['label']??'';
-            $data['AUDIT_STATUS'] = false;
-            if ($resendQy = ResendQYAudit::find()->where('USER_ID=:USER_ID AND PERIOD_NUM=:PERIOD_NUM AND (AUDIT_STATUS=:AUDIT_STATUS_UN OR AUDIT_STATUS=:AUDIT_STATUS_TRUE)', [':USER_ID' => $userId, ':PERIOD_NUM' => $periodNum, ':AUDIT_STATUS_UN' => \Yii::$app->params['auditStatus']['un']['value'], ':AUDIT_STATUS_TRUE' => \Yii::$app->params['auditStatus']['true']['value']])->asArray()->one()) {
-                $data['AUDIT_STATUS'] = $resendQy['AUDIT_STATUS'];
-            }
-        }
-        return static::notice($data);
-    }
-
-    /**
-     * 补发区域津贴列表
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionResendQyList() {
-        $filter = $this->filterCondition([
-            'userIds' => 'USER_ID',
-            'filterStatus' => 'RESEND_STATUS',
-            'PERIOD_NUM' => 'PERIOD_NUM',
-            'LAST_DEC_LV_NAME' => 'LAST_DEC_LV',
-            'LAST_EMP_LV_NAME' => 'LAST_EMP_LV',
-            'LAST_STATUS_NAME' => 'LAST_STATUS',
-            'LAST_SUB_COM_NAME' => 'LAST_SUB_COM_ID',
-            'LAST_AREA_NAME' => [
-                'FIELD' => ['LAST_PROVINCE', 'LAST_CITY', 'LAST_COUNTY'],
-                'BIND' => ['LAST_PROVINCE', 'LAST_CITY', 'LAST_COUNTY'],
-            ],
-            'LAST_SYSTEM_NAME' => 'LAST_SYSTEM_ID',
-            'BONUS_QY' => 'BONUS_QY',
-            'SHOULD_QY' => 'SHOULD_QY',
-            'QY_1L' => 'QY_1L',
-            'SURPLUS_1L' => 'SURPLUS_1L',
-            'QY_2L' => 'QY_2L',
-            'SURPLUS_2L' => 'SURPLUS_2L',
-            'QY_3L' => 'QY_3L',
-            'SURPLUS_3L' => 'SURPLUS_3L',
-            'QY_4L' => 'QY_4L',
-            'SURPLUS_4L' => 'SURPLUS_4L',
-            'QY_5L' => 'QY_5L',
-            'SURPLUS_5L' => 'SURPLUS_5L',
-            'SURPLUS_LS' => 'SURPLUS_LS',
-            'QY_LS' => 'QY_LS',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-        $listObj = new ResendQyList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
-        return static::notice($data);
-    }
-
-    /**
-     * 区域津贴补发列表导出 
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionResendQyListExport() {
-        $filter = $this->filterCondition([
-            'userIds' => 'USER_ID',
-            'filterStatus' => 'RESEND_STATUS',
-            'PERIOD_NUM' => 'PERIOD_NUM',
-            'LAST_DEC_LV_NAME' => 'LAST_DEC_LV',
-            'LAST_EMP_LV_NAME' => 'LAST_EMP_LV',
-            'LAST_STATUS_NAME' => 'LAST_STATUS',
-            'LAST_SUB_COM_NAME' => 'LAST_SUB_COM_ID',
-            'LAST_AREA_NAME' => [
-                'FIELD' => ['LAST_PROVINCE', 'LAST_CITY', 'LAST_COUNTY'],
-                'BIND' => ['LAST_PROVINCE', 'LAST_CITY', 'LAST_COUNTY'],
-            ],
-            'LAST_SYSTEM_NAME' => 'LAST_SYSTEM_ID',
-            'BONUS_QY' => 'BONUS_QY',
-            'SHOULD_QY' => 'SHOULD_QY',
-            'QY_1L' => 'QY_1L',
-            'SURPLUS_1L' => 'SURPLUS_1L',
-            'QY_2L' => 'QY_2L',
-            'SURPLUS_2L' => 'SURPLUS_2L',
-            'QY_3L' => 'QY_3L',
-            'SURPLUS_3L' => 'SURPLUS_3L',
-            'QY_4L' => 'QY_4L',
-            'SURPLUS_4L' => 'SURPLUS_4L',
-            'QY_5L' => 'QY_5L',
-            'SURPLUS_5L' => 'SURPLUS_5L',
-            'SURPLUS_LS' => 'SURPLUS_LS',
-            'QY_LS' => 'QY_LS',
-        ]);
-        $form = new BonusExportForm();
-        $result = $form->run($filter, '区域津贴补发列表');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-    /**
-     * 补发区域津贴
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionResendQy() {
-        if (Yii::$app->request->isPost) {
-            $formModel = new ResendQYForm();
-            $formModel->scenario = 'apply';
-            if ($formModel->load(Yii::$app->request->post(), '') && $result = $formModel->apply()) {
-                if($result['logs']){
-                    /*foreach ($result['logs'] as $k => $value) {
-                        $userName = Info::getUserNameByUserId($value);
-                        // Log::adminHandle('申请为会员' . $userName . '发放补发区域津贴', 0, $value, $userName);
-                    }*/
-                    return static::notice('申请成功,请在补发区域津贴审核管理中审核');
-                }else{
-                    return static::notice('没有符合补发条件的记录',400);
-                }
-            } else {
-                return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
-            }
-        }
-        return static::notice('非法请求', 400);
-    }
-
-    /**
-     * 补发审核表
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionResendQyAuditList() {
-        $filter = $this->filterCondition([
-            'userIds' => 'RQYA.USER_ID',
-            'filterStatus' => 'RQYA.AUDIT_STATUS',
-            'SHOULD_BONUS' => 'RQYA.SHOULD_BONUS',
-            'PERIOD_NUM' => 'RQYA.PERIOD_NUM',
-            'CREATED_AT' => 'RQYA.CREATED_AT',
-            'AUDITED_AT' => 'RQYA.AUDITED_AT',
-            'RESEND_REMARK' => 'RQYA.RESEND_REMARK',
-            'CREATE_ADMIN_NAME' => 'ADMC.ADMIN_NAME',
-            'AUDIT_ADMIN_NAME' => 'ADMA.ADMIN_NAME',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-        $listObj = new ResendQyAuditList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
-        return static::notice($data);
-    }
-
-    /**
-     * 补发审核表导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionResendQyAuditListExport() {
-        $filter = $this->filterCondition([
-            'userIds' => 'RQYA.USER_ID',
-            'filterStatus' => 'RQYA.AUDIT_STATUS',
-            'SHOULD_BONUS' => 'RQYA.SHOULD_BONUS',
-            'PERIOD_NUM' => 'RQYA.PERIOD_NUM',
-            'CREATED_AT' => 'RQYA.CREATED_AT',
-            'AUDITED_AT' => 'RQYA.AUDITED_AT',
-            'RESEND_REMARK' => 'RQYA.RESEND_REMARK',
-            'CREATE_ADMIN_NAME' => 'ADMC.ADMIN_NAME',
-            'AUDIT_ADMIN_NAME' => 'ADMA.ADMIN_NAME',
-        ]);
-        $form = new BonusExportForm();
-        $result = $form->run($filter, '补发区域津贴审核列表');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-    /**
-     * 审核补发区域津贴
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionResendQyAudit() {
-        $formModel = new ResendQYForm();
-        $formModel->scenario = 'audit';
-        if ($formModel->load(Yii::$app->request->post(), '') && $result = $formModel->audit()) {
-            /*foreach ($result['logs'] as $k => $value) {
-                $userName = Info::getUserNameByUserId($value);
-                // Log::adminHandle('审核为会员' . $userName . '补发区域津贴', 1, $value, $userName);
-            }*/
-            return static::notice('审核补发区域津贴成功');
-        }
-        return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
-    }
-
-    /**
-     * 删除补发区域津贴审核信息
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionResendQyAuditDelete() {
-        $resendQYForm = new ResendQYForm();
-        $result = static::delete(ResendQYAudit::class, function ($selected) use ($resendQYForm) {
-            $resendQYForm->beforeDelete($selected);
-            // Log::adminHandle('删除审核会员余额信息');
-        }, function ($selected) use ($resendQYForm) {
-            $resendQYForm->delete($selected);
-            // Log::adminHandle('删除审核会员余额信息');
-        }, true);
-        return $result;
-    }
-
-    /**
-     * 余额列表
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionBalanceList() {
-        $filter = $this->filterCondition([
-            'USER_NAME' => 'UI.USER_NAME',
-            'REAL_NAME' => 'UI.REAL_NAME',
-            'userIds' => 'UB.USER_ID',
-            'BONUS' => 'BONUS',
-            'RECONSUME_POINTS' => 'RECONSUME_POINTS',
-            'CASH' => 'CASH',
-            'IS_DEC' => 'UI.IS_DEC',
-            'PERIOD_AT' => 'UI.PERIOD_AT',
-            'MOBILE' => 'UI.MOBILE',
-            'TEL' => 'UI.TEL',
-//            'CF' => 'CF',
-//            'LX' => 'LX',
-//            'HIGHEST_EMP_LV_NAME' => 'UI.HIGHEST_EMP_LV',
-//            'SYSTEM_NAME' => 'UI.SYSTEM_ID',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-        $listObj = new BalanceList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
-        return static::notice($data);
-    }
-
-    /**
-     * 会员奖金余额导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionBalanceExport() {
-        $filter = $this->filterCondition([
-            'USER_NAME' => 'UI.USER_NAME',
-            'REAL_NAME' => 'UI.REAL_NAME',
-            'userIds' => 'UB.USER_ID',
-            'BONUS' => 'BONUS',
-            'IS_DEC' => 'UI.IS_DEC',
-            'PERIOD_AT' => 'UI.PERIOD_AT',
-            'MOBILE' => 'UI.MOBILE',
-            'TEL' => 'UI.TEL',
-//            'CF' => 'CF',
-//            'LX' => 'LX',
-        ]);
-        $form = new BonusExportForm();
-        $result = $form->run($filter, '会员奖金余额');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-    /**
-     * 报单中心店补/补贴追溯
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceBt() {
-        $startPeriodNum = Yii::$app->request->get('startPeriodNum');
-        $endPeriodNum = Yii::$app->request->get('endPeriodNum');
-        if (!$startPeriodNum || !$endPeriodNum) return static::notice([]);
-        $filterStatus = Yii::$app->request->get('filterStatus');
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-        if ($startPeriodNum) {
-            $condition .= ' AND CBT.PERIOD_NUM>=:START_PERIOD_NUM';
-            $params[':START_PERIOD_NUM'] = $startPeriodNum;
-        }
-        if ($endPeriodNum) {
-            $condition .= ' AND CBT.PERIOD_NUM<=:END_PERIOD_NUM';
-            $params[':END_PERIOD_NUM'] = $endPeriodNum;
-        }
-        if ($filterStatus) {
-            $condition .= ' AND CBT.BT_TYPE=:BT_TYPE';
-            $params[':BT_TYPE'] = $filterStatus;
-        }
-        $listObj = new TraceBtList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
-
-        return static::notice($data);
-    }
-
-    /**
-     * 报单中心补贴追溯导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceBtExport() {
-        $startPeriodNum = Yii::$app->request->get('startPeriodNum');
-        $endPeriodNum = Yii::$app->request->get('endPeriodNum');
-        if (!$startPeriodNum || !$endPeriodNum) return static::notice([]);
-        $filterStatus = Yii::$app->request->get('filterStatus');
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-        if ($startPeriodNum) {
-            $condition .= ' AND CBT.PERIOD_NUM>=:START_PERIOD_NUM';
-            $params[':START_PERIOD_NUM'] = $startPeriodNum;
-        }
-        if ($endPeriodNum) {
-            $condition .= ' AND CBT.PERIOD_NUM<=:END_PERIOD_NUM';
-            $params[':END_PERIOD_NUM'] = $endPeriodNum;
-        }
-        if ($filterStatus) {
-            $condition .= ' AND CBT.BT_TYPE=:BT_TYPE';
-            $params[':BT_TYPE'] = $filterStatus;
-        }
-        $form = new BonusExportForm();
-        $result = $form->run(['condition'=>$condition, 'params'=>$params], '报单中心补贴追溯');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-    /**
-     * 报单中心货补追溯
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceFl() {
-        $startPeriodNum = Yii::$app->request->get('startPeriodNum');
-        $endPeriodNum = Yii::$app->request->get('endPeriodNum');
-        if (!$startPeriodNum || !$endPeriodNum) return static::notice([]);
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-        if ($startPeriodNum) {
-            $condition .= ' AND CFL.PERIOD_NUM>=:START_PERIOD_NUM';
-            $params[':START_PERIOD_NUM'] = $startPeriodNum;
-        }
-        if ($endPeriodNum) {
-            $condition .= ' AND CFL.PERIOD_NUM<=:END_PERIOD_NUM';
-            $params[':END_PERIOD_NUM'] = $endPeriodNum;
-        }
-        $listObj = new TraceFlList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
-
-        return static::notice($data);
-    }
-
-    /**
-     * 报单中心货补追溯导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceFlExport() {
-        $startPeriodNum = Yii::$app->request->get('startPeriodNum');
-        $endPeriodNum = Yii::$app->request->get('endPeriodNum');
-        if (!$startPeriodNum || !$endPeriodNum) return static::notice([]);
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-        if ($startPeriodNum) {
-            $condition .= ' AND CFL.PERIOD_NUM>=:START_PERIOD_NUM';
-            $params[':START_PERIOD_NUM'] = $startPeriodNum;
-        }
-        if ($endPeriodNum) {
-            $condition .= ' AND CFL.PERIOD_NUM<=:END_PERIOD_NUM';
-            $params[':END_PERIOD_NUM'] = $endPeriodNum;
-        }
-        $form = new BonusExportForm();
-        $result = $form->run(['condition'=>$condition, 'params'=>$params], '报单中心货补追溯');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-    /**
-     * 区域业绩提成追溯
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceFw() {
-        $startPeriodNum = Yii::$app->request->get('startPeriodNum');
-        $endPeriodNum = Yii::$app->request->get('endPeriodNum');
-        if (!$startPeriodNum || !$endPeriodNum) return static::notice([]);
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-        if ($startPeriodNum) {
-            $condition .= ' AND CFW.PERIOD_NUM>=:START_PERIOD_NUM';
-            $params[':START_PERIOD_NUM'] = $startPeriodNum;
-        }
-        if ($endPeriodNum) {
-            $condition .= ' AND CFW.PERIOD_NUM<=:END_PERIOD_NUM';
-            $params[':END_PERIOD_NUM'] = $endPeriodNum;
-        }
-        $listObj = new TraceFwList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
-
-        return static::notice($data);
-    }
-
-    /**
-     * 区域业绩提成导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionTraceFwExport() {
-        $startPeriodNum = Yii::$app->request->get('startPeriodNum');
-        $endPeriodNum = Yii::$app->request->get('endPeriodNum');
-        if (!$startPeriodNum || !$endPeriodNum) return static::notice([]);
-        $filter = $this->filterCondition([
-            'userName' => 'UI.USER_NAME',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-        if ($startPeriodNum) {
-            $condition .= ' AND CFW.PERIOD_NUM>=:START_PERIOD_NUM';
-            $params[':START_PERIOD_NUM'] = $startPeriodNum;
-        }
-        if ($endPeriodNum) {
-            $condition .= ' AND CFW.PERIOD_NUM<=:END_PERIOD_NUM';
-            $params[':END_PERIOD_NUM'] = $endPeriodNum;
-        }
-        $form = new BonusExportForm();
-        $result = $form->run(['condition'=>$condition, 'params'=>$params], '区域业绩提成追溯');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-    /**
-     * 业绩单
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionPerfOrder(){
-        $filter = $this->filterCondition([
-            'PERIOD_NUM' => 'PO.PERIOD_NUM',
-            'SN' => 'PO.SN',
-            'DEC_STATUS_NAME' => 'PO.DEC_STATUS',
-            'USER_NAME' => 'U.USER_NAME',
-            'REAL_NAME' => 'U.REAL_NAME',
-            'userIds' => 'PO.USER_ID',
-            'filterType' => 'PO.DEC_TYPE',
-            'LAST_REC_USER_NAME' => 'PO.LAST_REC_USER_NAME',
-            'LAST_REC_REAL_NAME' => 'PO.LAST_REC_REAL_NAME',
-            'PV' => 'PO.PV',
-            'DEC_AMOUNT' => 'PO.DEC_AMOUNT',
-            'DEC_SN' => 'PO.DEC_SN',
-            'CREATED_AT' => 'PO.CREATED_AT',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-        $listObj = new PerfOrderList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
-
-        return static::notice($data);
-    }
-
-    /**
-     * 业绩单导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionPerfOrderExport() {
-        $filter = $this->filterCondition([
-            'PERIOD_NUM' => 'PO.PERIOD_NUM',
-            'SN' => 'PO.SN',
-            'DEC_STATUS_NAME' => 'PO.DEC_STATUS',
-            'userIds' => 'PO.USER_ID',
-            'filterType' => 'PO.DEC_TYPE',
-            'LAST_REC_USER_NAME' => 'PO.LAST_REC_USER_NAME',
-            'LAST_REC_REAL_NAME' => 'PO.LAST_REC_REAL_NAME',
-            'PV' => 'PO.PV',
-            'DEC_AMOUNT' => 'PO.DEC_AMOUNT',
-            'DEC_SN' => 'PO.DEC_SN',
-            'LAST_SUB_COM_NAME' => 'PO.LAST_SUB_COM_ID',
-            'LAST_SYSTEM_NAME' => 'PO.LAST_SYSTEM_ID',
-            'LAST_AREA' => [
-                'FIELD' => ['PO.LAST_PROVINCE', 'PO.LAST_CITY', 'PO.LAST_COUNTY'],
-                'BIND' => ['LAST_PROVINCE', 'LAST_CITY', 'LAST_COUNTY'],
-            ],
-            'DEC_USER_NAME' => 'DUI.USER_NAME',
-            'LAST_DEC_DEC_LV_NAME' => 'PO.LAST_DEC_DEC_LV',
-            'LAST_DEC_SUB_COM_NAME' => 'PO.LAST_DEC_SUB_COM_ID',
-            'LAST_DEC_AREA' => [
-                'FIELD' => ['PO.LAST_DEC_PROVINCE', 'PO.LAST_DEC_CITY', 'PO.LAST_DEC_COUNTY'],
-                'BIND' => ['LAST_DEC_PROVINCE', 'LAST_DEC_CITY', 'LAST_DEC_COUNTY'],
-            ],
-            'CREATED_AT' => 'PO.CREATED_AT',
-            'CLOSED_AT' => 'PO.CLOSED_AT',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-        $form = new BonusExportForm();
-        $result = $form->run(['condition'=>$condition, 'params'=>$params], '业绩单');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-    /**
-     * 月积分
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionScoreMonth(){
-        $filter = $this->filterCondition([
-            'USER_NAME' => 'U.USER_NAME',
-            'userIds' => 'SM.USER_ID',
-            'CALC_MONTH' => 'SM.CALC_MONTH',
-            'CREATED_AT' => 'SM.CREATED_AT',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-        $listObj = new ScoreMonthList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
-
-        return static::notice($data);
-    }
-
-    /**
-     * 月积分导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionScoreMonthExport() {
-        $filter = $this->filterCondition([
-            'USER_NAME' => 'U.USER_NAME',
-            'userIds' => 'SM.USER_ID',
-            'CALC_MONTH' => 'SM.CALC_MONTH',
-            'CREATED_AT' => 'SM.CREATED_AT',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-        $form = new BonusExportForm();
-        $result = $form->run(['condition'=>$condition, 'params'=>$params], '月积分');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-    /**
-     * 月业绩
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionPerfMonth(){
-        $filter = $this->filterCondition([
-            'USER_NAME' => 'U.USER_NAME',
-            'REC_USER_NAME' => 'RU.USER_NAME',
-            'userIds' => 'PM.USER_ID',
-            'CALC_MONTH' => 'PM.CALC_MONTH',
-            'CREATED_AT' => 'PM.CREATED_AT',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-        $listObj = new PerfMonthList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
-
-        return static::notice($data);
-    }
-
-    /**
-     * 月业绩导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionPerfMonthExport() {
-        $filter = $this->filterCondition([
-            'USER_NAME' => 'U.USER_NAME',
-            'REC_USER_NAME' => 'RU.USER_NAME',
-            'userIds' => 'PM.USER_ID',
-            'CALC_MONTH' => 'PM.CALC_MONTH',
-            'CREATED_AT' => 'PM.CREATED_AT',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-        $form = new BonusExportForm();
-        $result = $form->run(['condition'=>$condition, 'params'=>$params], '月业绩');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-    /**
-     * 期业绩
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionPerfPeriodList(){
-        $filter = $this->filterCondition([
-            'USER_NAME' => 'U.USER_NAME',
-            'userIds' => 'PP.USER_ID',
-            'PERIOD_NUM' => 'PP.PERIOD_NUM',
-            'CREATED_AT' => 'PP.CREATED_AT',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-        $listObj = new PerfPeriodList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
-
-        return static::notice($data);
-    }
-
-    /**
-     * 期业绩导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionPerfPeriodListExport() {
-        $filter = $this->filterCondition([
-            'USER_NAME' => 'U.USER_NAME',
-            'userIds' => 'PP.USER_ID',
-            'PERIOD_NUM' => 'PP.PERIOD_NUM',
-            'CREATED_AT' => 'PP.CREATED_AT',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-        $form = new BonusExportForm();
-        $result = $form->run(['condition'=>$condition, 'params'=>$params], '期业绩');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-
-    /**
-     * 达标业绩
-     * @return mixed
-     * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionPerfStandard(){
-        $filter = $this->filterCondition([
-            'USER_NAME' => 'U.USER_NAME',
-            'REC_USER_NAME' => 'RU.USER_NAME',
-            'userIds' => 'PS.USER_ID',
-            'CALC_MONTH' => 'PS.CALC_MONTH',
-            'CREATED_AT' => 'PS.CREATED_AT',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-        $listObj = new PerfStandardList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
-
-        return static::notice($data);
-    }
-
-    /**
-     * 达标业绩导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionPerfStandardExport() {
-        $filter = $this->filterCondition([
-            'USER_NAME' => 'U.USER_NAME',
-            'REC_USER_NAME' => 'RU.USER_NAME',
-            'userIds' => 'PS.USER_ID',
-            'CALC_MONTH' => 'PS.CALC_MONTH',
-            'CREATED_AT' => 'PS.CREATED_AT',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-        $form = new BonusExportForm();
-        $result = $form->run(['condition'=>$condition, 'params'=>$params], '达标业绩');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
-
-
-    /**
-     * 会员实时业绩
-     * @return mixed
-     * @throws \yii\web\HttpException
-     */
-    public function actionRealTimePerf() {
-        $userName = Yii::$app->request->get('userName');
-        if (!$userId = Info::getUserIdByUserName($userName)) {
-            return static::notice('会员不存在', 400);
-        }
-        $period = Period::instance();
-        $newPerf = Perf::getPeriodNewPerf($userId);
-        $weekData = [['PV_1L' => $newPerf['PV_1L'], 'PV_2L' => $newPerf['PV_2L'], 'PV_3L' => $newPerf['PV_3L'], 'PV_4L' => $newPerf['PV_4L'], 'PV_5L' => $newPerf['PV_5L'], 'PV_PCS'=>Tool::formatPrice($newPerf['PV_PCS']), 'PV_PSS'=>Tool::formatPrice($newPerf['PV_PSS'])]];
-        $monthPerf = Perf::getMonthPerf($userId);
-        $monthData = [['PV_1L' => Tool::formatPrice($monthPerf['PV_1L']), 'PV_2L' => Tool::formatPrice($monthPerf['PV_2L']), 'PV_3L' => Tool::formatPrice($monthPerf['PV_3L']), 'PV_4L' => Tool::formatPrice($monthPerf['PV_4L']), 'PV_5L' => Tool::formatPrice($monthPerf['PV_5L']), 'PV_PCS'=>Tool::formatPrice($monthPerf['PV_PCS']), 'PV_PSS'=>Tool::formatPrice($monthPerf['PV_PSS'])]];
-        $lastMonth = PerfMonth::getMonthPerf($period->getLastMonth()['yearMonth'], $userId);
-        $lastData = [['PV_1L' => Tool::formatPrice($lastMonth['PV_1L_TOTAL']), 'PV_2L' => Tool::formatPrice($lastMonth['PV_2L_TOTAL']), 'PV_3L' => Tool::formatPrice($lastMonth['PV_3L_TOTAL']), 'PV_4L' => Tool::formatPrice($lastMonth['PV_4L_TOTAL']), 'PV_5L' => Tool::formatPrice($lastMonth['PV_5L_TOTAL']), 'PV_PCS'=>Tool::formatPrice($lastMonth['PV_PCS']), 'PV_PSS'=>Tool::formatPrice($lastMonth['PV_PSS']), 'PV_PSS_TOTAL'=>Tool::formatPrice($lastMonth['PV_PSS_TOTAL'])]];
-        //是否合格
-//        $lastChkStatus = '';
-//        $lastMonthPerfChk = Cache::getSystemConfig()['lastMonthPerfChk']['VALUE'];
-//        $lastArr = [$lastMonth['PV_1L_TOTAL'], $lastMonth['PV_2L_TOTAL'], $lastMonth['PV_3L_TOTAL'], $lastMonth['PV_4L_TOTAL'], $lastMonth['PV_5L_TOTAL']];
-//        if (array_sum($lastArr) >= $lastMonthPerfChk) {
-//            $lastChkStatus = '已合格';
-//        }
-        //判断大区
-//        $bigLocation = array_search(max($lastArr), $lastArr) + 1;
-        return static::notice(['weekData' => $weekData, 'monthData' => $monthData, 'lastData' => $lastData]);
-    }
-
-    /**
-     * 荣衔业绩
-     * @return mixed
-     * @throws \yii\web\HttpException
-     */
-    public function actionYcPerf() {
-        $userName = Yii::$app->request->get('userName');
-        if (!$userId = Info::getUserIdByUserName($userName)) {
-            return static::notice('会员不存在', 400);
-        }
-
-        $userPerfData = Perf::getUserPerf($userId);
-        $ycPerfList = [];
-        //查找推荐的子会员
-        $childrenList = UserInfo::findUseDbCalc()->select('USER_ID')->where('REC_UID=:REC_UID', [
-            'REC_UID' => $userId
-        ])->asArray()->all();
-        $maxPvPss = 0;
-        $childSumPerf = 0;
-        foreach ($childrenList as $child) {
-            $childBaseUser = Info::getBaseUserById($child['USER_ID']);
-            if( !$childBaseUser ) continue;
-            $childPerfData = Perf::getUserPerf($child['USER_ID']);
-            if( !$childPerfData ) continue;
-
-            $childPvPcs = $childPerfData['PV_PCS_ZC'] + $childPerfData['PV_PCS_FX'];
-
-            $childPvPssTotal = $childPvPcs + $childPerfData['PV_PSS'];
-
-            $childSumPerf += $childPvPssTotal;
-            if( $childPvPssTotal >= $maxPvPss ) {
-                $maxPvPss = $childPvPssTotal;
-            }
-
-            $ycPerfList[] = [
-                'USER_NAME'=>$childBaseUser['USER_NAME'],
-                'REAL_NAME'=>$childBaseUser['REAL_NAME'],
-                'PV_PCS' => $childPerfData['PV_PCS_ZC'] + $childPerfData['PV_PCS_FX'],
-                'PV_PSS_TOTAL' => $childPerfData['PV_PSS_TOTAL'],
-                'MAX_DEPART_PERF' => '-',
-                'OTHER_DEPART_PERF' => '-',
-                'PV_PSS_SUM_TOTAL' => round($childPerfData['PV_PCS_ZC'] + $childPerfData['PV_PCS_FX'] + $childPerfData['PV_PSS_TOTAL'],2),
-            ];
-        }
-
-        if( $userPerfData ) {
-            $baseUser = Info::getBaseUserById($userId);
-            $ycPerfData = [
-                'USER_NAME'=>$baseUser['USER_NAME'],
-                'REAL_NAME'=>$baseUser['REAL_NAME'],
-                'PV_PCS' => $userPerfData['PV_PCS_ZC'] + $userPerfData['PV_PCS_FX'],
-                'PV_PSS_TOTAL' => $userPerfData['PV_PSS_TOTAL'],
-                'MAX_DEPART_PERF' => round($maxPvPss, 2),
-                'OTHER_DEPART_PERF' => round($childSumPerf-$maxPvPss, 2),
-                'PV_PSS_SUM_TOTAL' => round($userPerfData['PV_PCS_ZC'] + $userPerfData['PV_PCS_FX'] + $userPerfData['PV_PSS_TOTAL'],2),
-            ];
-            array_unshift($ycPerfList, $ycPerfData);
-        }
-
-        return static::notice(['ycPerfList' => $ycPerfList]);
-    }
-
-    /**
-     * 用户业绩
-     * @return mixed
-     * @throws \yii\web\HttpException
-     */
-    public function actionUserPerf() {
-        $filter = $this->filterCondition([
-            'USER_NAME' => 'U.USER_NAME',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-        $listObj = new UserPerfList();
-        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
-
-        return static::notice($data);
-    }
-
-    /**
-     * 月业绩导出
-     * @return mixed
-     * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
-     */
-    public function actionUserPerfExport() {
-        $filter = $this->filterCondition([
-            'USER_NAME' => 'U.USER_NAME',
-        ]);
-        $condition = $filter['condition'];
-        $params = $filter['params'];
-        $form = new BonusExportForm();
-        $result = $form->run(['condition'=>$condition, 'params'=>$params], '用户业绩');
-        if (!$result) {
-            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
-        }
-        return static::notice('导出开始,请到文件管理-导出文件查看');
-    }
+<?php
+/**
+ * Created by PhpStorm.
+ * User: leo
+ * Date: 2018/2/24
+ * Time: 下午12:48
+ */
+
+namespace backendApi\modules\v1\controllers;
+
+use backendApi\modules\v1\models\Admin;
+use backendApi\modules\v1\models\exportForms\BonusExportForm;
+use backendApi\modules\v1\models\lists\bonus\BalanceList;
+use backendApi\modules\v1\models\lists\bonus\FlowBalanceList;
+use backendApi\modules\v1\models\lists\bonus\FlowBonusList;
+use backendApi\modules\v1\models\lists\bonus\FlowExchangePointsList;
+use backendApi\modules\v1\models\lists\bonus\FlowReconsumePointsList;
+use backendApi\modules\v1\models\lists\bonus\FlowWalletList;
+use backendApi\modules\v1\models\lists\bonus\PerfMonthList;
+use backendApi\modules\v1\models\lists\bonus\PerfOrderList;
+use backendApi\modules\v1\models\lists\bonus\PerfPeriodList;
+use backendApi\modules\v1\models\lists\bonus\PerfStandardList;
+use backendApi\modules\v1\models\lists\bonus\PeriodBonusList;
+use backendApi\modules\v1\models\lists\bonus\ScoreMonthList;
+use backendApi\modules\v1\models\lists\bonus\TraceDownBdList;
+use backendApi\modules\v1\models\lists\bonus\TraceDownGlList;
+use backendApi\modules\v1\models\lists\bonus\TraceDownGxList;
+use backendApi\modules\v1\models\lists\bonus\TraceDownQyList;
+use backendApi\modules\v1\models\lists\bonus\TraceDownTgList;
+use backendApi\modules\v1\models\lists\bonus\TraceDownXfList;
+use backendApi\modules\v1\models\lists\bonus\TraceDownYcList;
+use backendApi\modules\v1\models\lists\bonus\TraceDownYjList;
+use backendApi\modules\v1\models\lists\bonus\TraceUpBdList;
+use backendApi\modules\v1\models\lists\bonus\TraceUpGlList;
+use backendApi\modules\v1\models\lists\bonus\TraceUpGxList;
+use backendApi\modules\v1\models\lists\bonus\TraceUpQyList;
+use backendApi\modules\v1\models\lists\bonus\TraceUpTgList;
+use backendApi\modules\v1\models\lists\bonus\TraceUpXfList;
+use backendApi\modules\v1\models\lists\bonus\TraceUpYcList;
+use backendApi\modules\v1\models\lists\bonus\TraceUpYjList;
+use backendApi\modules\v1\models\lists\bonus\UserPerfList;
+use common\helpers\Cache;
+use common\helpers\Date;
+use common\helpers\Tool;
+use common\helpers\user\Info;
+use common\helpers\user\Perf;
+use common\models\CalcBonus;
+use common\models\CFLXAudit;
+use common\models\forms\ResendQYForm;
+use common\models\forms\SendCFAndLXForm;
+use common\models\PerfMonth;
+use common\models\PerfOrder;
+use common\models\PerfPeriod;
+use common\models\ResendQYAudit;
+use common\models\User;
+use common\models\UserInfo;
+use common\models\UserNetwork;
+use Yii;
+use common\helpers\Form;
+use common\models\Config;
+use common\models\FlowBonus;
+use common\models\FlowExchangePoints;
+use common\models\forms\PeriodForm;
+use common\models\forms\PreparePeriodForm;
+use common\models\Period;
+use common\models\PeriodPrepare;
+use Exception;
+
+class BonusController extends BaseController {
+    public $modelClass = FlowBonus::class;
+
+    public function behaviors() {
+        $behaviors = parent::behaviors();
+        //$behaviors['contentNegotiator']['formats']['text/html'] = Response::FORMAT_JSON;
+        return $behaviors;
+    }
+
+    /**
+     * 查看预计计算月业绩数据状态
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionPreparePeriod() {
+        $filter = $this->filterCondition([
+            'periodNum' => 'PERIOD_NUM',
+            'year' => 'CALC_YEAR',
+            'month' => 'CALC_MONTH',
+            'startTime' => 'START_TIME',
+            'endTime' => 'END_TIME',
+            'closedAt' => 'CLOSED_AT',
+            'perfStartedAt' => 'PERF_STARTED_AT',
+            'perfedAt' => 'PERFED_AT',
+            'calStartedAt' => 'CALCULATE_STARTED_AT',
+            'calculatedAt' => 'CALCULATED_AT',
+            'sendStartedAt' => 'SEND_STARTED_AT',
+            'sentAt' => 'SENT_AT',
+        ]);
+        $oriPeriodObj = Period::instance();
+        $nowPeriodNum = $oriPeriodObj->getNowPeriodNum();
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+        // $condition .= ' AND PERIOD_NUM=:PERIOD_NUM';
+        $params[':PERIOD_NUM'] = $nowPeriodNum;
+        $data = PeriodPrepare::lists($condition, $params, ['orderBy' => 'PERIOD_NUM ASC']);
+        foreach ($data['list'] as $key => $value) {
+           
+            // 是否可生成业绩单
+            $data['list'][$key]['IS_CAN_PERF'] = true;
+                        
+            // 操作数据按钮是否可用
+            $data['list'][$key]['BUTTON_IS_CAN'] = true;
+            
+        }
+        return static::notice($data);
+    }
+
+    /**
+     * 对预计算业绩进行生成
+     * @return mixed
+     * @throws \yii\web\HttpException
+     */
+    public function actionPreparePerfPeriod() {
+        $periodNum = \Yii::$app->request->get('periodNum');
+        if (!$periodNum) {
+            return static::notice('期数不存在', 400);
+        }
+        
+        $formModel = new PreparePeriodForm();
+        $formModel->scenario = 'perf';
+        if ($formModel->load(Yii::$app->request->get(), '') && $formModel->perfWebToAsync()) {
+            return static::notice('预计算正在生成月业绩单,请等待');
+        } else {
+            return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
+        }
+    }
+
+    /**
+     * 期数列表
+     * @return mixed
+     * @throws \yii\base\InvalidConfigException
+     * @throws \yii\httpclient\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionPeriod() {
+        $filter = $this->filterCondition([
+            'periodNum' => 'PERIOD_NUM',
+            'year' => 'CALC_YEAR',
+            'month' => 'CALC_MONTH',
+            'startTime' => 'START_TIME',
+            'endTime' => 'END_TIME',
+            'closedAt' => 'CLOSED_AT',
+            'perfStartedAt' => 'PERF_STARTED_AT',
+            'perfedAt' => 'PERFED_AT',
+            'calStartedAt' => 'CALCULATE_STARTED_AT',
+            'calculatedAt' => 'CALCULATED_AT',
+            'sendStartedAt' => 'SEND_STARTED_AT',
+            'sentAt' => 'SENT_AT',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+        $periodObj = Period::instance();
+        $nowPeriodNum = $periodObj->getNowPeriodNum();
+        $condition .= ' AND PERIOD_NUM<=:PERIOD_NUM';
+        $params[':PERIOD_NUM'] = $nowPeriodNum;
+        $data = Period::lists($condition, $params, ['orderBy' => 'PERIOD_NUM DESC']);
+        foreach ($data['list'] as $key => $value) {
+            // 是否可封期
+            $data['list'][$key]['IS_CAN_CLOSE'] = $periodObj->isCanClose($value['PERIOD_NUM']);
+            // 是否可生成业绩单
+            $data['list'][$key]['IS_CAN_PERF'] = $periodObj->isCanPerf($value['PERIOD_NUM']);
+            // 是否可结算
+            $data['list'][$key]['IS_CAN_CALC'] = $periodObj->isCanCalc($value['PERIOD_NUM']);
+            // 是否可挂网
+            $data['list'][$key]['IS_CAN_SENT'] = $periodObj->isCanSend($value['PERIOD_NUM']);
+            // 操作数据按钮是否可用
+            $data['list'][$key]['BUTTON_IS_CAN'] = $periodObj->isCanClose($value['PERIOD_NUM']) || $periodObj->isCanPerf($value['PERIOD_NUM']) || $periodObj->isCanCalc($value['PERIOD_NUM']) || $periodObj->isCanSend($value['PERIOD_NUM']);
+        }
+        return static::notice($data);
+    }
+
+    /**
+     * 封期
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionClosePeriod() {
+        $periodNum = \Yii::$app->request->get('periodNum');
+        if (!$periodNum) {
+            return static::notice('期数不存在', 400);
+        }
+        $formModel = new PeriodForm();
+        if ($formModel->load(Yii::$app->request->get(), '') && $formModel->closePeriod()) {
+            // Log::adminHandle('第' . $periodNum . '期封期成功');
+            return static::notice('封期成功');
+        } else {
+            return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
+        }
+    }
+
+    /**
+     * 计算业绩并生成业绩单
+     * @return mixed
+     * @throws \yii\web\HttpException
+     */
+    public function actionPerfPeriod() {
+        $periodNum = \Yii::$app->request->get('periodNum');
+        if (!$periodNum) {
+            return static::notice('期数不存在', 400);
+        }
+        $formModel = new PeriodForm();
+        $formModel->scenario = 'perf';
+        if ($formModel->load(Yii::$app->request->get(), '') && $formModel->perfWebToAsync()) {
+            // Log::adminHandle('第' . $periodNum . '期封生成业绩单');
+            return static::notice('生成业绩单已开始处理,请等待');
+        } else {
+            return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
+        }
+    }
+
+    /**
+     * 结算封期
+     * @return mixed
+     * @throws \yii\web\HttpException
+     */
+    public function actionCalcPeriod() {
+        $periodNum = \Yii::$app->request->get('periodNum');
+        if (!$periodNum) {
+            return static::notice('期数不存在', 400);
+        }
+        $formModel = new PeriodForm();
+        $formModel->scenario = 'calc';
+        if ($formModel->load(Yii::$app->request->get(), '') && $formModel->calcWebToAsync()) {
+            // Log::adminHandle('第' . $periodNum . '期结算');
+            return static::notice('结算已开始处理,请等待');
+        } else {
+            return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
+        }
+    }
+
+    /**
+     * 挂网
+     * @return mixed
+     * @throws \yii\web\HttpException
+     */
+    public function actionSendPeriod() {
+        $periodNum = \Yii::$app->request->get('periodNum');
+        if (!$periodNum) {
+            return static::notice('期数不存在', 400);
+        }
+        $formModel = new PeriodForm();
+        $formModel->scenario = 'send';
+        if ($formModel->load(Yii::$app->request->get(), '') && $formModel->sendWebToAsync()) {
+            // Log::adminHandle('第' . $periodNum . '期挂网');
+            return static::notice('挂网已开始处理,请等待');
+        } else {
+            return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
+        }
+    }
+
+    /**
+     * 查看业绩
+     * @return mixed
+     * @throws \yii\web\HttpException
+     */
+    public function actionPerf() {
+        // 获取当前年月
+        $period = Period::instance();
+        $yearMonth = $period->getNowYearMonth();
+        $yearMonth = Yii::$app->request->get('yearMonth', $yearMonth);
+        //$filter = $this->filterCondition(Perf::tableName(), ['periodNum'=>'P.PERIOD_NUM', 'userName'=>'UI.USER_NAME']);
+        $condition = '';
+        $params = [];
+        $data = PerfPeriod::lists($condition, $params, [
+            'select' => 'P.*, UI.USER_NAME',
+            'yearMonth' => $yearMonth,
+            'from' => PerfPeriod::tableName() . ' AS P',
+            'join' => [
+                ['LEFT JOIN', UserInfo::tableName() . ' AS UI', 'P.USER_ID=UI.USER_ID']
+            ],
+            'orderBy' => 'P.PERIOD_NUM DESC',
+        ]);
+        $data['request'] = [];
+        $data['request']['yearMonth'] = $yearMonth;
+        return static::notice($data);
+    }
+
+    /**
+     * 奖金流水
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionFlowBonus() {
+        $filter = $this->filterCondition([
+            'USER_NAME' => 'U.USER_NAME',
+            'REAL_NAME' => 'U.REAL_NAME',
+            'IS_DEC' => 'U.IS_DEC',
+            'userIds' => 'USER_ID',
+            'CREATED_AT' => 'FB.CREATED_AT',
+            'PERIOD_NUM' => 'PERIOD_NUM',
+            'CALC_MONTH' => 'CALC_MONTH',
+            'DEAL_TYPE_NAME' => 'DEAL_TYPE_ID',
+            'LAST_DEC_LV_NAME' => 'LAST_DEC_LV',
+            'LAST_EMP_LV_NAME' => 'LAST_EMP_LV',
+//            'LAST_STATUS_NAME' => 'LAST_STATUS',
+            'AMOUNT' => 'AMOUNT',
+            'TOTAL' => 'TOTAL',
+            'ADMIN_NAME' => 'ADMIN_NAME',
+            'REMARK' => 'REMARK',
+            'TRANSFER_SN' => 'TRANSFER_SN',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+        $listObj = new FlowBonusList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
+        return static::notice($data);
+    }
+
+    /**
+     * 奖金流水
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionFlowBonusExport() {
+        $filter = $this->filterCondition([
+            'USER_NAME' => 'U.USER_NAME',
+            'REAL_NAME' => 'U.REAL_NAME',
+            'IS_DEC' => 'U.IS_DEC',
+            'userIds' => 'USER_ID',
+            'CREATED_AT' => 'FB.CREATED_AT',
+            'PERIOD_NUM' => 'PERIOD_NUM',
+            'CALC_MONTH' => 'CALC_MONTH',
+            'DEAL_TYPE_NAME' => 'DEAL_TYPE_ID',
+            'LAST_DEC_LV_NAME' => 'LAST_DEC_LV',
+            'LAST_EMP_LV_NAME' => 'LAST_EMP_LV',
+            'LAST_STATUS_NAME' => 'LAST_STATUS',
+            'AMOUNT' => 'AMOUNT',
+            'TOTAL' => 'TOTAL',
+            'ADMIN_NAME' => 'ADMIN_NAME',
+            'REMARK' => 'REMARK',
+            'TRANSFER_SN' => 'TRANSFER_SN',
+        ]);
+        $form = new BonusExportForm();
+        $result = $form->run($filter, '奖金流水');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+    /**
+     * 复消积分流水
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionFlowRp() {
+        $filter = $this->filterCondition([
+            'userIds' => 'USER_ID',
+            'CREATED_AT' => 'CREATED_AT',
+            'PERIOD_NUM' => 'PERIOD_NUM',
+            'CALC_MONTH' => 'CALC_MONTH',
+            'DEAL_TYPE_NAME' => 'DEAL_TYPE_ID',
+            'LAST_DEC_LV_NAME' => 'LAST_DEC_LV',
+            'LAST_EMP_LV_NAME' => 'LAST_EMP_LV',
+            'AMOUNT' => 'AMOUNT',
+            'TOTAL' => 'TOTAL',
+            'ADMIN_NAME' => 'ADMIN_NAME',
+            'REMARK' => 'REMARK',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+        $listObj = new FlowReconsumePointsList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
+        return static::notice($data);
+    }
+
+    /**
+     * 复消积分流水导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionFlowRpExport() {
+        $filter = $this->filterCondition([
+            'userIds' => 'USER_ID',
+            'CREATED_AT' => 'CREATED_AT',
+            'PERIOD_NUM' => 'PERIOD_NUM',
+            'CALC_MONTH' => 'CALC_MONTH',
+            'DEAL_TYPE_NAME' => 'DEAL_TYPE_ID',
+            'LAST_DEC_LV_NAME' => 'LAST_DEC_LV',
+            'LAST_EMP_LV_NAME' => 'LAST_EMP_LV',
+            'AMOUNT' => 'AMOUNT',
+            'TOTAL' => 'TOTAL',
+            'ADMIN_NAME' => 'ADMIN_NAME',
+            'REMARK' => 'REMARK',
+        ]);
+        $form = new BonusExportForm();
+        $result = $form->run($filter, '复消积分流水');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+
+    /**
+     * 会员余额流水 
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionFlowBalance() {
+        $filter = $this->filterCondition([
+            'USER_NAME' => 'USER_NAME',
+            'REAL_NAME' => 'REAL_NAME',
+            'CALC_MONTH' => 'CALC_MONTH',
+            'PERIOD_NUM' => 'PERIOD_NUM',
+            'TRANSFER_SN' => 'TRANSFER_SN',
+            'CREATED_AT' => 'FW.CREATED_AT',
+            'AMOUNT' => 'AMOUNT',
+            'TOTAL' => 'TOTAL',
+            'REMARK' => 'REMARK',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+        $listObj = new FlowBalanceList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
+        return static::notice($data);
+    }
+
+    /**
+     * 会员余额流水导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionFlowBalanceExport() {
+        $filter = $this->filterCondition([
+            'USER_NAME' => 'USER_NAME',
+            'REAL_NAME' => 'REAL_NAME',
+            'CALC_MONTH' => 'CALC_MONTH',
+            'PERIOD_NUM' => 'PERIOD_NUM',
+            'TRANSFER_SN' => 'TRANSFER_SN',
+            'CREATED_AT' => 'FW.CREATED_AT',
+            'AMOUNT' => 'AMOUNT',
+            'TOTAL' => 'TOTAL',
+            'REMARK' => 'REMARK',
+        ]);
+        $form = new BonusExportForm();
+        $result = $form->run($filter, '会员余额流水');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+
+    /**
+     * 兑换点数流水
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionFlowExchange() {
+        $filter = $this->filterCondition([
+            'userIds' => 'USER_ID',
+            'CREATED_AT' => 'CREATED_AT',
+            'PERIOD_NUM' => 'PERIOD_NUM',
+            'CALC_MONTH' => 'CALC_MONTH',
+            'DEAL_TYPE_NAME' => 'DEAL_TYPE_ID',
+            'LAST_DEC_LV_NAME' => 'LAST_DEC_LV',
+            'LAST_EMP_LV_NAME' => 'LAST_EMP_LV',
+            'AMOUNT' => 'AMOUNT',
+            'TOTAL' => 'TOTAL',
+            'ADMIN_NAME' => 'ADMIN_NAME',
+            'REMARK' => 'REMARK',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+        $listObj = new FlowExchangePointsList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
+        return static::notice($data);
+    }
+
+    /**
+     * 兑换点数流水导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionFlowExchangeExport() {
+        $filter = $this->filterCondition([
+            'userIds' => 'USER_ID',
+            'CREATED_AT' => 'CREATED_AT',
+            'PERIOD_NUM' => 'PERIOD_NUM',
+            'CALC_MONTH' => 'CALC_MONTH',
+            'DEAL_TYPE_NAME' => 'DEAL_TYPE_ID',
+            'LAST_DEC_LV_NAME' => 'LAST_DEC_LV',
+            'LAST_EMP_LV_NAME' => 'LAST_EMP_LV',
+            'AMOUNT' => 'AMOUNT',
+            'TOTAL' => 'TOTAL',
+            'ADMIN_NAME' => 'ADMIN_NAME',
+            'REMARK' => 'REMARK',
+        ]);
+        $form = new BonusExportForm();
+        $result = $form->run($filter, '兑换点数流水');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+    /**
+     * 现金钱包流水
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionFlowWallet() {
+        $filter = $this->filterCondition([
+            'USER_NAME' => 'U.USER_NAME',
+            'REAL_NAME' => 'U.REAL_NAME',
+            'IS_DEC' => 'U.IS_DEC',
+            'userIds' => 'USER_ID',
+            'CREATED_AT' => 'CREATED_AT',
+            'PERIOD_NUM' => 'PERIOD_NUM',
+            'CALC_MONTH' => 'CALC_MONTH',
+            'AMOUNT' => 'AMOUNT',
+            'TOTAL' => 'TOTAL',
+            'ADMIN_NAME' => 'ADMIN_NAME',
+            'REMARK' => 'REMARK',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+        $listObj = new FlowWalletList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
+        return static::notice($data);
+    }
+
+    /**
+     * 现金钱包流水导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionFlowWalletExport() {
+        $filter = $this->filterCondition([
+            'USER_NAME' => 'U.USER_NAME',
+            'REAL_NAME' => 'U.REAL_NAME',
+            'IS_DEC' => 'U.IS_DEC',
+            'userIds' => 'USER_ID',
+            'CREATED_AT' => 'CREATED_AT',
+            'PERIOD_NUM' => 'PERIOD_NUM',
+            'CALC_MONTH' => 'CALC_MONTH',
+            'AMOUNT' => 'AMOUNT',
+            'TOTAL' => 'TOTAL',
+            'ADMIN_NAME' => 'ADMIN_NAME',
+            'REMARK' => 'REMARK',
+        ]);
+        $form = new BonusExportForm();
+        $result = $form->run($filter, '现金钱包流水');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+    /**
+     * 车房流水
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionFlowCf() {
+        $filter = $this->filterCondition([
+            'userIds' => 'USER_ID',
+            'CREATED_AT' => 'CREATED_AT',
+            'PERIOD_NUM' => 'PERIOD_NUM',
+            'CALC_MONTH' => 'CALC_MONTH',
+            'DEAL_TYPE_NAME' => 'DEAL_TYPE_ID',
+            'LAST_DEC_LV_NAME' => 'LAST_DEC_LV',
+            'LAST_EMP_LV_NAME' => 'LAST_EMP_LV',
+            'LAST_STATUS_NAME' => 'LAST_STATUS',
+            'AMOUNT' => 'AMOUNT',
+            'TOTAL' => 'TOTAL',
+            'ADMIN_NAME' => 'ADMIN_NAME',
+            'REMARK' => 'REMARK',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+        $listObj = new FlowCfList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
+        return static::notice($data);
+    }
+
+    /**
+     * 车房养老奖流水导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionFlowCfExport() {
+        $filter = $this->filterCondition([
+            'userIds' => 'USER_ID',
+            'CREATED_AT' => 'CREATED_AT',
+            'PERIOD_NUM' => 'PERIOD_NUM',
+            'CALC_MONTH' => 'CALC_MONTH',
+            'DEAL_TYPE_NAME' => 'DEAL_TYPE_ID',
+            'LAST_DEC_LV_NAME' => 'LAST_DEC_LV',
+            'LAST_EMP_LV_NAME' => 'LAST_EMP_LV',
+            'LAST_STATUS_NAME' => 'LAST_STATUS',
+            'AMOUNT' => 'AMOUNT',
+            'TOTAL' => 'TOTAL',
+            'ADMIN_NAME' => 'ADMIN_NAME',
+            'REMARK' => 'REMARK',
+        ]);
+        $form = new BonusExportForm();
+        $result = $form->run($filter, '车房养老奖流水');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+    /**
+     * 领袖分红流水
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionFlowLx() {
+        $filter = $this->filterCondition([
+            'userIds' => 'USER_ID',
+            'CREATED_AT' => 'CREATED_AT',
+            'PERIOD_NUM' => 'PERIOD_NUM',
+            'CALC_MONTH' => 'CALC_MONTH',
+            'DEAL_TYPE_NAME' => 'DEAL_TYPE_ID',
+            'LAST_DEC_LV_NAME' => 'LAST_DEC_LV',
+            'LAST_EMP_LV_NAME' => 'LAST_EMP_LV',
+            'LAST_STATUS_NAME' => 'LAST_STATUS',
+            'AMOUNT' => 'AMOUNT',
+            'TOTAL' => 'TOTAL',
+            'ADMIN_NAME' => 'ADMIN_NAME',
+            'REMARK' => 'REMARK',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+        $listObj = new FlowLxList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
+        return static::notice($data);
+    }
+
+    /**
+     * 导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionFlowLxExport() {
+        $filter = $this->filterCondition([
+            'userIds' => 'USER_ID',
+            'CREATED_AT' => 'CREATED_AT',
+            'PERIOD_NUM' => 'PERIOD_NUM',
+            'CALC_MONTH' => 'CALC_MONTH',
+            'DEAL_TYPE_NAME' => 'DEAL_TYPE_ID',
+            'LAST_DEC_LV_NAME' => 'LAST_DEC_LV',
+            'LAST_EMP_LV_NAME' => 'LAST_EMP_LV',
+            'LAST_STATUS_NAME' => 'LAST_STATUS',
+            'AMOUNT' => 'AMOUNT',
+            'TOTAL' => 'TOTAL',
+            'ADMIN_NAME' => 'ADMIN_NAME',
+            'REMARK' => 'REMARK',
+        ]);
+        $form = new BonusExportForm();
+        $result = $form->run($filter, '领袖分红奖流水');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+    /**
+     * 车房养老奖和领袖分红年度发放审核列表
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionCfLxAuditList() {
+        $filter = $this->filterCondition([
+            'userIds' => 'CFLXA.USER_ID',
+            'CF' => 'CFLXA.CF',
+            'LX' => 'CFLXA.LX',
+            'CREATE_ADMIN_NAME' => 'ADM.ADMIN_NAME',
+            'CREATED_AT' => 'CFLXA.CREATED_AT',
+            'AUDIT_ADMIN_NAME' => 'ADMA.ADMIN_NAME',
+            'AUDITED_AT' => 'CFLXA.AUDITED_AT',
+            'CREATE_REMARK' => 'CFLXA.CREATE_REMARK',
+            'filterStatus' => 'CFLXA.AUDIT_STATUS',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+        $listObj = new CfLxAuditList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
+        return static::notice($data);
+    }
+
+    /**
+     * 车房养老奖和领袖分红年度发放审核导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionCfLxAuditExport() {
+        $filter = $this->filterCondition([
+            'userIds' => 'CFLXA.USER_ID',
+            'CF' => 'CFLXA.CF',
+            'LX' => 'CFLXA.LX',
+            'CREATE_ADMIN_NAME' => 'ADM.ADMIN_NAME',
+            'CREATED_AT' => 'CFLXA.CREATED_AT',
+            'AUDIT_ADMIN_NAME' => 'ADMA.ADMIN_NAME',
+            'AUDITED_AT' => 'CFLXA.AUDITED_AT',
+            'CREATE_REMARK' => 'CFLXA.CREATE_REMARK',
+            'filterStatus' => 'CFLXA.AUDIT_STATUS',
+        ]);
+        $form = new BonusExportForm();
+        $result = $form->run($filter, '年度奖金发放审核');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+    /**
+     * 申请发放车房养老奖和领袖分红
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionCfLxApply() {
+        if (Yii::$app->request->isPost) {
+            $formModel = new SendCFAndLXForm();
+            $formModel->scenario = 'apply';
+            if ($formModel->load(Yii::$app->request->post(), '') && $result = $formModel->apply()) {
+                if(!empty($result['logs'])){
+                    return static::notice('申请成功,请在年度奖管理中审核');
+                }else{
+                    return static::notice('申请失败,无符合发放条件会员',400);
+                }
+            } else {
+                return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
+            }
+        }
+        return static::notice('非法请求', 400);
+    }
+
+    /**
+     * 审核车房养老奖和领袖分红
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionCfLxAudit() {
+        $formModel = new SendCFAndLXForm();
+        $formModel->scenario = 'audit';
+        if ($formModel->load(Yii::$app->request->post(), '') && $result = $formModel->audit()) {
+            return static::notice('审核年度奖申请完成');
+        }
+        return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
+    }
+
+    /**
+     * 删除车房领袖审核信息
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionCfLxAuditDelete() {
+        $sendCFAndLXForm = new SendCFAndLXForm();
+        $result = static::delete(CFLXAudit::class, function ($selected) use ($sendCFAndLXForm) {
+            $sendCFAndLXForm->beforeDelete($selected);
+            // Log::adminHandle('删除审核会员余额信息');
+        }, function ($selected) use ($sendCFAndLXForm) {
+            $sendCFAndLXForm->delete($selected);
+            // Log::adminHandle('删除审核会员余额信息');
+        }, true);
+        return $result;
+    }
+
+    /**
+     * 查看所传期数的各项奖金
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionPeriodDetail() {
+        $periodNum = \Yii::$app->request->get('periodNum');
+        $period = Period::instance();
+        $periodInfo = $period->setPeriodNum($periodNum);
+        $yearMonth = $period->getYearMonth($periodNum);
+//        $filter = $this->filterCondition('UT', [
+//            'userName' => 'UI.USER_NAME',
+//        ]);
+        $condition = '';
+        $params = [];
+        $condition .= ' AND C.PERIOD_NUM=:PERIOD_NUM';
+        $params[':PERIOD_NUM'] = $periodNum;
+        if (!$period->isClosed($periodNum)) {
+            return static::notice('该期不能查看');
+        }
+        $data = CalcBonus::lists($condition, $params, [
+            'yearMonth' => $yearMonth,
+            'select' => 'C.*,UI.USER_NAME',
+            'from' => CalcBonus::tableName() . ' AS C',
+            'join' => [
+                ['LEFT JOIN', UserInfo::tableName() . ' AS UI', 'C.USER_ID=UI.USER_ID'],
+            ],
+            'orderBy' => 'C.CREATED_AT DESC',
+        ]);
+        $data['periodInfo'] = $periodInfo;
+        return static::notice($data);
+    }
+
+    /**
+     * 获取最新一期结算的奖金
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionNewPeriodBonus() {
+        $periodNum = Period::calculatedMaxPeriodNum();
+        $data = $this->_periodBonus($periodNum);
+        return static::notice($data);
+    }
+
+    /**
+     * 最新一期奖金导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionNewPeriodBonusExport() {
+        $filter = $this->filterCondition([
+            'LAST_USER_NAME' => 'CB.LAST_USER_NAME',
+            'LAST_REAL_NAME' => 'CB.LAST_REAL_NAME',
+            'LAST_DEC_LV_NAME' => 'CB.LAST_DEC_LV',
+            'LAST_EMP_LV_NAME' => 'CB.LAST_EMP_LV',
+            'LAST_MOBILE' => 'CB.LAST_MOBILE',
+            'LAST_PERIOD_AT' => 'CB.LAST_PERIOD_AT',
+            'LAST_CREATED_AT' => 'CB.LAST_CREATED_AT',
+            'LAST_REC_USER_NAME' => 'CB.LAST_REC_USER_NAME',
+            'LAST_REC_REAL_NAME' => 'CB.LAST_REC_REAL_NAME',
+            'LAST_CON_USER_NAME' => 'CB.LAST_CON_USER_NAME',
+            'LAST_CON_REAL_NAME' => 'CB.LAST_CON_REAL_NAME',
+            'BONUS_BD' => 'CB.BONUS_BD',
+            'BONUS_TG' => 'CB.BONUS_TG',
+            'BONUS_YJ' => 'CB.BONUS_YJ',
+            'BONUS_GX' => 'CB.BONUS_GX',
+            // 'BONUS_GL' => 'CB.BONUS_BS',
+            'BONUS_GL' => 'CB.BONUS_GL',
+            'BONUS_QY' => 'CB.BONUS_QY',
+            'BONUS_YC' => 'CB.BONUS_YC',
+            'PV_1L' => 'CB.PV_1L',
+            'SURPLUS_1L' => 'CB.SURPLUS_1L',
+            'PV_2L' => 'CB.PV_2L',
+            'SURPLUS_2L' => 'CB.SURPLUS_2L',
+            'PV_3L' => 'CB.PV_3L',
+            'SURPLUS_3L' => 'CB.SURPLUS_3L',
+            'CALCULATED_AT' => 'CB.CALCULATED_AT',
+            'CALC_MONTH' => 'CB.CALC_MONTH',
+            'BONUS_QY_MONTH' => 'CB.BONUS_QY_MONTH',
+        ]);
+        $periodNum = Period::calculatedMaxPeriodNum();
+        $period = Period::instance();
+        $yearMonth = $period->getYearMonth($periodNum);
+        $filter['condition'] .= ' AND PERIOD_NUM=:PERIOD_NUM';
+        $filter['params'][':PERIOD_NUM'] = $periodNum;
+        $form = new BonusExportForm();
+        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth]]), '最新奖金');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+    /**
+     * 获取往期已结算的奖金
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionOtherPeriodBonus() {
+        $periodNumRequest = \Yii::$app->request->get('periodNum');
+        if(!$periodNumRequest){
+            $periodNum = Period::calculatedMaxPeriodNum();
+            //return static::notice('请填写期数',400);
+        }else{
+            $periodNum = explode(",", $periodNumRequest)[1];
+        }
+        $data = $this->_periodBonus($periodNum,false);
+        if( isset($data['filterTypes']) && is_array($data['filterTypes']) ) {
+            $data['filterTypes'] = array_merge(['periodNum'=>['isUserTable'=> false, 'name'=> '结算期数']], $data['filterTypes']);
+        }
+
+        return static::notice($data);
+    }
+
+    /**
+     * 往期奖金导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionOtherPeriodBonusExport() {
+        $filter = $this->filterCondition([
+            'periodNum' => 'CB.PERIOD_NUM',
+            'LAST_USER_NAME' => 'CB.LAST_USER_NAME',
+            'LAST_REAL_NAME' => 'CB.LAST_REAL_NAME',
+            'LAST_DEC_LV_NAME' => 'CB.LAST_DEC_LV',
+            'LAST_EMP_LV_NAME' => 'CB.LAST_EMP_LV',
+            'LAST_MOBILE' => 'CB.LAST_MOBILE',
+            'LAST_PERIOD_AT' => 'CB.LAST_PERIOD_AT',
+            'LAST_CREATED_AT' => 'CB.LAST_CREATED_AT',
+            'LAST_REC_USER_NAME' => 'CB.LAST_REC_USER_NAME',
+            'LAST_REC_REAL_NAME' => 'CB.LAST_REC_REAL_NAME',
+            'LAST_CON_USER_NAME' => 'CB.LAST_CON_USER_NAME',
+            'LAST_CON_REAL_NAME' => 'CB.LAST_CON_REAL_NAME',
+            'BONUS_BD' => 'CB.BONUS_BD',
+            'BONUS_TG' => 'CB.BONUS_TG',
+            'BONUS_YJ' => 'CB.BONUS_YJ',
+            'BONUS_GX' => 'CB.BONUS_GX',
+            'BONUS_GL' => 'CB.BONUS_GL',
+            // 'BONUS_GL' => 'CB.BONUS_BS',
+            'BONUS_QY' => 'CB.BONUS_QY',
+            'BONUS_YC' => 'CB.BONUS_YC',
+            'PV_1L' => 'CB.PV_1L',
+            'SURPLUS_1L' => 'CB.SURPLUS_1L',
+            'PV_2L' => 'CB.PV_2L',
+            'SURPLUS_2L' => 'CB.SURPLUS_2L',
+            'PV_3L' => 'CB.PV_3L',
+            'SURPLUS_3L' => 'CB.SURPLUS_3L',
+            'CALCULATED_AT' => 'CB.CALCULATED_AT',
+            'CALC_MONTH' => 'CB.CALC_MONTH',
+            'BONUS_QY_MONTH' => 'CB.BONUS_QY_MONTH',
+        ]);
+        $periodNumRequest = \Yii::$app->request->get('periodNum');
+        if(!$periodNumRequest){
+            $periodNum = Period::calculatedMaxPeriodNum();
+        }else{
+            $periodNum = explode(",", $periodNumRequest)[1];
+        }
+//        if(!isset($filter['params'][':PERIODNUM'])){
+//            return static::notice('请填写期数',400);
+//        }
+//        $periodNum = $filter['params'][':PERIODNUM'];
+        $period = Period::instance();
+        $yearMonth = $period->getYearMonth($periodNum);
+//        $filter['condition'] .= ' AND CB.PERIOD_NUM=:PERIOD_NUM';
+//        $filter['params'][':PERIOD_NUM'] = $periodNum;
+        $form = new BonusExportForm();
+        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth]]), '往期奖金');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+    /**
+     * 获取筛选类型
+     * @return mixed
+     * @throws \yii\web\HttpException
+     */
+    public function actionOtherPeriodBonusFilterTypes(){
+        $listObj = new PeriodBonusList();
+        $filterTypes = $listObj->getFilterTypes();
+        $filterTypes = array_merge(['periodNum'=>['isUserTable'=> false, 'name'=> '结算期数']], $filterTypes);
+        return static::notice($filterTypes);
+    }
+
+    /**
+     * 期数对应的奖金
+     * @param $periodNum
+     * @param $periodFilter
+     * @return array
+     * @throws \yii\base\Exception
+     * @throws \yii\db\Exception
+     */
+    private function _periodBonus($periodNum,$periodFilter = true) {
+        $filter = $this->filterCondition([
+            'periodNum' => 'CB.PERIOD_NUM',
+            'LAST_USER_NAME' => 'CB.LAST_USER_NAME',
+            'LAST_REAL_NAME' => 'CB.LAST_REAL_NAME',
+            'LAST_DEC_LV_NAME' => 'CB.LAST_DEC_LV',
+            'LAST_EMP_LV_NAME' => 'CB.LAST_EMP_LV',
+            'LAST_MOBILE' => 'CB.LAST_MOBILE',
+            'LAST_PERIOD_AT' => 'CB.LAST_PERIOD_AT',
+            'LAST_CREATED_AT' => 'CB.LAST_CREATED_AT',
+            'LAST_REC_USER_NAME' => 'CB.LAST_REC_USER_NAME',
+            'LAST_REC_REAL_NAME' => 'CB.LAST_REC_REAL_NAME',
+            'LAST_CON_USER_NAME' => 'CB.LAST_CON_USER_NAME',
+            'LAST_CON_REAL_NAME' => 'CB.LAST_CON_REAL_NAME',
+            'BONUS_BD' => 'CB.BONUS_BD',
+            'BONUS_TG' => 'CB.BONUS_TG',
+            'BONUS_XF' => 'CB.BONUS_XF',
+            'BONUS_YJ' => 'CB.BONUS_YJ',
+            'BONUS_GX' => 'CB.BONUS_GX',
+            'BONUS_GL' => 'CB.BONUS_GL',
+            // 'BONUS_GL' => 'CB.BONUS_BS',
+            'BONUS_QY' => 'CB.BONUS_QY',
+            'BONUS_YC' => 'CB.BONUS_YC',
+            'ORI_BONUS_STANDARD' => 'CB.ORI_BONUS_STANDARD',
+            'PV_1L' => 'CB.PV_1L',
+            'SURPLUS_1L' => 'CB.SURPLUS_1L',
+            'PV_2L' => 'CB.PV_2L',
+            'SURPLUS_2L' => 'CB.SURPLUS_2L',
+            'PV_3L' => 'CB.PV_3L',
+            'SURPLUS_3L' => 'CB.SURPLUS_3L',
+            'CALCULATED_AT' => 'CB.CALCULATED_AT',
+            'CALC_MONTH' => 'CB.CALC_MONTH',
+            'BONUS_QY_MONTH' => 'CB.BONUS_QY_MONTH',
+        ]);
+        $period = Period::instance();
+        $yearMonth = $period->getYearMonth($periodNum);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+        if($periodFilter){
+            $condition .= ' AND CB.PERIOD_NUM=:PERIOD_NUM';
+            $params[':PERIOD_NUM'] = $periodNum;
+        }
+        $listObj = new PeriodBonusList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params, 'others'=>['yearMonth'=>$yearMonth]]);
+        return $data;
+    }
+
+    /**
+     * 团队奖奖金向下追溯
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceDownQy() {
+        $periodNum = Yii::$app->request->get('periodNum');
+        if (!$periodNum) return static::notice('请填写期数', 400);
+        $userName = Yii::$app->request->get('userName');
+        if (!$userName) return static::notice('请填写会员编号', 400);
+        $period = Period::instance();
+        if (!$period->isCalculated($periodNum)) {
+            return static::notice([]);
+        }
+        $yearMonth = $period->getYearMonth($periodNum);
+
+        $filter = $this->filterCondition([
+            'decType' => 'PO.DEC_TYPE',
+            'periodNum' => 'PO.PERIOD_NUM',
+        ]);
+        $qyFilter = $this->_qyFilterCondition($filter['request']);
+        $filter = array_merge($filter, $qyFilter);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+        $listObj = new TraceDownQyList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params, 'others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]);
+        return static::notice($data);
+    }
+
+    /**
+     * 获取
+     * @param $request
+     * @return array|string[]
+     */
+    private function _qyFilterCondition($request) {
+        //根据USER_NAME获取USER_ID
+        $user = User::find()->select('ID')->where('USER_NAME=:USER_NAME', ['USER_NAME'=>$request['userName']])->asArray()->one();
+        if( !$user ) return [];
+
+        //找到这个会员的LOCATION_TAG
+        $userNetwork = UserNetwork::find()->select(['LOCATION_TAG'])->where('USER_ID=:USER_ID', ['USER_ID'=>$user['ID']])->asArray()->one();
+        $searchLocationTag = $userNetwork['LOCATION_TAG'];
+        if( isset($request['location']) && $request['location'] ) {
+            $searchLocationTag .= $request['location'];
+        }
+
+        return [
+            'LOCATION_TAG' => 'LIKE ' . $searchLocationTag . '%'
+        ];
+    }
+
+    /**
+     * 团队奖向下追溯导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceDownQyExport() {
+        $periodNum = Yii::$app->request->get('periodNum');
+        if (!$periodNum) return static::notice('请填写期数', 400);
+        $userName = Yii::$app->request->get('userName');
+        if (!$userName) return static::notice('请填写会员编号', 400);
+        $period = Period::instance();
+        if (!$period->isCalculated($periodNum)) {
+            return static::notice([]);
+        }
+        $yearMonth = $period->getYearMonth($periodNum);
+        $filter = $this->filterCondition([
+            'decType' => 'PO.DEC_TYPE',
+            'periodNum' => 'PO.PERIOD_NUM',
+        ]);
+        $qyFilter = $this->_qyFilterCondition($filter['request']);
+        $filter = array_merge($filter, $qyFilter);
+
+        $form = new BonusExportForm();
+        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]), '团队奖向下追溯');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+    /**
+     * 团队奖向上追溯
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceUpQy() {
+        $periodNum = Yii::$app->request->get('periodNum');
+        if (!$periodNum) return static::notice('请填写期数', 400);
+        if (!$userName = Yii::$app->request->get('userName')) return static::notice('请填写会员编号', 400);
+        if(!$userId = Info::getUserIdByUserName($userName))  return static::notice('会员不存在', 400);
+        //会员是否有业绩单
+        if(!PerfOrder::find()->where('USER_ID=:USER_ID AND PERIOD_NUM=:PERIOD_NUM',[':USER_ID'=>$userId,':PERIOD_NUM'=>$periodNum])->exists()){
+            return static::notice('该会员本期没有业绩单', 400);
+        }
+        $listObj = new TraceUpQyList();
+        $data = $listObj->getList(['condition'=>'', 'params'=>[], 'others'=>['userId'=>$userId, 'periodNum'=>$periodNum]]);
+        return static::notice($data);
+    }
+
+    /**
+     * 团队奖向上追溯导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceUpQyExport() {
+        $periodNum = Yii::$app->request->get('periodNum');
+        if (!$periodNum) return static::notice('请填写期数', 400);
+        if (!$userName = Yii::$app->request->get('userName')) return static::notice('请填写会员编号', 400);
+        if(!$userId = Info::getUserIdByUserName($userName))  return static::notice('会员不存在', 400);
+        //会员是否有业绩单
+        if(!PerfOrder::find()->where('USER_ID=:USER_ID AND PERIOD_NUM=:PERIOD_NUM',[':USER_ID'=>$userId,':PERIOD_NUM'=>$periodNum])->exists()){
+            return static::notice('该会员本期没有业绩单', 400);
+        }
+        $form = new BonusExportForm();
+        $result = $form->run(array_merge(['condition'=>'', 'params'=>[]], ['others'=>['userId'=>$userId, 'periodNum'=>$periodNum]]), '团队奖向上追溯');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+    /**
+     * 荣衔奖向下追溯
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceDownYc() {
+        $periodNum = Yii::$app->request->get('periodNum');
+        if (!$periodNum) return static::notice([]);
+        $period = Period::instance();
+        $yearMonth = $period->getYearMonth($periodNum);
+
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+            'periodNum' => 'CBY.PERIOD_NUM',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+
+        $listObj = new TraceDownYcList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params, 'others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]);
+
+        return static::notice($data);
+    }
+
+    /**
+     * 荣衔奖向下追溯导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceDownYcExport() {
+        $periodNum = Yii::$app->request->get('periodNum');
+        if (!$periodNum) return static::notice([]);
+        $period = Period::instance();
+        $yearMonth = $period->getYearMonth($periodNum);
+
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+            'periodNum' => 'CBY.PERIOD_NUM',
+        ]);
+        $form = new BonusExportForm();
+        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]), '荣衔奖向下追溯');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+    /**
+     * 服务奖向下追溯
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceDownBd() {
+        $periodNum = Yii::$app->request->get('periodNum');
+        if (!$periodNum) return static::notice([]);
+        $period = Period::instance();
+        $yearMonth = $period->getYearMonth($periodNum);
+
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+            'periodNum' => 'CBB.PERIOD_NUM',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+
+        $listObj = new TraceDownBdList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params, 'others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]);
+
+        return static::notice($data);
+    }
+
+    /**
+     * 服务奖向下追溯导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceDownBdExport() {
+        $periodNum = Yii::$app->request->get('periodNum');
+        if (!$periodNum) return static::notice([]);
+        $period = Period::instance();
+        $yearMonth = $period->getYearMonth($periodNum);
+
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+            'periodNum' => 'CBB.PERIOD_NUM',
+        ]);
+        $form = new BonusExportForm();
+        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]), '服务奖向下追溯');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+
+    /**
+     * 推广奖向下追溯
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceDownTg() {
+        $periodNum = Yii::$app->request->get('periodNum');
+        if (!$periodNum) return static::notice([]);
+        $period = Period::instance();
+        $yearMonth = $period->getYearMonth($periodNum);
+
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+            'periodNum' => 'CTG.PERIOD_NUM',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+
+        $listObj = new TraceDownTgList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params, 'others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]);
+
+        return static::notice($data);
+    }
+
+    /**
+     * 推广奖向下追溯导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceDownTgExport() {
+        $periodNum = Yii::$app->request->get('periodNum');
+        if (!$periodNum) return static::notice([]);
+        $period = Period::instance();
+        $yearMonth = $period->getYearMonth($periodNum);
+
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+            'periodNum' => 'CTG.PERIOD_NUM',
+        ]);
+        $form = new BonusExportForm();
+        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]), '推广奖向下追溯');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+    /**
+     * 消费奖向下追溯
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceDownXf() {
+        $periodNum = Yii::$app->request->get('periodNum');
+        if (!$periodNum) return static::notice([]);
+        $period = Period::instance();
+        $yearMonth = $period->getYearMonth($periodNum);
+
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+            'periodNum' => 'CXF.PERIOD_NUM',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+
+        $listObj = new TraceDownXfList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params, 'others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]);
+
+        return static::notice($data);
+    }
+
+    /**
+     * 消费奖向下追溯导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceDownXfExport() {
+        $periodNum = Yii::$app->request->get('periodNum');
+        if (!$periodNum) return static::notice([]);
+        $period = Period::instance();
+        $yearMonth = $period->getYearMonth($periodNum);
+
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+            'periodNum' => 'CXF.PERIOD_NUM',
+        ]);
+        $form = new BonusExportForm();
+        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]), '推广奖向下追溯');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+    /**
+     * 业绩奖向下追溯
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceDownYj() {
+        $periodNum = Yii::$app->request->get('periodNum');
+        if (!$periodNum) return static::notice([]);
+        $period = Period::instance();
+        $yearMonth = $period->getYearMonth($periodNum);
+
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+            'periodNum' => 'CYJ.PERIOD_NUM',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+
+        $listObj = new TraceDownYjList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params, 'others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]);
+
+        return static::notice($data);
+    }
+
+    /**
+     * 业绩奖向下追溯导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceDownYjExport() {
+        $periodNum = Yii::$app->request->get('periodNum');
+        if (!$periodNum) return static::notice([]);
+        $period = Period::instance();
+        $yearMonth = $period->getYearMonth($periodNum);
+
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+            'periodNum' => 'CYJ.PERIOD_NUM',
+        ]);
+        $form = new BonusExportForm();
+        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]), '业绩奖向下追溯');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+    /**
+     * 共享奖向下追溯
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceDownGx() {
+        $periodNum = Yii::$app->request->get('periodNum');
+        if (!$periodNum) return static::notice([]);
+        $period = Period::instance();
+        $yearMonth = $period->getYearMonth($periodNum);
+
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+            'periodNum' => 'CGX.PERIOD_NUM',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+
+        $listObj = new TraceDownGxList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params, 'others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]);
+
+        return static::notice($data);
+    }
+
+    /**
+     * 共享奖向下追溯导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceDownGxExport() {
+        $periodNum = Yii::$app->request->get('periodNum');
+        if (!$periodNum) return static::notice([]);
+        $period = Period::instance();
+        $yearMonth = $period->getYearMonth($periodNum);
+
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+            'periodNum' => 'CGX.PERIOD_NUM',
+        ]);
+        $form = new BonusExportForm();
+        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]), '共享奖向下追溯');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+    /**
+     * 管理奖向下追溯
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceDownGl() {
+        $periodNum = Yii::$app->request->get('periodNum');
+        if (!$periodNum) return static::notice([]);
+        $period = Period::instance();
+        $yearMonth = $period->getYearMonth($periodNum);
+
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+            'periodNum' => 'CGL.PERIOD_NUM',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+
+        $listObj = new TraceDownGlList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params, 'others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]);
+
+        return static::notice($data);
+    }
+
+    /**
+     * 管理奖向下追溯导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceDownGlExport() {
+        $periodNum = Yii::$app->request->get('periodNum');
+        if (!$periodNum) return static::notice([]);
+        $period = Period::instance();
+        $yearMonth = $period->getYearMonth($periodNum);
+
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+            'periodNum' => 'CGL.PERIOD_NUM',
+        ]);
+        $form = new BonusExportForm();
+        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]), '管理奖向下追溯');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+    /**
+     * 荣衔奖向上追溯
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceUpYc() {
+        $periodNum = Yii::$app->request->get('periodNum');
+        if (!$periodNum) return static::notice([]);
+        $period = Period::instance();
+        $yearMonth = $period->getYearMonth($periodNum);
+
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+            'periodNum' => 'CBY.PERIOD_NUM',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+
+        $listObj = new TraceUpYcList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params, 'others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]);
+
+        return static::notice($data);
+    }
+
+    /**
+     * 荣衔奖向上追溯导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceUpYcExport() {
+        $periodNum = Yii::$app->request->get('periodNum');
+        if (!$periodNum) return static::notice([]);
+        $period = Period::instance();
+        $yearMonth = $period->getYearMonth($periodNum);
+
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+            'periodNum' => 'CBY.PERIOD_NUM',
+        ]);
+        $form = new BonusExportForm();
+        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]), '荣衔奖向上追溯');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+
+    /**
+     * 服务奖向上追溯
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceUpBd() {
+        $periodNum = Yii::$app->request->get('periodNum');
+        if (!$periodNum) return static::notice([]);
+        $period = Period::instance();
+        $yearMonth = $period->getYearMonth($periodNum);
+
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+            'periodNum' => 'CBB.PERIOD_NUM',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+
+        $listObj = new TraceUpBdList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params, 'others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]);
+
+        return static::notice($data);
+    }
+
+    /**
+     * 服务奖向上追溯导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceUpBdExport() {
+        $periodNum = Yii::$app->request->get('periodNum');
+        if (!$periodNum) return static::notice([]);
+        $period = Period::instance();
+        $yearMonth = $period->getYearMonth($periodNum);
+
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+            'periodNum' => 'CBY.PERIOD_NUM',
+        ]);
+        $form = new BonusExportForm();
+        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]), '荣衔奖向上追溯');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+    /**
+     * 推广奖向上追溯
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceUpTg() {
+        $periodNum = Yii::$app->request->get('periodNum');
+        if (!$periodNum) return static::notice([]);
+        $period = Period::instance();
+        $yearMonth = $period->getYearMonth($periodNum);
+
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+            'periodNum' => 'CTG.PERIOD_NUM',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+
+        $listObj = new TraceUpTgList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params, 'others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]);
+
+        return static::notice($data);
+    }
+
+    /**
+     * 推广奖向上追溯导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceUpTgExport() {
+        $periodNum = Yii::$app->request->get('periodNum');
+        if (!$periodNum) return static::notice([]);
+        $period = Period::instance();
+        $yearMonth = $period->getYearMonth($periodNum);
+
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+            'periodNum' => 'CTG.PERIOD_NUM',
+        ]);
+        $form = new BonusExportForm();
+        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]), '荣衔奖向上追溯');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+    /**
+     * 消费奖向上追溯
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceUpXf() {
+        $periodNum = Yii::$app->request->get('periodNum');
+        if (!$periodNum) return static::notice([]);
+        $period = Period::instance();
+        $yearMonth = $period->getYearMonth($periodNum);
+
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+            'periodNum' => 'CXF.PERIOD_NUM',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+
+        $listObj = new TraceUpXfList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params, 'others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]);
+
+        return static::notice($data);
+    }
+
+    /**
+     * 推广奖向上追溯导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceUpXfExport() {
+        $periodNum = Yii::$app->request->get('periodNum');
+        if (!$periodNum) return static::notice([]);
+        $period = Period::instance();
+        $yearMonth = $period->getYearMonth($periodNum);
+
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+            'periodNum' => 'CXF.PERIOD_NUM',
+        ]);
+        $form = new BonusExportForm();
+        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]), '荣衔奖向上追溯');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+    /**
+     * 业绩奖向上追溯
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceUpYj() {
+        $periodNum = Yii::$app->request->get('periodNum');
+        if (!$periodNum) return static::notice([]);
+        $period = Period::instance();
+        $yearMonth = $period->getYearMonth($periodNum);
+
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+            'periodNum' => 'CYJ.PERIOD_NUM',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+
+        $listObj = new TraceUpYjList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params, 'others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]);
+
+        return static::notice($data);
+    }
+
+    /**
+     * 业绩奖向上追溯导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceUpYjExport() {
+        $periodNum = Yii::$app->request->get('periodNum');
+        if (!$periodNum) return static::notice([]);
+        $period = Period::instance();
+        $yearMonth = $period->getYearMonth($periodNum);
+
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+            'periodNum' => 'CYJ.PERIOD_NUM',
+        ]);
+        $form = new BonusExportForm();
+        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]), '荣衔奖向上追溯');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+    /**
+     * 共享奖向上追溯
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceUpGx() {
+        $periodNum = Yii::$app->request->get('periodNum');
+        if (!$periodNum) return static::notice([]);
+        $period = Period::instance();
+        $yearMonth = $period->getYearMonth($periodNum);
+
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+            'periodNum' => 'CGX.PERIOD_NUM',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+
+        $listObj = new TraceUpGxList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params, 'others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]);
+
+        return static::notice($data);
+    }
+
+    /**
+     * 共享奖向上追溯导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceUpGxExport() {
+        $periodNum = Yii::$app->request->get('periodNum');
+        if (!$periodNum) return static::notice([]);
+        $period = Period::instance();
+        $yearMonth = $period->getYearMonth($periodNum);
+
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+            'periodNum' => 'CGX.PERIOD_NUM',
+        ]);
+        $form = new BonusExportForm();
+        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]), '荣衔奖向上追溯');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+    /**
+     * 管理奖向上追溯
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceUpGl() {
+        $periodNum = Yii::$app->request->get('periodNum');
+        if (!$periodNum) return static::notice([]);
+        $period = Period::instance();
+        $yearMonth = $period->getYearMonth($periodNum);
+
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+            'periodNum' => 'CGL.PERIOD_NUM',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+
+        $listObj = new TraceUpGlList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params, 'others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]);
+
+        return static::notice($data);
+    }
+
+    /**
+     * 管理奖向上追溯导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceUpGlExport() {
+        $periodNum = Yii::$app->request->get('periodNum');
+        if (!$periodNum) return static::notice([]);
+        $period = Period::instance();
+        $yearMonth = $period->getYearMonth($periodNum);
+
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+            'periodNum' => 'CGL.PERIOD_NUM',
+        ]);
+        $form = new BonusExportForm();
+        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]), '荣衔奖向上追溯');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+
+    /**
+     * 复销奖向下追溯
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceDownFx() {
+        $periodNum = Yii::$app->request->get('periodNum');
+        if (!$periodNum) return static::notice([]);
+        $period = Period::instance();
+        $yearMonth = $period->getYearMonth($periodNum);
+
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+            'periodNum' => 'CBF.PERIOD_NUM',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+
+        $listObj = new TraceDownFxList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params, 'others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]);
+
+        return static::notice($data);
+    }
+
+    /**
+     * 复销奖向下追溯导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceDownFxExport() {
+        $periodNum = Yii::$app->request->get('periodNum');
+        if (!$periodNum) return static::notice([]);
+        $period = Period::instance();
+        $yearMonth = $period->getYearMonth($periodNum);
+
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+            'periodNum' => 'CBF.PERIOD_NUM',
+        ]);
+        $form = new BonusExportForm();
+        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]), '复销奖向下追溯');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+    /**
+     * 复销奖向上追溯
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceUpFx() {
+        $periodNum = Yii::$app->request->get('periodNum');
+        if (!$periodNum) return static::notice([]);
+        $period = Period::instance();
+        $yearMonth = $period->getYearMonth($periodNum);
+
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+            'periodNum' => 'CBF.PERIOD_NUM',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+
+        $listObj = new TraceUpFxList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params, 'others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]);
+
+        return static::notice($data);
+    }
+
+    /**
+     * 复销奖向上追溯导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceUpFxExport() {
+        $periodNum = Yii::$app->request->get('periodNum');
+        if (!$periodNum) return static::notice([]);
+        $period = Period::instance();
+        $yearMonth = $period->getYearMonth($periodNum);
+
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+            'periodNum' => 'CBF.PERIOD_NUM',
+        ]);
+        $form = new BonusExportForm();
+        $result = $form->run(array_merge($filter, ['others'=>['yearMonth'=>$yearMonth, 'periodNum'=>$periodNum]]), '复销奖向上追溯');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+    /**
+     * 核算会员区域津贴
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionCalcQy() {
+        $periodNum = Yii::$app->request->get('periodNum');
+        $userName = Yii::$app->request->get('userName');
+        $period = Period::instance();
+        $yearMonth = $period->getYearMonth($periodNum);
+        if (!$userId = Info::getUserIdByUserName($userName)) {
+            return static::notice('会员不存在', 400);
+        }
+        $data = CalcBonus::findUseSlaves()->yearMonth($yearMonth)->where('PERIOD_NUM=:PERIOD_NUM AND USER_ID=:USER_ID', [':PERIOD_NUM' => $periodNum, ':USER_ID' => $userId])->asArray()->one();
+        if ($data) {
+            $data['REAL_NAME'] = Info::getUserRealNameByUserId($userId);
+            $data['LAST_DEC_LV_NAME'] = Cache::getDecLevelConfig()[$data['LAST_DEC_LV']]['LEVEL_NAME']??'';
+            $data['LAST_EMP_LV_NAME'] = Cache::getEmpLevelConfig()[$data['LAST_EMP_LV']]['LEVEL_NAME']??'';
+            $data['LAST_STATUS_NAME'] = \Yii::$app->params['userStatus'][$data['LAST_STATUS']]['label']??'';
+            $data['AUDIT_STATUS'] = false;
+            if ($resendQy = ResendQYAudit::find()->where('USER_ID=:USER_ID AND PERIOD_NUM=:PERIOD_NUM AND (AUDIT_STATUS=:AUDIT_STATUS_UN OR AUDIT_STATUS=:AUDIT_STATUS_TRUE)', [':USER_ID' => $userId, ':PERIOD_NUM' => $periodNum, ':AUDIT_STATUS_UN' => \Yii::$app->params['auditStatus']['un']['value'], ':AUDIT_STATUS_TRUE' => \Yii::$app->params['auditStatus']['true']['value']])->asArray()->one()) {
+                $data['AUDIT_STATUS'] = $resendQy['AUDIT_STATUS'];
+            }
+        }
+        return static::notice($data);
+    }
+
+    /**
+     * 补发区域津贴列表
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionResendQyList() {
+        $filter = $this->filterCondition([
+            'userIds' => 'USER_ID',
+            'filterStatus' => 'RESEND_STATUS',
+            'PERIOD_NUM' => 'PERIOD_NUM',
+            'LAST_DEC_LV_NAME' => 'LAST_DEC_LV',
+            'LAST_EMP_LV_NAME' => 'LAST_EMP_LV',
+            'LAST_STATUS_NAME' => 'LAST_STATUS',
+            'LAST_SUB_COM_NAME' => 'LAST_SUB_COM_ID',
+            'LAST_AREA_NAME' => [
+                'FIELD' => ['LAST_PROVINCE', 'LAST_CITY', 'LAST_COUNTY'],
+                'BIND' => ['LAST_PROVINCE', 'LAST_CITY', 'LAST_COUNTY'],
+            ],
+            'LAST_SYSTEM_NAME' => 'LAST_SYSTEM_ID',
+            'BONUS_QY' => 'BONUS_QY',
+            'SHOULD_QY' => 'SHOULD_QY',
+            'QY_1L' => 'QY_1L',
+            'SURPLUS_1L' => 'SURPLUS_1L',
+            'QY_2L' => 'QY_2L',
+            'SURPLUS_2L' => 'SURPLUS_2L',
+            'QY_3L' => 'QY_3L',
+            'SURPLUS_3L' => 'SURPLUS_3L',
+            'QY_4L' => 'QY_4L',
+            'SURPLUS_4L' => 'SURPLUS_4L',
+            'QY_5L' => 'QY_5L',
+            'SURPLUS_5L' => 'SURPLUS_5L',
+            'SURPLUS_LS' => 'SURPLUS_LS',
+            'QY_LS' => 'QY_LS',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+        $listObj = new ResendQyList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
+        return static::notice($data);
+    }
+
+    /**
+     * 区域津贴补发列表导出 
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionResendQyListExport() {
+        $filter = $this->filterCondition([
+            'userIds' => 'USER_ID',
+            'filterStatus' => 'RESEND_STATUS',
+            'PERIOD_NUM' => 'PERIOD_NUM',
+            'LAST_DEC_LV_NAME' => 'LAST_DEC_LV',
+            'LAST_EMP_LV_NAME' => 'LAST_EMP_LV',
+            'LAST_STATUS_NAME' => 'LAST_STATUS',
+            'LAST_SUB_COM_NAME' => 'LAST_SUB_COM_ID',
+            'LAST_AREA_NAME' => [
+                'FIELD' => ['LAST_PROVINCE', 'LAST_CITY', 'LAST_COUNTY'],
+                'BIND' => ['LAST_PROVINCE', 'LAST_CITY', 'LAST_COUNTY'],
+            ],
+            'LAST_SYSTEM_NAME' => 'LAST_SYSTEM_ID',
+            'BONUS_QY' => 'BONUS_QY',
+            'SHOULD_QY' => 'SHOULD_QY',
+            'QY_1L' => 'QY_1L',
+            'SURPLUS_1L' => 'SURPLUS_1L',
+            'QY_2L' => 'QY_2L',
+            'SURPLUS_2L' => 'SURPLUS_2L',
+            'QY_3L' => 'QY_3L',
+            'SURPLUS_3L' => 'SURPLUS_3L',
+            'QY_4L' => 'QY_4L',
+            'SURPLUS_4L' => 'SURPLUS_4L',
+            'QY_5L' => 'QY_5L',
+            'SURPLUS_5L' => 'SURPLUS_5L',
+            'SURPLUS_LS' => 'SURPLUS_LS',
+            'QY_LS' => 'QY_LS',
+        ]);
+        $form = new BonusExportForm();
+        $result = $form->run($filter, '区域津贴补发列表');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+    /**
+     * 补发区域津贴
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionResendQy() {
+        if (Yii::$app->request->isPost) {
+            $formModel = new ResendQYForm();
+            $formModel->scenario = 'apply';
+            if ($formModel->load(Yii::$app->request->post(), '') && $result = $formModel->apply()) {
+                if($result['logs']){
+                    /*foreach ($result['logs'] as $k => $value) {
+                        $userName = Info::getUserNameByUserId($value);
+                        // Log::adminHandle('申请为会员' . $userName . '发放补发区域津贴', 0, $value, $userName);
+                    }*/
+                    return static::notice('申请成功,请在补发区域津贴审核管理中审核');
+                }else{
+                    return static::notice('没有符合补发条件的记录',400);
+                }
+            } else {
+                return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
+            }
+        }
+        return static::notice('非法请求', 400);
+    }
+
+    /**
+     * 补发审核表
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionResendQyAuditList() {
+        $filter = $this->filterCondition([
+            'userIds' => 'RQYA.USER_ID',
+            'filterStatus' => 'RQYA.AUDIT_STATUS',
+            'SHOULD_BONUS' => 'RQYA.SHOULD_BONUS',
+            'PERIOD_NUM' => 'RQYA.PERIOD_NUM',
+            'CREATED_AT' => 'RQYA.CREATED_AT',
+            'AUDITED_AT' => 'RQYA.AUDITED_AT',
+            'RESEND_REMARK' => 'RQYA.RESEND_REMARK',
+            'CREATE_ADMIN_NAME' => 'ADMC.ADMIN_NAME',
+            'AUDIT_ADMIN_NAME' => 'ADMA.ADMIN_NAME',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+        $listObj = new ResendQyAuditList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
+        return static::notice($data);
+    }
+
+    /**
+     * 补发审核表导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionResendQyAuditListExport() {
+        $filter = $this->filterCondition([
+            'userIds' => 'RQYA.USER_ID',
+            'filterStatus' => 'RQYA.AUDIT_STATUS',
+            'SHOULD_BONUS' => 'RQYA.SHOULD_BONUS',
+            'PERIOD_NUM' => 'RQYA.PERIOD_NUM',
+            'CREATED_AT' => 'RQYA.CREATED_AT',
+            'AUDITED_AT' => 'RQYA.AUDITED_AT',
+            'RESEND_REMARK' => 'RQYA.RESEND_REMARK',
+            'CREATE_ADMIN_NAME' => 'ADMC.ADMIN_NAME',
+            'AUDIT_ADMIN_NAME' => 'ADMA.ADMIN_NAME',
+        ]);
+        $form = new BonusExportForm();
+        $result = $form->run($filter, '补发区域津贴审核列表');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+    /**
+     * 审核补发区域津贴
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionResendQyAudit() {
+        $formModel = new ResendQYForm();
+        $formModel->scenario = 'audit';
+        if ($formModel->load(Yii::$app->request->post(), '') && $result = $formModel->audit()) {
+            /*foreach ($result['logs'] as $k => $value) {
+                $userName = Info::getUserNameByUserId($value);
+                // Log::adminHandle('审核为会员' . $userName . '补发区域津贴', 1, $value, $userName);
+            }*/
+            return static::notice('审核补发区域津贴成功');
+        }
+        return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
+    }
+
+    /**
+     * 删除补发区域津贴审核信息
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionResendQyAuditDelete() {
+        $resendQYForm = new ResendQYForm();
+        $result = static::delete(ResendQYAudit::class, function ($selected) use ($resendQYForm) {
+            $resendQYForm->beforeDelete($selected);
+            // Log::adminHandle('删除审核会员余额信息');
+        }, function ($selected) use ($resendQYForm) {
+            $resendQYForm->delete($selected);
+            // Log::adminHandle('删除审核会员余额信息');
+        }, true);
+        return $result;
+    }
+
+    /**
+     * 余额列表
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionBalanceList() {
+        $filter = $this->filterCondition([
+            'USER_NAME' => 'UI.USER_NAME',
+            'REAL_NAME' => 'UI.REAL_NAME',
+            'userIds' => 'UB.USER_ID',
+            'BONUS' => 'BONUS',
+            'RECONSUME_POINTS' => 'RECONSUME_POINTS',
+            'CASH' => 'CASH',
+            'IS_DEC' => 'UI.IS_DEC',
+            'PERIOD_AT' => 'UI.PERIOD_AT',
+            'MOBILE' => 'UI.MOBILE',
+            'TEL' => 'UI.TEL',
+//            'CF' => 'CF',
+//            'LX' => 'LX',
+//            'HIGHEST_EMP_LV_NAME' => 'UI.HIGHEST_EMP_LV',
+//            'SYSTEM_NAME' => 'UI.SYSTEM_ID',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+        $listObj = new BalanceList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
+        return static::notice($data);
+    }
+
+    /**
+     * 会员奖金余额导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionBalanceExport() {
+        $filter = $this->filterCondition([
+            'USER_NAME' => 'UI.USER_NAME',
+            'REAL_NAME' => 'UI.REAL_NAME',
+            'userIds' => 'UB.USER_ID',
+            'BONUS' => 'BONUS',
+            'IS_DEC' => 'UI.IS_DEC',
+            'PERIOD_AT' => 'UI.PERIOD_AT',
+            'MOBILE' => 'UI.MOBILE',
+            'TEL' => 'UI.TEL',
+//            'CF' => 'CF',
+//            'LX' => 'LX',
+        ]);
+        $form = new BonusExportForm();
+        $result = $form->run($filter, '会员奖金余额');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+    /**
+     * 报单中心店补/补贴追溯
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceBt() {
+        $startPeriodNum = Yii::$app->request->get('startPeriodNum');
+        $endPeriodNum = Yii::$app->request->get('endPeriodNum');
+        if (!$startPeriodNum || !$endPeriodNum) return static::notice([]);
+        $filterStatus = Yii::$app->request->get('filterStatus');
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+        if ($startPeriodNum) {
+            $condition .= ' AND CBT.PERIOD_NUM>=:START_PERIOD_NUM';
+            $params[':START_PERIOD_NUM'] = $startPeriodNum;
+        }
+        if ($endPeriodNum) {
+            $condition .= ' AND CBT.PERIOD_NUM<=:END_PERIOD_NUM';
+            $params[':END_PERIOD_NUM'] = $endPeriodNum;
+        }
+        if ($filterStatus) {
+            $condition .= ' AND CBT.BT_TYPE=:BT_TYPE';
+            $params[':BT_TYPE'] = $filterStatus;
+        }
+        $listObj = new TraceBtList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
+
+        return static::notice($data);
+    }
+
+    /**
+     * 报单中心补贴追溯导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceBtExport() {
+        $startPeriodNum = Yii::$app->request->get('startPeriodNum');
+        $endPeriodNum = Yii::$app->request->get('endPeriodNum');
+        if (!$startPeriodNum || !$endPeriodNum) return static::notice([]);
+        $filterStatus = Yii::$app->request->get('filterStatus');
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+        if ($startPeriodNum) {
+            $condition .= ' AND CBT.PERIOD_NUM>=:START_PERIOD_NUM';
+            $params[':START_PERIOD_NUM'] = $startPeriodNum;
+        }
+        if ($endPeriodNum) {
+            $condition .= ' AND CBT.PERIOD_NUM<=:END_PERIOD_NUM';
+            $params[':END_PERIOD_NUM'] = $endPeriodNum;
+        }
+        if ($filterStatus) {
+            $condition .= ' AND CBT.BT_TYPE=:BT_TYPE';
+            $params[':BT_TYPE'] = $filterStatus;
+        }
+        $form = new BonusExportForm();
+        $result = $form->run(['condition'=>$condition, 'params'=>$params], '报单中心补贴追溯');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+    /**
+     * 报单中心货补追溯
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceFl() {
+        $startPeriodNum = Yii::$app->request->get('startPeriodNum');
+        $endPeriodNum = Yii::$app->request->get('endPeriodNum');
+        if (!$startPeriodNum || !$endPeriodNum) return static::notice([]);
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+        if ($startPeriodNum) {
+            $condition .= ' AND CFL.PERIOD_NUM>=:START_PERIOD_NUM';
+            $params[':START_PERIOD_NUM'] = $startPeriodNum;
+        }
+        if ($endPeriodNum) {
+            $condition .= ' AND CFL.PERIOD_NUM<=:END_PERIOD_NUM';
+            $params[':END_PERIOD_NUM'] = $endPeriodNum;
+        }
+        $listObj = new TraceFlList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
+
+        return static::notice($data);
+    }
+
+    /**
+     * 报单中心货补追溯导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceFlExport() {
+        $startPeriodNum = Yii::$app->request->get('startPeriodNum');
+        $endPeriodNum = Yii::$app->request->get('endPeriodNum');
+        if (!$startPeriodNum || !$endPeriodNum) return static::notice([]);
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+        if ($startPeriodNum) {
+            $condition .= ' AND CFL.PERIOD_NUM>=:START_PERIOD_NUM';
+            $params[':START_PERIOD_NUM'] = $startPeriodNum;
+        }
+        if ($endPeriodNum) {
+            $condition .= ' AND CFL.PERIOD_NUM<=:END_PERIOD_NUM';
+            $params[':END_PERIOD_NUM'] = $endPeriodNum;
+        }
+        $form = new BonusExportForm();
+        $result = $form->run(['condition'=>$condition, 'params'=>$params], '报单中心货补追溯');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+    /**
+     * 区域业绩提成追溯
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceFw() {
+        $startPeriodNum = Yii::$app->request->get('startPeriodNum');
+        $endPeriodNum = Yii::$app->request->get('endPeriodNum');
+        if (!$startPeriodNum || !$endPeriodNum) return static::notice([]);
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+        if ($startPeriodNum) {
+            $condition .= ' AND CFW.PERIOD_NUM>=:START_PERIOD_NUM';
+            $params[':START_PERIOD_NUM'] = $startPeriodNum;
+        }
+        if ($endPeriodNum) {
+            $condition .= ' AND CFW.PERIOD_NUM<=:END_PERIOD_NUM';
+            $params[':END_PERIOD_NUM'] = $endPeriodNum;
+        }
+        $listObj = new TraceFwList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
+
+        return static::notice($data);
+    }
+
+    /**
+     * 区域业绩提成导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionTraceFwExport() {
+        $startPeriodNum = Yii::$app->request->get('startPeriodNum');
+        $endPeriodNum = Yii::$app->request->get('endPeriodNum');
+        if (!$startPeriodNum || !$endPeriodNum) return static::notice([]);
+        $filter = $this->filterCondition([
+            'userName' => 'UI.USER_NAME',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+        if ($startPeriodNum) {
+            $condition .= ' AND CFW.PERIOD_NUM>=:START_PERIOD_NUM';
+            $params[':START_PERIOD_NUM'] = $startPeriodNum;
+        }
+        if ($endPeriodNum) {
+            $condition .= ' AND CFW.PERIOD_NUM<=:END_PERIOD_NUM';
+            $params[':END_PERIOD_NUM'] = $endPeriodNum;
+        }
+        $form = new BonusExportForm();
+        $result = $form->run(['condition'=>$condition, 'params'=>$params], '区域业绩提成追溯');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+    /**
+     * 业绩单
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionPerfOrder(){
+        $filter = $this->filterCondition([
+            'PERIOD_NUM' => 'PO.PERIOD_NUM',
+            'SN' => 'PO.SN',
+            'DEC_STATUS_NAME' => 'PO.DEC_STATUS',
+            'USER_NAME' => 'U.USER_NAME',
+            'REAL_NAME' => 'U.REAL_NAME',
+            'userIds' => 'PO.USER_ID',
+            'filterType' => 'PO.DEC_TYPE',
+            'LAST_REC_USER_NAME' => 'PO.LAST_REC_USER_NAME',
+            'LAST_REC_REAL_NAME' => 'PO.LAST_REC_REAL_NAME',
+            'PV' => 'PO.PV',
+            'DEC_AMOUNT' => 'PO.DEC_AMOUNT',
+            'DEC_SN' => 'PO.DEC_SN',
+            'CREATED_AT' => 'PO.CREATED_AT',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+        $listObj = new PerfOrderList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
+
+        return static::notice($data);
+    }
+
+    /**
+     * 业绩单导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionPerfOrderExport() {
+        $filter = $this->filterCondition([
+            'PERIOD_NUM' => 'PO.PERIOD_NUM',
+            'SN' => 'PO.SN',
+            'DEC_STATUS_NAME' => 'PO.DEC_STATUS',
+            'userIds' => 'PO.USER_ID',
+            'filterType' => 'PO.DEC_TYPE',
+            'LAST_REC_USER_NAME' => 'PO.LAST_REC_USER_NAME',
+            'LAST_REC_REAL_NAME' => 'PO.LAST_REC_REAL_NAME',
+            'PV' => 'PO.PV',
+            'DEC_AMOUNT' => 'PO.DEC_AMOUNT',
+            'DEC_SN' => 'PO.DEC_SN',
+            'LAST_SUB_COM_NAME' => 'PO.LAST_SUB_COM_ID',
+            'LAST_SYSTEM_NAME' => 'PO.LAST_SYSTEM_ID',
+            'LAST_AREA' => [
+                'FIELD' => ['PO.LAST_PROVINCE', 'PO.LAST_CITY', 'PO.LAST_COUNTY'],
+                'BIND' => ['LAST_PROVINCE', 'LAST_CITY', 'LAST_COUNTY'],
+            ],
+            'DEC_USER_NAME' => 'DUI.USER_NAME',
+            'LAST_DEC_DEC_LV_NAME' => 'PO.LAST_DEC_DEC_LV',
+            'LAST_DEC_SUB_COM_NAME' => 'PO.LAST_DEC_SUB_COM_ID',
+            'LAST_DEC_AREA' => [
+                'FIELD' => ['PO.LAST_DEC_PROVINCE', 'PO.LAST_DEC_CITY', 'PO.LAST_DEC_COUNTY'],
+                'BIND' => ['LAST_DEC_PROVINCE', 'LAST_DEC_CITY', 'LAST_DEC_COUNTY'],
+            ],
+            'CREATED_AT' => 'PO.CREATED_AT',
+            'CLOSED_AT' => 'PO.CLOSED_AT',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+        $form = new BonusExportForm();
+        $result = $form->run(['condition'=>$condition, 'params'=>$params], '业绩单');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+    /**
+     * 月积分
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionScoreMonth(){
+        $filter = $this->filterCondition([
+            'USER_NAME' => 'U.USER_NAME',
+            'userIds' => 'SM.USER_ID',
+            'CALC_MONTH' => 'SM.CALC_MONTH',
+            'CREATED_AT' => 'SM.CREATED_AT',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+        $listObj = new ScoreMonthList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
+
+        return static::notice($data);
+    }
+
+    /**
+     * 月积分导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionScoreMonthExport() {
+        $filter = $this->filterCondition([
+            'USER_NAME' => 'U.USER_NAME',
+            'userIds' => 'SM.USER_ID',
+            'CALC_MONTH' => 'SM.CALC_MONTH',
+            'CREATED_AT' => 'SM.CREATED_AT',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+        $form = new BonusExportForm();
+        $result = $form->run(['condition'=>$condition, 'params'=>$params], '月积分');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+    /**
+     * 月业绩
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionPerfMonth(){
+        $filter = $this->filterCondition([
+            'USER_NAME' => 'U.USER_NAME',
+            'REC_USER_NAME' => 'RU.USER_NAME',
+            'userIds' => 'PM.USER_ID',
+            'CALC_MONTH' => 'PM.CALC_MONTH',
+            'CREATED_AT' => 'PM.CREATED_AT',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+        $listObj = new PerfMonthList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
+
+        return static::notice($data);
+    }
+
+    /**
+     * 月业绩导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionPerfMonthExport() {
+        $filter = $this->filterCondition([
+            'USER_NAME' => 'U.USER_NAME',
+            'REC_USER_NAME' => 'RU.USER_NAME',
+            'userIds' => 'PM.USER_ID',
+            'CALC_MONTH' => 'PM.CALC_MONTH',
+            'CREATED_AT' => 'PM.CREATED_AT',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+        $form = new BonusExportForm();
+        $result = $form->run(['condition'=>$condition, 'params'=>$params], '月业绩');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+    /**
+     * 期业绩
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionPerfPeriodList(){
+        $filter = $this->filterCondition([
+            'USER_NAME' => 'U.USER_NAME',
+            'userIds' => 'PP.USER_ID',
+            'PERIOD_NUM' => 'PP.PERIOD_NUM',
+            'CREATED_AT' => 'PP.CREATED_AT',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+        $listObj = new PerfPeriodList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
+
+        return static::notice($data);
+    }
+
+    /**
+     * 期业绩导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionPerfPeriodListExport() {
+        $filter = $this->filterCondition([
+            'USER_NAME' => 'U.USER_NAME',
+            'userIds' => 'PP.USER_ID',
+            'PERIOD_NUM' => 'PP.PERIOD_NUM',
+            'CREATED_AT' => 'PP.CREATED_AT',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+        $form = new BonusExportForm();
+        $result = $form->run(['condition'=>$condition, 'params'=>$params], '期业绩');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+
+    /**
+     * 达标业绩
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionPerfStandard(){
+        $filter = $this->filterCondition([
+            'USER_NAME' => 'U.USER_NAME',
+            'REC_USER_NAME' => 'RU.USER_NAME',
+            'userIds' => 'PS.USER_ID',
+            'CALC_MONTH' => 'PS.CALC_MONTH',
+            'CREATED_AT' => 'PS.CREATED_AT',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+        $listObj = new PerfStandardList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
+
+        return static::notice($data);
+    }
+
+    /**
+     * 达标业绩导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionPerfStandardExport() {
+        $filter = $this->filterCondition([
+            'USER_NAME' => 'U.USER_NAME',
+            'REC_USER_NAME' => 'RU.USER_NAME',
+            'userIds' => 'PS.USER_ID',
+            'CALC_MONTH' => 'PS.CALC_MONTH',
+            'CREATED_AT' => 'PS.CREATED_AT',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+        $form = new BonusExportForm();
+        $result = $form->run(['condition'=>$condition, 'params'=>$params], '达标业绩');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
+
+
+    /**
+     * 会员实时业绩
+     * @return mixed
+     * @throws \yii\web\HttpException
+     */
+    public function actionRealTimePerf() {
+        $userName = Yii::$app->request->get('userName');
+        if (!$userId = Info::getUserIdByUserName($userName)) {
+            return static::notice('会员不存在', 400);
+        }
+        $period = Period::instance();
+        $newPerf = Perf::getPeriodNewPerf($userId);
+        $weekData = [['PV_1L' => $newPerf['PV_1L'], 'PV_2L' => $newPerf['PV_2L'], 'PV_3L' => $newPerf['PV_3L'], 'PV_4L' => $newPerf['PV_4L'], 'PV_5L' => $newPerf['PV_5L'], 'PV_PCS'=>Tool::formatPrice($newPerf['PV_PCS']), 'PV_PSS'=>Tool::formatPrice($newPerf['PV_PSS'])]];
+        $monthPerf = Perf::getMonthPerf($userId);
+        $monthData = [['PV_1L' => Tool::formatPrice($monthPerf['PV_1L']), 'PV_2L' => Tool::formatPrice($monthPerf['PV_2L']), 'PV_3L' => Tool::formatPrice($monthPerf['PV_3L']), 'PV_4L' => Tool::formatPrice($monthPerf['PV_4L']), 'PV_5L' => Tool::formatPrice($monthPerf['PV_5L']), 'PV_PCS'=>Tool::formatPrice($monthPerf['PV_PCS']), 'PV_PSS'=>Tool::formatPrice($monthPerf['PV_PSS'])]];
+        $lastMonth = PerfMonth::getMonthPerf($period->getLastMonth()['yearMonth'], $userId);
+        $lastData = [['PV_1L' => Tool::formatPrice($lastMonth['PV_1L_TOTAL']), 'PV_2L' => Tool::formatPrice($lastMonth['PV_2L_TOTAL']), 'PV_3L' => Tool::formatPrice($lastMonth['PV_3L_TOTAL']), 'PV_4L' => Tool::formatPrice($lastMonth['PV_4L_TOTAL']), 'PV_5L' => Tool::formatPrice($lastMonth['PV_5L_TOTAL']), 'PV_PCS'=>Tool::formatPrice($lastMonth['PV_PCS']), 'PV_PSS'=>Tool::formatPrice($lastMonth['PV_PSS']), 'PV_PSS_TOTAL'=>Tool::formatPrice($lastMonth['PV_PSS_TOTAL'])]];
+        //是否合格
+//        $lastChkStatus = '';
+//        $lastMonthPerfChk = Cache::getSystemConfig()['lastMonthPerfChk']['VALUE'];
+//        $lastArr = [$lastMonth['PV_1L_TOTAL'], $lastMonth['PV_2L_TOTAL'], $lastMonth['PV_3L_TOTAL'], $lastMonth['PV_4L_TOTAL'], $lastMonth['PV_5L_TOTAL']];
+//        if (array_sum($lastArr) >= $lastMonthPerfChk) {
+//            $lastChkStatus = '已合格';
+//        }
+        //判断大区
+//        $bigLocation = array_search(max($lastArr), $lastArr) + 1;
+        return static::notice(['weekData' => $weekData, 'monthData' => $monthData, 'lastData' => $lastData]);
+    }
+
+    /**
+     * 荣衔业绩
+     * @return mixed
+     * @throws \yii\web\HttpException
+     */
+    public function actionYcPerf() {
+        $userName = Yii::$app->request->get('userName');
+        if (!$userId = Info::getUserIdByUserName($userName)) {
+            return static::notice('会员不存在', 400);
+        }
+
+        $userPerfData = Perf::getUserPerf($userId);
+        $ycPerfList = [];
+        //查找推荐的子会员
+        $childrenList = UserInfo::findUseDbCalc()->select('USER_ID')->where('REC_UID=:REC_UID', [
+            'REC_UID' => $userId
+        ])->asArray()->all();
+        $maxPvPss = 0;
+        $childSumPerf = 0;
+        foreach ($childrenList as $child) {
+            $childBaseUser = Info::getBaseUserById($child['USER_ID']);
+            if( !$childBaseUser ) continue;
+            $childPerfData = Perf::getUserPerf($child['USER_ID']);
+            if( !$childPerfData ) continue;
+
+            $childPvPcs = $childPerfData['PV_PCS_ZC'] + $childPerfData['PV_PCS_FX'];
+
+            $childPvPssTotal = $childPvPcs + $childPerfData['PV_PSS'];
+
+            $childSumPerf += $childPvPssTotal;
+            if( $childPvPssTotal >= $maxPvPss ) {
+                $maxPvPss = $childPvPssTotal;
+            }
+
+            $ycPerfList[] = [
+                'USER_NAME'=>$childBaseUser['USER_NAME'],
+                'REAL_NAME'=>$childBaseUser['REAL_NAME'],
+                'PV_PCS' => $childPerfData['PV_PCS_ZC'] + $childPerfData['PV_PCS_FX'],
+                'PV_PSS_TOTAL' => $childPerfData['PV_PSS_TOTAL'],
+                'MAX_DEPART_PERF' => '-',
+                'OTHER_DEPART_PERF' => '-',
+                'PV_PSS_SUM_TOTAL' => round($childPerfData['PV_PCS_ZC'] + $childPerfData['PV_PCS_FX'] + $childPerfData['PV_PSS_TOTAL'],2),
+            ];
+        }
+
+        if( $userPerfData ) {
+            $baseUser = Info::getBaseUserById($userId);
+            $ycPerfData = [
+                'USER_NAME'=>$baseUser['USER_NAME'],
+                'REAL_NAME'=>$baseUser['REAL_NAME'],
+                'PV_PCS' => $userPerfData['PV_PCS_ZC'] + $userPerfData['PV_PCS_FX'],
+                'PV_PSS_TOTAL' => $userPerfData['PV_PSS_TOTAL'],
+                'MAX_DEPART_PERF' => round($maxPvPss, 2),
+                'OTHER_DEPART_PERF' => round($childSumPerf-$maxPvPss, 2),
+                'PV_PSS_SUM_TOTAL' => round($userPerfData['PV_PCS_ZC'] + $userPerfData['PV_PCS_FX'] + $userPerfData['PV_PSS_TOTAL'],2),
+            ];
+            array_unshift($ycPerfList, $ycPerfData);
+        }
+
+        return static::notice(['ycPerfList' => $ycPerfList]);
+    }
+
+    /**
+     * 用户业绩
+     * @return mixed
+     * @throws \yii\web\HttpException
+     */
+    public function actionUserPerf() {
+        $filter = $this->filterCondition([
+            'USER_NAME' => 'U.USER_NAME',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+        $listObj = new UserPerfList();
+        $data = $listObj->getList(['condition'=>$condition, 'params'=>$params]);
+
+        return static::notice($data);
+    }
+
+    /**
+     * 月业绩导出
+     * @return mixed
+     * @throws \yii\db\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionUserPerfExport() {
+        $filter = $this->filterCondition([
+            'USER_NAME' => 'U.USER_NAME',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+        $form = new BonusExportForm();
+        $result = $form->run(['condition'=>$condition, 'params'=>$params], '用户业绩');
+        if (!$result) {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+        return static::notice('导出开始,请到文件管理-导出文件查看');
+    }
 }

+ 2055 - 2043
backendEle/src/router/index.js

@@ -1,2043 +1,2055 @@
-import Vue from 'vue'
-import Router from 'vue-router'
-import layout from '../views/layout/layout'
-
-const _import = require('./_import_' + process.env.NODE_ENV)
-
-if(Router.version >= '3.1.0'){
-  const originalPush = Router.prototype.push
-  Router.prototype.push = function push(location) {
-    return originalPush.call(this, location).catch(err => err)
-  }
-}
-
-Vue.use(Router)
-
-export const constantRouterMap = [
-  {path: '/', redirect: '/login'},
-  {path: '/login', component: _import('login/index'), name: 'login'},
-  {path: '/modify-password/:adminName', component: _import('login/modify-password'), name: 'modify-password'},
-  // { path: '/authredirect', component: _import('login/authredirect'), hidden: true },
-  // { path: '/404', component: _import('errorPage/404'), hidden: true },
-  // { path: '/401', component: _import('errorPage/401'), hidden: true },
-  {
-    path: '/dashboard',
-    component: layout,
-    redirect: '/dashboard/index',
-    children: [{
-      path: '/dashboard/index',
-      component: _import('dashboard/index'),
-      name: 'dashboard_index',
-      meta: {
-        title: '控制台',
-        breadcrumb: [
-          {title: '首页', path: '/dashboard/index'},
-        ],
-      },
-    }]
-  },
-  {
-    path: '/shop',
-    component: layout,
-    redirect: '/shop/dec-order-list',
-    children: [
-      {
-        path: '/shop/dec-order-list',
-        component: _import('shop/dec-order-list'),
-        name: 'shop_dec-order-list',
-        meta: {
-          title: '报单列表',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '商城管理', path: '/shop/dec-order-list'},
-          ],
-        },
-      },
-      {
-        path: '/shop/order-list',
-        component: _import('shop/order-list'),
-        name: 'shop_order-list',
-        meta: {
-          title: '订单列表',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '商城管理', path: '/shop/dec-order-list'},
-          ],
-        },
-
-      },
-      {
-        path: '/shop/order-shop-list',
-        component: _import('shop/order-shop-list'),
-        name: 'shop_order_shop-list',
-        meta: {
-          title: '外部商城订单列表',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '商城管理', path: '/shop/dec-order-list'},
-          ],
-        },
-
-      },
-        {
-            path: '/shop/order-dec-list',
-            component: _import('shop/order-dec-list'),
-            name: 'shop_order_dec-list',
-            meta: {
-                title: '外部商城报单列表',
-                breadcrumb: [
-                    {title: '首页', path: '/dashboard/index'},
-                    {title: '商城管理', path: '/shop/dec-order-list'},
-                ],
-            },
-
-        },
-      {
-        path: '/shop/order-standard-list',
-        component: _import('shop/order-standard-list'),
-        name: 'shop_order_standard-list',
-        meta: {
-          title: '外部商城达标订单列表',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '商城管理', path: '/shop/dec-order-list'},
-          ],
-        },
-
-      },
-        {
-            path: '/shop/package',
-            component: _import('shop/package'),
-            name: 'shop_package',
-            meta: {
-                title: '报单套餐列表',
-                breadcrumb: [
-                    {title: '首页', path: '/dashboard/index'},
-                    {title: '商城管理', path: '/shop/dec-order-list'},
-                ],
-            },
-
-        },
-        {
-            path: '/shop/package-add',
-            component: _import('shop/package-add'),
-            name: 'shop_package-add',
-            meta: {
-                title: '报单套餐添加',
-                breadcrumb: [
-                    {title: '首页', path: '/dashboard/index'},
-                    {title: '商城管理', path: '/shop/dec-order-list'},
-                ],
-            },
-
-        },
-        {
-            path: '/shop/index',
-            component: _import('shop/index'),
-            name: 'shop_index',
-            meta: {
-                title: '商品列表',
-                breadcrumb: [
-                    {title: '首页', path: '/dashboard/index'},
-                    {title: '商城管理', path: '/shop/dec-order-list'},
-                ],
-            },
-
-        },
-        {
-            path: '/shop/goods-add',
-            component: _import('shop/goods-add'),
-            name: 'shop_goods-add',
-            meta: {
-                title: '商品添加',
-                breadcrumb: [
-                    {title: '首页', path: '/dashboard/index'},
-                    {title: '商城管理', path: '/shop/dec-order-list'},
-                ],
-            },
-
-        },
-    ],
-  },
-  {
-    path: '/user',
-    component: layout,
-    redirect: '/user/index',
-    children: [
-      {
-        path: '/user/index',
-        component: _import('user/index'),
-        name: 'user_index',
-        meta: {
-          title: '会员列表',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '会员管理', path: '/user/index'},
-          ],
-        },
-      },
-      {
-        path: '/user/user-add-opt',
-        component: _import('user/user-add-opt'),
-        name: 'user_user-add-opt',
-        meta: {
-          title: '空单操作',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '会员管理', path: '/user/index'},
-          ],
-        },
-      },
-        {
-            path: '/user/empty-list',
-            component: _import('user/empty-list'),
-            name: 'user_empty_list',
-            meta: {
-                title: '空单列表',
-                breadcrumb: [
-                    {title: '首页', path: '/dashboard/index'},
-                    {title: '会员管理', path: '/user/index'},
-                ],
-            },
-        },
-      {
-        path: '/user/bind',
-        component: _import('user/bind'),
-        name: 'user_bind',
-        meta: {
-          title: '点位绑定',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '会员管理', path: '/user/index'},
-          ],
-        },
-      },
-      {
-        path: '/user/bind-add',
-        component: _import('user/bind-edit'),
-        name: 'user_bind-add',
-        meta: {
-          title: '添加点位绑定',
-          highLight: '/user/bind',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '会员管理', path: '/user/index'},
-            {title: '点位绑定', path: '/user/bind'},
-          ],
-        },
-      },
-      {
-        path: '/user/bind-edit/:id',
-        component: _import('user/bind-edit'),
-        name: 'user_bind-edit',
-        meta: {
-          title: '编辑点位绑定',
-          highLight: '/user/bind',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '会员管理', path: '/user/index'},
-            {title: '点位绑定', path: '/user/bind'},
-          ],
-        },
-      },
-      {
-        path: '/user/teamwork',
-        component: _import('user/teamwork'),
-        name: 'user_teamwork',
-        meta: {
-          title: '点位合作',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '会员管理', path: '/user/index'},
-          ],
-        },
-      },
-      {
-        path: '/user/teamwork-add',
-        component: _import('user/teamwork-edit'),
-        name: 'user_teamwork-add',
-        meta: {
-          title: '添加点位合作',
-          highLight: '/user/teamwork',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '会员管理', path: '/user/index'},
-            {title: '点位合作', path: '/user/teamwork'},
-          ],
-        },
-      },
-      {
-        path: '/user/teamwork-edit/:id',
-        component: _import('user/teamwork-edit'),
-        name: 'user_teamwork-edit',
-        meta: {
-          title: '编辑点位合作',
-          highLight: '/user/teamwork',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '会员管理', path: '/user/index'},
-            {title: '点位合作', path: '/user/teamwork'},
-          ],
-        },
-      },
-      {
-        path: '/user/system',
-        component: _import('user/system'),
-        name: 'user_system',
-        meta: {
-          title: '体系管理',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '会员管理', path: '/user/index'},
-          ],
-        },
-      },
-      {
-        path: '/user/system-add',
-        component: _import('user/system-edit'),
-        name: 'user_system-add',
-        meta: {
-          title: '添加体系',
-          highLight: '/user/system',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '会员管理', path: '/user/index'},
-            {title: '体系管理', path: '/user/system'},
-          ],
-        },
-      },
-      {
-        path: '/user/system-edit/:id',
-        component: _import('user/system-edit'),
-        name: 'user_system-edit',
-        meta: {
-          title: '编辑体系',
-          highLight: '/user/system',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '会员管理', path: '/user/index'},
-            {title: '体系管理', path: '/user/system'},
-          ],
-        },
-      },
-      {
-        path: '/user/group',
-        component: _import('user/group'),
-        name: 'user_group',
-        meta: {
-          title: '团队领导人列表',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '会员管理', path: '/user/index'},
-          ],
-        },
-      },
-      {
-        path: '/user/move',
-        component: _import('user/move'),
-        name: 'user_move',
-        meta: {
-          title: '移网管理',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '会员管理', path: '/user/index'},
-          ],
-        },
-      },
-      {
-        path: '/user/move-add',
-        component: _import('user/move-add'),
-        name: 'user_move-add',
-        meta: {
-          title: '申请移网',
-          highLight: '/user/move',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '会员管理', path: '/user/index'},
-            {title: '移网管理', path: '/user/move'},
-          ],
-        },
-      },
-      {
-        path: '/user/reg-info',
-        component: _import('user/reg-info'),
-        name: 'user_reg-info',
-        meta: {
-          title: '注册信息报表',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '会员管理', path: '/user/index'},
-          ],
-        },
-      },
-      {
-        path: '/user/reg-info-audit',
-        component: _import('user/reg-info-audit'),
-        name: 'user_reg-info-audit',
-        meta: {
-          title: '注册信息审核',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '会员管理', path: '/user/index'},
-          ],
-        },
-      },
-      {
-        path: '/user/reg-info-audit-add-opt/:id?',
-        component: _import('user/reg-info-audit-add-opt'),
-        name: 'user_reg-info-audit-add-opt',
-        meta: {
-          title: '注册信息添加操作',
-          highLight: '/user/reg-info-audit',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '会员管理', path: '/user/index'},
-            {title: '注册信息审核', path: '/user/reg-info-audit'},
-          ],
-        },
-      },
-      {
-        path: '/user/status-audit-list',
-        component: _import('user/status-audit-list'),
-        name: 'user_status-audit-list',
-        meta: {
-          title: '会员状态管理',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '会员管理', path: '/user/index'},
-          ],
-        },
-      },
-      {
-        path: '/user/status-audit-add',
-        component: _import('user/status-audit-add'),
-        name: 'user_status-audit-add',
-        meta: {
-          title: '申请修改会员状态',
-          highLight: '/user/status-audit-list',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '会员管理', path: '/user/index'},
-            {title: '会员状态管理', path: '/user/status-audit-list'},
-          ],
-        },
-      },
-      {
-        path: '/user/status-audit-add/:userName',
-        component: _import('user/status-audit-add'),
-        name: 'user_status-audit-add-username',
-        meta: {
-          title: '申请修改会员状态',
-          highLight: '/user/status-audit-list',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '会员管理', path: '/user/index'},
-            {title: '会员状态管理', path: '/user/status-audit-list'},
-          ],
-        },
-      },
-        {
-            path: '/user/dec-level-list',
-            component: _import('user/dec-level-list'),
-            name: 'user_dec-level-list',
-            meta: {
-                title: '会员级别调整列表',
-                breadcrumb: [
-                    {title: '首页', path: '/dashboard/index'},
-                    {title: '会员管理', path: '/user/index'},
-                ],
-            },
-        },
-      {
-        path: '/user/change-user-dec-level',
-        component: _import('user/change-user-dec-level'),
-        name: 'user_change-user-dec-level',
-        meta: {
-          title: '修改会员级别',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '会员管理', path: '/user/index'},
-          ],
-        },
-      },
-      {
-        path: '/user/change-user-dec-role',
-        component: _import('user/change-user-dec-role'),
-        name: 'user_change-user-dec-role',
-        meta: {
-          title: '修改报单中心级别',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '会员管理', path: '/user/index'},
-          ],
-        },
-      },
-      {
-        path: '/user/year-highest-emp-lv',
-        component: _import('user/year-highest-emp-lv'),
-        name: 'user_year-highest-emp-lv',
-        meta: {
-          title: '会员历史年度最高聘级表',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '会员管理', path: '/user/index'},
-          ],
-        },
-      },
-      {
-        path: '/user/change-show-emp-level',
-        component: _import('user/change-show-emp-level'),
-        name: 'user_change-show-emp-level',
-        meta: {
-          title: '修改会员前台显示聘级',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '会员管理', path: '/user/index'},
-          ],
-        },
-      },
-    ]
-  },
-  {
-    path: '/atlas',
-    component: layout,
-    redirect: '/atlas/relation-opt',
-    children: [
-      {
-        path: '/atlas/relation-opt',
-        component: _import('atlas/relation-opt'),
-        name: 'atlas_relation-opt',
-        meta: {
-          title: '开拓网络',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '网络图谱', path: '/atlas/relation-opt'},
-          ],
-        },
-      },
-      {
-        path: '/atlas/network-opt',
-        component: _import('atlas/network-opt'),
-        name: 'atlas_network-opt',
-        meta: {
-          title: '安置网络',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '网络图谱', path: '/atlas/relation-opt'},
-          ],
-        },
-      },
-      {
-        path: '/atlas/network-line-opt',
-        component: _import('atlas/network-line-opt'),
-        name: 'atlas_network-line-opt',
-        meta: {
-          title: '安置链路',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '网络图谱', path: '/atlas/relation-opt'},
-          ],
-        },
-      },
-      {
-        path: '/atlas/emp-user-line',
-        component: _import('atlas/emp-user-line'),
-        name: 'atlas_emp-user-line',
-        meta: {
-          title: '聘级网络',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '网络图谱', path: '/atlas/relation-opt'},
-          ],
-        },
-      },
-      // {
-      //   path: '/atlas/emp-user-list',
-      //   component: _import('atlas/emp-user-list'),
-      //   name: 'atlas_emp-user-list',
-      //   meta: {
-      //     title: '聘级网络列表',
-      //     breadcrumb: [
-      //       {title: '首页', path: '/dashboard/index'},
-      //       {title: '网络图谱', path: '/atlas/relation-opt'},
-      //     ],
-      //   },
-      // },
-
-
-    ]
-  },
-  {
-    path: '/reconsume',
-    component: layout,
-    redirect: '/reconsume/pool-list',
-    children: [
-      {
-        path: '/reconsume/pool-list',
-        component: _import('reconsume/pool-list'),
-        name: 'reconsume_pool-list',
-        meta: {
-          title: '复销池余额列表',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '复销管理', path: '/reconsume/pool-list'},
-          ],
-        },
-      },
-      {
-        path: '/reconsume/deduct',
-        component: _import('reconsume/deduct'),
-        name: 'reconsume_deduct',
-        meta: {
-          title: '手动扣除月复销',
-          highLight: '/reconsume/deduct',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '复销管理', path: '/reconsume/pool-list'},
-          ],
-        },
-      },
-      {
-        path: '/reconsume/change-audit-list',
-        component: _import('reconsume/change-audit-list'),
-        name: 'reconsume_change-audit-list',
-        meta: {
-          title: '复销余额调整审核',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '复销管理', path: '/reconsume/pool-list'},
-          ],
-        },
-      },
-      {
-        path: '/reconsume/change-audit-add/:userName?',
-        component: _import('reconsume/change-audit-add'),
-        name: 'reconsume_change-audit-add',
-        meta: {
-          title: '申请调整复销池余额',
-          highLight: '/reconsume/change-audit-list',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '复销管理', path: '/reconsume/pool-list'},
-            {title: '复销余额调整审核', path: '/reconsume/change-audit-list'},
-          ],
-        },
-      },
-      {
-        path: '/reconsume/deduct-audit-list',
-        component: _import('reconsume/deduct-audit-list'),
-        name: 'reconsume_deduct-audit-list',
-        meta: {
-          title: '扣除复销审核',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '复销管理', path: '/reconsume/pool-list'},
-          ],
-        },
-      },
-      {
-        path: '/reconsume/deduct-audit-add',
-        component: _import('reconsume/deduct-audit-add'),
-        name: 'reconsume_deduct-audit-add',
-        meta: {
-          title: '手动扣除月复销',
-          highLight: '/reconsume/deduct-audit-list',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '复销管理', path: '/reconsume/pool-list'},
-          ],
-        },
-      },
-      {
-        path: '/reconsume/flow-list',
-        component: _import('reconsume/flow-list'),
-        name: 'reconsume_flow-list',
-        meta: {
-          title: '复销流水',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '复销管理', path: '/reconsume/pool-list'},
-          ],
-        },
-      },
-    ]
-  },
-  {
-    path: '/bonus',
-    component: layout,
-    redirect: '/bonus/period',
-    children: [
-      {
-        path: '/bonus/period',
-        component: _import('bonus/period'),
-        name: 'bonus_period',
-        meta: {
-          title: '封期管理',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '奖金管理', path: '/bonus/period'},
-          ],
-        },
-      },
-      {
-        path: '/bonus/balance-list',
-        component: _import('bonus/balance-list'),
-        name: 'bonus_balance-list',
-        meta: {
-          title: '会员奖金余额',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '奖金管理', path: '/bonus/period'},
-          ],
-        },
-      },
-
-      {
-        path: '/bonus/period-detail/:periodNum',
-        component: _import('bonus/period-detail'),
-        name: 'bonus_period-detail',
-        meta: {
-          title: '期奖金明细',
-          highLight: '/bonus/period',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '奖金管理', path: '/bonus/period'},
-            {title: '封期管理', path: '/bonus/period'},
-          ],
-        },
-      },
-      {
-        path: '/bonus/new-period-bonus',
-        component: _import('bonus/new-period-bonus'),
-        name: 'bonus_new-period-bonus',
-        meta: {
-          title: '最新奖金',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '奖金管理', path: '/bonus/period'},
-          ],
-        },
-      },
-      {
-        path: '/bonus/other-period-bonus',
-        component: _import('bonus/other-period-bonus'),
-        name: 'bonus_other-period-bonus',
-        meta: {
-          title: '往期奖金',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '奖金管理', path: '/bonus/period'},
-          ],
-        },
-      },
-      {
-        path: '/bonus/flow-bonus',
-        component: _import('bonus/flow-bonus'),
-        name: 'bonus_flow-bonus',
-        meta: {
-          title: '奖金流水',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '奖金管理', path: '/bonus/period'},
-          ],
-        },
-      },
-      {
-        path: '/bonus/flow-rp',
-        component: _import('bonus/flow-rp'),
-        name: 'bonus_flow-rp',
-        meta: {
-          title: '复消积分流水',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '奖金管理', path: '/bonus/period'},
-          ],
-        },
-      },
-      {
-        path: '/bonus/flow-balance',
-        component: _import('bonus/flow-balance'),
-        name: 'bonus_flow-balance',
-        meta: {
-          title: '用户余额流水',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '奖金管理', path: '/bonus/period'},
-          ],
-        },
-      },
-      {
-        path: '/bonus/flow-exchange',
-        component: _import('bonus/flow-exchange'),
-        name: 'bonus_flow-exchange',
-        meta: {
-          title: '兑换点数流水',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '奖金管理', path: '/bonus/period'},
-          ],
-        },
-      },
-      {
-        path: '/bonus/flow-lx',
-        component: _import('bonus/flow-lx'),
-        name: 'bonus_flow-lx',
-        meta: {
-          title: '领袖分红奖流水',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '奖金管理', path: '/bonus/period'},
-          ],
-        },
-      },
-      {
-        path: '/bonus/cf-lx-audit-list',
-        component: _import('bonus/cf-lx-audit-list'),
-        name: 'bonus_cf-lx-audit-list',
-        meta: {
-          title: '年度奖金发放审核',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '奖金管理', path: '/bonus/period'},
-          ],
-        },
-      },
-      {
-        path: '/bonus/cf-lx-apply',
-        component: _import('bonus/cf-lx-apply'),
-        name: 'bonus_cf-lx-apply',
-        meta: {
-          title: '申请发放年度奖',
-          highLight: '/bonus/cf-lx-audit-list',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '奖金管理', path: '/bonus/period'},
-            {title: '年度奖金发放审核', path: '/bonus/cf-lx-audit-list'},
-          ],
-        },
-      },
-      {
-        path: '/bonus/perf',
-        component: _import('bonus/perf'),
-        name: 'bonus_perf',
-        meta: {
-          title: '业绩管理',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '奖金管理', path: '/bonus/period'},
-          ],
-        },
-      },
-      {
-        path: '/bonus/calc-qy',
-        component: _import('bonus/calc-qy'),
-        name: 'bonus_calc-qy',
-        meta: {
-          title: '区域津贴核算',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '奖金管理', path: '/bonus/period'},
-          ],
-        },
-      },
-      {
-        path: '/bonus/resend-qy-list',
-        component: _import('bonus/resend-qy-list'),
-        name: 'bonus_resend-qy-list',
-        meta: {
-          title: '区域津贴补发列表',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '奖金管理', path: '/bonus/period'},
-          ],
-        },
-      },
-      {
-        path: '/bonus/resend-qy-audit-list',
-        component: _import('bonus/resend-qy-audit-list'),
-        name: 'bonus_resend-qy-audit-list',
-        meta: {
-          title: '补发区域津贴审核列表',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '奖金管理', path: '/bonus/period'},
-          ],
-        },
-      },
-      {
-        path: '/bonus/trace-down-qy',
-        component: _import('bonus/trace-down-qy'),
-        name: 'bonus_trace-down-qy',
-        meta: {
-          title: '团队奖向下追溯',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '奖金管理', path: '/bonus/period'},
-          ],
-        },
-      },
-      {
-        path: '/bonus/trace-up-qy',
-        component: _import('bonus/trace-up-qy'),
-        name: 'bonus_trace-up-qy',
-        meta: {
-          title: '团队奖向上追溯',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '奖金管理', path: '/bonus/period'},
-          ],
-        },
-      },
-      {
-        path: '/bonus/trace-down-yc',
-        component: _import('bonus/trace-down-yc'),
-        name: 'bonus_trace-down-yc',
-        meta: {
-          title: '荣衔奖向下追溯',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '奖金管理', path: '/bonus/period'},
-          ],
-        },
-      },
-      {
-        path: '/bonus/trace-up-yc',
-        component: _import('bonus/trace-up-yc'),
-        name: 'bonus_trace-up-yc',
-        meta: {
-          title: '荣衔奖向上追溯',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '奖金管理', path: '/bonus/period'},
-          ],
-        },
-      },
-      {
-          path: '/bonus/trace-down-bd',
-          component: _import('bonus/trace-down-bd'),
-          name: 'bonus_trace-down-bd',
-          meta: {
-              title: '报单奖向下追溯',
-              breadcrumb: [
-                  {title: '首页', path: '/dashboard/index'},
-                  {title: '奖金管理', path: '/bonus/period'},
-              ],
-          },
-      },
-      {
-          path: '/bonus/trace-up-bd',
-          component: _import('bonus/trace-up-bd'),
-          name: 'bonus_trace-up-bd',
-          meta: {
-              title: '报单奖向上追溯',
-              breadcrumb: [
-                  {title: '首页', path: '/dashboard/index'},
-                  {title: '奖金管理', path: '/bonus/period'},
-              ],
-          },
-      },
-      {
-          path: '/bonus/trace-down-tg',
-          component: _import('bonus/trace-down-tg'),
-          name: 'bonus_trace-down-tg',
-          meta: {
-              title: '推广奖向下追溯',
-              breadcrumb: [
-                  {title: '首页', path: '/dashboard/index'},
-                  {title: '奖金管理', path: '/bonus/period'},
-              ],
-          },
-      },
-      {
-          path: '/bonus/trace-up-tg',
-          component: _import('bonus/trace-up-tg'),
-          name: 'bonus_trace-up-tg',
-          meta: {
-              title: '推广奖向上追溯',
-              breadcrumb: [
-                  {title: '首页', path: '/dashboard/index'},
-                  {title: '奖金管理', path: '/bonus/period'},
-              ],
-          },
-      },
-      {
-        path: '/bonus/trace-down-xf',
-        component: _import('bonus/trace-down-xf'),
-        name: 'bonus_trace-down-xf',
-        meta: {
-          title: '消费奖向下追溯',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '奖金管理', path: '/bonus/period'},
-          ],
-        },
-      },
-      {
-        path: '/bonus/trace-up-xf',
-        component: _import('bonus/trace-up-xf'),
-        name: 'bonus_trace-up-xf',
-        meta: {
-          title: '消费奖向上追溯',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '奖金管理', path: '/bonus/period'},
-          ],
-        },
-      },
-      {
-          path: '/bonus/trace-down-yj',
-          component: _import('bonus/trace-down-yj'),
-          name: 'bonus_trace-down-yj',
-          meta: {
-              title: '业绩奖向下追溯',
-              breadcrumb: [
-                  {title: '首页', path: '/dashboard/index'},
-                  {title: '奖金管理', path: '/bonus/period'},
-              ],
-          },
-      },
-      {
-          path: '/bonus/trace-up-yj',
-          component: _import('bonus/trace-up-yj'),
-          name: 'bonus_trace-up-yj',
-          meta: {
-              title: '业绩奖向上追溯',
-              breadcrumb: [
-                  {title: '首页', path: '/dashboard/index'},
-                  {title: '奖金管理', path: '/bonus/period'},
-              ],
-          },
-      },
-      {
-          path: '/bonus/trace-down-gx',
-          component: _import('bonus/trace-down-gx'),
-          name: 'bonus_trace-down-gx',
-          meta: {
-              title: '共享奖向下追溯',
-              breadcrumb: [
-                  {title: '首页', path: '/dashboard/index'},
-                  {title: '奖金管理', path: '/bonus/period'},
-              ],
-          },
-      },
-      {
-          path: '/bonus/trace-up-gx',
-          component: _import('bonus/trace-up-gx'),
-          name: 'bonus_trace-up-gx',
-          meta: {
-              title: '共享奖向上追溯',
-              breadcrumb: [
-                  {title: '首页', path: '/dashboard/index'},
-                  {title: '奖金管理', path: '/bonus/period'},
-              ],
-          },
-      },
-      {
-          path: '/bonus/trace-down-gl',
-          component: _import('bonus/trace-down-gl'),
-          name: 'bonus_trace-down-gl',
-          meta: {
-              title: '管理奖向下追溯',
-              breadcrumb: [
-                  {title: '首页', path: '/dashboard/index'},
-                  {title: '奖金管理', path: '/bonus/period'},
-              ],
-          },
-      },
-      {
-          path: '/bonus/trace-up-gl',
-          component: _import('bonus/trace-up-gl'),
-          name: 'bonus_trace-up-gl',
-          meta: {
-              title: '管理奖向上追溯',
-              breadcrumb: [
-                  {title: '首页', path: '/dashboard/index'},
-                  {title: '奖金管理', path: '/bonus/period'},
-              ],
-          },
-      },
-      {
-        path: '/bonus/trace-down-fx',
-        component: _import('bonus/trace-down-fx'),
-        name: 'bonus_trace-down-fx',
-        meta: {
-          title: '复销奖向下追溯',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '奖金管理', path: '/bonus/period'},
-          ],
-        },
-      },
-      {
-        path: '/bonus/trace-up-fx',
-        component: _import('bonus/trace-up-fx'),
-        name: 'bonus_trace-up-fx',
-        meta: {
-          title: '复销奖向上追溯',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '奖金管理', path: '/bonus/period'},
-          ],
-        },
-      },
-      {
-        path: '/bonus/trace-bt',
-        component: _import('bonus/trace-bt'),
-        name: 'bonus_trace-bt',
-        meta: {
-          title: '报单中心补贴追溯',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '奖金管理', path: '/bonus/period'},
-          ],
-        },
-      },
-      {
-        path: '/bonus/trace-fl',
-        component: _import('bonus/trace-fl'),
-        name: 'bonus_trace-fl',
-        meta: {
-          title: '报单中心货补追溯',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '奖金管理', path: '/bonus/period'},
-          ],
-        },
-      },
-      {
-        path: '/bonus/trace-fw',
-        component: _import('bonus/trace-fw'),
-        name: 'bonus_trace-fw',
-        meta: {
-          title: '区域业绩提成追溯',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '奖金管理', path: '/bonus/period'},
-          ],
-        },
-      },
-      {
-        path: '/bonus/perf-order',
-        component: _import('bonus/perf-order'),
-        name: 'bonus_perf-order',
-        meta: {
-          title: '业绩单',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '奖金管理', path: '/bonus/period'},
-          ],
-        },
-      },
-      {
-        path: '/bonus/perf-period-list',
-        component: _import('bonus/perf-period-list'),
-        name: 'bonus_perf-period-list',
-        meta: {
-          title: '期业绩',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '奖金管理', path: '/bonus/period'},
-          ],
-        },
-      },
-      {
-          path: '/bonus/perf-month',
-          component: _import('bonus/perf-month'),
-          name: 'bonus_perf-month',
-          meta: {
-              title: '月业绩',
-              breadcrumb: [
-                  {title: '首页', path: '/dashboard/index'},
-                  {title: '奖金管理', path: '/bonus/period'},
-              ],
-          },
-      },
-      {
-        path: '/bonus/perf-standard',
-        component: _import('bonus/perf-standard'),
-        name: 'bonus_perf-standard',
-        meta: {
-          title: '达标业绩',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '奖金管理', path: '/bonus/period'},
-          ],
-        },
-      },
-      {
-        path: '/bonus/score-month',
-        component: _import('bonus/score-month'),
-        name: 'bonus_score-month',
-        meta: {
-          title: '月积分',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '奖金管理', path: '/bonus/period'},
-          ],
-        },
-      },
-      {
-        path: '/bonus/real-time-perf',
-        component: _import('bonus/real-time-perf'),
-        name: 'bonus_real-time-perf',
-        meta: {
-          title: '会员实时业绩',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '奖金管理', path: '/bonus/period'},
-          ],
-        },
-      },
-      {
-        path: '/bonus/yc-perf',
-        component: _import('bonus/yc-perf'),
-        name: 'bonus_yc-perf',
-        meta: {
-          title: '荣衔业绩',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '奖金管理', path: '/bonus/period'},
-          ],
-        },
-      },
-      {
-        path: '/bonus/user-perf',
-        component: _import('bonus/user-perf'),
-        name: 'leo-user-perf-table',
-        meta: {
-          title: '用户业绩',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '奖金管理', path: '/bonus/period'},
-          ],
-        },
-      },
-    ]
-  },
-  {
-    path: '/report',
-    component: layout,
-    redirect: '/report/dec',
-    children: [
-      {
-        path: '/report/dec',
-        component: _import('report/dec'),
-        name: 'report_dec',
-        meta: {
-          title: '报单查询',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '报表管理', path: '/report/dec'},
-          ],
-        },
-      },
-    ]
-  },
-  {
-    path: '/finance',
-    component: layout,
-    redirect: '/finance/balance-audit-list',
-    children: [
-      {
-        path: '/finance/balance-audit-list',
-        component: _import('finance/balance-audit-list'),
-        name: 'finance_balance-audit-list',
-        meta: {
-          title: '会员余额调整列表',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '财务管理', path: '/finance/balance-audit-list'},
-          ],
-        },
-      },
-      {
-        path: '/finance/change-balance-opt',
-        component: _import('finance/change-balance-opt'),
-        name: 'finance_change-balance-opt',
-        meta: {
-          title: '申请调整会员余额',
-          highLight: '/finance/balance-audit-list',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '财务管理', path: '/finance/balance-audit-list'},
-            {title: '会员余额调整列表', path: '/finance/balance-audit-list'},
-          ],
-        },
-      },
-      {
-        path: '/finance/dec-list',
-        component: _import('finance/dec-list'),
-        name: 'finance_dec-list',
-        meta: {
-          title: '报单订货单列表',
-          highLight: '/finance/dec-list',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '财务管理', path: '/finance/balance-audit-list'},
-          ],
-        },
-      },
-      {
-        path: '/finance/transfer-list',
-        component: _import('finance/transfer-list'),
-        name: 'finance_transfer-list',
-        meta: {
-          title: '转账记录列表',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '财务管理', path: '/finance/balance-audit-list'},
-          ],
-        },
-      },
-      {
-        path: '/finance/withdraw',
-        component: _import('finance/withdraw'),
-        name: 'finance_withdraw',
-        meta: {
-          title: '提现管理',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '提现管理', path: '/finance/withdraw'},
-          ],
-        },
-      },
-      {
-        path: '/finance/withdraw-add',
-        component: _import('finance/withdraw-add'),
-        name: 'finance_withdraw-add',
-        meta: {
-          title: '新增提现',
-          highLight: '/finance/withdraw',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '提现管理', path: '/finance/withdraw'},
-            {title: '新增提现', path: '/finance/withdraw-add'},
-          ],
-        },
-      },
-      {
-        path: '/finance/invoice-audit',
-        component: _import('finance/invoice-audit'),
-        name: 'finance_invoice-audit',
-        meta: {
-          title: '发票管理',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '发票管理', path: '/finance/invoice-audit'},
-          ],
-        },
-      },
-      {
-        path: '/finance/perf-audit-list',
-        component: _import('finance/perf-audit-list'),
-        name: 'finance_perf-audit-list',
-        meta: {
-          title: '会员业绩调整列表',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '财务管理', path: '/finance/balance-audit-list'},
-          ],
-        },
-      },
-      {
-        path: '/finance/perf-apply',
-        component: _import('finance/perf-apply'),
-        name: 'finance_perf-apply',
-        meta: {
-          title: '调整会员业绩',
-          highLight: '/finance/perf-audit-list',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '财务管理', path: '/finance/balance-audit-list'},
-            {title: '调整会员业绩', path: '/finance/perf-audit-list'},
-          ],
-        },
-      },
-      {
-        path: '/finance/deal-type',
-        component: _import('finance/deal-type'),
-        name: 'finance_deal-type',
-        meta: {
-          title: '交易类型',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '交易类型', path: '/finance/deal-type'},
-          ],
-        },
-      },
-      {
-        path: '/finance/deal-type-add',
-        component: _import('finance/deal-type-add'),
-        name: 'finance_deal-type-add',
-        meta: {
-          title: '交易类型添加',
-          highLight: '/finance/deal-type',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '交易类型', path: '/finance/deal-type'},
-            {title: '交易类型添加', path: '/finance/deal-type-add'},
-          ],
-        },
-      },
-      {
-        path: '/finance/history-bonus',
-        component: _import('finance/history-bonus'),
-        name: 'finance_history-bonus',
-        meta: {
-          title: '历史奖金余额',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '财务管理', path: '/finance/balance-audit-list'},
-          ],
-        },
-      },
-        {
-            path: '/finance/recharge',
-            component: _import('finance/recharge'),
-            name: 'finance_recharge',
-            meta: {
-                title: '充值管理',
-                breadcrumb: [
-                    {title: '首页', path: '/dashboard/index'},
-                    {title: '财务管理', path: '/finance/balance-audit-list'},
-                ],
-            },
-        },
-        {
-            path: '/finance/recharge-status',
-            component: _import('finance/recharge-status'),
-            name: 'finance_recharge-status',
-            meta: {
-                title: '状态管理',
-                breadcrumb: [
-                    {title: '首页', path: '/dashboard/index'},
-                    {title: '财务管理', path: '/finance/balance-audit-list'},
-                ],
-            },
-        },
-    ]
-  },
-  {
-    path: '/article',
-    component: layout,
-    redirect: '/article/category',
-    children: [
-      {
-        path: '/article/category',
-        component: _import('article/category'),
-        name: 'article_category',
-        meta: {
-          title: '分类管理',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '分类管理', path: '/article/category'},
-          ],
-        },
-      },
-      {
-        path: '/article/category-add',
-        component: _import('article/category-add'),
-        name: 'article_category-add',
-        meta: {
-          title: '添加分类',
-          highLight: '/article/category-add',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '分类管理', path: '/article/category'},
-            {title: '添加分类', path: '/article/category-add'},
-          ],
-        },
-      },
-      {
-        path: '/article/index',
-        component: _import('article/index'),
-        name: 'article_index',
-        meta: {
-          title: '文章列表',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '文章列表', path: '/article/index'},
-          ],
-        },
-      },
-      {
-        path: '/article/add',
-        component: _import('article/edit'),
-        name: 'article_add',
-        meta: {
-          title: '添加文章',
-          highLight: '/article/index',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '文章列表', path: '/article/index'},
-            {title: '添加文章', path: '/article/add'},
-          ],
-        },
-      },
-      {
-        path: '/article/edit/:id',
-        component: _import('article/edit'),
-        name: 'article_edit',
-        meta: {
-          title: '编辑文章',
-          highLight: '/article/index',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '文章列表', path: '/article/index'},
-            {title: '编辑文章', path: '/article/edit'},
-          ],
-        },
-      },
-    ]
-  },
-  {
-    path: '/message',
-    component: layout,
-    redirect: '/message/list',
-    children: [
-      {
-        path: '/message/list',
-        component: _import('message/list'),
-        name: 'message_list',
-        meta: {
-          title: '站内信列表',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '站内信管理', path: '/message/list'},
-          ],
-        },
-      },
-      {
-        path: '/message/add',
-        component: _import('message/edit'),
-        name: 'message_add',
-        meta: {
-          title: '添加站内信',
-          highLight: '/message/list',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '站内信管理', path: '/message/list'},
-            {title: '站内信列表', path: '/message/list'},
-          ],
-        },
-      },
-    ]
-  },
-  {
-    path: '/file',
-    component: layout,
-    redirect: '/file/export',
-    children: [
-      {
-        path: '/file/export',
-        component: _import('file/export'),
-        name: 'file_export',
-        meta: {
-          title: '导出文件',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '文件管理', path: '/bonus/period'},
-          ],
-        },
-      },
-    ]
-  },
-  {
-    path: '/admin',
-    component: layout,
-    redirect: '/admin/index',
-    children: [
-      {
-        path: '/admin/change-password',
-        component: _import('admin/edit'),
-        name: 'admin_change-password',
-        meta: {
-          title: '重置密码',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '管理员管理', path: '/admin/index'},
-          ],
-        },
-      },
-      {
-        path: '/admin/index',
-        component: _import('admin/index'),
-        name: 'admin_index',
-        meta: {
-          title: '管理员列表',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '管理员管理', path: '/admin/index'},
-          ],
-        },
-      }, {
-        path: '/admin/add',
-        component: _import('admin/edit'),
-        name: 'admin_add',
-        meta: {
-          title: '添加管理员',
-          highLight: '/admin/index',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '管理员管理', path: '/admin/index'},
-            {title: '管理员列表', path: '/admin/index'},
-          ],
-        },
-      }, {
-        path: '/admin/edit/:id',
-        component: _import('admin/edit'),
-        name: 'admin_edit',
-        meta: {
-          title: '编辑管理员',
-          highLight: '/admin/index',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '管理员管理', path: '/admin/index'},
-            {title: '管理员列表', path: '/admin/index'},
-          ],
-        },
-      }, {
-        path: '/admin/role',
-        component: _import('admin/role'),
-        name: 'admin_role',
-        meta: {
-          title: '管理员角色列表',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '管理员管理', path: '/admin/index'},
-          ],
-        },
-      }, {
-        path: '/admin/role-add',
-        component: _import('admin/role-add'),
-        name: 'admin_role-add',
-        meta: {
-          title: '添加管理员角色',
-          highLight: '/admin/role',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '管理员管理', path: '/admin/index'},
-            {title: '管理员角色列表', path: '/admin/role'},
-          ],
-        },
-      },{
-        path: '/admin/role-edit/:id',
-        component: _import('admin/role-add'),
-        name: 'admin_role-edit',
-        meta: {
-          title: '编辑管理员角色',
-          highLight: '/admin/role',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '管理员管理', path: '/admin/index'},
-            {title: '管理员角色列表', path: '/admin/role'},
-          ],
-        },
-      }, {
-        path: '/admin/role-permission/:id',
-        component: _import('admin/role-permission'),
-        name: 'admin_role-permission',
-        meta: {
-          title: '管理员角色权限',
-          highLight: '/admin/role',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '管理员管理', path: '/admin/index'},
-            {title: '管理员角色列表', path: '/admin/role'},
-          ],
-        },
-      }, {
-        path: '/admin/role-column/:id',
-        component: _import('admin/role-column'),
-        name: 'admin_role-column',
-        meta: {
-          title: '管理员角色列表字段权限',
-          highLight: '/admin/role',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '管理员管理', path: '/admin/index'},
-            {title: '管理员角色列表', path: '/admin/role'},
-          ],
-        },
-      }, {
-        path: '/admin/test',
-        component: _import('admin/test'),
-        name: 'admin_test',
-      }]
-  },
-  {
-    path: '/ad',
-    component: layout,
-    redirect: '/ad/location',
-    children: [
-      {
-        path: '/ad/location',
-        component: _import('ad/location'),
-        name: 'ad_location',
-        meta: {
-          title: '广告位',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '广告管理', path: '/ad/location'},
-          ],
-        },
-      },
-      {
-        path: '/ad/list/:lid',
-        component: _import('ad/list'),
-        name: 'ad_list',
-        meta: {
-          title: '广告列表',
-          highLight: '/ad/location',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '广告管理', path: '/ad/location'},
-            {title: '广告位', path: '/ad/location'},
-          ],
-        },
-      },
-      {
-        path: '/ad/add',
-        component: _import('ad/edit'),
-        name: 'ad_add',
-        meta: {
-          title: '添加广告',
-          highLight: '/ad/location',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '广告管理', path: '/ad/location'},
-            {title: '广告位', path: '/ad/location'},
-          ],
-        },
-      },
-      {
-        path: '/ad/edit/:id',
-        component: _import('ad/edit'),
-        name: 'ad_edit',
-        meta: {
-          title: '编辑广告',
-          highLight: '/ad/location',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '广告管理', path: '/ad/location'},
-            {title: '广告位', path: '/ad/location'},
-          ],
-        },
-      },
-    ]
-  },
-  {
-    path: '/log',
-    component: layout,
-    redirect: '/log/admin-login',
-    children: [
-      {
-        path: '/log/admin-login',
-        component: _import('log/admin-login'),
-        name: 'log_admin-login',
-        meta: {
-          title: '管理员登录日志',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '日志管理', path: '/log/admin-login'},
-          ],
-        },
-      },
-      {
-        path: '/log/user-login',
-        component: _import('log/user-login'),
-        name: 'log_user-login',
-        meta: {
-          title: '会员登录日志',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '日志管理', path: '/log/user-login'},
-          ],
-        },
-      },
-      {
-        path: '/log/admin-handle',
-        component: _import('log/admin-handle'),
-        name: 'log_admin-handle',
-        meta: {
-          title: '管理员操作日志',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '日志管理', path: '/log/admin-login'},
-          ],
-        },
-      },
-      {
-        path: '/log/user-handle',
-        component: _import('log/user-handle'),
-        name: 'log_user-handle',
-        meta: {
-          title: '会员操作日志',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '日志管理', path: '/log/admin-login'},
-          ],
-        },
-      },
-      {
-        path: '/log/system',
-        component: _import('log/system'),
-        name: 'log_system',
-        meta: {
-          title: '系统日志',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '日志管理', path: '/log/admin-login'},
-          ],
-        },
-      },
-    ]
-  },
-  {
-    path: '/config',
-    component: layout,
-    redirect: '/config/base',
-    children: [
-      {
-        path: '/config/base',
-        component: _import('config/base'),
-        name: 'config_base',
-        meta: {
-          title: '站点设置',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '配置', path: '/config/base'},
-          ],
-        },
-      }, {
-        path: '/config/period',
-        component: _import('config/period'),
-        name: 'config_period',
-        meta: {
-          title: '期数配置',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '配置', path: '/config/index'},
-          ],
-        },
-      }, {
-        path: '/config/other',
-        component: _import('config/other'),
-        name: 'config_other',
-        meta: {
-          title: '其他配置',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '配置', path: '/config/index'},
-          ],
-        },
-      }, {
-        path: '/config/dec-level',
-        component: _import('config/dec-level'),
-        name: 'config_dec-level',
-        meta: {
-          title: '会员级别配置',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '配置', path: '/config/index'},
-          ],
-        },
-      }, {
-        path: '/config/dec-level-add',
-        component: _import('config/dec-level-edit'),
-        name: 'config_dec-level-add',
-        meta: {
-          title: '添加会员级别',
-          highLight: '/config/dec-level',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '配置', path: '/config/index'},
-            {title: '会员级别配置', path: '/config/dec-level'},
-          ],
-        },
-      }, {
-        path: '/config/dec-level-edit/:id',
-        component: _import('config/dec-level-edit'),
-        name: 'config_dec-level-edit',
-        meta: {
-          title: '编辑会员级别',
-          highLight: '/config/dec-level',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '配置', path: '/config/index'},
-            {title: '会员级别配置', path: '/config/dec-level'},
-          ],
-        },
-      }, {
-        path: '/config/dec-role',
-        component: _import('config/dec-role'),
-        name: 'config_dec-role',
-        meta: {
-          title: '报单中心级别配置',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '配置', path: '/config/index'},
-          ],
-        },
-      }, {
-        path: '/config/dec-role-edit/:id',
-        component: _import('config/dec-role-edit'),
-        name: 'config_dec-role-edit',
-        meta: {
-          title: '编辑报单中心级别',
-          highLight: '/config/dec-role',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '配置', path: '/config/index'},
-            {title: '报单中心级别配置', path: '/config/dec-role'},
-          ],
-        },
-      }, {
-        path: '/config/emp-level',
-        component: _import('config/emp-level'),
-        name: 'config_emp-level',
-        meta: {
-          title: '会员聘级配置',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '配置', path: '/config/index'},
-          ],
-        },
-      }, {
-        path: '/config/emp-level-add',
-        component: _import('config/emp-level-edit'),
-        name: 'config_emp-level-add',
-        meta: {
-          title: '添加聘级',
-          highLight: '/config/emp-level',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '配置', path: '/config/index'},
-            {title: '聘级管理', path: '/config/emp-level'},
-          ],
-        },
-      }, {
-        path: '/config/emp-level-edit/:id',
-        component: _import('config/emp-level-edit'),
-        name: 'config_emp-level-edit',
-        meta: {
-          title: '编辑聘级',
-          highLight: '/config/emp-level',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '配置', path: '/config/index'},
-            {title: '聘级管理', path: '/config/emp-level'},
-          ],
-        },
-      }, {
-        path: '/config/reg-type',
-        component: _import('config/reg-type'),
-        name: 'config_reg-type',
-        meta: {
-          title: '会员注册类型配置',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '配置', path: '/config/index'},
-          ],
-        },
-      }, {
-        path: '/config/bonus-opt',
-        component: _import('config/bonus-opt'),
-        name: 'config_bonus-opt',
-        meta: {
-          title: '奖金设置',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '配置', path: '/config/index'},
-          ],
-        },
-      }, {
-        path: '/config/clear-data',
-        component: _import('config/clear-data'),
-        name: 'config_clear-data',
-        meta: {
-          title: '清空数据',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '配置', path: '/config/index'},
-          ],
-        },
-      }, {
-        path: '/config/api-opt',
-        component: _import('config/api-opt'),
-        name: 'config_api-opt',
-        meta: {
-          title: '第三方接口',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '配置', path: '/config/index'},
-          ],
-        },
-      }, {
-        path: '/config/api-edit/:type/:id',
-        component: _import('config/api-edit'),
-        name: 'config_api-edit',
-        meta: {
-          title: '编辑第三方接口',
-          highLight: '/config/api-opt',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '配置', path: '/config/index'},
-            {title: '第三方接口', path: '/config/api-opt'},
-          ],
-        },
-      },
-      {
-        path: '/config/sms',
-        component: _import('config/sms'),
-        name: 'config_sms',
-        meta: {
-          title: '短信配置',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '配置', path: '/config/index'},
-          ],
-        },
-      },
-      {
-        path: '/config/transfer',
-        component: _import('config/transfer'),
-        name: 'config_transfer',
-        meta: {
-          title: '转账配置',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '配置', path: '/config/index'},
-          ],
-        },
-      },
-      {
-        path: '/config/score',
-        component: _import('config/score'),
-        name: 'config_score',
-        meta: {
-          title: '积分配置',
-          breadcrumb: [
-            {title: '首页', path: '/dashboard/index'},
-            {title: '配置', path: '/config/index'},
-          ],
-        },
-      },
-    ]
-  }
-  // {
-  //     path: '/documentation',
-  //     component: Layout,
-  //     redirect: '/documentation/index',
-  //     children: [{
-  //         path: 'index',
-  //         component: _import('documentation/index'),
-  //         name: 'documentation',
-  //         meta: { title: 'documentation', icon: 'documentation', noCache: true }
-  //     }]
-  // }
-]
-
-export default new Router({
-  routes: constantRouterMap
-})
+import Vue from 'vue'
+import Router from 'vue-router'
+import layout from '../views/layout/layout'
+
+const _import = require('./_import_' + process.env.NODE_ENV)
+
+if(Router.version >= '3.1.0'){
+  const originalPush = Router.prototype.push
+  Router.prototype.push = function push(location) {
+    return originalPush.call(this, location).catch(err => err)
+  }
+}
+
+Vue.use(Router)
+
+export const constantRouterMap = [
+  {path: '/', redirect: '/login'},
+  {path: '/login', component: _import('login/index'), name: 'login'},
+  {path: '/modify-password/:adminName', component: _import('login/modify-password'), name: 'modify-password'},
+  // { path: '/authredirect', component: _import('login/authredirect'), hidden: true },
+  // { path: '/404', component: _import('errorPage/404'), hidden: true },
+  // { path: '/401', component: _import('errorPage/401'), hidden: true },
+  {
+    path: '/dashboard',
+    component: layout,
+    redirect: '/dashboard/index',
+    children: [{
+      path: '/dashboard/index',
+      component: _import('dashboard/index'),
+      name: 'dashboard_index',
+      meta: {
+        title: '控制台',
+        breadcrumb: [
+          {title: '首页', path: '/dashboard/index'},
+        ],
+      },
+    }]
+  },
+  {
+    path: '/shop',
+    component: layout,
+    redirect: '/shop/dec-order-list',
+    children: [
+      {
+        path: '/shop/dec-order-list',
+        component: _import('shop/dec-order-list'),
+        name: 'shop_dec-order-list',
+        meta: {
+          title: '报单列表',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '商城管理', path: '/shop/dec-order-list'},
+          ],
+        },
+      },
+      {
+        path: '/shop/order-list',
+        component: _import('shop/order-list'),
+        name: 'shop_order-list',
+        meta: {
+          title: '订单列表',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '商城管理', path: '/shop/dec-order-list'},
+          ],
+        },
+
+      },
+      {
+        path: '/shop/order-shop-list',
+        component: _import('shop/order-shop-list'),
+        name: 'shop_order_shop-list',
+        meta: {
+          title: '外部商城订单列表',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '商城管理', path: '/shop/dec-order-list'},
+          ],
+        },
+
+      },
+        {
+            path: '/shop/order-dec-list',
+            component: _import('shop/order-dec-list'),
+            name: 'shop_order_dec-list',
+            meta: {
+                title: '外部商城报单列表',
+                breadcrumb: [
+                    {title: '首页', path: '/dashboard/index'},
+                    {title: '商城管理', path: '/shop/dec-order-list'},
+                ],
+            },
+
+        },
+      {
+        path: '/shop/order-standard-list',
+        component: _import('shop/order-standard-list'),
+        name: 'shop_order_standard-list',
+        meta: {
+          title: '外部商城达标订单列表',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '商城管理', path: '/shop/dec-order-list'},
+          ],
+        },
+
+      },
+        {
+            path: '/shop/package',
+            component: _import('shop/package'),
+            name: 'shop_package',
+            meta: {
+                title: '报单套餐列表',
+                breadcrumb: [
+                    {title: '首页', path: '/dashboard/index'},
+                    {title: '商城管理', path: '/shop/dec-order-list'},
+                ],
+            },
+
+        },
+        {
+            path: '/shop/package-add',
+            component: _import('shop/package-add'),
+            name: 'shop_package-add',
+            meta: {
+                title: '报单套餐添加',
+                breadcrumb: [
+                    {title: '首页', path: '/dashboard/index'},
+                    {title: '商城管理', path: '/shop/dec-order-list'},
+                ],
+            },
+
+        },
+        {
+            path: '/shop/index',
+            component: _import('shop/index'),
+            name: 'shop_index',
+            meta: {
+                title: '商品列表',
+                breadcrumb: [
+                    {title: '首页', path: '/dashboard/index'},
+                    {title: '商城管理', path: '/shop/dec-order-list'},
+                ],
+            },
+
+        },
+        {
+            path: '/shop/goods-add',
+            component: _import('shop/goods-add'),
+            name: 'shop_goods-add',
+            meta: {
+                title: '商品添加',
+                breadcrumb: [
+                    {title: '首页', path: '/dashboard/index'},
+                    {title: '商城管理', path: '/shop/dec-order-list'},
+                ],
+            },
+
+        },
+    ],
+  },
+  {
+    path: '/user',
+    component: layout,
+    redirect: '/user/index',
+    children: [
+      {
+        path: '/user/index',
+        component: _import('user/index'),
+        name: 'user_index',
+        meta: {
+          title: '会员列表',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '会员管理', path: '/user/index'},
+          ],
+        },
+      },
+      {
+        path: '/user/user-add-opt',
+        component: _import('user/user-add-opt'),
+        name: 'user_user-add-opt',
+        meta: {
+          title: '空单操作',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '会员管理', path: '/user/index'},
+          ],
+        },
+      },
+        {
+            path: '/user/empty-list',
+            component: _import('user/empty-list'),
+            name: 'user_empty_list',
+            meta: {
+                title: '空单列表',
+                breadcrumb: [
+                    {title: '首页', path: '/dashboard/index'},
+                    {title: '会员管理', path: '/user/index'},
+                ],
+            },
+        },
+      {
+        path: '/user/bind',
+        component: _import('user/bind'),
+        name: 'user_bind',
+        meta: {
+          title: '点位绑定',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '会员管理', path: '/user/index'},
+          ],
+        },
+      },
+      {
+        path: '/user/bind-add',
+        component: _import('user/bind-edit'),
+        name: 'user_bind-add',
+        meta: {
+          title: '添加点位绑定',
+          highLight: '/user/bind',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '会员管理', path: '/user/index'},
+            {title: '点位绑定', path: '/user/bind'},
+          ],
+        },
+      },
+      {
+        path: '/user/bind-edit/:id',
+        component: _import('user/bind-edit'),
+        name: 'user_bind-edit',
+        meta: {
+          title: '编辑点位绑定',
+          highLight: '/user/bind',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '会员管理', path: '/user/index'},
+            {title: '点位绑定', path: '/user/bind'},
+          ],
+        },
+      },
+      {
+        path: '/user/teamwork',
+        component: _import('user/teamwork'),
+        name: 'user_teamwork',
+        meta: {
+          title: '点位合作',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '会员管理', path: '/user/index'},
+          ],
+        },
+      },
+      {
+        path: '/user/teamwork-add',
+        component: _import('user/teamwork-edit'),
+        name: 'user_teamwork-add',
+        meta: {
+          title: '添加点位合作',
+          highLight: '/user/teamwork',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '会员管理', path: '/user/index'},
+            {title: '点位合作', path: '/user/teamwork'},
+          ],
+        },
+      },
+      {
+        path: '/user/teamwork-edit/:id',
+        component: _import('user/teamwork-edit'),
+        name: 'user_teamwork-edit',
+        meta: {
+          title: '编辑点位合作',
+          highLight: '/user/teamwork',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '会员管理', path: '/user/index'},
+            {title: '点位合作', path: '/user/teamwork'},
+          ],
+        },
+      },
+      {
+        path: '/user/system',
+        component: _import('user/system'),
+        name: 'user_system',
+        meta: {
+          title: '体系管理',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '会员管理', path: '/user/index'},
+          ],
+        },
+      },
+      {
+        path: '/user/system-add',
+        component: _import('user/system-edit'),
+        name: 'user_system-add',
+        meta: {
+          title: '添加体系',
+          highLight: '/user/system',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '会员管理', path: '/user/index'},
+            {title: '体系管理', path: '/user/system'},
+          ],
+        },
+      },
+      {
+        path: '/user/system-edit/:id',
+        component: _import('user/system-edit'),
+        name: 'user_system-edit',
+        meta: {
+          title: '编辑体系',
+          highLight: '/user/system',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '会员管理', path: '/user/index'},
+            {title: '体系管理', path: '/user/system'},
+          ],
+        },
+      },
+      {
+        path: '/user/group',
+        component: _import('user/group'),
+        name: 'user_group',
+        meta: {
+          title: '团队领导人列表',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '会员管理', path: '/user/index'},
+          ],
+        },
+      },
+      {
+        path: '/user/move',
+        component: _import('user/move'),
+        name: 'user_move',
+        meta: {
+          title: '移网管理',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '会员管理', path: '/user/index'},
+          ],
+        },
+      },
+      {
+        path: '/user/move-add',
+        component: _import('user/move-add'),
+        name: 'user_move-add',
+        meta: {
+          title: '申请移网',
+          highLight: '/user/move',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '会员管理', path: '/user/index'},
+            {title: '移网管理', path: '/user/move'},
+          ],
+        },
+      },
+      {
+        path: '/user/reg-info',
+        component: _import('user/reg-info'),
+        name: 'user_reg-info',
+        meta: {
+          title: '注册信息报表',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '会员管理', path: '/user/index'},
+          ],
+        },
+      },
+      {
+        path: '/user/reg-info-audit',
+        component: _import('user/reg-info-audit'),
+        name: 'user_reg-info-audit',
+        meta: {
+          title: '注册信息审核',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '会员管理', path: '/user/index'},
+          ],
+        },
+      },
+      {
+        path: '/user/reg-info-audit-add-opt/:id?',
+        component: _import('user/reg-info-audit-add-opt'),
+        name: 'user_reg-info-audit-add-opt',
+        meta: {
+          title: '注册信息添加操作',
+          highLight: '/user/reg-info-audit',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '会员管理', path: '/user/index'},
+            {title: '注册信息审核', path: '/user/reg-info-audit'},
+          ],
+        },
+      },
+      {
+        path: '/user/status-audit-list',
+        component: _import('user/status-audit-list'),
+        name: 'user_status-audit-list',
+        meta: {
+          title: '会员状态管理',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '会员管理', path: '/user/index'},
+          ],
+        },
+      },
+      {
+        path: '/user/status-audit-add',
+        component: _import('user/status-audit-add'),
+        name: 'user_status-audit-add',
+        meta: {
+          title: '申请修改会员状态',
+          highLight: '/user/status-audit-list',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '会员管理', path: '/user/index'},
+            {title: '会员状态管理', path: '/user/status-audit-list'},
+          ],
+        },
+      },
+      {
+        path: '/user/status-audit-add/:userName',
+        component: _import('user/status-audit-add'),
+        name: 'user_status-audit-add-username',
+        meta: {
+          title: '申请修改会员状态',
+          highLight: '/user/status-audit-list',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '会员管理', path: '/user/index'},
+            {title: '会员状态管理', path: '/user/status-audit-list'},
+          ],
+        },
+      },
+        {
+            path: '/user/dec-level-list',
+            component: _import('user/dec-level-list'),
+            name: 'user_dec-level-list',
+            meta: {
+                title: '会员级别调整列表',
+                breadcrumb: [
+                    {title: '首页', path: '/dashboard/index'},
+                    {title: '会员管理', path: '/user/index'},
+                ],
+            },
+        },
+      {
+        path: '/user/change-user-dec-level',
+        component: _import('user/change-user-dec-level'),
+        name: 'user_change-user-dec-level',
+        meta: {
+          title: '修改会员级别',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '会员管理', path: '/user/index'},
+          ],
+        },
+      },
+      {
+        path: '/user/change-user-dec-role',
+        component: _import('user/change-user-dec-role'),
+        name: 'user_change-user-dec-role',
+        meta: {
+          title: '修改报单中心级别',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '会员管理', path: '/user/index'},
+          ],
+        },
+      },
+      {
+        path: '/user/year-highest-emp-lv',
+        component: _import('user/year-highest-emp-lv'),
+        name: 'user_year-highest-emp-lv',
+        meta: {
+          title: '会员历史年度最高聘级表',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '会员管理', path: '/user/index'},
+          ],
+        },
+      },
+      {
+        path: '/user/change-show-emp-level',
+        component: _import('user/change-show-emp-level'),
+        name: 'user_change-show-emp-level',
+        meta: {
+          title: '修改会员前台显示聘级',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '会员管理', path: '/user/index'},
+          ],
+        },
+      },
+    ]
+  },
+  {
+    path: '/atlas',
+    component: layout,
+    redirect: '/atlas/relation-opt',
+    children: [
+      {
+        path: '/atlas/relation-opt',
+        component: _import('atlas/relation-opt'),
+        name: 'atlas_relation-opt',
+        meta: {
+          title: '开拓网络',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '网络图谱', path: '/atlas/relation-opt'},
+          ],
+        },
+      },
+      {
+        path: '/atlas/network-opt',
+        component: _import('atlas/network-opt'),
+        name: 'atlas_network-opt',
+        meta: {
+          title: '安置网络',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '网络图谱', path: '/atlas/relation-opt'},
+          ],
+        },
+      },
+      {
+        path: '/atlas/network-line-opt',
+        component: _import('atlas/network-line-opt'),
+        name: 'atlas_network-line-opt',
+        meta: {
+          title: '安置链路',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '网络图谱', path: '/atlas/relation-opt'},
+          ],
+        },
+      },
+      {
+        path: '/atlas/emp-user-line',
+        component: _import('atlas/emp-user-line'),
+        name: 'atlas_emp-user-line',
+        meta: {
+          title: '聘级网络',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '网络图谱', path: '/atlas/relation-opt'},
+          ],
+        },
+      },
+      // {
+      //   path: '/atlas/emp-user-list',
+      //   component: _import('atlas/emp-user-list'),
+      //   name: 'atlas_emp-user-list',
+      //   meta: {
+      //     title: '聘级网络列表',
+      //     breadcrumb: [
+      //       {title: '首页', path: '/dashboard/index'},
+      //       {title: '网络图谱', path: '/atlas/relation-opt'},
+      //     ],
+      //   },
+      // },
+
+
+    ]
+  },
+  {
+    path: '/reconsume',
+    component: layout,
+    redirect: '/reconsume/pool-list',
+    children: [
+      {
+        path: '/reconsume/pool-list',
+        component: _import('reconsume/pool-list'),
+        name: 'reconsume_pool-list',
+        meta: {
+          title: '复销池余额列表',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '复销管理', path: '/reconsume/pool-list'},
+          ],
+        },
+      },
+      {
+        path: '/reconsume/deduct',
+        component: _import('reconsume/deduct'),
+        name: 'reconsume_deduct',
+        meta: {
+          title: '手动扣除月复销',
+          highLight: '/reconsume/deduct',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '复销管理', path: '/reconsume/pool-list'},
+          ],
+        },
+      },
+      {
+        path: '/reconsume/change-audit-list',
+        component: _import('reconsume/change-audit-list'),
+        name: 'reconsume_change-audit-list',
+        meta: {
+          title: '复销余额调整审核',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '复销管理', path: '/reconsume/pool-list'},
+          ],
+        },
+      },
+      {
+        path: '/reconsume/change-audit-add/:userName?',
+        component: _import('reconsume/change-audit-add'),
+        name: 'reconsume_change-audit-add',
+        meta: {
+          title: '申请调整复销池余额',
+          highLight: '/reconsume/change-audit-list',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '复销管理', path: '/reconsume/pool-list'},
+            {title: '复销余额调整审核', path: '/reconsume/change-audit-list'},
+          ],
+        },
+      },
+      {
+        path: '/reconsume/deduct-audit-list',
+        component: _import('reconsume/deduct-audit-list'),
+        name: 'reconsume_deduct-audit-list',
+        meta: {
+          title: '扣除复销审核',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '复销管理', path: '/reconsume/pool-list'},
+          ],
+        },
+      },
+      {
+        path: '/reconsume/deduct-audit-add',
+        component: _import('reconsume/deduct-audit-add'),
+        name: 'reconsume_deduct-audit-add',
+        meta: {
+          title: '手动扣除月复销',
+          highLight: '/reconsume/deduct-audit-list',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '复销管理', path: '/reconsume/pool-list'},
+          ],
+        },
+      },
+      {
+        path: '/reconsume/flow-list',
+        component: _import('reconsume/flow-list'),
+        name: 'reconsume_flow-list',
+        meta: {
+          title: '复销流水',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '复销管理', path: '/reconsume/pool-list'},
+          ],
+        },
+      },
+    ]
+  },
+  {
+    path: '/bonus',
+    component: layout,
+    redirect: '/bonus/period',
+    children: [
+      {
+        path: '/bonus/prepare-period',
+        component: _import('bonus/prepare-period'),
+        name: 'bonus_prepare-period',
+        meta: {
+          title: '预算月业绩',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
+      },
+      {
+        path: '/bonus/period',
+        component: _import('bonus/period'),
+        name: 'bonus_period',
+        meta: {
+          title: '封期管理',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
+      },
+      {
+        path: '/bonus/balance-list',
+        component: _import('bonus/balance-list'),
+        name: 'bonus_balance-list',
+        meta: {
+          title: '会员奖金余额',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
+      },
+
+      {
+        path: '/bonus/period-detail/:periodNum',
+        component: _import('bonus/period-detail'),
+        name: 'bonus_period-detail',
+        meta: {
+          title: '期奖金明细',
+          highLight: '/bonus/period',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+            {title: '封期管理', path: '/bonus/period'},
+          ],
+        },
+      },
+      {
+        path: '/bonus/new-period-bonus',
+        component: _import('bonus/new-period-bonus'),
+        name: 'bonus_new-period-bonus',
+        meta: {
+          title: '最新奖金',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
+      },
+      {
+        path: '/bonus/other-period-bonus',
+        component: _import('bonus/other-period-bonus'),
+        name: 'bonus_other-period-bonus',
+        meta: {
+          title: '往期奖金',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
+      },
+      {
+        path: '/bonus/flow-bonus',
+        component: _import('bonus/flow-bonus'),
+        name: 'bonus_flow-bonus',
+        meta: {
+          title: '奖金流水',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
+      },
+      {
+        path: '/bonus/flow-rp',
+        component: _import('bonus/flow-rp'),
+        name: 'bonus_flow-rp',
+        meta: {
+          title: '复消积分流水',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
+      },
+      {
+        path: '/bonus/flow-balance',
+        component: _import('bonus/flow-balance'),
+        name: 'bonus_flow-balance',
+        meta: {
+          title: '用户余额流水',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
+      },
+      {
+        path: '/bonus/flow-exchange',
+        component: _import('bonus/flow-exchange'),
+        name: 'bonus_flow-exchange',
+        meta: {
+          title: '兑换点数流水',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
+      },
+      {
+        path: '/bonus/flow-lx',
+        component: _import('bonus/flow-lx'),
+        name: 'bonus_flow-lx',
+        meta: {
+          title: '领袖分红奖流水',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
+      },
+      {
+        path: '/bonus/cf-lx-audit-list',
+        component: _import('bonus/cf-lx-audit-list'),
+        name: 'bonus_cf-lx-audit-list',
+        meta: {
+          title: '年度奖金发放审核',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
+      },
+      {
+        path: '/bonus/cf-lx-apply',
+        component: _import('bonus/cf-lx-apply'),
+        name: 'bonus_cf-lx-apply',
+        meta: {
+          title: '申请发放年度奖',
+          highLight: '/bonus/cf-lx-audit-list',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+            {title: '年度奖金发放审核', path: '/bonus/cf-lx-audit-list'},
+          ],
+        },
+      },
+      {
+        path: '/bonus/perf',
+        component: _import('bonus/perf'),
+        name: 'bonus_perf',
+        meta: {
+          title: '业绩管理',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
+      },
+      {
+        path: '/bonus/calc-qy',
+        component: _import('bonus/calc-qy'),
+        name: 'bonus_calc-qy',
+        meta: {
+          title: '区域津贴核算',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
+      },
+      {
+        path: '/bonus/resend-qy-list',
+        component: _import('bonus/resend-qy-list'),
+        name: 'bonus_resend-qy-list',
+        meta: {
+          title: '区域津贴补发列表',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
+      },
+      {
+        path: '/bonus/resend-qy-audit-list',
+        component: _import('bonus/resend-qy-audit-list'),
+        name: 'bonus_resend-qy-audit-list',
+        meta: {
+          title: '补发区域津贴审核列表',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
+      },
+      {
+        path: '/bonus/trace-down-qy',
+        component: _import('bonus/trace-down-qy'),
+        name: 'bonus_trace-down-qy',
+        meta: {
+          title: '团队奖向下追溯',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
+      },
+      {
+        path: '/bonus/trace-up-qy',
+        component: _import('bonus/trace-up-qy'),
+        name: 'bonus_trace-up-qy',
+        meta: {
+          title: '团队奖向上追溯',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
+      },
+      {
+        path: '/bonus/trace-down-yc',
+        component: _import('bonus/trace-down-yc'),
+        name: 'bonus_trace-down-yc',
+        meta: {
+          title: '荣衔奖向下追溯',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
+      },
+      {
+        path: '/bonus/trace-up-yc',
+        component: _import('bonus/trace-up-yc'),
+        name: 'bonus_trace-up-yc',
+        meta: {
+          title: '荣衔奖向上追溯',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
+      },
+      {
+          path: '/bonus/trace-down-bd',
+          component: _import('bonus/trace-down-bd'),
+          name: 'bonus_trace-down-bd',
+          meta: {
+              title: '报单奖向下追溯',
+              breadcrumb: [
+                  {title: '首页', path: '/dashboard/index'},
+                  {title: '奖金管理', path: '/bonus/period'},
+              ],
+          },
+      },
+      {
+          path: '/bonus/trace-up-bd',
+          component: _import('bonus/trace-up-bd'),
+          name: 'bonus_trace-up-bd',
+          meta: {
+              title: '报单奖向上追溯',
+              breadcrumb: [
+                  {title: '首页', path: '/dashboard/index'},
+                  {title: '奖金管理', path: '/bonus/period'},
+              ],
+          },
+      },
+      {
+          path: '/bonus/trace-down-tg',
+          component: _import('bonus/trace-down-tg'),
+          name: 'bonus_trace-down-tg',
+          meta: {
+              title: '推广奖向下追溯',
+              breadcrumb: [
+                  {title: '首页', path: '/dashboard/index'},
+                  {title: '奖金管理', path: '/bonus/period'},
+              ],
+          },
+      },
+      {
+          path: '/bonus/trace-up-tg',
+          component: _import('bonus/trace-up-tg'),
+          name: 'bonus_trace-up-tg',
+          meta: {
+              title: '推广奖向上追溯',
+              breadcrumb: [
+                  {title: '首页', path: '/dashboard/index'},
+                  {title: '奖金管理', path: '/bonus/period'},
+              ],
+          },
+      },
+      {
+        path: '/bonus/trace-down-xf',
+        component: _import('bonus/trace-down-xf'),
+        name: 'bonus_trace-down-xf',
+        meta: {
+          title: '消费奖向下追溯',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
+      },
+      {
+        path: '/bonus/trace-up-xf',
+        component: _import('bonus/trace-up-xf'),
+        name: 'bonus_trace-up-xf',
+        meta: {
+          title: '消费奖向上追溯',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
+      },
+      {
+          path: '/bonus/trace-down-yj',
+          component: _import('bonus/trace-down-yj'),
+          name: 'bonus_trace-down-yj',
+          meta: {
+              title: '业绩奖向下追溯',
+              breadcrumb: [
+                  {title: '首页', path: '/dashboard/index'},
+                  {title: '奖金管理', path: '/bonus/period'},
+              ],
+          },
+      },
+      {
+          path: '/bonus/trace-up-yj',
+          component: _import('bonus/trace-up-yj'),
+          name: 'bonus_trace-up-yj',
+          meta: {
+              title: '业绩奖向上追溯',
+              breadcrumb: [
+                  {title: '首页', path: '/dashboard/index'},
+                  {title: '奖金管理', path: '/bonus/period'},
+              ],
+          },
+      },
+      {
+          path: '/bonus/trace-down-gx',
+          component: _import('bonus/trace-down-gx'),
+          name: 'bonus_trace-down-gx',
+          meta: {
+              title: '共享奖向下追溯',
+              breadcrumb: [
+                  {title: '首页', path: '/dashboard/index'},
+                  {title: '奖金管理', path: '/bonus/period'},
+              ],
+          },
+      },
+      {
+          path: '/bonus/trace-up-gx',
+          component: _import('bonus/trace-up-gx'),
+          name: 'bonus_trace-up-gx',
+          meta: {
+              title: '共享奖向上追溯',
+              breadcrumb: [
+                  {title: '首页', path: '/dashboard/index'},
+                  {title: '奖金管理', path: '/bonus/period'},
+              ],
+          },
+      },
+      {
+          path: '/bonus/trace-down-gl',
+          component: _import('bonus/trace-down-gl'),
+          name: 'bonus_trace-down-gl',
+          meta: {
+              title: '管理奖向下追溯',
+              breadcrumb: [
+                  {title: '首页', path: '/dashboard/index'},
+                  {title: '奖金管理', path: '/bonus/period'},
+              ],
+          },
+      },
+      {
+          path: '/bonus/trace-up-gl',
+          component: _import('bonus/trace-up-gl'),
+          name: 'bonus_trace-up-gl',
+          meta: {
+              title: '管理奖向上追溯',
+              breadcrumb: [
+                  {title: '首页', path: '/dashboard/index'},
+                  {title: '奖金管理', path: '/bonus/period'},
+              ],
+          },
+      },
+      {
+        path: '/bonus/trace-down-fx',
+        component: _import('bonus/trace-down-fx'),
+        name: 'bonus_trace-down-fx',
+        meta: {
+          title: '复销奖向下追溯',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
+      },
+      {
+        path: '/bonus/trace-up-fx',
+        component: _import('bonus/trace-up-fx'),
+        name: 'bonus_trace-up-fx',
+        meta: {
+          title: '复销奖向上追溯',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
+      },
+      {
+        path: '/bonus/trace-bt',
+        component: _import('bonus/trace-bt'),
+        name: 'bonus_trace-bt',
+        meta: {
+          title: '报单中心补贴追溯',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
+      },
+      {
+        path: '/bonus/trace-fl',
+        component: _import('bonus/trace-fl'),
+        name: 'bonus_trace-fl',
+        meta: {
+          title: '报单中心货补追溯',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
+      },
+      {
+        path: '/bonus/trace-fw',
+        component: _import('bonus/trace-fw'),
+        name: 'bonus_trace-fw',
+        meta: {
+          title: '区域业绩提成追溯',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
+      },
+      {
+        path: '/bonus/perf-order',
+        component: _import('bonus/perf-order'),
+        name: 'bonus_perf-order',
+        meta: {
+          title: '业绩单',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
+      },
+      {
+        path: '/bonus/perf-period-list',
+        component: _import('bonus/perf-period-list'),
+        name: 'bonus_perf-period-list',
+        meta: {
+          title: '期业绩',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
+      },
+      {
+          path: '/bonus/perf-month',
+          component: _import('bonus/perf-month'),
+          name: 'bonus_perf-month',
+          meta: {
+              title: '月业绩',
+              breadcrumb: [
+                  {title: '首页', path: '/dashboard/index'},
+                  {title: '奖金管理', path: '/bonus/period'},
+              ],
+          },
+      },
+      {
+        path: '/bonus/perf-standard',
+        component: _import('bonus/perf-standard'),
+        name: 'bonus_perf-standard',
+        meta: {
+          title: '达标业绩',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
+      },
+      {
+        path: '/bonus/score-month',
+        component: _import('bonus/score-month'),
+        name: 'bonus_score-month',
+        meta: {
+          title: '月积分',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
+      },
+      {
+        path: '/bonus/real-time-perf',
+        component: _import('bonus/real-time-perf'),
+        name: 'bonus_real-time-perf',
+        meta: {
+          title: '会员实时业绩',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
+      },
+      {
+        path: '/bonus/yc-perf',
+        component: _import('bonus/yc-perf'),
+        name: 'bonus_yc-perf',
+        meta: {
+          title: '荣衔业绩',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
+      },
+      {
+        path: '/bonus/user-perf',
+        component: _import('bonus/user-perf'),
+        name: 'leo-user-perf-table',
+        meta: {
+          title: '用户业绩',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/period'},
+          ],
+        },
+      },
+    ]
+  },
+  {
+    path: '/report',
+    component: layout,
+    redirect: '/report/dec',
+    children: [
+      {
+        path: '/report/dec',
+        component: _import('report/dec'),
+        name: 'report_dec',
+        meta: {
+          title: '报单查询',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '报表管理', path: '/report/dec'},
+          ],
+        },
+      },
+    ]
+  },
+  {
+    path: '/finance',
+    component: layout,
+    redirect: '/finance/balance-audit-list',
+    children: [
+      {
+        path: '/finance/balance-audit-list',
+        component: _import('finance/balance-audit-list'),
+        name: 'finance_balance-audit-list',
+        meta: {
+          title: '会员余额调整列表',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '财务管理', path: '/finance/balance-audit-list'},
+          ],
+        },
+      },
+      {
+        path: '/finance/change-balance-opt',
+        component: _import('finance/change-balance-opt'),
+        name: 'finance_change-balance-opt',
+        meta: {
+          title: '申请调整会员余额',
+          highLight: '/finance/balance-audit-list',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '财务管理', path: '/finance/balance-audit-list'},
+            {title: '会员余额调整列表', path: '/finance/balance-audit-list'},
+          ],
+        },
+      },
+      {
+        path: '/finance/dec-list',
+        component: _import('finance/dec-list'),
+        name: 'finance_dec-list',
+        meta: {
+          title: '报单订货单列表',
+          highLight: '/finance/dec-list',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '财务管理', path: '/finance/balance-audit-list'},
+          ],
+        },
+      },
+      {
+        path: '/finance/transfer-list',
+        component: _import('finance/transfer-list'),
+        name: 'finance_transfer-list',
+        meta: {
+          title: '转账记录列表',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '财务管理', path: '/finance/balance-audit-list'},
+          ],
+        },
+      },
+      {
+        path: '/finance/withdraw',
+        component: _import('finance/withdraw'),
+        name: 'finance_withdraw',
+        meta: {
+          title: '提现管理',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '提现管理', path: '/finance/withdraw'},
+          ],
+        },
+      },
+      {
+        path: '/finance/withdraw-add',
+        component: _import('finance/withdraw-add'),
+        name: 'finance_withdraw-add',
+        meta: {
+          title: '新增提现',
+          highLight: '/finance/withdraw',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '提现管理', path: '/finance/withdraw'},
+            {title: '新增提现', path: '/finance/withdraw-add'},
+          ],
+        },
+      },
+      {
+        path: '/finance/invoice-audit',
+        component: _import('finance/invoice-audit'),
+        name: 'finance_invoice-audit',
+        meta: {
+          title: '发票管理',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '发票管理', path: '/finance/invoice-audit'},
+          ],
+        },
+      },
+      {
+        path: '/finance/perf-audit-list',
+        component: _import('finance/perf-audit-list'),
+        name: 'finance_perf-audit-list',
+        meta: {
+          title: '会员业绩调整列表',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '财务管理', path: '/finance/balance-audit-list'},
+          ],
+        },
+      },
+      {
+        path: '/finance/perf-apply',
+        component: _import('finance/perf-apply'),
+        name: 'finance_perf-apply',
+        meta: {
+          title: '调整会员业绩',
+          highLight: '/finance/perf-audit-list',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '财务管理', path: '/finance/balance-audit-list'},
+            {title: '调整会员业绩', path: '/finance/perf-audit-list'},
+          ],
+        },
+      },
+      {
+        path: '/finance/deal-type',
+        component: _import('finance/deal-type'),
+        name: 'finance_deal-type',
+        meta: {
+          title: '交易类型',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '交易类型', path: '/finance/deal-type'},
+          ],
+        },
+      },
+      {
+        path: '/finance/deal-type-add',
+        component: _import('finance/deal-type-add'),
+        name: 'finance_deal-type-add',
+        meta: {
+          title: '交易类型添加',
+          highLight: '/finance/deal-type',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '交易类型', path: '/finance/deal-type'},
+            {title: '交易类型添加', path: '/finance/deal-type-add'},
+          ],
+        },
+      },
+      {
+        path: '/finance/history-bonus',
+        component: _import('finance/history-bonus'),
+        name: 'finance_history-bonus',
+        meta: {
+          title: '历史奖金余额',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '财务管理', path: '/finance/balance-audit-list'},
+          ],
+        },
+      },
+        {
+            path: '/finance/recharge',
+            component: _import('finance/recharge'),
+            name: 'finance_recharge',
+            meta: {
+                title: '充值管理',
+                breadcrumb: [
+                    {title: '首页', path: '/dashboard/index'},
+                    {title: '财务管理', path: '/finance/balance-audit-list'},
+                ],
+            },
+        },
+        {
+            path: '/finance/recharge-status',
+            component: _import('finance/recharge-status'),
+            name: 'finance_recharge-status',
+            meta: {
+                title: '状态管理',
+                breadcrumb: [
+                    {title: '首页', path: '/dashboard/index'},
+                    {title: '财务管理', path: '/finance/balance-audit-list'},
+                ],
+            },
+        },
+    ]
+  },
+  {
+    path: '/article',
+    component: layout,
+    redirect: '/article/category',
+    children: [
+      {
+        path: '/article/category',
+        component: _import('article/category'),
+        name: 'article_category',
+        meta: {
+          title: '分类管理',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '分类管理', path: '/article/category'},
+          ],
+        },
+      },
+      {
+        path: '/article/category-add',
+        component: _import('article/category-add'),
+        name: 'article_category-add',
+        meta: {
+          title: '添加分类',
+          highLight: '/article/category-add',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '分类管理', path: '/article/category'},
+            {title: '添加分类', path: '/article/category-add'},
+          ],
+        },
+      },
+      {
+        path: '/article/index',
+        component: _import('article/index'),
+        name: 'article_index',
+        meta: {
+          title: '文章列表',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '文章列表', path: '/article/index'},
+          ],
+        },
+      },
+      {
+        path: '/article/add',
+        component: _import('article/edit'),
+        name: 'article_add',
+        meta: {
+          title: '添加文章',
+          highLight: '/article/index',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '文章列表', path: '/article/index'},
+            {title: '添加文章', path: '/article/add'},
+          ],
+        },
+      },
+      {
+        path: '/article/edit/:id',
+        component: _import('article/edit'),
+        name: 'article_edit',
+        meta: {
+          title: '编辑文章',
+          highLight: '/article/index',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '文章列表', path: '/article/index'},
+            {title: '编辑文章', path: '/article/edit'},
+          ],
+        },
+      },
+    ]
+  },
+  {
+    path: '/message',
+    component: layout,
+    redirect: '/message/list',
+    children: [
+      {
+        path: '/message/list',
+        component: _import('message/list'),
+        name: 'message_list',
+        meta: {
+          title: '站内信列表',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '站内信管理', path: '/message/list'},
+          ],
+        },
+      },
+      {
+        path: '/message/add',
+        component: _import('message/edit'),
+        name: 'message_add',
+        meta: {
+          title: '添加站内信',
+          highLight: '/message/list',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '站内信管理', path: '/message/list'},
+            {title: '站内信列表', path: '/message/list'},
+          ],
+        },
+      },
+    ]
+  },
+  {
+    path: '/file',
+    component: layout,
+    redirect: '/file/export',
+    children: [
+      {
+        path: '/file/export',
+        component: _import('file/export'),
+        name: 'file_export',
+        meta: {
+          title: '导出文件',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '文件管理', path: '/bonus/period'},
+          ],
+        },
+      },
+    ]
+  },
+  {
+    path: '/admin',
+    component: layout,
+    redirect: '/admin/index',
+    children: [
+      {
+        path: '/admin/change-password',
+        component: _import('admin/edit'),
+        name: 'admin_change-password',
+        meta: {
+          title: '重置密码',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '管理员管理', path: '/admin/index'},
+          ],
+        },
+      },
+      {
+        path: '/admin/index',
+        component: _import('admin/index'),
+        name: 'admin_index',
+        meta: {
+          title: '管理员列表',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '管理员管理', path: '/admin/index'},
+          ],
+        },
+      }, {
+        path: '/admin/add',
+        component: _import('admin/edit'),
+        name: 'admin_add',
+        meta: {
+          title: '添加管理员',
+          highLight: '/admin/index',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '管理员管理', path: '/admin/index'},
+            {title: '管理员列表', path: '/admin/index'},
+          ],
+        },
+      }, {
+        path: '/admin/edit/:id',
+        component: _import('admin/edit'),
+        name: 'admin_edit',
+        meta: {
+          title: '编辑管理员',
+          highLight: '/admin/index',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '管理员管理', path: '/admin/index'},
+            {title: '管理员列表', path: '/admin/index'},
+          ],
+        },
+      }, {
+        path: '/admin/role',
+        component: _import('admin/role'),
+        name: 'admin_role',
+        meta: {
+          title: '管理员角色列表',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '管理员管理', path: '/admin/index'},
+          ],
+        },
+      }, {
+        path: '/admin/role-add',
+        component: _import('admin/role-add'),
+        name: 'admin_role-add',
+        meta: {
+          title: '添加管理员角色',
+          highLight: '/admin/role',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '管理员管理', path: '/admin/index'},
+            {title: '管理员角色列表', path: '/admin/role'},
+          ],
+        },
+      },{
+        path: '/admin/role-edit/:id',
+        component: _import('admin/role-add'),
+        name: 'admin_role-edit',
+        meta: {
+          title: '编辑管理员角色',
+          highLight: '/admin/role',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '管理员管理', path: '/admin/index'},
+            {title: '管理员角色列表', path: '/admin/role'},
+          ],
+        },
+      }, {
+        path: '/admin/role-permission/:id',
+        component: _import('admin/role-permission'),
+        name: 'admin_role-permission',
+        meta: {
+          title: '管理员角色权限',
+          highLight: '/admin/role',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '管理员管理', path: '/admin/index'},
+            {title: '管理员角色列表', path: '/admin/role'},
+          ],
+        },
+      }, {
+        path: '/admin/role-column/:id',
+        component: _import('admin/role-column'),
+        name: 'admin_role-column',
+        meta: {
+          title: '管理员角色列表字段权限',
+          highLight: '/admin/role',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '管理员管理', path: '/admin/index'},
+            {title: '管理员角色列表', path: '/admin/role'},
+          ],
+        },
+      }, {
+        path: '/admin/test',
+        component: _import('admin/test'),
+        name: 'admin_test',
+      }]
+  },
+  {
+    path: '/ad',
+    component: layout,
+    redirect: '/ad/location',
+    children: [
+      {
+        path: '/ad/location',
+        component: _import('ad/location'),
+        name: 'ad_location',
+        meta: {
+          title: '广告位',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '广告管理', path: '/ad/location'},
+          ],
+        },
+      },
+      {
+        path: '/ad/list/:lid',
+        component: _import('ad/list'),
+        name: 'ad_list',
+        meta: {
+          title: '广告列表',
+          highLight: '/ad/location',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '广告管理', path: '/ad/location'},
+            {title: '广告位', path: '/ad/location'},
+          ],
+        },
+      },
+      {
+        path: '/ad/add',
+        component: _import('ad/edit'),
+        name: 'ad_add',
+        meta: {
+          title: '添加广告',
+          highLight: '/ad/location',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '广告管理', path: '/ad/location'},
+            {title: '广告位', path: '/ad/location'},
+          ],
+        },
+      },
+      {
+        path: '/ad/edit/:id',
+        component: _import('ad/edit'),
+        name: 'ad_edit',
+        meta: {
+          title: '编辑广告',
+          highLight: '/ad/location',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '广告管理', path: '/ad/location'},
+            {title: '广告位', path: '/ad/location'},
+          ],
+        },
+      },
+    ]
+  },
+  {
+    path: '/log',
+    component: layout,
+    redirect: '/log/admin-login',
+    children: [
+      {
+        path: '/log/admin-login',
+        component: _import('log/admin-login'),
+        name: 'log_admin-login',
+        meta: {
+          title: '管理员登录日志',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '日志管理', path: '/log/admin-login'},
+          ],
+        },
+      },
+      {
+        path: '/log/user-login',
+        component: _import('log/user-login'),
+        name: 'log_user-login',
+        meta: {
+          title: '会员登录日志',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '日志管理', path: '/log/user-login'},
+          ],
+        },
+      },
+      {
+        path: '/log/admin-handle',
+        component: _import('log/admin-handle'),
+        name: 'log_admin-handle',
+        meta: {
+          title: '管理员操作日志',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '日志管理', path: '/log/admin-login'},
+          ],
+        },
+      },
+      {
+        path: '/log/user-handle',
+        component: _import('log/user-handle'),
+        name: 'log_user-handle',
+        meta: {
+          title: '会员操作日志',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '日志管理', path: '/log/admin-login'},
+          ],
+        },
+      },
+      {
+        path: '/log/system',
+        component: _import('log/system'),
+        name: 'log_system',
+        meta: {
+          title: '系统日志',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '日志管理', path: '/log/admin-login'},
+          ],
+        },
+      },
+    ]
+  },
+  {
+    path: '/config',
+    component: layout,
+    redirect: '/config/base',
+    children: [
+      {
+        path: '/config/base',
+        component: _import('config/base'),
+        name: 'config_base',
+        meta: {
+          title: '站点设置',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '配置', path: '/config/base'},
+          ],
+        },
+      }, {
+        path: '/config/period',
+        component: _import('config/period'),
+        name: 'config_period',
+        meta: {
+          title: '期数配置',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '配置', path: '/config/index'},
+          ],
+        },
+      }, {
+        path: '/config/other',
+        component: _import('config/other'),
+        name: 'config_other',
+        meta: {
+          title: '其他配置',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '配置', path: '/config/index'},
+          ],
+        },
+      }, {
+        path: '/config/dec-level',
+        component: _import('config/dec-level'),
+        name: 'config_dec-level',
+        meta: {
+          title: '会员级别配置',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '配置', path: '/config/index'},
+          ],
+        },
+      }, {
+        path: '/config/dec-level-add',
+        component: _import('config/dec-level-edit'),
+        name: 'config_dec-level-add',
+        meta: {
+          title: '添加会员级别',
+          highLight: '/config/dec-level',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '配置', path: '/config/index'},
+            {title: '会员级别配置', path: '/config/dec-level'},
+          ],
+        },
+      }, {
+        path: '/config/dec-level-edit/:id',
+        component: _import('config/dec-level-edit'),
+        name: 'config_dec-level-edit',
+        meta: {
+          title: '编辑会员级别',
+          highLight: '/config/dec-level',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '配置', path: '/config/index'},
+            {title: '会员级别配置', path: '/config/dec-level'},
+          ],
+        },
+      }, {
+        path: '/config/dec-role',
+        component: _import('config/dec-role'),
+        name: 'config_dec-role',
+        meta: {
+          title: '报单中心级别配置',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '配置', path: '/config/index'},
+          ],
+        },
+      }, {
+        path: '/config/dec-role-edit/:id',
+        component: _import('config/dec-role-edit'),
+        name: 'config_dec-role-edit',
+        meta: {
+          title: '编辑报单中心级别',
+          highLight: '/config/dec-role',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '配置', path: '/config/index'},
+            {title: '报单中心级别配置', path: '/config/dec-role'},
+          ],
+        },
+      }, {
+        path: '/config/emp-level',
+        component: _import('config/emp-level'),
+        name: 'config_emp-level',
+        meta: {
+          title: '会员聘级配置',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '配置', path: '/config/index'},
+          ],
+        },
+      }, {
+        path: '/config/emp-level-add',
+        component: _import('config/emp-level-edit'),
+        name: 'config_emp-level-add',
+        meta: {
+          title: '添加聘级',
+          highLight: '/config/emp-level',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '配置', path: '/config/index'},
+            {title: '聘级管理', path: '/config/emp-level'},
+          ],
+        },
+      }, {
+        path: '/config/emp-level-edit/:id',
+        component: _import('config/emp-level-edit'),
+        name: 'config_emp-level-edit',
+        meta: {
+          title: '编辑聘级',
+          highLight: '/config/emp-level',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '配置', path: '/config/index'},
+            {title: '聘级管理', path: '/config/emp-level'},
+          ],
+        },
+      }, {
+        path: '/config/reg-type',
+        component: _import('config/reg-type'),
+        name: 'config_reg-type',
+        meta: {
+          title: '会员注册类型配置',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '配置', path: '/config/index'},
+          ],
+        },
+      }, {
+        path: '/config/bonus-opt',
+        component: _import('config/bonus-opt'),
+        name: 'config_bonus-opt',
+        meta: {
+          title: '奖金设置',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '配置', path: '/config/index'},
+          ],
+        },
+      }, {
+        path: '/config/clear-data',
+        component: _import('config/clear-data'),
+        name: 'config_clear-data',
+        meta: {
+          title: '清空数据',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '配置', path: '/config/index'},
+          ],
+        },
+      }, {
+        path: '/config/api-opt',
+        component: _import('config/api-opt'),
+        name: 'config_api-opt',
+        meta: {
+          title: '第三方接口',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '配置', path: '/config/index'},
+          ],
+        },
+      }, {
+        path: '/config/api-edit/:type/:id',
+        component: _import('config/api-edit'),
+        name: 'config_api-edit',
+        meta: {
+          title: '编辑第三方接口',
+          highLight: '/config/api-opt',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '配置', path: '/config/index'},
+            {title: '第三方接口', path: '/config/api-opt'},
+          ],
+        },
+      },
+      {
+        path: '/config/sms',
+        component: _import('config/sms'),
+        name: 'config_sms',
+        meta: {
+          title: '短信配置',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '配置', path: '/config/index'},
+          ],
+        },
+      },
+      {
+        path: '/config/transfer',
+        component: _import('config/transfer'),
+        name: 'config_transfer',
+        meta: {
+          title: '转账配置',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '配置', path: '/config/index'},
+          ],
+        },
+      },
+      {
+        path: '/config/score',
+        component: _import('config/score'),
+        name: 'config_score',
+        meta: {
+          title: '积分配置',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '配置', path: '/config/index'},
+          ],
+        },
+      },
+    ]
+  }
+  // {
+  //     path: '/documentation',
+  //     component: Layout,
+  //     redirect: '/documentation/index',
+  //     children: [{
+  //         path: 'index',
+  //         component: _import('documentation/index'),
+  //         name: 'documentation',
+  //         meta: { title: 'documentation', icon: 'documentation', noCache: true }
+  //     }]
+  // }
+]
+
+export default new Router({
+  routes: constantRouterMap
+})

+ 2 - 0
common/components/SwooleAsyncTimer.php

@@ -22,6 +22,7 @@ use common\libs\taskQueue\TaskFunc;
 use common\models\UserInfo;
 use Yii;
 use anlity\swooleAsyncTimer\SwooleAsyncTimerController;
+use common\helpers\bonus\PreparePerfCalc;
 use yii\base\Exception;
 use yii\helpers\Json;
 
@@ -47,6 +48,7 @@ class SwooleAsyncTimer extends SwooleAsyncTimerComponent implements SocketInterf
      */
     public function timerCallback($timerId, $server){
         // 自动封期
+        PreparePerfCalc::instance()->calcStep(); // 预计算月业绩
         AutoClosePeriod::instance()->autoClose();
         // 自动执行任务队列中的任务
         Queue::instance()->consumeTask();

+ 328 - 327
common/config/params.php

@@ -1,327 +1,328 @@
-<?php
-$nationParams = require_once __DIR__ . '/params-nation.php';
-return [
-    'adminEmail' => 'admin@example.com',
-    'supportEmail' => 'support@example.com',
-    'nation' => $nationParams,
-    'backAccessTokenExpiresIn' => 3000 * 60,
-    'backRefreshTokenExpiresIn' => 3000 * 60 * 60,
-    'frontAccessTokenExpiresIn' => 3000 * 60,
-    'frontRefreshTokenExpiresIn' => 3000 * 60 * 60,
-    'user.passwordResetTokenExpire' => 3600,
-    'operationTimeOut' => 15 * 60,     // 这里设置的15分钟超时
-    'pageSize' => 20,
-    'http' => [
-        'shopApi' => [
-            'authKey' => 'sErypUtORfuloNdiTYLINArdtHErSAnDkiRPRElTaiNgIneUSEardopEnTAcErNO',
-            'timeDiff' => 0,
-        ],
-        'remoteUploadApi' => [
-            'authKey' => 'k4Ao7KWVbvg3Z2L6KLwN9OoDjQL5SioJffIPoODATxCynuEVEAt0278kg7r9FHiS',
-            'host' => $mainConfig['remoteUploadHost'],
-            'remoteUploadNotifyUrl' => '',
-        ],
-        'backendToFrontendApi' => [
-            'authKey' => 'hYkDsjhj6CfGMKbRMjoKtMauMEHiufyikGmziqy2anXYTMXhsUkrPC6YbvyHmdLD',
-            'timeDiff' => 0,
-        ],
-        'lingYunGongApi' => [
-            'host' => $mainConfig['idCardVerify']['host'],
-            'authToken' => [
-                'path' => '/uaa/v1/auth/tokens',
-                'clientId' => $mainConfig['idCardVerify']['clientId'],
-            ],
-            'hasIdCardInfoPath' => '/socialwork/v1/external/freedom-emps/has-idcard-info/%s',
-        ]
-//        'requestShop' => [
-//            'url' => $mainConfig['requestShopUrl'],
-//            'username' => 'bonus_api',
-//            'password' => 'bonus_api',
-//        ]
-
-    ],
-    'shopWalletType' => [
-        'cash' =>[
-            'value'=>'cash',
-            'title'=>'现金钱包',
-        ],
-    ],
-    'shopFlowType' => [
-        'remit' => [
-            'value' => 'remit',
-            'label' => '汇款充值',
-        ],
-        'recharge' => [
-            'value' => 'recharge',
-            'label' => '第三方充值',
-        ],
-        'transfer_out' => [
-            'value' => 'transfer_out',
-            'label' => '转出',
-        ],
-        'transfer_in' => [
-            'value' => 'transfer_in',
-            'label' => '转入',
-        ],
-        'pay' => [
-            'value' => 'pay',
-            'label' => '支付',
-        ],
-        'decRecharge' => [
-            'value' => 'decRecharge',
-            'label' => '报单充入',
-        ],
-        'orderRecharge' => [
-            'value' => 'orderRecharge',
-            'label' => '订货充入',
-        ],
-        'freight' => [
-            'value' => 'freight',
-            'label' => '支付运费',
-        ],
-        'adjust_recharge' => [
-            'value' => 'adjust_recharge',
-            'label' => '待调整充入',
-        ],
-        'adjust_deduct' => [
-            'value' => 'adjust_deduct',
-            'label' => '待调整扣除',
-        ],
-        'adjust_transfer_out' => [
-            'value' => 'adjust_transfer_out',
-            'label' => '待调整转出',
-        ],
-        'adjust_transfer_in' => [
-            'value' => 'adjust_transfer_in',
-            'label' => '待调整转入',
-        ],
-        'exchange_recharge' => [
-            'value' => 'exchange_recharge',
-            'label' => '换货充入',
-        ],
-        'exchange_deduct' => [
-            'value' => 'exchange_deduct',
-            'label' => '换货扣除',
-        ],
-        'delete_order_deduct' => [
-            'value' => 'delete_order_deduct',
-            'label' => '删单自动扣除',
-        ],
-        'delete_order_recharge' => [
-            'value' => 'delete_order_recharge',
-            'label' => '删单自动充入',
-        ],
-        'delete_order_return' => [
-            'value' => 'delete_order_return',
-            'label' => '删单扣回',
-        ],
-        'repair_pay' => [
-            'value' => 'repair_pay',
-            'label' => '支付维修费',
-        ],
-        'after_sale_exchange_recharge' => [
-            'value' => 'after_sale_exchange_recharge',
-            'label' => '售后调货充入',
-        ],
-        'after_sale_exchange_deduct' => [
-            'value' => 'after_sale_exchange_deduct',
-            'label' => '售后调货扣费',
-        ],
-        'oms_deduct' => [
-            'value' => 'oms_deduct',
-            'label' => 'OMS扣款',
-        ],
-        'deduct' => [
-            'value' => 'deduct',
-            'label' => '扣除',
-        ],
-        'incr' => [
-            'value' => 'incr',
-            'label' => '增加',
-        ],
-        'other' => [
-            'value' => 'other',
-            'label' => '其它',
-        ],
-        'handle' => [
-            'value' => 'handle',
-            'label' => '管理员手动调整',
-        ],
-    ],
-    'enableLog' => true,
-    'isRemoteUpload' => false, // 是否上传至远程
-    'excelLocalDir' => 'excel_export', // 是否上传至远程
-    'superAdminRoleId' => '666A7F102B8D6C66E055736AECE8644D',
-    'mainAdminId' => '65F27BCE7FD278FFE055736AECE8644D',
-    'mainUserId' => '670B84FD7C216D4EE055736AECE8644D',
-    'hbCouponsProId' => '1000000000', // 货补优惠券
-    'storeDecRoleId' => '8976C62F40064D8AB357BE07C8A3CA8F', // 报单中心里面店铺的ID
-    'countyStoreDecRoleId' => '810916A06B304162902408A6B9E5D177', // 报单中心里面区级店的ID
-    'daysDiff' => 0,
-    'userStatus' => [
-        0 => [
-            'value' => '0',
-            'label' => '未激活',
-        ],
-        1 => [
-            'value' => '1',
-            'label' => '正常',
-        ],
-        2 => [
-            'value' => '2',
-            'label' => '注销',
-        ],
-        3 => [
-            'value' => '3',
-            'label' => '黑名单',
-        ],
-        4 => [
-            'value' => '4',
-            'label' => '停发',
-        ],
-        9 => [
-            'value' => '9',
-            'label' => '永久关停',
-        ],
-    ],
-    'bonusWalletType' => [
-        'bonus' => [
-            'name' => 'bonus',
-            'label' => '会员账户奖金',
-        ],
-        'reconsume_points' => [
-            'name' => 'bonus',
-            'label' => '复消积分余额',
-        ],
-        'cash' => [
-            'name' => 'cash',
-            'label' => '会员账户余额',
-        ],
-        'exchange_points' => [
-            'name' => 'bonus',
-            'label' => '兑换点数余额',
-        ]
-//        'cf' => [
-//            'name' => 'cf',
-//            'label' => '车房养老奖余额',
-//        ],
-//        'lx' => [
-//            'name' => 'lx',
-//            'label' => '领袖分红奖余额',
-//        ],
-    ],
-    'auditStatus' => [
-        'un' => [
-            'value' => 0,
-            'label' => '未审核'
-        ],
-        'true' => [
-            'value' => 1,
-            'label' => '已审核'
-        ],
-        'false' => [
-            'value' => 2,
-            'label' => '审核失败'
-        ],
-        'reject' => [
-            'value' => 3,
-            'label' => '已拒绝'
-        ],
-    ],
-    // 发货状态
-    'deliveryStatus' => [
-        '0' => [
-            'value' => 0,
-            'label' => '未发货'
-        ],
-        'notDelivery' => [
-            'value' => 0,
-            'label' => '未发货'
-        ],
-        '1' => [
-            'value' => 1,
-            'label' => '已发货'
-        ],
-        'delivered' => [
-            'value' => 1,
-            'label' => '已发货'
-        ],
-        '2' => [
-            'value' => 2,
-            'label' => '确认收货'
-        ],
-        'confirm' => [
-            'value' => 2,
-            'label' => '确认收货'
-        ],
-    ],
-    'orderStatus' => [
-        '0' => [
-            'value' => 0,
-            'label' => '待支付'
-        ],
-        'notPaid' => [
-            'value' => 0,
-            'label' => '待支付'
-        ],
-        '1' => [
-            'value' => 1,
-            'label' => '已支付'
-        ],
-        'paid' => [
-            'value' => 1,
-            'label' => '已支付'
-        ],
-        // 此时进入发货流程参考发货状态
-        '3' => [
-            'value' => 3,
-            'label' => '物流状态'
-        ],
-        'delivery' => [
-            'value' => 3,
-            'label' => '物流状态'
-        ],
-        '4' => [
-            'value' => 4,
-            'label' => '订单完成'
-        ],
-        'complete' => [
-            'value' => 4,
-            'label' => '订单完成'
-        ],
-        '5' => [
-            'value' => 5,
-            'label' => '订单取消'
-        ],
-        'cancel' => [
-            'value' => 5,
-            'label' => '订单取消'
-        ],
-        '6' => [
-            'value' => 6,
-            'label' => '订单删除'
-        ],
-        'del' => [
-            'value' => 6,
-            'label' => '订单删除'
-        ],
-    ],
-    'exportModule' => [
-        'shop' => ['label' => '商城管理', 'value'=>'shop'],
-        'user' => ['label' => '会员管理', 'value'=>'user'],
-        'atlas' => ['label' => '网络图谱', 'value'=>'atlas'],
-        'reconsume' => ['label' => '复销管理', 'value'=>'reconsume'],
-        'bonus' => ['label' => '奖金管理', 'value'=>'bonus'],
-        //'report' => ['label' => '报表管理', 'value'=>'report'],
-        'finance' => ['label' => '财务管理', 'value'=>'finance'],
-        //'log' => ['label' => '日志管理', 'value'=>'log'],
-    ],
-    'snowFake' => [
-        'dataCenterId' => 1,//
-        'workerId' => 1,
-    ],
-    'pageSnowFake' => [
-        'dataCenterId' => 2,//
-        'workerId' => 2,
-    ],
-];
+<?php
+$nationParams = require_once __DIR__ . '/params-nation.php';
+return [
+    'preparePerfLimit' => isset($mainConfig['preparePerfLimit']) ? $mainConfig['preparePerfLimit'] : false,
+    'adminEmail' => 'admin@example.com',
+    'supportEmail' => 'support@example.com',
+    'nation' => $nationParams,
+    'backAccessTokenExpiresIn' => 3000 * 60,
+    'backRefreshTokenExpiresIn' => 3000 * 60 * 60,
+    'frontAccessTokenExpiresIn' => 3000 * 60,
+    'frontRefreshTokenExpiresIn' => 3000 * 60 * 60,
+    'user.passwordResetTokenExpire' => 3600,
+    'operationTimeOut' => 15 * 60,     // 这里设置的15分钟超时
+    'pageSize' => 20,
+    'http' => [
+        'shopApi' => [
+            'authKey' => 'sErypUtORfuloNdiTYLINArdtHErSAnDkiRPRElTaiNgIneUSEardopEnTAcErNO',
+            'timeDiff' => 0,
+        ],
+        'remoteUploadApi' => [
+            'authKey' => 'k4Ao7KWVbvg3Z2L6KLwN9OoDjQL5SioJffIPoODATxCynuEVEAt0278kg7r9FHiS',
+            'host' => $mainConfig['remoteUploadHost'],
+            'remoteUploadNotifyUrl' => '',
+        ],
+        'backendToFrontendApi' => [
+            'authKey' => 'hYkDsjhj6CfGMKbRMjoKtMauMEHiufyikGmziqy2anXYTMXhsUkrPC6YbvyHmdLD',
+            'timeDiff' => 0,
+        ],
+        'lingYunGongApi' => [
+            'host' => $mainConfig['idCardVerify']['host'],
+            'authToken' => [
+                'path' => '/uaa/v1/auth/tokens',
+                'clientId' => $mainConfig['idCardVerify']['clientId'],
+            ],
+            'hasIdCardInfoPath' => '/socialwork/v1/external/freedom-emps/has-idcard-info/%s',
+        ]
+//        'requestShop' => [
+//            'url' => $mainConfig['requestShopUrl'],
+//            'username' => 'bonus_api',
+//            'password' => 'bonus_api',
+//        ]
+
+    ],
+    'shopWalletType' => [
+        'cash' =>[
+            'value'=>'cash',
+            'title'=>'现金钱包',
+        ],
+    ],
+    'shopFlowType' => [
+        'remit' => [
+            'value' => 'remit',
+            'label' => '汇款充值',
+        ],
+        'recharge' => [
+            'value' => 'recharge',
+            'label' => '第三方充值',
+        ],
+        'transfer_out' => [
+            'value' => 'transfer_out',
+            'label' => '转出',
+        ],
+        'transfer_in' => [
+            'value' => 'transfer_in',
+            'label' => '转入',
+        ],
+        'pay' => [
+            'value' => 'pay',
+            'label' => '支付',
+        ],
+        'decRecharge' => [
+            'value' => 'decRecharge',
+            'label' => '报单充入',
+        ],
+        'orderRecharge' => [
+            'value' => 'orderRecharge',
+            'label' => '订货充入',
+        ],
+        'freight' => [
+            'value' => 'freight',
+            'label' => '支付运费',
+        ],
+        'adjust_recharge' => [
+            'value' => 'adjust_recharge',
+            'label' => '待调整充入',
+        ],
+        'adjust_deduct' => [
+            'value' => 'adjust_deduct',
+            'label' => '待调整扣除',
+        ],
+        'adjust_transfer_out' => [
+            'value' => 'adjust_transfer_out',
+            'label' => '待调整转出',
+        ],
+        'adjust_transfer_in' => [
+            'value' => 'adjust_transfer_in',
+            'label' => '待调整转入',
+        ],
+        'exchange_recharge' => [
+            'value' => 'exchange_recharge',
+            'label' => '换货充入',
+        ],
+        'exchange_deduct' => [
+            'value' => 'exchange_deduct',
+            'label' => '换货扣除',
+        ],
+        'delete_order_deduct' => [
+            'value' => 'delete_order_deduct',
+            'label' => '删单自动扣除',
+        ],
+        'delete_order_recharge' => [
+            'value' => 'delete_order_recharge',
+            'label' => '删单自动充入',
+        ],
+        'delete_order_return' => [
+            'value' => 'delete_order_return',
+            'label' => '删单扣回',
+        ],
+        'repair_pay' => [
+            'value' => 'repair_pay',
+            'label' => '支付维修费',
+        ],
+        'after_sale_exchange_recharge' => [
+            'value' => 'after_sale_exchange_recharge',
+            'label' => '售后调货充入',
+        ],
+        'after_sale_exchange_deduct' => [
+            'value' => 'after_sale_exchange_deduct',
+            'label' => '售后调货扣费',
+        ],
+        'oms_deduct' => [
+            'value' => 'oms_deduct',
+            'label' => 'OMS扣款',
+        ],
+        'deduct' => [
+            'value' => 'deduct',
+            'label' => '扣除',
+        ],
+        'incr' => [
+            'value' => 'incr',
+            'label' => '增加',
+        ],
+        'other' => [
+            'value' => 'other',
+            'label' => '其它',
+        ],
+        'handle' => [
+            'value' => 'handle',
+            'label' => '管理员手动调整',
+        ],
+    ],
+    'enableLog' => true,
+    'isRemoteUpload' => false, // 是否上传至远程
+    'excelLocalDir' => 'excel_export', // 是否上传至远程
+    'superAdminRoleId' => '666A7F102B8D6C66E055736AECE8644D',
+    'mainAdminId' => '65F27BCE7FD278FFE055736AECE8644D',
+    'mainUserId' => '670B84FD7C216D4EE055736AECE8644D',
+    'hbCouponsProId' => '1000000000', // 货补优惠券
+    'storeDecRoleId' => '8976C62F40064D8AB357BE07C8A3CA8F', // 报单中心里面店铺的ID
+    'countyStoreDecRoleId' => '810916A06B304162902408A6B9E5D177', // 报单中心里面区级店的ID
+    'daysDiff' => 0,
+    'userStatus' => [
+        0 => [
+            'value' => '0',
+            'label' => '未激活',
+        ],
+        1 => [
+            'value' => '1',
+            'label' => '正常',
+        ],
+        2 => [
+            'value' => '2',
+            'label' => '注销',
+        ],
+        3 => [
+            'value' => '3',
+            'label' => '黑名单',
+        ],
+        4 => [
+            'value' => '4',
+            'label' => '停发',
+        ],
+        9 => [
+            'value' => '9',
+            'label' => '永久关停',
+        ],
+    ],
+    'bonusWalletType' => [
+        'bonus' => [
+            'name' => 'bonus',
+            'label' => '会员账户奖金',
+        ],
+        'reconsume_points' => [
+            'name' => 'bonus',
+            'label' => '复消积分余额',
+        ],
+        'cash' => [
+            'name' => 'cash',
+            'label' => '会员账户余额',
+        ],
+        'exchange_points' => [
+            'name' => 'bonus',
+            'label' => '兑换点数余额',
+        ]
+//        'cf' => [
+//            'name' => 'cf',
+//            'label' => '车房养老奖余额',
+//        ],
+//        'lx' => [
+//            'name' => 'lx',
+//            'label' => '领袖分红奖余额',
+//        ],
+    ],
+    'auditStatus' => [
+        'un' => [
+            'value' => 0,
+            'label' => '未审核'
+        ],
+        'true' => [
+            'value' => 1,
+            'label' => '已审核'
+        ],
+        'false' => [
+            'value' => 2,
+            'label' => '审核失败'
+        ],
+        'reject' => [
+            'value' => 3,
+            'label' => '已拒绝'
+        ],
+    ],
+    // 发货状态
+    'deliveryStatus' => [
+        '0' => [
+            'value' => 0,
+            'label' => '未发货'
+        ],
+        'notDelivery' => [
+            'value' => 0,
+            'label' => '未发货'
+        ],
+        '1' => [
+            'value' => 1,
+            'label' => '已发货'
+        ],
+        'delivered' => [
+            'value' => 1,
+            'label' => '已发货'
+        ],
+        '2' => [
+            'value' => 2,
+            'label' => '确认收货'
+        ],
+        'confirm' => [
+            'value' => 2,
+            'label' => '确认收货'
+        ],
+    ],
+    'orderStatus' => [
+        '0' => [
+            'value' => 0,
+            'label' => '待支付'
+        ],
+        'notPaid' => [
+            'value' => 0,
+            'label' => '待支付'
+        ],
+        '1' => [
+            'value' => 1,
+            'label' => '已支付'
+        ],
+        'paid' => [
+            'value' => 1,
+            'label' => '已支付'
+        ],
+        // 此时进入发货流程参考发货状态
+        '3' => [
+            'value' => 3,
+            'label' => '物流状态'
+        ],
+        'delivery' => [
+            'value' => 3,
+            'label' => '物流状态'
+        ],
+        '4' => [
+            'value' => 4,
+            'label' => '订单完成'
+        ],
+        'complete' => [
+            'value' => 4,
+            'label' => '订单完成'
+        ],
+        '5' => [
+            'value' => 5,
+            'label' => '订单取消'
+        ],
+        'cancel' => [
+            'value' => 5,
+            'label' => '订单取消'
+        ],
+        '6' => [
+            'value' => 6,
+            'label' => '订单删除'
+        ],
+        'del' => [
+            'value' => 6,
+            'label' => '订单删除'
+        ],
+    ],
+    'exportModule' => [
+        'shop' => ['label' => '商城管理', 'value'=>'shop'],
+        'user' => ['label' => '会员管理', 'value'=>'user'],
+        'atlas' => ['label' => '网络图谱', 'value'=>'atlas'],
+        'reconsume' => ['label' => '复销管理', 'value'=>'reconsume'],
+        'bonus' => ['label' => '奖金管理', 'value'=>'bonus'],
+        //'report' => ['label' => '报表管理', 'value'=>'report'],
+        'finance' => ['label' => '财务管理', 'value'=>'finance'],
+        //'log' => ['label' => '日志管理', 'value'=>'log'],
+    ],
+    'snowFake' => [
+        'dataCenterId' => 1,//
+        'workerId' => 1,
+    ],
+    'pageSnowFake' => [
+        'dataCenterId' => 2,//
+        'workerId' => 2,
+    ],
+];

+ 9 - 5
common/helpers/Cache.php

@@ -48,6 +48,9 @@ class Cache
     const USER_INFO_KEY = 'user:baseInfo';
     const USER_NETWORK_PARENTS = 'user:networkParents';
     const USER_RELATION_PARENTS = 'user:relationParents';
+    const PREPARE_USER_NETWORK_PARENTS = 'prepare:user:networkParents';
+    const PREPARE_USER_RELATION_PARENTS = 'prepare:user:relationParents';
+    const PRE_USER_CREATED_AT_LIST = 'prepare:user:createdAtList_';
     const USER_CREATED_AT_LIST = 'user:createdAtList_';
 
     /**
@@ -316,19 +319,20 @@ class Cache
     /**
      * 获取全部安置网络上级
      * @param $userId
+     * @param $isPrepare 是否是预计计算 true为是 则使用预计计算的缓存key
      * @return array|mixed
      */
-    public static function getAllNetworkParents($userId){
-        return UserNetwork::getAllParentsFromRedis($userId);
+    public static function getAllNetworkParents($userId, $isPrepare=false){
+        return UserNetwork::getAllParentsFromRedis($userId, $isPrepare);
     }
 
     /**
      * 获取全部推荐网络的上级
      * @param $userId
+     * @param $isPrepare 是否是预计计算 true为是 则使用预计计算的缓存key
      * @return array|mixed
      */
-    public static function getAllRelationParents($userId){
-        return UserRelation::getAllParentsFromRedis($userId);
+    public static function getAllRelationParents($userId, $isPrepare = false){
+        return UserRelation::getAllParentsFromRedis($userId, $isPrepare);
     }
-
 }

+ 5 - 0
common/helpers/Tool.php

@@ -71,6 +71,11 @@ class Tool {
         }
     }
 
+    // 格式化业绩期
+    public static function formatPreparePerf($perf) {
+        return number_format($perf,2);
+    }
+
     /**
      * 前台业绩格式化
      * @param $perf

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

@@ -604,6 +604,7 @@ class PerfCalc {
                 unset($data, $decInfo, $sn, $toInfo);
             }
             PerfOrder::batchInsert($insertPerfOrderData);
+
             unset($insertPerfOrderData, $allData, $snArr);
             return $this->loopCalcPeriodPerfByOrderDec($offset + $this->_limit);
         }
@@ -727,7 +728,7 @@ class PerfCalc {
                 unset($data, $baseInfo, $sn, $orderCashAmount, $payPv, $cacheDataKey);
             }
             PerfOrder::batchInsert($insertPerfOrderData);
-
+            
             unset($insertPerfOrderData, $allData, $snArr);
             return $this->loopCalcPerfByFXOrder($offset + $this->_limit);
         }
@@ -843,7 +844,6 @@ class PerfCalc {
                 unset($data, $baseInfo, $sn, $orderCashAmount, $payPv, $cacheDataKey);
             }
             PerfOrder::batchInsert($insertPerfOrderData);
-
             unset($insertPerfOrderData, $allData, $snArr);
             return $this->loopCalcPerfByShopFXOrder($offset + $this->_limit);
         }

+ 3 - 2
common/models/UserNetwork.php

@@ -454,10 +454,11 @@ class UserNetwork extends \common\components\ActiveRecord
     /**
      * 从缓存中获取会员的全部父级(主要用于结算时的处理,能够提高效率不去查库)
      * @param $userId
+     * @param $isPrepare 是否是预计计算 true为是 则使用预计计算的缓存key
      * @return array|mixed
      */
-    public static function getAllParentsFromRedis($userId){
-        $key = Cache::USER_NETWORK_PARENTS;
+    public static function getAllParentsFromRedis($userId,$isPrepare=false){
+        $key = $isPrepare === true ? Cache::PREPARE_USER_NETWORK_PARENTS : Cache::USER_NETWORK_PARENTS;
         $data = Yii::$app->redis->hget($key, $userId);
         if(!$data){
             $data = [];

+ 3 - 2
common/models/UserRelation.php

@@ -346,10 +346,11 @@ class UserRelation extends \common\components\ActiveRecord
     /**
      * 从缓存中获取会员的全部父级(主要用于结算时的处理,能够提高效率不去查库)
      * @param $userId
+     * @param $isPrepare 是否是预计计算 true为是 则使用预计计算的缓存key
      * @return array|mixed
      */
-    public static function getAllParentsFromRedis($userId){
-        $key = Cache::USER_RELATION_PARENTS;
+    public static function getAllParentsFromRedis($userId, $isPrepare = false){
+        $key = $isPrepare === true ? Cache::PREPARE_USER_RELATION_PARENTS : Cache::USER_RELATION_PARENTS;
         $data = Yii::$app->redis->hget($key, $userId);
         if(!$data){
             $data = [];

+ 572 - 549
console/controllers/BonusController.php

@@ -1,550 +1,573 @@
-<?php
-/**
- * Created by PhpStorm.
- * User: leo
- * Date: 2018/3/9
- * Time: 上午11:56
- */
-namespace console\controllers;
-
-use backendApi\modules\v1\models\lists\bonus\BalanceList;
-use backendApi\modules\v1\models\lists\bonus\CfLxAuditList;
-use backendApi\modules\v1\models\lists\bonus\FlowBalanceList;
-use backendApi\modules\v1\models\lists\bonus\FlowBonusList;
-use backendApi\modules\v1\models\lists\bonus\FlowCfList;
-use backendApi\modules\v1\models\lists\bonus\FlowExchangePointsList;
-use backendApi\modules\v1\models\lists\bonus\FlowLxList;
-use backendApi\modules\v1\models\lists\bonus\FlowReconsumePointsList;
-use backendApi\modules\v1\models\lists\bonus\OtherPeriodBonusList;
-use backendApi\modules\v1\models\lists\bonus\PerfMonthList;
-use backendApi\modules\v1\models\lists\bonus\PerfOrderList;
-use backendApi\modules\v1\models\lists\bonus\PerfPeriodList;
-use backendApi\modules\v1\models\lists\bonus\PerfStandardList;
-use backendApi\modules\v1\models\lists\bonus\PeriodBonusList;
-use backendApi\modules\v1\models\lists\bonus\ResendQyAuditList;
-use backendApi\modules\v1\models\lists\bonus\ResendQyList;
-use backendApi\modules\v1\models\lists\bonus\ScoreMonthList;
-use backendApi\modules\v1\models\lists\bonus\TraceBtList;
-use backendApi\modules\v1\models\lists\bonus\TraceDownBdList;
-use backendApi\modules\v1\models\lists\bonus\TraceDownFxList;
-use backendApi\modules\v1\models\lists\bonus\TraceDownGlList;
-use backendApi\modules\v1\models\lists\bonus\TraceDownGxList;
-use backendApi\modules\v1\models\lists\bonus\TraceDownQyList;
-use backendApi\modules\v1\models\lists\bonus\TraceDownTgList;
-use backendApi\modules\v1\models\lists\bonus\TraceDownXfList;
-use backendApi\modules\v1\models\lists\bonus\TraceDownYcList;
-use backendApi\modules\v1\models\lists\bonus\TraceDownYjList;
-use backendApi\modules\v1\models\lists\bonus\TraceFlList;
-use backendApi\modules\v1\models\lists\bonus\TraceFwList;
-use backendApi\modules\v1\models\lists\bonus\TraceUpBdList;
-use backendApi\modules\v1\models\lists\bonus\TraceUpFxList;
-use backendApi\modules\v1\models\lists\bonus\TraceUpGlList;
-use backendApi\modules\v1\models\lists\bonus\TraceUpGxList;
-use backendApi\modules\v1\models\lists\bonus\TraceUpQyList;
-use backendApi\modules\v1\models\lists\bonus\TraceUpTgList;
-use backendApi\modules\v1\models\lists\bonus\TraceUpXfList;
-use backendApi\modules\v1\models\lists\bonus\TraceUpYcList;
-use backendApi\modules\v1\models\lists\bonus\TraceUpYjList;
-use backendApi\modules\v1\models\lists\bonus\UserPerfList;
-use common\helpers\Cache;
-use common\helpers\Excel;
-use common\helpers\Form;
-use common\helpers\http\RemoteUploadApi;
-use common\helpers\Log;
-use common\libs\export\module\BonusExport;
-use common\models\forms\PeriodForm;
-use common\models\LogAsync;
-use common\models\Withdraw;
-use yii\db\Exception;
-
-class BonusController extends BaseController
-{
-
-    /**
-     * 生成业绩单并计算业绩
-     * @param $taskKey
-     * @throws Exception
-     * @throws \yii\base\Exception
-     */
-    public function actionPerf($taskKey){
-        $params = Cache::getAsyncParams($taskKey);
-        $formModel = new PeriodForm();
-        $handleResult = false;
-        if($formModel->load($params, '') && $formModel->perfAsync($params['handleUserId'])){
-            $handleResult = true;
-            \Yii::$app->swooleAsyncTimer->pushAsyncResultToAdmin($params['handleUserId'], "第{$params['periodNum']}期生成业绩单更新成功");
-        } else {
-            \Yii::$app->swooleAsyncTimer->pushAsyncResultToAdmin($params['handleUserId'], "第{$params['periodNum']}期生成业绩单更新失败,原因:".Form::formatErrorsForApi($formModel->getErrors()), false);
-        }
-        if(!$handleResult){
-            echo "第{$params['periodNum']}期生成业绩单更新失败,原因:".Form::formatErrorsForApi($formModel->getErrors());
-            // Log::async([
-//                'type' => LogAsync::TYPE_BONUS,
-//                'route' => \Yii::$app->controller->id.'/'.\Yii::$app->controller->action->id,
-//                'title' => "第{$params['periodNum']}期生成业绩单更新失败",
-//                'detail' => "第{$params['periodNum']}期生成业绩单更新失败,原因:".Form::formatErrorsForApi($formModel->getErrors()),
-//                'status' => 0,
-//            ]);
-        }
-    }
-
-    /**
-     * 结算奖金
-     * @param $taskKey
-     * @throws Exception
-     * @throws \yii\base\Exception
-     */
-    public function actionCalc($taskKey){
-        $params = Cache::getAsyncParams($taskKey);
-        $formModel = new PeriodForm();
-        $handleResult = false;
-        if($formModel->load($params, '') && $formModel->calcAsync($params['handleUserId'])){
-            $handleResult = true;
-            \Yii::$app->swooleAsyncTimer->pushAsyncResultToAdmin($params['handleUserId'], "第{$params['periodNum']}期奖金结算更新成功");
-        } else {
-            \Yii::$app->swooleAsyncTimer->pushAsyncResultToAdmin($params['handleUserId'], "第{$params['periodNum']}期奖金结算更新失败,原因:".Form::formatErrorsForApi($formModel->getErrors()), false);
-        }
-        if(!$handleResult){
-            echo "第{$params['periodNum']}期奖金结算更新失败,原因:".Form::formatErrorsForApi($formModel->getErrors());
-            // Log::async([
-//                'type' => LogAsync::TYPE_BONUS,
-//                'route' => \Yii::$app->controller->id.'/'.\Yii::$app->controller->action->id,
-//                'title' => "第{$params['periodNum']}期奖金结算更新失败",
-//                'detail' => "第{$params['periodNum']}期奖金结算更新失败,原因:".Form::formatErrorsForApi($formModel->getErrors()),
-//                'status' => 0,
-//            ]);
-        }
-    }
-
-    /**
-     * 奖金挂网
-     * @param $taskKey
-     * @throws Exception
-     * @throws \yii\base\Exception
-     */
-    public function actionSend($taskKey){
-        $params = Cache::getAsyncParams($taskKey);
-        $formModel = new PeriodForm();
-        $handleResult = false;
-        if($formModel->load($params, '') && $formModel->sendAsync($params['handleUserId'])){
-            $handleResult = true;
-            \Yii::$app->swooleAsyncTimer->pushAsyncResultToAdmin($params['handleUserId'], "第{$params['periodNum']}期挂网成功");
-        } else {
-            \Yii::$app->swooleAsyncTimer->pushAsyncResultToAdmin($params['handleUserId'], "第{$params['periodNum']}期挂网失败,原因:".Form::formatErrorsForApi($formModel->getErrors()), false);
-        }
-        if(!$handleResult){
-            echo "第{$params['periodNum']}期挂网失败,原因:".Form::formatErrorsForApi($formModel->getErrors());
-            // Log::async([
-//                'type' => LogAsync::TYPE_BONUS,
-//                'route' => \Yii::$app->controller->id.'/'.\Yii::$app->controller->action->id,
-//                'title' => "第{$params['periodNum']}期挂网失败",
-//                'detail' => "第{$params['periodNum']}期挂网失败,原因:".Form::formatErrorsForApi($formModel->getErrors()),
-//                'status' => 0,
-//            ]);
-        }
-    }
-
-    /**
-     * 后台手动封期时调用的封期后操作
-     * @param $taskKey
-     * @throws Exception
-     */
-    public function actionAfterClose($taskKey){
-        $params = Cache::getAsyncParams($taskKey);
-        $formModel = new PeriodForm();
-        $handleResult = false;
-        if($formModel->afterCloseAsync($params['periodNum'], $params['closedAt'])){
-            $handleResult = true;
-        }
-        if(!$handleResult){
-            // Log::async([
-//                'type' => LogAsync::TYPE_BONUS,
-//                'route' => \Yii::$app->controller->id.'/'.\Yii::$app->controller->action->id,
-//                'title' => "于{$params['periodNum']}期自动提现上月奖金失败",
-//                'detail' => "于{$params['periodNum']}期自动提现上月奖金失败",
-//                'status' => 0,
-//            ]);
-        }
-    }
-
-    /**
-     * 奖金余额导出
-     * @param $taskId
-     * @return bool
-     */
-    public function actionBalanceExport($taskId){
-        return $this->_export($taskId, BalanceList::class, '会员奖金余额列表');
-    }
-
-    /**
-     * 车房养老奖和领袖分红年度发放审核导出
-     * @param $taskId
-     * @return bool
-     */
-    public function actionCfLxAuditExport($taskId){
-        return $this->_export($taskId, CfLxAuditList::class, '年度奖金发放审核列表');
-    }
-
-    /**
-     * 最新奖金列表导出
-     * @param $taskId
-     * @return bool
-     */
-    public function actionNewPeriodBonusExport($taskId){
-        return $this->_export($taskId, PeriodBonusList::class, '最新奖金列表');
-    }
-
-    /**
-     * 往期奖金列表导出
-     * @param $taskId
-     * @return bool
-     */
-    public function actionOtherPeriodBonusExport($taskId){
-        return $this->_export($taskId, PeriodBonusList::class, '往期奖金列表');
-    }
-
-    /**
-     * 奖金流水列表导出
-     * @param $taskId
-     * @return bool
-     */
-    public function actionFlowBonusExport($taskId){
-        return $this->_export($taskId, FlowBonusList::class, '奖金流水列表');
-    }
-
-    /**
-     * 余额流水导出
-     * @param $taskId
-     * @return bool
-     */
-    public function actionFlowBalanceExport($taskId){
-        return $this->_export($taskId, FlowBalanceList::class, '复消积分流水列表');
-    }
-
-    /**
-     * 复消积分流水导出
-     * @param $taskId
-     * @return bool
-     */
-    public function actionFlowRpExport($taskId){
-        return $this->_export($taskId, FlowReconsumePointsList::class, '复消积分流水列表');
-    }
-
-    /**
-     * 兑换积分流水导出
-     * @param $taskId
-     * @return bool
-     */
-    public function actionFlowExchangeExport($taskId){
-        return $this->_export($taskId, FlowExchangePointsList::class, '兑换点数流水列表');
-    }
-
-    /**
-     * 车房养老奖流水导出
-     * @param $taskId
-     * @return bool
-     */
-    public function actionFlowCfExport($taskId){
-        return $this->_export($taskId, FlowCfList::class, '车房养老奖流水列表');
-    }
-
-    /**
-     * 领袖分红奖导出
-     * @param $taskId
-     * @return bool
-     */
-    public function actionFlowLxExport($taskId){
-        return $this->_export($taskId, FlowLxList::class, '领袖分红奖流水列表');
-    }
-
-    /**
-     * 区域津贴补发列表
-     * @param $taskId
-     * @return bool
-     */
-    public function actionResendQyListExport($taskId){
-        return $this->_export($taskId, ResendQyList::class, '区域津贴补发列表');
-    }
-
-    /**
-     * 补发区域津贴审核列表
-     * @param $taskId
-     * @return bool
-     */
-    public function actionResendQyAuditListExport($taskId){
-        return $this->_export($taskId, ResendQyAuditList::class, '补发区域津贴审核列表');
-    }
-
-    /**
-     * 团队奖向下追溯导出
-     * @param $taskId
-     * @return bool
-     */
-    public function actionTraceDownQyExport($taskId){
-        return $this->_export($taskId, TraceDownQyList::class, '团队奖向下追溯导出列表');
-    }
-
-    /**
-     * 团队奖向上追溯导出
-     * @param $taskId
-     * @return bool
-     */
-    public function actionTraceUpQyExport($taskId){
-        return $this->_export($taskId, TraceUpQyList::class, '团队奖向上追溯导出列表');
-    }
-
-    /**
-     * 荣衔奖向下追溯导出
-     * @param $taskId
-     * @return bool
-     */
-    public function actionTraceDownYcExport($taskId){
-        return $this->_export($taskId, TraceDownYcList::class, '荣衔奖向下追溯导出列表');
-    }
-
-    /**
-     * 荣衔奖向上追溯导出
-     * @param $taskId
-     * @return bool
-     */
-    public function actionTraceUpYcExport($taskId){
-        return $this->_export($taskId, TraceUpYcList::class, '荣衔奖向上追溯导出列表');
-    }
-
-    /**
-     * 服务奖向下追溯导出
-     * @param $taskId
-     * @return bool
-     */
-    public function actionTraceDownBdExport($taskId){
-        return $this->_export($taskId, TraceDownYcList::class, '服务奖向下追溯导出列表');
-    }
-
-    /**
-     * 服务奖向上追溯导出
-     * @param $taskId
-     * @return bool
-     */
-    public function actionTraceUpBdExport($taskId){
-        return $this->_export($taskId, TraceUpYcList::class, '服务奖向上追溯导出列表');
-    }
-
-    /**
-     * 推广奖向下追溯导出
-     * @param $taskId
-     * @return bool
-     */
-    public function actionTraceDownTgExport($taskId){
-        return $this->_export($taskId, TraceDownTgList::class, '推广奖向下追溯导出列表');
-    }
-
-
-    /**
-     * 推广奖向上追溯导出
-     * @param $taskId
-     * @return bool
-     */
-    public function actionTraceUpTgExport($taskId){
-        return $this->_export($taskId, TraceUpTgList::class, '推广奖向上追溯导出列表');
-    }
-
-
-    /**
-     * 消费奖向下追溯导出
-     * @param $taskId
-     * @return bool
-     */
-    public function actionTraceDownXfExport($taskId){
-        return $this->_export($taskId, TraceDownXfList::class, '消费奖向下追溯导出列表');
-    }
-
-
-    /**
-     * 消费奖向上追溯导出
-     * @param $taskId
-     * @return bool
-     */
-    public function actionTraceUpXfExport($taskId){
-        return $this->_export($taskId, TraceUpXfList::class, '消费奖向上追溯导出列表');
-    }
-
-
-    /**
-     * 业绩奖向下追溯导出
-     * @param $taskId
-     * @return bool
-     */
-    public function actionTraceDownYjExport($taskId){
-        return $this->_export($taskId, TraceDownYjList::class, '业绩奖向下追溯导出列表');
-    }
-
-    /**
-     * 业绩奖向上追溯导出
-     * @param $taskId
-     * @return bool
-     */
-    public function actionTraceUpYjExport($taskId){
-        return $this->_export($taskId, TraceUpYjList::class, '业绩奖向上追溯导出列表');
-    }
-
-    /**
-     * 管理奖向下追溯导出
-     * @param $taskId
-     * @return bool
-     */
-    public function actionTraceDownGlExport($taskId){
-        return $this->_export($taskId, TraceDownGlList::class, '管理奖向下追溯导出列表');
-    }
-
-    /**
-     * 管理奖向上追溯导出
-     * @param $taskId
-     * @return bool
-     */
-    public function actionTraceUpGlExport($taskId){
-        return $this->_export($taskId, TraceUpGlList::class, '管理奖向上追溯导出列表');
-    }
-
-
-    /**
-     * 共享奖向下追溯导出
-     * @param $taskId
-     * @return bool
-     */
-    public function actionTraceDownGxExport($taskId){
-        return $this->_export($taskId, TraceDownGxList::class, '共享奖向下追溯导出列表');
-    }
-
-    /**
-     * 共享奖向上追溯导出
-     * @param $taskId
-     * @return bool
-     */
-    public function actionTraceUpBdGxport($taskId){
-        return $this->_export($taskId, TraceUpGxList::class, '共享奖向上追溯导出列表');
-    }
-
-
-    /**
-     * 复销奖向下追溯导出
-     * @param $taskId
-     * @return bool
-     */
-    public function actionTraceDownFxExport($taskId){
-        return $this->_export($taskId, TraceDownFxList::class, '复销奖向下追溯导出列表');
-    }
-
-    /**
-     * 复销奖向上追溯导出
-     * @param $taskId
-     * @return bool
-     */
-    public function actionTraceUpFxExport($taskId){
-        return $this->_export($taskId, TraceUpFxList::class, '复销奖向上追溯导出列表');
-    }
-
-    /**
-     * 报单中心补贴追溯导出
-     * @param $taskId
-     * @return bool
-     */
-    public function actionTraceBtExport($taskId){
-        return $this->_export($taskId, TraceBtList::class, '报单中心补贴追溯列表');
-    }
-
-    /**
-     * 报单中心货补追溯导出
-     * @param $taskId
-     * @return bool
-     */
-    public function actionTraceFlExport($taskId){
-        return $this->_export($taskId, TraceFlList::class, '报单中心货补追溯列表');
-    }
-
-    /**
-     * 区域业绩提成追溯列表导出
-     * @param $taskId
-     * @return bool
-     */
-    public function actionTraceFwExport($taskId){
-        return $this->_export($taskId, TraceFwList::class, '区域业绩提成追溯列表');
-    }
-
-    /**
-     * 业绩单导出
-     * @param $taskId
-     * @return bool
-     */
-    public function actionPerfOrderExport($taskId){
-        return $this->_export($taskId, PerfOrderList::class, '业绩单列表');
-    }
-
-    /**
-     * 月积分导出
-     * @param $taskId
-     * @return bool
-     */
-    public function actionScoreMonthExport($taskId){
-        return $this->_export($taskId, ScoreMonthList::class, '月积分列表');
-    }
-
-    /**
-     * 月业绩导出
-     * @param $taskId
-     * @return bool
-     */
-    public function actionPerfMonthExport($taskId){
-        return $this->_export($taskId, PerfMonthList::class, '月业绩列表');
-    }
-
-    /**
-     * 达标业绩导出
-     * @param $taskId
-     * @return bool
-     */
-    public function actionPerfStandardExport($taskId){
-        return $this->_export($taskId, PerfStandardList::class, '达标业绩列表');
-    }
-
-    /**
-     * 月业绩导出
-     * @param $taskId
-     * @return bool
-     */
-    public function actionUserPerfExport($taskId){
-        return $this->_export($taskId, UserPerfList::class, '用户业绩列表');
-    }
-
-    /**
-     * 期业绩导出
-     * @param $taskId
-     * @return bool
-     */
-    public function actionPerfPeriodListExport($taskId){
-        return $this->_export($taskId, PerfPeriodList::class, '期业绩列表');
-    }
-
-    /**
-     * 导出方法
-     * @param $taskId
-     * @param $className
-     * @param $listName
-     * @return bool
-     */
-    private function _export($taskId, $className, $listName){
-        $factory = BonusExport::factory($taskId);
-        $factory->listModelClass = $className;
-        try {
-            if ($factory->generate()) {
-                \Yii::$app->swooleAsyncTimer->pushAsyncResultToAdmin($factory->getUserId(), $listName.'导出成功');
-            }
-            unset($factory, $taskId, $className, $listName);
-            return true;
-        } catch (\Exception $e) {
-            echo $listName.'导出失败。详情:' . $e->getMessage();
-            \Yii::$app->swooleAsyncTimer->pushAsyncResultToAdmin($factory->getUserId(), $listName.'导出失败。详情:' . $e->getMessage(), false);
-        }
-        unset($factory, $taskId, $className, $listName);
-        return false;
-    }
+<?php
+/**
+ * Created by PhpStorm.
+ * User: leo
+ * Date: 2018/3/9
+ * Time: 上午11:56
+ */
+namespace console\controllers;
+
+use backendApi\modules\v1\models\lists\bonus\BalanceList;
+use backendApi\modules\v1\models\lists\bonus\CfLxAuditList;
+use backendApi\modules\v1\models\lists\bonus\FlowBalanceList;
+use backendApi\modules\v1\models\lists\bonus\FlowBonusList;
+use backendApi\modules\v1\models\lists\bonus\FlowCfList;
+use backendApi\modules\v1\models\lists\bonus\FlowExchangePointsList;
+use backendApi\modules\v1\models\lists\bonus\FlowLxList;
+use backendApi\modules\v1\models\lists\bonus\FlowReconsumePointsList;
+use backendApi\modules\v1\models\lists\bonus\OtherPeriodBonusList;
+use backendApi\modules\v1\models\lists\bonus\PerfMonthList;
+use backendApi\modules\v1\models\lists\bonus\PerfOrderList;
+use backendApi\modules\v1\models\lists\bonus\PerfPeriodList;
+use backendApi\modules\v1\models\lists\bonus\PerfStandardList;
+use backendApi\modules\v1\models\lists\bonus\PeriodBonusList;
+use backendApi\modules\v1\models\lists\bonus\ResendQyAuditList;
+use backendApi\modules\v1\models\lists\bonus\ResendQyList;
+use backendApi\modules\v1\models\lists\bonus\ScoreMonthList;
+use backendApi\modules\v1\models\lists\bonus\TraceBtList;
+use backendApi\modules\v1\models\lists\bonus\TraceDownBdList;
+use backendApi\modules\v1\models\lists\bonus\TraceDownFxList;
+use backendApi\modules\v1\models\lists\bonus\TraceDownGlList;
+use backendApi\modules\v1\models\lists\bonus\TraceDownGxList;
+use backendApi\modules\v1\models\lists\bonus\TraceDownQyList;
+use backendApi\modules\v1\models\lists\bonus\TraceDownTgList;
+use backendApi\modules\v1\models\lists\bonus\TraceDownXfList;
+use backendApi\modules\v1\models\lists\bonus\TraceDownYcList;
+use backendApi\modules\v1\models\lists\bonus\TraceDownYjList;
+use backendApi\modules\v1\models\lists\bonus\TraceFlList;
+use backendApi\modules\v1\models\lists\bonus\TraceFwList;
+use backendApi\modules\v1\models\lists\bonus\TraceUpBdList;
+use backendApi\modules\v1\models\lists\bonus\TraceUpFxList;
+use backendApi\modules\v1\models\lists\bonus\TraceUpGlList;
+use backendApi\modules\v1\models\lists\bonus\TraceUpGxList;
+use backendApi\modules\v1\models\lists\bonus\TraceUpQyList;
+use backendApi\modules\v1\models\lists\bonus\TraceUpTgList;
+use backendApi\modules\v1\models\lists\bonus\TraceUpXfList;
+use backendApi\modules\v1\models\lists\bonus\TraceUpYcList;
+use backendApi\modules\v1\models\lists\bonus\TraceUpYjList;
+use backendApi\modules\v1\models\lists\bonus\UserPerfList;
+use common\helpers\Cache;
+use common\helpers\Excel;
+use common\helpers\Form;
+use common\helpers\http\RemoteUploadApi;
+use common\helpers\Log;
+use common\libs\export\module\BonusExport;
+use common\models\forms\PeriodForm;
+use common\models\forms\PreparePeriodForm;
+use common\models\LogAsync;
+use common\models\Withdraw;
+use yii\db\Exception;
+
+class BonusController extends BaseController
+{
+
+    /**
+     * 预计计算生成月业绩,如果是月节点的话
+     * @param $taskKey
+     * @throws Exception
+     * @throws \yii\base\Exception
+     */
+    public function actionPreparePerf($taskKey){
+        $params = Cache::getAsyncParams($taskKey);
+        $formModel = new PreparePeriodForm();
+        $handleResult = false;
+        $periodNum = isset($params['periodNum']) && !empty($params['periodNum']) ? $params['periodNum'] : null;
+        if($formModel->load($params, '') && $formModel->perfAsync($params['handleUserId'],$periodNum)){
+            $handleResult = true;
+            \Yii::$app->swooleAsyncTimer->pushAsyncResultToAdmin($params['handleUserId'], "预计算月业绩第{$params['periodNum']}期生成业绩单更新成功");
+        } else {
+            \Yii::$app->swooleAsyncTimer->pushAsyncResultToAdmin($params['handleUserId'], "预计算月业绩第{$params['periodNum']}期生成业绩单更新失败,原因:".Form::formatErrorsForApi($formModel->getErrors()), false);
+        }
+        if(!$handleResult){
+            echo "预计算月业绩,第{$params['periodNum']}期生成业绩单更新失败,原因:".Form::formatErrorsForApi($formModel->getErrors());
+        }
+    }
+
+    /**
+     * 生成业绩单并计算业绩
+     * @param $taskKey
+     * @throws Exception
+     * @throws \yii\base\Exception
+     */
+    public function actionPerf($taskKey){
+        $params = Cache::getAsyncParams($taskKey);
+        $formModel = new PeriodForm();
+        $handleResult = false;
+        if($formModel->load($params, '') && $formModel->perfAsync($params['handleUserId'])){
+            $handleResult = true;
+            \Yii::$app->swooleAsyncTimer->pushAsyncResultToAdmin($params['handleUserId'], "第{$params['periodNum']}期生成业绩单更新成功");
+        } else {
+            \Yii::$app->swooleAsyncTimer->pushAsyncResultToAdmin($params['handleUserId'], "第{$params['periodNum']}期生成业绩单更新失败,原因:".Form::formatErrorsForApi($formModel->getErrors()), false);
+        }
+        if(!$handleResult){
+            echo "第{$params['periodNum']}期生成业绩单更新失败,原因:".Form::formatErrorsForApi($formModel->getErrors());
+            // Log::async([
+//                'type' => LogAsync::TYPE_BONUS,
+//                'route' => \Yii::$app->controller->id.'/'.\Yii::$app->controller->action->id,
+//                'title' => "第{$params['periodNum']}期生成业绩单更新失败",
+//                'detail' => "第{$params['periodNum']}期生成业绩单更新失败,原因:".Form::formatErrorsForApi($formModel->getErrors()),
+//                'status' => 0,
+//            ]);
+        }
+    }
+
+    /**
+     * 结算奖金
+     * @param $taskKey
+     * @throws Exception
+     * @throws \yii\base\Exception
+     */
+    public function actionCalc($taskKey){
+        $params = Cache::getAsyncParams($taskKey);
+        $formModel = new PeriodForm();
+        $handleResult = false;
+        if($formModel->load($params, '') && $formModel->calcAsync($params['handleUserId'])){
+            $handleResult = true;
+            \Yii::$app->swooleAsyncTimer->pushAsyncResultToAdmin($params['handleUserId'], "第{$params['periodNum']}期奖金结算更新成功");
+        } else {
+            \Yii::$app->swooleAsyncTimer->pushAsyncResultToAdmin($params['handleUserId'], "第{$params['periodNum']}期奖金结算更新失败,原因:".Form::formatErrorsForApi($formModel->getErrors()), false);
+        }
+        if(!$handleResult){
+            echo "第{$params['periodNum']}期奖金结算更新失败,原因:".Form::formatErrorsForApi($formModel->getErrors());
+            // Log::async([
+//                'type' => LogAsync::TYPE_BONUS,
+//                'route' => \Yii::$app->controller->id.'/'.\Yii::$app->controller->action->id,
+//                'title' => "第{$params['periodNum']}期奖金结算更新失败",
+//                'detail' => "第{$params['periodNum']}期奖金结算更新失败,原因:".Form::formatErrorsForApi($formModel->getErrors()),
+//                'status' => 0,
+//            ]);
+        }
+    }
+
+    /**
+     * 奖金挂网
+     * @param $taskKey
+     * @throws Exception
+     * @throws \yii\base\Exception
+     */
+    public function actionSend($taskKey){
+        $params = Cache::getAsyncParams($taskKey);
+        $formModel = new PeriodForm();
+        $handleResult = false;
+        if($formModel->load($params, '') && $formModel->sendAsync($params['handleUserId'])){
+            $handleResult = true;
+            \Yii::$app->swooleAsyncTimer->pushAsyncResultToAdmin($params['handleUserId'], "第{$params['periodNum']}期挂网成功");
+        } else {
+            \Yii::$app->swooleAsyncTimer->pushAsyncResultToAdmin($params['handleUserId'], "第{$params['periodNum']}期挂网失败,原因:".Form::formatErrorsForApi($formModel->getErrors()), false);
+        }
+        if(!$handleResult){
+            echo "第{$params['periodNum']}期挂网失败,原因:".Form::formatErrorsForApi($formModel->getErrors());
+            // Log::async([
+//                'type' => LogAsync::TYPE_BONUS,
+//                'route' => \Yii::$app->controller->id.'/'.\Yii::$app->controller->action->id,
+//                'title' => "第{$params['periodNum']}期挂网失败",
+//                'detail' => "第{$params['periodNum']}期挂网失败,原因:".Form::formatErrorsForApi($formModel->getErrors()),
+//                'status' => 0,
+//            ]);
+        }
+    }
+
+    /**
+     * 后台手动封期时调用的封期后操作
+     * @param $taskKey
+     * @throws Exception
+     */
+    public function actionAfterClose($taskKey){
+        $params = Cache::getAsyncParams($taskKey);
+        $formModel = new PeriodForm();
+        $handleResult = false;
+        if($formModel->afterCloseAsync($params['periodNum'], $params['closedAt'])){
+            $handleResult = true;
+        }
+        if(!$handleResult){
+            // Log::async([
+//                'type' => LogAsync::TYPE_BONUS,
+//                'route' => \Yii::$app->controller->id.'/'.\Yii::$app->controller->action->id,
+//                'title' => "于{$params['periodNum']}期自动提现上月奖金失败",
+//                'detail' => "于{$params['periodNum']}期自动提现上月奖金失败",
+//                'status' => 0,
+//            ]);
+        }
+    }
+
+    /**
+     * 奖金余额导出
+     * @param $taskId
+     * @return bool
+     */
+    public function actionBalanceExport($taskId){
+        return $this->_export($taskId, BalanceList::class, '会员奖金余额列表');
+    }
+
+    /**
+     * 车房养老奖和领袖分红年度发放审核导出
+     * @param $taskId
+     * @return bool
+     */
+    public function actionCfLxAuditExport($taskId){
+        return $this->_export($taskId, CfLxAuditList::class, '年度奖金发放审核列表');
+    }
+
+    /**
+     * 最新奖金列表导出
+     * @param $taskId
+     * @return bool
+     */
+    public function actionNewPeriodBonusExport($taskId){
+        return $this->_export($taskId, PeriodBonusList::class, '最新奖金列表');
+    }
+
+    /**
+     * 往期奖金列表导出
+     * @param $taskId
+     * @return bool
+     */
+    public function actionOtherPeriodBonusExport($taskId){
+        return $this->_export($taskId, PeriodBonusList::class, '往期奖金列表');
+    }
+
+    /**
+     * 奖金流水列表导出
+     * @param $taskId
+     * @return bool
+     */
+    public function actionFlowBonusExport($taskId){
+        return $this->_export($taskId, FlowBonusList::class, '奖金流水列表');
+    }
+
+    /**
+     * 余额流水导出
+     * @param $taskId
+     * @return bool
+     */
+    public function actionFlowBalanceExport($taskId){
+        return $this->_export($taskId, FlowBalanceList::class, '复消积分流水列表');
+    }
+
+    /**
+     * 复消积分流水导出
+     * @param $taskId
+     * @return bool
+     */
+    public function actionFlowRpExport($taskId){
+        return $this->_export($taskId, FlowReconsumePointsList::class, '复消积分流水列表');
+    }
+
+    /**
+     * 兑换点数流水导出
+     * @param $taskId
+     * @return bool
+     */
+    public function actionFlowExchangeExport($taskId){
+        return $this->_export($taskId, FlowExchangePointsList::class, '兑换点数流水列表');
+    }
+
+    /**
+     * 车房养老奖流水导出
+     * @param $taskId
+     * @return bool
+     */
+    public function actionFlowCfExport($taskId){
+        return $this->_export($taskId, FlowCfList::class, '车房养老奖流水列表');
+    }
+
+    /**
+     * 领袖分红奖导出
+     * @param $taskId
+     * @return bool
+     */
+    public function actionFlowLxExport($taskId){
+        return $this->_export($taskId, FlowLxList::class, '领袖分红奖流水列表');
+    }
+
+    /**
+     * 区域津贴补发列表
+     * @param $taskId
+     * @return bool
+     */
+    public function actionResendQyListExport($taskId){
+        return $this->_export($taskId, ResendQyList::class, '区域津贴补发列表');
+    }
+
+    /**
+     * 补发区域津贴审核列表
+     * @param $taskId
+     * @return bool
+     */
+    public function actionResendQyAuditListExport($taskId){
+        return $this->_export($taskId, ResendQyAuditList::class, '补发区域津贴审核列表');
+    }
+
+    /**
+     * 团队奖向下追溯导出
+     * @param $taskId
+     * @return bool
+     */
+    public function actionTraceDownQyExport($taskId){
+        return $this->_export($taskId, TraceDownQyList::class, '团队奖向下追溯导出列表');
+    }
+
+    /**
+     * 团队奖向上追溯导出
+     * @param $taskId
+     * @return bool
+     */
+    public function actionTraceUpQyExport($taskId){
+        return $this->_export($taskId, TraceUpQyList::class, '团队奖向上追溯导出列表');
+    }
+
+    /**
+     * 荣衔奖向下追溯导出
+     * @param $taskId
+     * @return bool
+     */
+    public function actionTraceDownYcExport($taskId){
+        return $this->_export($taskId, TraceDownYcList::class, '荣衔奖向下追溯导出列表');
+    }
+
+    /**
+     * 荣衔奖向上追溯导出
+     * @param $taskId
+     * @return bool
+     */
+    public function actionTraceUpYcExport($taskId){
+        return $this->_export($taskId, TraceUpYcList::class, '荣衔奖向上追溯导出列表');
+    }
+
+    /**
+     * 服务奖向下追溯导出
+     * @param $taskId
+     * @return bool
+     */
+    public function actionTraceDownBdExport($taskId){
+        return $this->_export($taskId, TraceDownYcList::class, '服务奖向下追溯导出列表');
+    }
+
+    /**
+     * 服务奖向上追溯导出
+     * @param $taskId
+     * @return bool
+     */
+    public function actionTraceUpBdExport($taskId){
+        return $this->_export($taskId, TraceUpYcList::class, '服务奖向上追溯导出列表');
+    }
+
+    /**
+     * 推广奖向下追溯导出
+     * @param $taskId
+     * @return bool
+     */
+    public function actionTraceDownTgExport($taskId){
+        return $this->_export($taskId, TraceDownTgList::class, '推广奖向下追溯导出列表');
+    }
+
+
+    /**
+     * 推广奖向上追溯导出
+     * @param $taskId
+     * @return bool
+     */
+    public function actionTraceUpTgExport($taskId){
+        return $this->_export($taskId, TraceUpTgList::class, '推广奖向上追溯导出列表');
+    }
+
+
+    /**
+     * 消费奖向下追溯导出
+     * @param $taskId
+     * @return bool
+     */
+    public function actionTraceDownXfExport($taskId){
+        return $this->_export($taskId, TraceDownXfList::class, '消费奖向下追溯导出列表');
+    }
+
+
+    /**
+     * 消费奖向上追溯导出
+     * @param $taskId
+     * @return bool
+     */
+    public function actionTraceUpXfExport($taskId){
+        return $this->_export($taskId, TraceUpXfList::class, '消费奖向上追溯导出列表');
+    }
+
+
+    /**
+     * 业绩奖向下追溯导出
+     * @param $taskId
+     * @return bool
+     */
+    public function actionTraceDownYjExport($taskId){
+        return $this->_export($taskId, TraceDownYjList::class, '业绩奖向下追溯导出列表');
+    }
+
+    /**
+     * 业绩奖向上追溯导出
+     * @param $taskId
+     * @return bool
+     */
+    public function actionTraceUpYjExport($taskId){
+        return $this->_export($taskId, TraceUpYjList::class, '业绩奖向上追溯导出列表');
+    }
+
+    /**
+     * 管理奖向下追溯导出
+     * @param $taskId
+     * @return bool
+     */
+    public function actionTraceDownGlExport($taskId){
+        return $this->_export($taskId, TraceDownGlList::class, '管理奖向下追溯导出列表');
+    }
+
+    /**
+     * 管理奖向上追溯导出
+     * @param $taskId
+     * @return bool
+     */
+    public function actionTraceUpGlExport($taskId){
+        return $this->_export($taskId, TraceUpGlList::class, '管理奖向上追溯导出列表');
+    }
+
+
+    /**
+     * 共享奖向下追溯导出
+     * @param $taskId
+     * @return bool
+     */
+    public function actionTraceDownGxExport($taskId){
+        return $this->_export($taskId, TraceDownGxList::class, '共享奖向下追溯导出列表');
+    }
+
+    /**
+     * 共享奖向上追溯导出
+     * @param $taskId
+     * @return bool
+     */
+    public function actionTraceUpBdGxport($taskId){
+        return $this->_export($taskId, TraceUpGxList::class, '共享奖向上追溯导出列表');
+    }
+
+
+    /**
+     * 复销奖向下追溯导出
+     * @param $taskId
+     * @return bool
+     */
+    public function actionTraceDownFxExport($taskId){
+        return $this->_export($taskId, TraceDownFxList::class, '复销奖向下追溯导出列表');
+    }
+
+    /**
+     * 复销奖向上追溯导出
+     * @param $taskId
+     * @return bool
+     */
+    public function actionTraceUpFxExport($taskId){
+        return $this->_export($taskId, TraceUpFxList::class, '复销奖向上追溯导出列表');
+    }
+
+    /**
+     * 报单中心补贴追溯导出
+     * @param $taskId
+     * @return bool
+     */
+    public function actionTraceBtExport($taskId){
+        return $this->_export($taskId, TraceBtList::class, '报单中心补贴追溯列表');
+    }
+
+    /**
+     * 报单中心货补追溯导出
+     * @param $taskId
+     * @return bool
+     */
+    public function actionTraceFlExport($taskId){
+        return $this->_export($taskId, TraceFlList::class, '报单中心货补追溯列表');
+    }
+
+    /**
+     * 区域业绩提成追溯列表导出
+     * @param $taskId
+     * @return bool
+     */
+    public function actionTraceFwExport($taskId){
+        return $this->_export($taskId, TraceFwList::class, '区域业绩提成追溯列表');
+    }
+
+    /**
+     * 业绩单导出
+     * @param $taskId
+     * @return bool
+     */
+    public function actionPerfOrderExport($taskId){
+        return $this->_export($taskId, PerfOrderList::class, '业绩单列表');
+    }
+
+    /**
+     * 月积分导出
+     * @param $taskId
+     * @return bool
+     */
+    public function actionScoreMonthExport($taskId){
+        return $this->_export($taskId, ScoreMonthList::class, '月积分列表');
+    }
+
+    /**
+     * 月业绩导出
+     * @param $taskId
+     * @return bool
+     */
+    public function actionPerfMonthExport($taskId){
+        return $this->_export($taskId, PerfMonthList::class, '月业绩列表');
+    }
+
+    /**
+     * 达标业绩导出
+     * @param $taskId
+     * @return bool
+     */
+    public function actionPerfStandardExport($taskId){
+        return $this->_export($taskId, PerfStandardList::class, '达标业绩列表');
+    }
+
+    /**
+     * 月业绩导出
+     * @param $taskId
+     * @return bool
+     */
+    public function actionUserPerfExport($taskId){
+        return $this->_export($taskId, UserPerfList::class, '用户业绩列表');
+    }
+
+    /**
+     * 期业绩导出
+     * @param $taskId
+     * @return bool
+     */
+    public function actionPerfPeriodListExport($taskId){
+        return $this->_export($taskId, PerfPeriodList::class, '期业绩列表');
+    }
+
+    /**
+     * 导出方法
+     * @param $taskId
+     * @param $className
+     * @param $listName
+     * @return bool
+     */
+    private function _export($taskId, $className, $listName){
+        $factory = BonusExport::factory($taskId);
+        $factory->listModelClass = $className;
+        try {
+            if ($factory->generate()) {
+                \Yii::$app->swooleAsyncTimer->pushAsyncResultToAdmin($factory->getUserId(), $listName.'导出成功');
+            }
+            unset($factory, $taskId, $className, $listName);
+            return true;
+        } catch (\Exception $e) {
+            echo $listName.'导出失败。详情:' . $e->getMessage();
+            \Yii::$app->swooleAsyncTimer->pushAsyncResultToAdmin($factory->getUserId(), $listName.'导出失败。详情:' . $e->getMessage(), false);
+        }
+        unset($factory, $taskId, $className, $listName);
+        return false;
+    }
 }

+ 1 - 0
frontendApi/config/menu.php

@@ -74,6 +74,7 @@ return [
         'show'=>1,
         'child'=>[
             ['name'=>'我的账户', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'index', 'routePath'=>'bonus/index', 'show'=>1,],
+            ['name'=>'团队查询', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'teams', 'routePath'=>'bonus/teams', 'show'=>1,],
             ['name'=>'最新奖金', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'new', 'routePath'=>'bonus/new', 'show'=>1,'allow'=>'newBonusSwitch'],
             ['name'=>'往期奖金', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'other', 'routePath'=>'bonus/other', 'show'=>1,'allow'=>'pastBonusSwitch'],
             //['name'=>'实时业绩', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'real-time-perf', 'routePath'=>'bonus/real-time-perf', 'show'=>1,],

+ 1 - 0
frontendApi/config/urlManagerRules.php

@@ -115,6 +115,7 @@ return [
             'GET index' => 'index',
             'GET wallet-flow' => 'wallet-flow',
             'GET new' => 'new',
+            'GET teams' => 'teams',
             'GET other' => 'other',
             'GET real-time-perf' => 'real-time-perf',
             'GET flow-bt' => 'flow-bt',

+ 103 - 0
frontendApi/modules/v1/controllers/BonusController.php

@@ -29,10 +29,14 @@ use common\models\Period;
 use common\models\DecRole;
 use common\models\EmployLevel;
 use common\models\FlowExchangePoints;
+use common\models\PerfMonthPrepare;
+use common\models\PeriodPrepare;
 use common\models\ScoreMonth;
 use common\models\UserBonus;
+use common\models\UserRelation;
 use common\models\UserWallet;
 use frontendApi\modules\v1\models\User;
+use Yii;
 
 class BonusController extends BaseController {
     public $modelClass = CalcBonus::class;
@@ -94,6 +98,105 @@ class BonusController extends BaseController {
         return static::notice(['wallet' => $wallet,'dealSwitch'=>$dealSwitch]);
     }
 
+    /**
+     * 团队查询
+     * @return mixed
+     * @throws \yii\web\HttpException
+     */
+    public function actionTeams() {
+        $userId = \Yii::$app->user->id;
+        $period = Period::instance();
+        $periodNum = $period->getNowPeriodNum();
+        $month = $period->getNowYearMonth();
+        // 判断是否是周日,并且是否是月结节点
+        // 特殊要求,测试环境要去掉是否是周日的判断,周一至周日都能看.正式环境只有周日能看
+        // 读取加入到忽略文件的common/config/config.php文件内容
+        $preparePerfLimit = isset(Yii::$app->params['preparePerfLimit']) ? Yii::$app->params['preparePerfLimit'] : false;
+        $isCalcMonth = $period->isCalcMonth($periodNum);
+        $w = date('w', time());
+        //特殊要求,测试环境要去掉是否是周日的判断,周一至周日都能看
+        if($preparePerfLimit === true && $isCalcMonth != 1) {
+            return static::notice(['user' => [],'team'=>[]]);
+        } else if ($preparePerfLimit !== true && ($w != '0' || $isCalcMonth != 1)) {
+            return static::notice(['user' => [],'team'=>[]]);
+        }
+        // 判断此业绩期是否已经完成生成了预计算业绩单,生成完毕才能看到
+        $isPerfed = PeriodPrepare::isPerfed($periodNum);
+        if (!$isPerfed) {
+            return static::notice(['user' => [],'team'=>[]]);
+        }
+        
+        // 获取最新的计算时间
+        $calcAt = PeriodPrepare::getInfo($periodNum);
+        $calcAt = date('Y-m-d H:i:s', $calcAt['PERF_STARTED_AT']);
+
+        // 达标规则,小组底下有一个大于等于一万.或者个人情况里的合计大于等于一万
+        $data = PerfMonthPrepare::getMonthPerfPrepare($userId, $month);
+        // PV_PCS 个人业绩  PV_PSS 月新增团队业绩  PV_PSS_TOTAL月累计团队业绩
+        // 其中页面使用的是月新增团队业绩
+        // 获取用信息
+        $userInfo = User::getEnCodeInfo($userId);
+        $user[0] = [
+            'number' => $userInfo['USER_NAME'],
+            'name' => $userInfo['REAL_NAME'],
+            'perf_status' => '0', // 0  未达标  1为已达标
+            'perf_status_name' => '不达标',
+            'user_perf' => 0, // 个人业绩
+            'team_perf' => 0, // 团队新增累计业绩
+            'total_perf' => 0 // 合计业绩
+        ];
+        if (!empty($data)) {
+            // 调整个人合格了,依旧不显示业绩
+            $userCheck = PerfMonthPrepare::checkPrepareStatus($data['PV_PCS']+$data['PV_PSS']);
+            $user[0]['user_perf'] = $userCheck ? '' : Tool::formatPreparePerf($data['PV_PCS']);
+            $user[0]['team_perf'] = $userCheck ? '' : Tool::formatPreparePerf($data['PV_PSS']);
+            $user[0]['total_perf'] = $userCheck ? '' : Tool::formatPreparePerf($data['PV_PCS']+$data['PV_PSS']);
+            $user[0]['perf_status'] = $userCheck ? '1' : $user[0]['perf_status'];
+            $user[0]['perf_status_name'] = $userCheck ? '达标' : $user[0]['perf_status_name'];
+        }
+        $teamInfo = [];
+        // 查询此用户的推荐(开拓)团队一级信息
+        $relation = UserRelation::getChildrenWithDeepAndLayer($userId, 1, 1, $periodNum);
+        $userStatusFlag = false;
+        if ($relation) {
+            // 循环一级开拓用户
+            foreach($relation as $k=>$v) {
+                // 获取此用户预计算月业绩
+                $relationPerf = PerfMonthPrepare::getMonthPerfPrepare($v['USER_ID'], $month);
+                if (empty($relationPerf)) {
+                    $relationPerf['PV_PCS'] = 0;
+                    $relationPerf['PV_PSS'] = 0;
+                }
+                $relationCheck = PerfMonthPrepare::checkPrepareStatus($relationPerf['PV_PCS']+$relationPerf['PV_PSS']);
+                $teamInfo[]['perf_status'] = $relationCheck ? 1 : 0;
+                if ($relationCheck) {
+                    $userStatusFlag = true; // 只要有一个达标,则个人就达标
+                    $teamInfo[$k]['number'] = '';
+                    $teamInfo[$k]['name'] = '';
+                    $teamInfo[$k]['user_perf'] = '';
+                    $teamInfo[$k]['team_perf'] = '';
+                    $teamInfo[$k]['total_perf'] = '';
+                    $teamInfo[$k]['perf_status'] = '1';
+                    $teamInfo[$k]['perf_status_name'] = '达标';
+                } else {
+                    $teamInfo[$k]['number'] = $v['USER_NAME'];
+                    $teamInfo[$k]['name'] = $v['REAL_NAME'];
+                    $teamInfo[$k]['user_perf'] = Tool::formatPreparePerf($relationPerf['PV_PCS']);
+                    $teamInfo[$k]['team_perf'] = Tool::formatPreparePerf($relationPerf['PV_PSS']);
+                    $teamInfo[$k]['total_perf'] = Tool::formatPreparePerf($relationPerf['PV_PCS']+$relationPerf['PV_PSS']);
+                    $teamInfo[$k]['perf_status'] = '0';
+                    $teamInfo[$k]['perf_status_name'] = '不达标';
+                } 
+            }
+        }
+        if ($userStatusFlag === true) {
+            $user[0]['perf_status'] = 1;
+            $user[0]['perf_status_name'] = '达标';
+        }
+        
+        return static::notice(['user' => $user,'team'=>$teamInfo,'calcAt' => $calcAt]);
+    }
+
     /**
      * 交易记录
      * @return mixed

+ 238 - 236
frontendApi/modules/v1/controllers/ShopController.php

@@ -1,237 +1,239 @@
-<?php
-/**
- * Created by PhpStorm.
- * User: leo
- * Date: 2018/2/24
- * Time: 下午12:48
- */
-
-namespace frontendApi\modules\v1\controllers;
-
-use common\helpers\Date;
-use common\helpers\Form;
-use common\helpers\user\Info;
-use common\models\DecOrder;
-use common\models\forms\DeclarationForm;
-use common\models\forms\OrderForm;
-use common\models\Order;
-use common\models\ReceiveAddress;
-use common\models\Region;
-use common\models\ShopGoods;
-use common\models\User;
-use common\models\UserBonus;
-use common\models\UserWallet;
-
-class ShopController extends BaseController {
-    public $modelClass = DecOrder::class;
-
-    /**
-     * 商品列表
-     * @return mixed
-     * @throws \yii\web\HttpException
-     */
-    public function actionIndex() {
-        $condition = ' AND STATUS=1 AND (FIND_IN_SET(2,GIFT_TYPE)>0';
-        $isStudio = User::getEnCodeInfo(\Yii::$app->user->id)['IS_STUDIO'];
-        if($isStudio==1){
-            $condition.= " OR FIND_IN_SET(4,GIFT_TYPE)>0";
-        }
-        $condition.=")";
-
-        $data = ShopGoods::lists($condition, [], [
-            'orderBy' => 'SORT ASC,CREATED_AT DESC',
-            'from' => ShopGoods::tableName(),
-        ]);
-        foreach ($data['list'] as $key => $value) {
-            if ($value['TYPE'] == 1 || $value['TYPE'] == 2) {
-                $data['list'][$key]['DISCOUNT'] = ShopGoods::GOODS_TYPE[$value['TYPE']]['discount'];
-            } else {
-                $data['list'][$key]['DISCOUNT'] = $value['SELL_DISCOUNT']*100;
-            }
-            // $data['list'][$key]['DISCOUNT'] = ShopGoods::GOODS_TYPE[$value['TYPE']]['discount'];
-        }
-        return static::notice($data);
-    }
-
-    /**
-     * 获取商品详情
-     * @return mixed
-     * @throws \yii\web\HttpException
-     */
-    public function actionGoodsDetail(){
-        $id = \Yii::$app->request->get('id');
-        $data = null;
-        if($id){
-            $data = ShopGoods::findOneAsArray('ID=:ID AND STATUS=1', [':ID'=>$id]);
-        }
-        return static::notice($data);
-    }
-
-    /**
-     * 购物车订单展示
-     * @throws \yii\web\HttpException
-     */
-    public function actionShowCart(){
-        $userId = \Yii::$app->user->id;
-        $payList = ShopGoods::payTypes();
-        $allAddress = ReceiveAddress::findAllAsArray('USER_ID=:USER_ID', [':USER_ID'=>$userId]);
-        if($allAddress) {
-            foreach ($allAddress as $key => $row) {
-                $allAddress[$key]['PROVINCE_NAME'] = Region::getCnName($row['PROVINCE']);
-                $allAddress[$key]['CITY_NAME'] = Region::getCnName($row['CITY']);
-                $allAddress[$key]['COUNTY_NAME'] = Region::getCnName($row['COUNTY']);
-            }
-        }
-        $userBalance = [
-            'points' => 0,
-            'cash' => 0,
-            'exchange' => 0
-        ];
-        if ($userBonusResult = UserBonus::findOneAsArray(['USER_ID' => $userId])) {
-            $userBalance['points'] = $userBonusResult['RECONSUME_POINTS'];
-            $userBalance['exchange'] = $userBonusResult['EXCHANGE_POINTS'];
-        }
-        if ($userCashResult = UserWallet::findOneAsArray(['USER_ID' => $userId])) {
-            $userBalance['cash'] = $userCashResult['CASH'];
-        }
-        return static::notice(['payList'=>$payList,'allAddress'=>$allAddress,'userBalance'=>$userBalance]);
-    }
-
-    /**
-     * 确认订单
-     */
-    public function actionSureOrder(){
-        if (\Yii::$app->request->isPost) {
-            $formModel = new OrderForm();
-            $formModel->scenario = 'userOrder';
-            $formModel->remark = '复销备注';
-            $post = \Yii::$app->request->post();
-            $post['type'] = DeclarationForm::TYPE_FX;
-            if ($formModel->load($post, '') && $formModel->add()) {
-                return static::notice('购物成功');
-            } else {
-                return static::notice(Form::formatErrorsForApi($formModel->getErrors()),400);
-            }
-        }
-    }
-
-    /**
-     * 订单支付成功
-     * @throws \yii\web\HttpException
-     */
-    public function actionPaySuccess(){
-        $orderSn = \Yii::$app->request->get('orderSn');
-        $data = null;
-        if($orderSn){
-            $data = Order::findOneAsArray('SN=:SN', [':SN'=>$orderSn]);
-        }
-        return static::notice($data);
-    }
-
-    /**
-     * 我的报单
-     * @return mixed
-     * @throws \yii\web\HttpException
-     */
-    public function actionDecOrderList() {
-        $condition = ' AND USER_ID=:USER_ID AND IS_DEL=0';
-        $params[':USER_ID'] = \Yii::$app->user->id;
-        $data = DecOrder::lists($condition, $params, [
-            'select' => 'DO.*,U.USER_NAME USER_NAME,U.REAL_NAME REAL_NAME,RU.USER_NAME REC_USER_NAME,RU.REAL_NAME REC_REAL_NAME,CU.USER_NAME CON_USER_NAME,CU.REAL_NAME CON_REAL_NAME',
-            'orderBy' => 'DO.CREATED_AT DESC',
-            'from' => DecOrder::tableName() . ' AS DO',
-            'join' => [
-                ['LEFT JOIN', User::tableName() . ' AS U', 'DO.TO_USER_ID=U.ID'],
-                ['LEFT JOIN', User::tableName() . ' AS RU', 'DO.REC_USER_ID=RU.ID'],
-                ['LEFT JOIN', User::tableName() . ' AS CU', 'DO.CON_USER_ID=CU.ID'],
-            ],
-
-        ]);
-        return static::notice($data);
-    }
-
-    /**
-     * 我的订单
-     * @return mixed
-     * @throws \yii\web\HttpException
-     */
-    public function actionOrderList() {
-        $uname = Info::getUserNameByUserId(\Yii::$app->user->id);
-        $condition = " AND ORDER_TYPE='FX' AND (USER_ID=:USER_ID OR CREATE_USER='$uname')";
-        $params[':USER_ID'] = \Yii::$app->user->id;
-        $data = Order::lists($condition, $params, [
-            'select' => 'O.*,U.REAL_NAME',
-            'orderBy' => 'O.CREATED_AT DESC',
-            'from' => Order::tableName() . ' AS O',
-            'join' => [
-                ['LEFT JOIN', User::tableName() . ' AS U', 'U.ID=O.USER_ID'],
-            ],
-        ]);
-        foreach ($data['list'] as $key => $value) {
-            //$data['list'][$key]['PROVINCE_NAME'] = $value['PROVINCE'] ? Region::getCnName($value['PROVINCE']) : '';
-           //$data['list'][$key]['CITY_NAME'] = $value['CITY'] ? Region::getCnName($value['CITY']) : '';
-            //$data['list'][$key]['COUNTY_NAME'] = $value['COUNTY'] ? Region::getCnName($value['COUNTY']) : '';
-            $data['list'][$key]['PAY_AT'] = Date::convert($value['PAY_AT'],'Y-m-d H:i:s');
-        }
-        return static::notice($data);
-    }
-
-    /**
-     * 会员复消
-     */
-    public function actionReconsume() {
-        $condition = ' AND STATUS=1 AND (FIND_IN_SET(2,GIFT_TYPE)>0 OR FIND_IN_SET(4,GIFT_TYPE)>0)';
-        $data = ShopGoods::lists($condition, [], [
-            'orderBy' => 'SORT ASC,CREATED_AT DESC',
-            'from' => ShopGoods::tableName(),
-        ]);
-        foreach ($data['list'] as $key => $value) {
-            if ($value['TYPE'] == 1 || $value['TYPE'] == 2) {
-                $data['list'][$key]['DISCOUNT'] = ShopGoods::GOODS_TYPE[$value['TYPE']]['discount'];
-            } else {
-                $data['list'][$key]['DISCOUNT'] = $value['SELL_DISCOUNT']*100;
-            }
-            //$data['list'][$key]['DISCOUNT'] = ShopGoods::GOODS_TYPE[$value['TYPE']]['discount'];
-        }
-        return static::notice($data);
-    }
-
-    /**
-     * 帮会员复消购物车
-     * @throws \yii\web\HttpException
-     */
-    public function actionReconsumeCart(){
-        $userId = \Yii::$app->user->id;
-        $payList = ['cash'=>['name'=>'余额支付'],];
-        $userBalance = [
-            'points' => 0,
-            'cash' => 0
-        ];
-        if ($userBonusResult = UserBonus::findOneAsArray(['USER_ID' => $userId])) {
-            $userBalance['points'] = $userBonusResult['RECONSUME_POINTS'];
-        }
-        if ($userCashResult = UserWallet::findOneAsArray(['USER_ID' => $userId])) {
-            $userBalance['cash'] = $userCashResult['CASH'];
-        }
-        return static::notice(['payList'=>$payList,'userBalance'=>$userBalance]);
-    }
-
-    /**
-     * 帮会员复消确认订单
-     */
-    public function actionReconsumeSureOrder(){
-        if (\Yii::$app->request->isPost) {
-            $formModel = new OrderForm();
-            $formModel->scenario = 'reconsumeOrder';
-            $formModel->remark = '帮会员复销';
-            $post = \Yii::$app->request->post();
-            $post['type'] = DeclarationForm::TYPE_FX;
-            if ($formModel->load($post, '') && $formModel->reconsumeAdd()) {
-                return static::notice('帮会员复消成功');
-            } else {
-                return static::notice(Form::formatErrorsForApi($formModel->getErrors()),400);
-            }
-        }
-    }
-
+<?php
+/**
+ * Created by PhpStorm.
+ * User: leo
+ * Date: 2018/2/24
+ * Time: 下午12:48
+ */
+
+namespace frontendApi\modules\v1\controllers;
+
+use common\helpers\Date;
+use common\helpers\Form;
+use common\helpers\user\Info;
+use common\models\DecOrder;
+use common\models\forms\DeclarationForm;
+use common\models\forms\OrderForm;
+use common\models\Order;
+use common\models\OrderGoods;
+use common\models\ReceiveAddress;
+use common\models\Region;
+use common\models\ShopGoods;
+use common\models\User;
+use common\models\UserBonus;
+use common\models\UserWallet;
+
+class ShopController extends BaseController {
+    public $modelClass = DecOrder::class;
+
+    /**
+     * 商品列表
+     * @return mixed
+     * @throws \yii\web\HttpException
+     */
+    public function actionIndex() {
+        $condition = ' AND STATUS=1 AND (FIND_IN_SET(2,GIFT_TYPE)>0';
+        $isStudio = User::getEnCodeInfo(\Yii::$app->user->id)['IS_STUDIO'];
+        if($isStudio==1){
+            $condition.= " OR FIND_IN_SET(4,GIFT_TYPE)>0";
+        }
+        $condition.=")";
+
+        $data = ShopGoods::lists($condition, [], [
+            'orderBy' => 'SORT ASC,CREATED_AT DESC',
+            'from' => ShopGoods::tableName(),
+        ]);
+        foreach ($data['list'] as $key => $value) {
+            if ($value['TYPE'] == 1 || $value['TYPE'] == 2) {
+                $data['list'][$key]['DISCOUNT'] = ShopGoods::GOODS_TYPE[$value['TYPE']]['discount'];
+            } else {
+                $data['list'][$key]['DISCOUNT'] = $value['SELL_DISCOUNT']*100;
+            }
+            // $data['list'][$key]['DISCOUNT'] = ShopGoods::GOODS_TYPE[$value['TYPE']]['discount'];
+        }
+        return static::notice($data);
+    }
+
+    /**
+     * 获取商品详情
+     * @return mixed
+     * @throws \yii\web\HttpException
+     */
+    public function actionGoodsDetail(){
+        $id = \Yii::$app->request->get('id');
+        $data = null;
+        if($id){
+            $data = ShopGoods::findOneAsArray('ID=:ID AND STATUS=1', [':ID'=>$id]);
+        }
+        return static::notice($data);
+    }
+
+    /**
+     * 购物车订单展示
+     * @throws \yii\web\HttpException
+     */
+    public function actionShowCart(){
+        $userId = \Yii::$app->user->id;
+        $payList = ShopGoods::payTypes();
+        $allAddress = ReceiveAddress::findAllAsArray('USER_ID=:USER_ID', [':USER_ID'=>$userId]);
+        if($allAddress) {
+            foreach ($allAddress as $key => $row) {
+                $allAddress[$key]['PROVINCE_NAME'] = Region::getCnName($row['PROVINCE']);
+                $allAddress[$key]['CITY_NAME'] = Region::getCnName($row['CITY']);
+                $allAddress[$key]['COUNTY_NAME'] = Region::getCnName($row['COUNTY']);
+            }
+        }
+        $userBalance = [
+            'points' => 0,
+            'cash' => 0,
+            'exchange' => 0
+        ];
+        if ($userBonusResult = UserBonus::findOneAsArray(['USER_ID' => $userId])) {
+            $userBalance['points'] = $userBonusResult['RECONSUME_POINTS'];
+            $userBalance['exchange'] = $userBonusResult['EXCHANGE_POINTS'];
+        }
+        if ($userCashResult = UserWallet::findOneAsArray(['USER_ID' => $userId])) {
+            $userBalance['cash'] = $userCashResult['CASH'];
+        }
+        return static::notice(['payList'=>$payList,'allAddress'=>$allAddress,'userBalance'=>$userBalance]);
+    }
+
+    /**
+     * 确认订单
+     */
+    public function actionSureOrder(){
+        if (\Yii::$app->request->isPost) {
+            $formModel = new OrderForm();
+            $formModel->scenario = 'userOrder';
+            $formModel->remark = '复销备注';
+            $post = \Yii::$app->request->post();
+            $post['type'] = DeclarationForm::TYPE_FX;
+            if ($formModel->load($post, '') && $formModel->add()) {
+                return static::notice('购物成功');
+            } else {
+                return static::notice(Form::formatErrorsForApi($formModel->getErrors()),400);
+            }
+        }
+    }
+
+    /**
+     * 订单支付成功
+     * @throws \yii\web\HttpException
+     */
+    public function actionPaySuccess(){
+        $orderSn = \Yii::$app->request->get('orderSn');
+        $data = null;
+        if($orderSn){
+            $data = Order::findOneAsArray('SN=:SN', [':SN'=>$orderSn]);
+        }
+        return static::notice($data);
+    }
+
+    /**
+     * 我的报单
+     * @return mixed
+     * @throws \yii\web\HttpException
+     */
+    public function actionDecOrderList() {
+        $condition = ' AND USER_ID=:USER_ID AND IS_DEL=0';
+        $params[':USER_ID'] = \Yii::$app->user->id;
+        $data = DecOrder::lists($condition, $params, [
+            'select' => 'DO.*,U.USER_NAME USER_NAME,U.REAL_NAME REAL_NAME,RU.USER_NAME REC_USER_NAME,RU.REAL_NAME REC_REAL_NAME,CU.USER_NAME CON_USER_NAME,CU.REAL_NAME CON_REAL_NAME,OG.*',
+            'orderBy' => 'DO.CREATED_AT DESC',
+            'from' => DecOrder::tableName() . ' AS DO',
+            'join' => [
+                ['LEFT JOIN', User::tableName() . ' AS U', 'DO.TO_USER_ID=U.ID'],
+                ['LEFT JOIN', User::tableName() . ' AS RU', 'DO.REC_USER_ID=RU.ID'],
+                ['LEFT JOIN', User::tableName() . ' AS CU', 'DO.CON_USER_ID=CU.ID'],
+                ['LEFT JOIN', OrderGoods::tableName() . ' AS OG', 'OG.ORDER_SN=DO.ORDER_SN'],
+            ],
+        ]);
+        return static::notice($data);
+    }
+
+    /**
+     * 我的订单
+     * @return mixed
+     * @throws \yii\web\HttpException
+     */
+    public function actionOrderList() {
+        $uname = Info::getUserNameByUserId(\Yii::$app->user->id);
+        $condition = " AND ORDER_TYPE='FX' AND (USER_ID=:USER_ID OR CREATE_USER='$uname')";
+        $params[':USER_ID'] = \Yii::$app->user->id;
+        $data = Order::lists($condition, $params, [
+            'select' => 'O.*,U.REAL_NAME,OG.*',
+            'orderBy' => 'O.CREATED_AT DESC',
+            'from' => Order::tableName() . ' AS O',
+            'join' => [
+                ['LEFT JOIN', User::tableName() . ' AS U', 'U.ID=O.USER_ID'],
+                ['LEFT JOIN', OrderGoods::tableName() . ' AS OG', 'OG.ORDER_SN=O.SN'],
+            ],
+        ]);
+        foreach ($data['list'] as $key => $value) {
+            //$data['list'][$key]['PROVINCE_NAME'] = $value['PROVINCE'] ? Region::getCnName($value['PROVINCE']) : '';
+           //$data['list'][$key]['CITY_NAME'] = $value['CITY'] ? Region::getCnName($value['CITY']) : '';
+            //$data['list'][$key]['COUNTY_NAME'] = $value['COUNTY'] ? Region::getCnName($value['COUNTY']) : '';
+            $data['list'][$key]['PAY_AT'] = Date::convert($value['PAY_AT'],'Y-m-d H:i:s');
+        }
+        return static::notice($data);
+    }
+
+    /**
+     * 会员复消
+     */
+    public function actionReconsume() {
+        $condition = ' AND STATUS=1 AND (FIND_IN_SET(2,GIFT_TYPE)>0 OR FIND_IN_SET(4,GIFT_TYPE)>0)';
+        $data = ShopGoods::lists($condition, [], [
+            'orderBy' => 'SORT ASC,CREATED_AT DESC',
+            'from' => ShopGoods::tableName(),
+        ]);
+        foreach ($data['list'] as $key => $value) {
+            if ($value['TYPE'] == 1 || $value['TYPE'] == 2) {
+                $data['list'][$key]['DISCOUNT'] = ShopGoods::GOODS_TYPE[$value['TYPE']]['discount'];
+            } else {
+                $data['list'][$key]['DISCOUNT'] = $value['SELL_DISCOUNT']*100;
+            }
+            //$data['list'][$key]['DISCOUNT'] = ShopGoods::GOODS_TYPE[$value['TYPE']]['discount'];
+        }
+        return static::notice($data);
+    }
+
+    /**
+     * 帮会员复消购物车
+     * @throws \yii\web\HttpException
+     */
+    public function actionReconsumeCart(){
+        $userId = \Yii::$app->user->id;
+        $payList = ['cash'=>['name'=>'余额支付'],];
+        $userBalance = [
+            'points' => 0,
+            'cash' => 0
+        ];
+        if ($userBonusResult = UserBonus::findOneAsArray(['USER_ID' => $userId])) {
+            $userBalance['points'] = $userBonusResult['RECONSUME_POINTS'];
+        }
+        if ($userCashResult = UserWallet::findOneAsArray(['USER_ID' => $userId])) {
+            $userBalance['cash'] = $userCashResult['CASH'];
+        }
+        return static::notice(['payList'=>$payList,'userBalance'=>$userBalance]);
+    }
+
+    /**
+     * 帮会员复消确认订单
+     */
+    public function actionReconsumeSureOrder(){
+        if (\Yii::$app->request->isPost) {
+            $formModel = new OrderForm();
+            $formModel->scenario = 'reconsumeOrder';
+            $formModel->remark = '帮会员复销';
+            $post = \Yii::$app->request->post();
+            $post['type'] = DeclarationForm::TYPE_FX;
+            if ($formModel->load($post, '') && $formModel->reconsumeAdd()) {
+                return static::notice('帮会员复消成功');
+            } else {
+                return static::notice(Form::formatErrorsForApi($formModel->getErrors()),400);
+            }
+        }
+    }
+
 }

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

@@ -318,6 +318,18 @@ export const constantRouterMap = [
           ],
         },
       },
+      {
+        path: '/bonus/teams',
+        component: _import('bonus/teams'),
+        name: 'bonus_teams',
+        meta: {
+          title: '团队查询',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/index'},
+          ],
+        },
+      },
 
     ]
   },

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

@@ -1,93 +1,97 @@
-<template>
-    <div v-loading="loading">
+<template>
+    <div v-loading="loading">
         <div class="white-box">
-          
-            <el-table class="withdraw-table" :data="tableData" stripe style="width: 100%;">
-
-                <el-table-column label="创建时间">
-                    <template slot-scope="scope">
-                        {{tool.formatDate(scope.row.CREATED_AT)}}
-                    </template>
-                </el-table-column>
-                <el-table-column label="报单编号" prop="DEC_SN">
-
-                </el-table-column>
-                <el-table-column label="订单编号" prop="ORDER_SN">
-
-                </el-table-column>
-
-                <el-table-column label="会员编号" prop="USER_NAME">
-                </el-table-column>
-                <el-table-column label="会员姓名" prop="REAL_NAME">
-                </el-table-column>
-                <!--<el-table-column label="推荐人编号" prop="REC_USER_NAME">-->
-                <!--</el-table-column>-->
-                <el-table-column label="接点人编号" prop="CON_USER_NAME">
-                </el-table-column>
-                <el-table-column label="报单金额" prop="DEC_AMOUNT">
-                </el-table-column>
-                <el-table-column label="报单PV" prop="DEC_PV">
-                </el-table-column>
-            </el-table>
-            <div class="white-box-footer">
-                <pagination :total="totalCount" :page_size="pageSize" @size-change="handleSizeChange" @current-change="handleCurrentChange"></pagination>
-            </div>
-        </div>
-    </div>
-</template>
-
-<script>
-    import network from '@/utils/network'
-    import tool from '@/utils/tool'
-    import Pagination from '@/components/Pagination'
-    export default {
-        name: "dec-order-list",
-        components: {Pagination},
-        mounted() {
-            this.getData()
-        },
-        data() {
-            return {
-                loading: false,
-                form:{
-
-                },
-                tableData:null,
-                list: null,
-                currentPage: 1,
-                totalPages: 1,
-                totalCount: 1,
-                pageSize: 20,
-                tool: tool,
-            }
-        },
-        methods: {
-            handleCurrentChange (page) {
-                this.getData(page, this.pageSize)
-            },
-            handleSizeChange (pageSize) {
-                this.getData(this.currentPage, pageSize)
-            },
-            getData(page, pageSize) {
-                network.getPageData(this, 'shop/dec-order-list', page, pageSize, {type: this.type}, function (response) {
-                //network.getData(`shop/dec-order-list`).then(response => {
-                    console.log(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)
-
-                });
-            },
-        }
-    }
-</script>
-
-<style scoped>
-
+            <el-table class="withdraw-table" :data="tableData" style="width: 100%;" :span-method="objectSpanMethod">
+                <el-table-column label="商品编号" prop="SKU_CODE"></el-table-column>
+                <el-table-column label="商品名称" prop="GOODS_TITLE"></el-table-column>
+                <el-table-column label="数量" prop="BUY_NUMS"></el-table-column>
+                <el-table-column label="报单金额" prop="REAL_PRICE"></el-table-column>
+                <el-table-column label="报单PV" prop="REAL_PV"></el-table-column>
+                <el-table-column label="报单编号" prop="DEC_SN"></el-table-column>
+                <el-table-column label="订单编号" prop="DEC_SN"></el-table-column>
+                <el-table-column label="会员编号" prop="USER_NAME"></el-table-column>
+                <el-table-column label="会员姓名" prop="REAL_NAME"></el-table-column>
+                <el-table-column label="接点人编号" prop="CON_USER_NAME"></el-table-column>
+                <el-table-column label="创建时间">
+                    <template slot-scope="scope">
+                        {{tool.formatDate(scope.row.CREATED_AT)}}
+                    </template>
+                </el-table-column>
+            </el-table>
+            <div class="white-box-footer">
+                <pagination :total="totalCount" :page_size="pageSize" @size-change="handleSizeChange" @current-change="handleCurrentChange"></pagination>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+    import network from '@/utils/network'
+    import tool from '@/utils/tool'
+    import Pagination from '@/components/Pagination'
+    export default {
+        name: "dec-order-list",
+        components: {Pagination},
+        mounted() {
+            this.getData()
+        },
+        data() {
+            return {
+                loading: false,
+                form:{
+
+                },
+                tableData:null,
+                list: null,
+                currentPage: 1,
+                totalPages: 1,
+                totalCount: 1,
+                pageSize: 20,
+                tool: tool,
+            }
+        },
+        methods: {
+            handleCurrentChange (page) {
+                this.getData(page, this.pageSize)
+            },
+            handleSizeChange (pageSize) {
+                this.getData(this.currentPage, pageSize)
+            },
+            getData(page, pageSize) {
+                let _this = this
+                network.getPageData(_this, 'shop/dec-order-list', page, pageSize, {type: this.type}, function (response) {
+                //network.getData(`shop/dec-order-list`).then(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;
+                });
+            },
+            objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+              if (columnIndex > 4) {
+                if (rowIndex % 2 === 0) {
+                  return {
+                    rowspan: 2,
+                    colspan: 1
+                  };
+                } else {
+                  return {
+                    rowspan: 0,
+                    colspan: 0
+                  };
+                }
+              }
+            },
+        }
+    }
+</script>
+
+<style scoped>
+
 </style>

+ 38 - 26
frontendEle/src/views/shop/order-list.vue

@@ -1,30 +1,26 @@
 <template>
     <div v-loading="loading">
         <div class="white-box">
-            <el-table class="withdraw-table" :data="tableData" stripe style="width: 100%;">
-                <el-table-column label="创建时间">
-                    <template slot-scope="scope">
-                        {{tool.formatDate(scope.row.CREATED_AT)}}
+            <el-table class="withdraw-table" :data="tableData" style="width: 100%;" :span-method="objectSpanMethod">
+              <el-table-column label="商品编号" prop="SKU_CODE"></el-table-column>
+              <el-table-column label="商品名称" prop="GOODS_TITLE"></el-table-column>
+                <el-table-column label="数量" prop="BUY_NUMS"></el-table-column>
+                <el-table-column label="会员价格">
+                    <template slot-scope="props">
+                        {{ props.row.REAL_PRICE * props.row.BUY_NUMS }}
                     </template>
                 </el-table-column>
-                <el-table-column label="订单编号" prop="SN">
+                <el-table-column label="会员PV">
+                    <template slot-scope="props">
+                        {{ props.row.REAL_PV * props.row.BUY_NUMS }}
+                    </template>
                 </el-table-column>
-              <!--  <el-table-column label="会员ID" prop="USER_ID">
-
-                </el-table-column>-->
+                <el-table-column label="订单编号" prop="SN"></el-table-column>
                 <el-table-column label="会员编号" prop="USER_NAME"></el-table-column>
                 <el-table-column label="会员姓名" prop="REAL_NAME"></el-table-column>
-
-                <el-table-column label="订单金额" prop="ORDER_AMOUNT">
-                </el-table-column>
-                <el-table-column label="订单PV" prop="PV">
-                </el-table-column>
-                <el-table-column label="收货人" prop="CONSIGNEE">
-                </el-table-column>
-                <el-table-column label="收货电话" prop="MOBILE">
-                </el-table-column>
-                <el-table-column label="支付时间" prop="PAY_AT">
-                </el-table-column>
+                <el-table-column label="收货人" prop="CONSIGNEE"></el-table-column>
+                <el-table-column label="收货电话" prop="MOBILE"></el-table-column>
+                <el-table-column label="支付时间" prop="PAY_AT"></el-table-column>
             </el-table>
             <div class="white-box-footer">
                 <pagination :total="totalCount" :page_size="pageSize" @size-change="handleSizeChange" @current-change="handleCurrentChange"></pagination>
@@ -59,6 +55,21 @@
             }
         },
         methods: {
+            objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+              if (columnIndex > 4) {
+                if (rowIndex % 2 === 0) {
+                  return {
+                    rowspan: 2,
+                    colspan: 1
+                  };
+                } else {
+                  return {
+                    rowspan: 0,
+                    colspan: 0
+                  };
+                }
+              }
+            },
             handleCurrentChange (page) {
                 this.getData(page, this.pageSize)
             },
@@ -66,16 +77,17 @@
                 this.getData(this.currentPage, pageSize)
             },
             getData(page, pageSize) {
-                network.getPageData(this, 'shop/order-list', page, pageSize, {type: this.type}, function (response) {
-                    console.log(response)
-                    this.loading = false;
-                    this.list = response.list;
-                    let settingObj=this.list;
+                let _this = this
+                network.getPageData(_this, 'shop/order-list', 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;
+                    _this.tableData=settingArr;
                     console.log(this.tableData)
 
 
@@ -86,4 +98,4 @@
 </script>
 <style scoped>
 
-</style>
+</style>

+ 39 - 8
frontendEle/src/views/shop/order.vue

@@ -4,7 +4,9 @@
             <div class="table">
                 <el-table
                     :data="goods"
-                    style="width: 100%">
+                    style="width: 100%"
+                    show-summary
+                    :summary-method="getSummaries">
                      <el-table-column label="商品名称" prop="GOODS_NAME">
                     </el-table-column>
 
@@ -14,19 +16,20 @@
                         </template>
                     </el-table-column>
 
-                    <el-table-column label="商品价格" prop="SELL_PRICE">
+                    <el-table-column label="会员价格" prop="member_price">
                     </el-table-column>
-                    <el-table-column label="价格PV" prop="PRICE_PV">
-                    </el-table-column>
-                    <el-table-column label="库存" prop="STORE_NUMS">
+                    <el-table-column label="会员PV" prop="member_pv">
                     </el-table-column>
+<!--                    <el-table-column label="库存" prop="STORE_NUMS">-->
+<!--                    </el-table-column>-->
 
                     <el-table-column label="数量" prop="chose_num">
 
                     </el-table-column>
-                    <el-table-column label="合计金额" prop="num_plus">
+                    <el-table-column label="会员价格合计金额" prop="member_price_plus">
 
                     </el-table-column>
+                    <el-table-column label="合计PV" prop="member_pv_plus"></el-table-column>
                 </el-table>
             </div>
             <div class="address_box">
@@ -106,7 +109,6 @@
                 goodsNum:'',
                 payPassword:'',
                 submitButtonStat:false,
-
             }
         },
         created(){
@@ -122,7 +124,13 @@
 
                     pageList.map((pageData, index)=>{
                         if( Number(pageData.chose_num) > 0 ) {
-                            pageData.num_plus = pageData.SELL_PRICE * Number(pageData.chose_num);
+                            let discount = pageData.DISCOUNT / 100;
+                            pageData.member_price = pageData.SELL_PRICE * discount;
+                            pageData.member_price_plus = pageData.SELL_PRICE * Number(pageData.chose_num) * discount;
+
+                            pageData.member_pv = pageData.PRICE_PV * discount;
+                            pageData.member_pv_plus = pageData.PRICE_PV * Number(pageData.chose_num) * discount;
+
                             this.goods.push(pageData)
                         }
                     })
@@ -132,6 +140,29 @@
             }
         },
         methods:{
+            getSummaries(param) {
+              const { columns, data } = param;
+              const sums = [];
+              columns.forEach((column, index) => {
+                if (index === 0) {
+                  sums[index] = '合计';
+                  return;
+                }
+                const values = data.map(item => Number(item[column.property]));
+                if ((!values.every(value => isNaN(value))) && [4, 5, 6].includes(index)) {
+                  sums[index] = values.reduce((prev, curr) => {
+                    const value = Number(curr);
+                    if (!isNaN(value)) {
+                      return prev + curr;
+                    } else {
+                      return prev;
+                    }
+                  }, 0);
+                }
+              });
+
+              return sums;
+            },
             goToAccounts(){
                 this.submitButtonStat = true
                 // let path = 'sure-order'

+ 39 - 7
frontendEle/src/views/shop/reconsume-order.vue

@@ -4,7 +4,9 @@
             <div class="table">
                 <el-table
                     :data="goods"
-                    style="width: 100%">
+                    style="width: 100%"
+                    show-summary
+                    :summary-method="getSummaries">
                      <el-table-column label="商品名称" prop="GOODS_NAME">
                     </el-table-column>
 
@@ -14,19 +16,20 @@
                         </template>
                     </el-table-column>
 
-                    <el-table-column label="商品价格" prop="SELL_PRICE">
+                    <el-table-column label="会员价格" prop="member_price">
                     </el-table-column>
-                    <el-table-column label="价格PV" prop="PRICE_PV">
-                    </el-table-column>
-                    <el-table-column label="库存" prop="STORE_NUMS">
+                    <el-table-column label="会员PV" prop="member_pv">
                     </el-table-column>
+<!--                    <el-table-column label="库存" prop="STORE_NUMS">-->
+<!--                    </el-table-column>-->
 
                     <el-table-column label="数量" prop="chose_num">
 
                     </el-table-column>
-                    <el-table-column label="合计金额" prop="num_plus">
+                    <el-table-column label="会员价格合计金额" prop="member_price_plus">
 
                     </el-table-column>
+                    <el-table-column label="合计PV" prop="member_pv_plus"></el-table-column>
                 </el-table>
             </div>
             <!--<div class="sum">-->
@@ -192,7 +195,13 @@
 
                     pageList.map((pageData, index)=>{
                         if( Number(pageData.chose_num) > 0 ) {
-                            pageData.num_plus = pageData.SELL_PRICE * Number(pageData.chose_num);
+                            let discount = pageData.DISCOUNT / 100;
+                            pageData.member_price = pageData.SELL_PRICE * discount;
+                            pageData.member_price_plus = pageData.SELL_PRICE * Number(pageData.chose_num) * discount;
+
+                            pageData.member_pv = pageData.PRICE_PV * discount;
+                            pageData.member_pv_plus = pageData.PRICE_PV * Number(pageData.chose_num) * discount;
+
                             this.goods.push(pageData)
                         }
                     })
@@ -244,6 +253,29 @@
                 })
 
             },
+            getSummaries(param) {
+              const { columns, data } = param;
+              const sums = [];
+              columns.forEach((column, index) => {
+                if (index === 0) {
+                  sums[index] = '合计';
+                  return;
+                }
+                const values = data.map(item => Number(item[column.property]));
+                if ((!values.every(value => isNaN(value))) && [4, 5, 6].includes(index)) {
+                  sums[index] = values.reduce((prev, curr) => {
+                    const value = Number(curr);
+                    if (!isNaN(value)) {
+                      return prev + curr;
+                    } else {
+                      return prev;
+                    }
+                  }, 0);
+                }
+              });
+
+              return sums;
+            },
             getSumMoney(){
                 // let points_plus_sum=[];
                 let cash_plus_sum=[];