York 3 жил өмнө
parent
commit
ea7df35127

+ 491 - 491
backendApi/config/menu.php

@@ -1,492 +1,492 @@
-<?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'=>'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,],
+        ],
+    ],
 ];

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

@@ -1,2765 +1,2765 @@
-<?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\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('导出开始,请到文件管理-导出文件查看');
+    }
 }

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

@@ -1,422 +1,422 @@
-<?php
-namespace backendApi\modules\v1\models\lists\bonus;
-
-use backendApi\modules\v1\models\Admin;
-use common\helpers\user\Info;
-use common\libs\dataList\column\Price;
-use common\libs\dataList\column\YesNo;
-use common\libs\dataList\DataListInterface;
-use common\models\User;
-use common\models\UserBind;
-use common\models\UserBonus;
-use common\models\UserInfo;
-use common\libs\dataList\column\DateTime;
-use common\models\UserWallet;
-use common\models\Withdraw;
-use Yii;
-
-class BalanceList extends \common\libs\dataList\DataList implements DataListInterface
-{
-    /**
-     * 列表名称
-     * @return string
-     */
-    public function getListName(){
-        return '会员奖金余额列表';
-    }
-
-    /**
-     * 列表筛选到的数据
-     * @throws \yii\base\Exception
-     */
-    public function dataHandle()
-    {
-        $this->condition .= ' AND UI.STATUS=1 AND I.LAST_LOGIN_AT>=1620748800';
-        $this->listData = UserBonus::lists($this->condition, $this->params, [
-            'select' => 'UB.*,UI.*,UW.CASH',
-            'from' => UserBonus::tableName() . ' AS UB',
-            'join' => [
-//                ['LEFT JOIN', UserInfo::tableName() . ' AS UI', 'UI.USER_ID=UB.USER_ID'],
-                ['LEFT JOIN', User::tableName() . ' AS UI', 'UI.ID=UB.USER_ID'],
-                ['LEFT JOIN', UserWallet::tableName() . ' AS UW', 'UW.USER_ID=UB.USER_ID'],
-                ['LEFT JOIN', UserInfo::tableName() . ' AS I', 'I.USER_ID=UB.USER_ID']
-            ],
-            'orderBy' => 'UB.CREATED_AT ASC, UB.ID ASC',
-            'page' => $this->page,
-            'pageSize' => $this->pageSize,
-        ]);
-
-//        foreach ($this->listData['list'] as $key => $value) {
-//            $userInfo = Info::baseInfo($value['USER_ID']);
-//            $this->listData['list'][$key] = array_merge($value, $userInfo);
-//            $this->listData['list'][$key]['WITHDRAW_WAIT'] = Withdraw::getWithdrawTotal($value['USER_ID'], Withdraw::STATUS_WAIT_PAID);
-//            $this->listData['list'][$key]['WITHDRAW_FAIL'] = Withdraw::getWithdrawTotal($value['USER_ID'], Withdraw::STATUS_PAID_FALSE);
-//        }
-        //总计
-//        $sumData = UserBonus::find()->select('SUM(BONUS) AS SUM_BONUS,SUM(CF) AS SUM_CF,SUM(LX) AS SUM_LX')
-//            ->from(UserBonus::tableName() . ' AS UB')
-//            ->leftJoin(UserInfo::tableName() . ' AS UI', 'UI.USER_ID=UB.USER_ID')
-//            ->where('1=1 ' . $this->condition, $this->params)->asArray()->one();
-//        $sumData['SUM_WITHDRAW_WAIT'] = Withdraw::getAllWithdrawTotal(Withdraw::STATUS_WAIT_PAID);
-//        $sumData['SUM_WITHDRAW_FAIL'] = Withdraw::getAllWithdrawTotal(Withdraw::STATUS_PAID_FALSE);
-//        $this->listData['sumData'] = $sumData;
-    }
-
-    /**
-     * 要展示和导出的所有字段
-     * @return array
-     */
-    public function getColumn(){
-        if(!$this->columns){
-            $this->columns = [
-                'USER_ID' => null, // 这种传输方式主要是用于索引,因为过滤后的字段可能没有这种ID,但是一些功能的操作还需要用这种ID去关联,例如前台会员列表中的勾选批量状态管理,这里需要的就是USER_ID
-                'USER_NAME' => [
-                    'header' => '会员编号',
-                    'headerOther' => [
-                        'width' => '150',
-                    ],
-                    'valueOther' => [
-                        'tag'=>['type'=>'info', 'size' => 'small', 'class'=>'no-border']
-                    ],
-                ],
-                'REAL_NAME' => [
-                    'header' => '会员姓名',
-                    'headerOther' => [
-                        'width' => '120',
-                    ],
-                    'valueOther' => [
-                        'tag'=>['type'=>'success', 'size' => 'small', 'class'=>'no-border']
-                    ],
-                ],
-//                'DEC_LV_NAME' => [
-//                    'header' => '会员级别',
-//                    'headerOther' => [
-//                        'width' => '110',
-//                    ],
-//                    'valueOther' => [
-//                        'tag'=>['type'=>'warning', 'size' => 'small', 'class'=>'no-border']
-//                    ],
-//                ],
-//                'EMP_LV_NAME' => [
-//                    'header' => '聘级',
-//                    'headerOther' => [
-//                        'width' => '130',
-//                    ],
-//                    'valueOther' => [
-//                        'tag'=>['type'=>'warning', 'size' => 'small', 'class'=>'no-border']
-//                    ],
-//                ],
-                'IS_DEC' => [
-                    'header' => '是否报单中心',
-                    'value' => function($row) {
-                        return (new YesNo([
-                            'value' => $row['IS_DEC'],
-                        ]))->result();
-                    },
-                    'headerOther' => function($row) {
-                        return [
-                            'width' => '120',
-                        ];
-                    },
-                    'valueOther' => function($row) {
-                        return [
-                            'tag'=>['type'=>(isset($row['IS_DEC']) && $row['IS_DEC'] )? 'success' : 'info', 'size' => 'small']
-                        ];
-                    },
-                ],
-//                'DEC_ROLE_NAME' => [
-//                    'header' => '报单中心级别',
-//                    'headerOther' => ['width' => '110'],
-//                ],
-//                'SYSTEM_NAME' => [
-//                    'header' => '体系名称',
-//                    'headerOther' => ['width' => '150'],
-//                ],
-                'BONUS' => [
-                    'header' => '会员奖金余额',
-                    'value' => function($row) {
-                        return (new Price([
-                            'value' => $row['BONUS'],
-                        ]))->result();
-                    },
-                    'headerOther' => [
-                        'width' => '150',
-                        'prop'=>'BONUS',
-                    ],
-                    'valueOther' => [
-                        'tag'=>['type'=>'danger', 'size' => 'small', 'class'=>'no-border'],
-                    ],
-                ],
-                'RECONSUME_POINTS' => [
-                    'header' => '会员复消积分',
-                    'value' => function($row) {
-                        return (new Price([
-                            'value' => $row['RECONSUME_POINTS'],
-                        ]))->result();
-                    },
-                    'headerOther' => [
-                        'width' => '150',
-                        'prop'=>'BONUS',
-                    ],
-                    'valueOther' => [
-                        'tag'=>['type'=>'danger', 'size' => 'small', 'class'=>'no-border'],
-                    ],
-                ],
-                'EXCHANGE_POINTS' => [
-                    'header' => '兑换积分',
-                    'value' => function($row) {
-                        return (new Price([
-                            'value' => $row['EXCHANGE_POINTS'],
-                        ]))->result();
-                    },
-                    'headerOther' => [
-                        'width' => '150',
-                        'prop'=>'BONUS',
-                    ],
-                    'valueOther' => [
-                        'tag'=>['type'=>'danger', 'size' => 'small', 'class'=>'no-border'],
-                    ],
-                ],
-                'CASH' => [
-                    'header' => '会员余额',
-                    'value' => function($row) {
-                        return (new Price([
-                            'value' => $row['CASH'],
-                        ]))->result();
-                    },
-                    'headerOther' => [
-                        'width' => '150',
-                        'prop'=>'BONUS',
-                    ],
-                    'valueOther' => [
-                        'tag'=>['type'=>'danger', 'size' => 'small', 'class'=>'no-border'],
-                    ],
-                ],
-//                'CF' => [
-//                    'header' => '车房养老余额',
-//                    'value' => function($row) {
-//                        return (new Price([
-//                            'value' => $row['CF'],
-//                        ]))->result();
-//                    },
-//                    'headerOther' => [
-//                        'width' => '150',
-//                        'prop'=>'CF',
-//                    ],
-//                    'valueOther' => [
-//                        'tag'=>['type'=>'danger', 'size' => 'small', 'class'=>'no-border'],
-//                    ],
-//                ],
-//                'LX' => [
-//                    'header' => '领袖分红余额',
-//                    'value' => function($row) {
-//                        return (new Price([
-//                            'value' => $row['LX'],
-//                        ]))->result();
-//                    },
-//                    'headerOther' => [
-//                        'width' => '150',
-//                        'prop'=>'LX',
-//                    ],
-//                    'valueOther' => [
-//                        'tag'=>['type'=>'danger', 'size' => 'small', 'class'=>'no-border'],
-//                    ],
-//                ],
-//                'WITHDRAW_WAIT' => [
-//                    'header' => '提现金额',
-//                    'value' => function($row) {
-//                        return (new Price([
-//                            'value' => $row['WITHDRAW_WAIT'],
-//                        ]))->result();
-//                    },
-//                    'headerOther' => [
-//                        'width' => '150',
-//                        'prop'=>'WITHDRAW_WAIT',
-//                    ],
-//                    'valueOther' => [
-//                        'tag'=>['type'=>'warning', 'size' => 'small', 'class'=>'no-border'],
-//                    ],
-//                ],
-//                'TAX' => [
-//                    'header' => '个税',
-//                    'value' => function($row) {
-//                        return (new Price([
-//                            'value' => $row['WITHDRAW_WAIT'],
-//                        ]))->result();
-//                    },
-//                    'headerOther' => [
-//                        'width' => '150',
-//                        'prop'=>'TAX',
-//                    ],
-//                    'valueOther' => [
-//                        'tag'=>['type'=>'warning', 'size' => 'small', 'class'=>'no-border'],
-//                    ],
-//                ],
-//                'DEDUCT' => [
-//                    'header' => '扣款',
-//                    'value' => function($row) {
-//                        return (new Price([
-//                            'value' => $row['WITHDRAW_WAIT'],
-//                        ]))->result();
-//                    },
-//                    'headerOther' => [
-//                        'width' => '150',
-//                        'prop'=>'DEDUCT',
-//                    ],
-//                    'valueOther' => [
-//                        'tag'=>['type'=>'warning', 'size' => 'small', 'class'=>'no-border'],
-//                    ],
-//                ],
-//                'REAL_PAID' => [
-//                    'header' => '实付金额',
-//                    'value' => function($row) {
-//                        return (new Price([
-//                            'value' => $row['WITHDRAW_WAIT'],
-//                        ]))->result();
-//                    },
-//                    'headerOther' => [
-//                        'width' => '150',
-//                        'prop'=>'REAL_PAID',
-//                    ],
-//                    'valueOther' => [
-//                        'tag'=>['type'=>'warning', 'size' => 'small', 'class'=>'no-border'],
-//                    ],
-//                ],
-//                'WITHDRAW_FAIL' => [
-//                    'header' => '实付失败金额',
-//                    'value' => function($row) {
-//                        return (new Price([
-//                            'value' => $row['WITHDRAW_FAIL'],
-//                        ]))->result();
-//                    },
-//                    'headerOther' => [
-//                        'width' => '150',
-//                        'prop'=>'WITHDRAW_FAIL',
-//                    ],
-//                    'valueOther' => [
-//                        'tag'=>['type'=>'warning', 'size' => 'small', 'class'=>'no-border'],
-//                    ],
-//                ],
-//                'STATUS' => [
-//                    'header' => '会员状态',
-//                    'value' => function($row){
-//                        return Yii::$app->params['userStatus'][$row['STATUS']]['label'];
-//                    },
-//                    'headerOther' => ['width' => '110'],
-//                ],
-//                'STATUS_AT' => [
-//                    'header' => '会员状态变更时间',
-//                    'value' => function($row) {
-//                        return (new DateTime([
-//                            'value' => $row['STATUS_AT'],
-//                        ]))->result();
-//                    },
-//                    'headerOther' => ['width' => '170'],
-//                ],
-//                'HIGHEST_EMP_LV_NAME' => [
-//                    'header' => '历史最高聘级',
-//                    'headerOther' => ['width' => '130'],
-//                ],
-                'PERIOD_AT' => '加入期数',
-//                'DEC_DEC_ROLE_NAME' => [
-//                    'header' => '所属报单中心级别',
-//                    'headerOther' => ['width' => '150'],
-//                ],
-//                'DEC_USER_NAME' => [
-//                    'header' => '所属报单中心编号',
-//                    'headerOther' => ['width' => '150'],
-//                ],
-//                'DEC_REAL_NAME' => [
-//                    'header' => '所属报单中心姓名',
-//                    'headerOther' => ['width' => '150'],
-//                ],
-                'MOBILE' => [
-                    'header' => '手机号码',
-                    'value' => function($row) {
-                        return "\t".$row['MOBILE'];
-                    },
-                    'headerOther' => ['width' => '120'],
-                ],
-                'TEL' => [
-                    'header' => '备用手机号码',
-                    'value' => function($row) {
-                        return "\t".$row['TEL'];
-                    },
-                    'headerOther' => ['width' => '120'],
-                ],
-//                'AREA' => [
-//                    'header' => '常用地址',
-//                    'value' => function($row) {
-//                        return $row['PROVINCE_NAME'].$row['CITY_NAME'].$row['COUNTY_NAME'];
-//                    },
-//                    'showValue' => function($row) {
-//                        return '<div class="addr" :title='.$row['PROVINCE_NAME'].$row['CITY_NAME'].$row['COUNTY_NAME'].'>'.$row['PROVINCE_NAME'].$row['CITY_NAME'].$row['COUNTY_NAME'].'</div>';
-//                    },
-//                    'headerOther' => [
-//                        'width' => '200'
-//                    ],
-//                ],
-//                'SUB_COM_NAME' => [
-//                    'header' => '所属分公司',
-//                    'headerOther' => ['width' => '100'],
-//                ],
-//                'IS_DIRECT_SELLER' => [
-//                    'header' => '是否直销员',
-//                    'value' => function($row) {
-//                        return (new YesNo([
-//                            'value' => $row['IS_DIRECT_SELLER'],
-//                        ]))->result();
-//                    },
-//                    'headerOther' => function($row) {
-//                        return [
-//                            'width' => '120',
-//                        ];
-//                    },
-//                    'valueOther' => function($row) {
-//                        return [
-//                            'tag'=>['type'=>(isset($row['IS_DIRECT_SELLER']) && $row['IS_DIRECT_SELLER']) ? 'success' : 'info', 'size' => 'small']
-//                        ];
-//                    },
-//                ],
-            ];
-        }
-        return $this->columns;
-    }
-
-    /**
-     * 前台用于筛选的类型集合
-     * @return mixed
-     */
-    public function getFilterTypes()
-    {
-        if(!$this->filterTypes){
-            $this->filterTypes = [
-                'USER_NAME'=> ['isUserTable'=> false, 'name'=> '会员编号'],
-                'REAL_NAME'=> ['isUserTable'=> false, 'name'=> '会员姓名'],
-//                'DEC_LV_NAME'=> ['isUserTable'=> true, 'name'=> '会员级别', 'other'=> 'decLevel'],
-//                'EMP_LV_NAME'=> ['isUserTable'=> true, 'name'=> '聘级', 'other'=> 'empLevel'],
-                'IS_DEC'=> ['isUserTable'=> false, 'name'=> '是否报单中心', 'other'=> 'yesOrNo'],
-//                'DEC_ROLE_NAME'=> ['isUserTable'=> true, 'name'=> '报单中心级别', 'other'=> 'decRole'],
-//                'SYSTEM_NAME'=> ['isUserTable'=> false, 'name'=> '体系名称', 'other'=> 'systems'],
-                'BONUS'=> ['isUserTable'=> false, 'name'=> '会员奖金余额'],
-                'RECONSUME_POINTS'=> ['isUserTable'=> false, 'name'=> '会员复消积分'],
-                'CASH'=> ['isUserTable'=> false, 'name'=> '会员余额'],
-//                'CF'=> ['isUserTable'=> false, 'name'=> '车房养老余额'],
-//                'LX'=> ['isUserTable'=> false, 'name'=> '领袖分红余额'],
-//                'STATUS'=> ['isUserTable'=> true, 'name'=> '会员状态', 'other'=> 'status'],
-//                'STATUS_AT'=> ['isUserTable'=> true, 'name'=> '会员状态变更时间', 'other'=> 'date'],
-//                'HIGHEST_EMP_LV_NAME'=> ['isUserTable'=> false, 'name'=> '历史最高聘级', 'other'=> 'empLevel'],
-                'PERIOD_AT'=> ['isUserTable'=> false, 'name'=> '加入期数'],
-//                'DEC_DEC_ROLE_NAME'=> ['isUserTable'=> true, 'name'=> '所属报单中心级别', 'other'=> 'decRole'],
-//                'DEC_USER_NAME'=> ['isUserTable'=> true, 'name'=> '所属报单中心编号'],
-//                'DEC_REAL_NAME'=> ['isUserTable'=> true, 'name'=> '所属报单中心姓名'],
-                'MOBILE'=> ['isUserTable'=> false, 'name'=> '手机号码'],
-                'TEL'=> ['isUserTable'=> false, 'name'=> '备用手机号码'],
-//                'AREA'=> ['isUserTable'=> true, 'name'=> '常用地址', 'other'=> 'area'],
-//                'SUB_COM_NAME'=> ['isUserTable'=> true, 'name'=> '所属分公司', 'other'=> 'subCompany'],
-//                'IS_DIRECT_SELLER'=> ['isUserTable'=> true, 'name'=> '是否直销员', 'other'=> 'yesOrNo'],
-            ];
-        }
-        return $this->filterTypes;
-    }
+<?php
+namespace backendApi\modules\v1\models\lists\bonus;
+
+use backendApi\modules\v1\models\Admin;
+use common\helpers\user\Info;
+use common\libs\dataList\column\Price;
+use common\libs\dataList\column\YesNo;
+use common\libs\dataList\DataListInterface;
+use common\models\User;
+use common\models\UserBind;
+use common\models\UserBonus;
+use common\models\UserInfo;
+use common\libs\dataList\column\DateTime;
+use common\models\UserWallet;
+use common\models\Withdraw;
+use Yii;
+
+class BalanceList extends \common\libs\dataList\DataList implements DataListInterface
+{
+    /**
+     * 列表名称
+     * @return string
+     */
+    public function getListName(){
+        return '会员奖金余额列表';
+    }
+
+    /**
+     * 列表筛选到的数据
+     * @throws \yii\base\Exception
+     */
+    public function dataHandle()
+    {
+        $this->condition .= ' AND UI.STATUS=1 AND I.LAST_LOGIN_AT>=1620748800';
+        $this->listData = UserBonus::lists($this->condition, $this->params, [
+            'select' => 'UB.*,UI.*,UW.CASH',
+            'from' => UserBonus::tableName() . ' AS UB',
+            'join' => [
+//                ['LEFT JOIN', UserInfo::tableName() . ' AS UI', 'UI.USER_ID=UB.USER_ID'],
+                ['LEFT JOIN', User::tableName() . ' AS UI', 'UI.ID=UB.USER_ID'],
+                ['LEFT JOIN', UserWallet::tableName() . ' AS UW', 'UW.USER_ID=UB.USER_ID'],
+                ['LEFT JOIN', UserInfo::tableName() . ' AS I', 'I.USER_ID=UB.USER_ID']
+            ],
+            'orderBy' => 'UB.CREATED_AT ASC, UB.ID ASC',
+            'page' => $this->page,
+            'pageSize' => $this->pageSize,
+        ]);
+
+//        foreach ($this->listData['list'] as $key => $value) {
+//            $userInfo = Info::baseInfo($value['USER_ID']);
+//            $this->listData['list'][$key] = array_merge($value, $userInfo);
+//            $this->listData['list'][$key]['WITHDRAW_WAIT'] = Withdraw::getWithdrawTotal($value['USER_ID'], Withdraw::STATUS_WAIT_PAID);
+//            $this->listData['list'][$key]['WITHDRAW_FAIL'] = Withdraw::getWithdrawTotal($value['USER_ID'], Withdraw::STATUS_PAID_FALSE);
+//        }
+        //总计
+//        $sumData = UserBonus::find()->select('SUM(BONUS) AS SUM_BONUS,SUM(CF) AS SUM_CF,SUM(LX) AS SUM_LX')
+//            ->from(UserBonus::tableName() . ' AS UB')
+//            ->leftJoin(UserInfo::tableName() . ' AS UI', 'UI.USER_ID=UB.USER_ID')
+//            ->where('1=1 ' . $this->condition, $this->params)->asArray()->one();
+//        $sumData['SUM_WITHDRAW_WAIT'] = Withdraw::getAllWithdrawTotal(Withdraw::STATUS_WAIT_PAID);
+//        $sumData['SUM_WITHDRAW_FAIL'] = Withdraw::getAllWithdrawTotal(Withdraw::STATUS_PAID_FALSE);
+//        $this->listData['sumData'] = $sumData;
+    }
+
+    /**
+     * 要展示和导出的所有字段
+     * @return array
+     */
+    public function getColumn(){
+        if(!$this->columns){
+            $this->columns = [
+                'USER_ID' => null, // 这种传输方式主要是用于索引,因为过滤后的字段可能没有这种ID,但是一些功能的操作还需要用这种ID去关联,例如前台会员列表中的勾选批量状态管理,这里需要的就是USER_ID
+                'USER_NAME' => [
+                    'header' => '会员编号',
+                    'headerOther' => [
+                        'width' => '150',
+                    ],
+                    'valueOther' => [
+                        'tag'=>['type'=>'info', 'size' => 'small', 'class'=>'no-border']
+                    ],
+                ],
+                'REAL_NAME' => [
+                    'header' => '会员姓名',
+                    'headerOther' => [
+                        'width' => '120',
+                    ],
+                    'valueOther' => [
+                        'tag'=>['type'=>'success', 'size' => 'small', 'class'=>'no-border']
+                    ],
+                ],
+//                'DEC_LV_NAME' => [
+//                    'header' => '会员级别',
+//                    'headerOther' => [
+//                        'width' => '110',
+//                    ],
+//                    'valueOther' => [
+//                        'tag'=>['type'=>'warning', 'size' => 'small', 'class'=>'no-border']
+//                    ],
+//                ],
+//                'EMP_LV_NAME' => [
+//                    'header' => '聘级',
+//                    'headerOther' => [
+//                        'width' => '130',
+//                    ],
+//                    'valueOther' => [
+//                        'tag'=>['type'=>'warning', 'size' => 'small', 'class'=>'no-border']
+//                    ],
+//                ],
+                'IS_DEC' => [
+                    'header' => '是否报单中心',
+                    'value' => function($row) {
+                        return (new YesNo([
+                            'value' => $row['IS_DEC'],
+                        ]))->result();
+                    },
+                    'headerOther' => function($row) {
+                        return [
+                            'width' => '120',
+                        ];
+                    },
+                    'valueOther' => function($row) {
+                        return [
+                            'tag'=>['type'=>(isset($row['IS_DEC']) && $row['IS_DEC'] )? 'success' : 'info', 'size' => 'small']
+                        ];
+                    },
+                ],
+//                'DEC_ROLE_NAME' => [
+//                    'header' => '报单中心级别',
+//                    'headerOther' => ['width' => '110'],
+//                ],
+//                'SYSTEM_NAME' => [
+//                    'header' => '体系名称',
+//                    'headerOther' => ['width' => '150'],
+//                ],
+                'BONUS' => [
+                    'header' => '会员奖金余额',
+                    'value' => function($row) {
+                        return (new Price([
+                            'value' => $row['BONUS'],
+                        ]))->result();
+                    },
+                    'headerOther' => [
+                        'width' => '150',
+                        'prop'=>'BONUS',
+                    ],
+                    'valueOther' => [
+                        'tag'=>['type'=>'danger', 'size' => 'small', 'class'=>'no-border'],
+                    ],
+                ],
+                'RECONSUME_POINTS' => [
+                    'header' => '会员复消积分',
+                    'value' => function($row) {
+                        return (new Price([
+                            'value' => $row['RECONSUME_POINTS'],
+                        ]))->result();
+                    },
+                    'headerOther' => [
+                        'width' => '150',
+                        'prop'=>'BONUS',
+                    ],
+                    'valueOther' => [
+                        'tag'=>['type'=>'danger', 'size' => 'small', 'class'=>'no-border'],
+                    ],
+                ],
+                'EXCHANGE_POINTS' => [
+                    'header' => '兑换点数',
+                    'value' => function($row) {
+                        return (new Price([
+                            'value' => $row['EXCHANGE_POINTS'],
+                        ]))->result();
+                    },
+                    'headerOther' => [
+                        'width' => '150',
+                        'prop'=>'BONUS',
+                    ],
+                    'valueOther' => [
+                        'tag'=>['type'=>'danger', 'size' => 'small', 'class'=>'no-border'],
+                    ],
+                ],
+                'CASH' => [
+                    'header' => '会员余额',
+                    'value' => function($row) {
+                        return (new Price([
+                            'value' => $row['CASH'],
+                        ]))->result();
+                    },
+                    'headerOther' => [
+                        'width' => '150',
+                        'prop'=>'BONUS',
+                    ],
+                    'valueOther' => [
+                        'tag'=>['type'=>'danger', 'size' => 'small', 'class'=>'no-border'],
+                    ],
+                ],
+//                'CF' => [
+//                    'header' => '车房养老余额',
+//                    'value' => function($row) {
+//                        return (new Price([
+//                            'value' => $row['CF'],
+//                        ]))->result();
+//                    },
+//                    'headerOther' => [
+//                        'width' => '150',
+//                        'prop'=>'CF',
+//                    ],
+//                    'valueOther' => [
+//                        'tag'=>['type'=>'danger', 'size' => 'small', 'class'=>'no-border'],
+//                    ],
+//                ],
+//                'LX' => [
+//                    'header' => '领袖分红余额',
+//                    'value' => function($row) {
+//                        return (new Price([
+//                            'value' => $row['LX'],
+//                        ]))->result();
+//                    },
+//                    'headerOther' => [
+//                        'width' => '150',
+//                        'prop'=>'LX',
+//                    ],
+//                    'valueOther' => [
+//                        'tag'=>['type'=>'danger', 'size' => 'small', 'class'=>'no-border'],
+//                    ],
+//                ],
+//                'WITHDRAW_WAIT' => [
+//                    'header' => '提现金额',
+//                    'value' => function($row) {
+//                        return (new Price([
+//                            'value' => $row['WITHDRAW_WAIT'],
+//                        ]))->result();
+//                    },
+//                    'headerOther' => [
+//                        'width' => '150',
+//                        'prop'=>'WITHDRAW_WAIT',
+//                    ],
+//                    'valueOther' => [
+//                        'tag'=>['type'=>'warning', 'size' => 'small', 'class'=>'no-border'],
+//                    ],
+//                ],
+//                'TAX' => [
+//                    'header' => '个税',
+//                    'value' => function($row) {
+//                        return (new Price([
+//                            'value' => $row['WITHDRAW_WAIT'],
+//                        ]))->result();
+//                    },
+//                    'headerOther' => [
+//                        'width' => '150',
+//                        'prop'=>'TAX',
+//                    ],
+//                    'valueOther' => [
+//                        'tag'=>['type'=>'warning', 'size' => 'small', 'class'=>'no-border'],
+//                    ],
+//                ],
+//                'DEDUCT' => [
+//                    'header' => '扣款',
+//                    'value' => function($row) {
+//                        return (new Price([
+//                            'value' => $row['WITHDRAW_WAIT'],
+//                        ]))->result();
+//                    },
+//                    'headerOther' => [
+//                        'width' => '150',
+//                        'prop'=>'DEDUCT',
+//                    ],
+//                    'valueOther' => [
+//                        'tag'=>['type'=>'warning', 'size' => 'small', 'class'=>'no-border'],
+//                    ],
+//                ],
+//                'REAL_PAID' => [
+//                    'header' => '实付金额',
+//                    'value' => function($row) {
+//                        return (new Price([
+//                            'value' => $row['WITHDRAW_WAIT'],
+//                        ]))->result();
+//                    },
+//                    'headerOther' => [
+//                        'width' => '150',
+//                        'prop'=>'REAL_PAID',
+//                    ],
+//                    'valueOther' => [
+//                        'tag'=>['type'=>'warning', 'size' => 'small', 'class'=>'no-border'],
+//                    ],
+//                ],
+//                'WITHDRAW_FAIL' => [
+//                    'header' => '实付失败金额',
+//                    'value' => function($row) {
+//                        return (new Price([
+//                            'value' => $row['WITHDRAW_FAIL'],
+//                        ]))->result();
+//                    },
+//                    'headerOther' => [
+//                        'width' => '150',
+//                        'prop'=>'WITHDRAW_FAIL',
+//                    ],
+//                    'valueOther' => [
+//                        'tag'=>['type'=>'warning', 'size' => 'small', 'class'=>'no-border'],
+//                    ],
+//                ],
+//                'STATUS' => [
+//                    'header' => '会员状态',
+//                    'value' => function($row){
+//                        return Yii::$app->params['userStatus'][$row['STATUS']]['label'];
+//                    },
+//                    'headerOther' => ['width' => '110'],
+//                ],
+//                'STATUS_AT' => [
+//                    'header' => '会员状态变更时间',
+//                    'value' => function($row) {
+//                        return (new DateTime([
+//                            'value' => $row['STATUS_AT'],
+//                        ]))->result();
+//                    },
+//                    'headerOther' => ['width' => '170'],
+//                ],
+//                'HIGHEST_EMP_LV_NAME' => [
+//                    'header' => '历史最高聘级',
+//                    'headerOther' => ['width' => '130'],
+//                ],
+                'PERIOD_AT' => '加入期数',
+//                'DEC_DEC_ROLE_NAME' => [
+//                    'header' => '所属报单中心级别',
+//                    'headerOther' => ['width' => '150'],
+//                ],
+//                'DEC_USER_NAME' => [
+//                    'header' => '所属报单中心编号',
+//                    'headerOther' => ['width' => '150'],
+//                ],
+//                'DEC_REAL_NAME' => [
+//                    'header' => '所属报单中心姓名',
+//                    'headerOther' => ['width' => '150'],
+//                ],
+                'MOBILE' => [
+                    'header' => '手机号码',
+                    'value' => function($row) {
+                        return "\t".$row['MOBILE'];
+                    },
+                    'headerOther' => ['width' => '120'],
+                ],
+                'TEL' => [
+                    'header' => '备用手机号码',
+                    'value' => function($row) {
+                        return "\t".$row['TEL'];
+                    },
+                    'headerOther' => ['width' => '120'],
+                ],
+//                'AREA' => [
+//                    'header' => '常用地址',
+//                    'value' => function($row) {
+//                        return $row['PROVINCE_NAME'].$row['CITY_NAME'].$row['COUNTY_NAME'];
+//                    },
+//                    'showValue' => function($row) {
+//                        return '<div class="addr" :title='.$row['PROVINCE_NAME'].$row['CITY_NAME'].$row['COUNTY_NAME'].'>'.$row['PROVINCE_NAME'].$row['CITY_NAME'].$row['COUNTY_NAME'].'</div>';
+//                    },
+//                    'headerOther' => [
+//                        'width' => '200'
+//                    ],
+//                ],
+//                'SUB_COM_NAME' => [
+//                    'header' => '所属分公司',
+//                    'headerOther' => ['width' => '100'],
+//                ],
+//                'IS_DIRECT_SELLER' => [
+//                    'header' => '是否直销员',
+//                    'value' => function($row) {
+//                        return (new YesNo([
+//                            'value' => $row['IS_DIRECT_SELLER'],
+//                        ]))->result();
+//                    },
+//                    'headerOther' => function($row) {
+//                        return [
+//                            'width' => '120',
+//                        ];
+//                    },
+//                    'valueOther' => function($row) {
+//                        return [
+//                            'tag'=>['type'=>(isset($row['IS_DIRECT_SELLER']) && $row['IS_DIRECT_SELLER']) ? 'success' : 'info', 'size' => 'small']
+//                        ];
+//                    },
+//                ],
+            ];
+        }
+        return $this->columns;
+    }
+
+    /**
+     * 前台用于筛选的类型集合
+     * @return mixed
+     */
+    public function getFilterTypes()
+    {
+        if(!$this->filterTypes){
+            $this->filterTypes = [
+                'USER_NAME'=> ['isUserTable'=> false, 'name'=> '会员编号'],
+                'REAL_NAME'=> ['isUserTable'=> false, 'name'=> '会员姓名'],
+//                'DEC_LV_NAME'=> ['isUserTable'=> true, 'name'=> '会员级别', 'other'=> 'decLevel'],
+//                'EMP_LV_NAME'=> ['isUserTable'=> true, 'name'=> '聘级', 'other'=> 'empLevel'],
+                'IS_DEC'=> ['isUserTable'=> false, 'name'=> '是否报单中心', 'other'=> 'yesOrNo'],
+//                'DEC_ROLE_NAME'=> ['isUserTable'=> true, 'name'=> '报单中心级别', 'other'=> 'decRole'],
+//                'SYSTEM_NAME'=> ['isUserTable'=> false, 'name'=> '体系名称', 'other'=> 'systems'],
+                'BONUS'=> ['isUserTable'=> false, 'name'=> '会员奖金余额'],
+                'RECONSUME_POINTS'=> ['isUserTable'=> false, 'name'=> '会员复消积分'],
+                'CASH'=> ['isUserTable'=> false, 'name'=> '会员余额'],
+//                'CF'=> ['isUserTable'=> false, 'name'=> '车房养老余额'],
+//                'LX'=> ['isUserTable'=> false, 'name'=> '领袖分红余额'],
+//                'STATUS'=> ['isUserTable'=> true, 'name'=> '会员状态', 'other'=> 'status'],
+//                'STATUS_AT'=> ['isUserTable'=> true, 'name'=> '会员状态变更时间', 'other'=> 'date'],
+//                'HIGHEST_EMP_LV_NAME'=> ['isUserTable'=> false, 'name'=> '历史最高聘级', 'other'=> 'empLevel'],
+                'PERIOD_AT'=> ['isUserTable'=> false, 'name'=> '加入期数'],
+//                'DEC_DEC_ROLE_NAME'=> ['isUserTable'=> true, 'name'=> '所属报单中心级别', 'other'=> 'decRole'],
+//                'DEC_USER_NAME'=> ['isUserTable'=> true, 'name'=> '所属报单中心编号'],
+//                'DEC_REAL_NAME'=> ['isUserTable'=> true, 'name'=> '所属报单中心姓名'],
+                'MOBILE'=> ['isUserTable'=> false, 'name'=> '手机号码'],
+                'TEL'=> ['isUserTable'=> false, 'name'=> '备用手机号码'],
+//                'AREA'=> ['isUserTable'=> true, 'name'=> '常用地址', 'other'=> 'area'],
+//                'SUB_COM_NAME'=> ['isUserTable'=> true, 'name'=> '所属分公司', 'other'=> 'subCompany'],
+//                'IS_DIRECT_SELLER'=> ['isUserTable'=> true, 'name'=> '是否直销员', 'other'=> 'yesOrNo'],
+            ];
+        }
+        return $this->filterTypes;
+    }
 }

+ 206 - 206
backendApi/modules/v1/models/lists/bonus/FlowExchangePointsList.php

@@ -1,207 +1,207 @@
-<?php
-
-namespace backendApi\modules\v1\models\lists\bonus;
-
-use common\helpers\Cache;
-use common\helpers\user\Info;
-use common\libs\dataList\column\Price;
-use common\libs\dataList\column\YesNo;
-use common\libs\dataList\DataListInterface;
-use common\models\DealType;
-use common\libs\dataList\column\DateTime;
-use common\models\FlowExchangePoints;
-use Yii;
-
-class FlowExchangePointsList extends \common\libs\dataList\DataList implements DataListInterface {
-    /**
-     * 列表名称
-     * @return string
-     */
-    public function getListName() {
-        return '兑换积分流水';
-    }
-
-    /**
-     * 列表筛选到的数据
-     * @throws \yii\base\Exception
-     */
-    public function dataHandle() {
-        $this->listData = FlowExchangePoints::lists($this->condition, $this->params, [
-            'orderBy' => 'CREATED_AT DESC, ID DESC',
-            'page' => $this->page,
-            'pageSize' => $this->pageSize,
-        ]);
-        foreach ($this->listData['list'] as $key => $value) {
-            $userInfo = Info::baseInfoZh($value['USER_ID']);
-            $this->listData['list'][$key] = array_merge($userInfo, $value);
-            $this->listData['list'][$key]['DEAL_TYPE_NAME'] = DealType::getAllTypesForShow()[$value['DEAL_TYPE_ID']]['TYPE_NAME'] ?? '';
-            $this->listData['list'][$key]['LAST_DEC_LV_NAME'] = Cache::getDecLevelConfig()[$value['LAST_DEC_LV']]['LEVEL_NAME'] ?? '';
-            $this->listData['list'][$key]['LAST_EMP_LV_NAME'] = Cache::getEmpLevelConfig()[$value['LAST_EMP_LV']]['LEVEL_NAME'] ?? '';
-            $this->listData['list'][$key]['LAST_STATUS_NAME'] = \Yii::$app->params['userStatus'][$value['LAST_STATUS']]['label'] ?? '';
-        }
-    }
-
-    /**
-     * 要展示和导出的所有字段
-     * @return array
-     */
-    public function getColumn() {
-        if (!$this->columns) {
-            $this->columns = [
-                'ID' => null,
-                'CREATED_AT' => [
-                    'header' => '创建时间',
-                    'value' => function ($row) {
-                        return (new DateTime([
-                            'value' => $row['CREATED_AT'],
-                        ]))->result();
-                    },
-                    'headerOther' => ['width' => '170'],
-                ],
-                'PERIOD_NUM' => '期数',
-                'CALC_MONTH' => '结算月',
-                'DEAL_TYPE_NAME' => [
-                    'header' => '交易类型',
-                    'headerOther' => [
-                        'width' => '150',
-                    ],
-                ],
-                'USER_NAME' => [
-                    'header' => '会员编号',
-                    'headerOther' => [
-                        'width' => '150',
-                    ],
-                    'valueOther' => [
-                        'tag' => ['type' => 'info', 'size' => 'small', 'class' => 'no-border']
-                    ],
-                ],
-                'REAL_NAME' => [
-                    'header' => '会员姓名',
-                    'headerOther' => [
-                        'width' => '120',
-                    ],
-                    'valueOther' => [
-                        'tag' => ['type' => 'success', 'size' => 'small', 'class' => 'no-border']
-                    ],
-                ],
-                'LAST_DEC_LV_NAME' => [
-                    'header' => '会员级别',
-                    'headerOther' => [
-                        'width' => '110',
-                    ],
-                    'valueOther' => [
-                        'tag' => ['type' => 'warning', 'size' => 'small', 'class' => 'no-border']
-                    ],
-                ],
-                'LAST_EMP_LV_NAME' => [
-                    'header' => '聘级',
-                    'headerOther' => [
-                        'width' => '130',
-                    ],
-                    'valueOther' => [
-                        'tag' => ['type' => 'warning', 'size' => 'small', 'class' => 'no-border']
-                    ],
-                ],
-                'IS_DEC' => [
-                    'header' => '是否报单中心',
-                    'value' => function ($row) {
-                        return (new YesNo([
-                            'value' => $row['IS_DEC'],
-                        ]))->result();
-                    },
-                    'headerOther' => function ($row) {
-                        return [
-                            'width' => '120',
-                        ];
-                    },
-                    'valueOther' => function ($row) {
-                        return [
-                            'tag' => ['type' => (isset($row['IS_DEC']) && $row['IS_DEC']) ? 'success' : 'info', 'size' => 'small']
-                        ];
-                    },
-                ],
-                'BEFORE_BALANCE' => [
-                    'header' => '交易前余额',
-                    'value' => function ($row) {
-                        return (new Price([
-                            'value' => $row['TOTAL'] - $row['AMOUNT'],
-                        ]))->result();
-                    },
-                    'headerOther' => [
-                        'width' => '150',
-                    ],
-                ],
-                'AMOUNT' => [
-                    'header' => '交易额',
-                    'value' => function ($row) {
-                        $result = (new Price([
-                            'value' => $row['AMOUNT'],
-                        ]))->result();
-                        return $row['IS_INCR'] > 0 ? '+' . $result : $result;
-                    },
-                    'headerOther' => [
-                        'width' => '150',
-                        'prop' => 'BONUS',
-                    ],
-                    'valueOther' => function ($row) {
-                        if ($row['IS_INCR'] > 0) {
-                            $type = 'success';
-                        } elseif ($row['IS_INCR'] == 0) {
-                            $type = 'danger';
-                        } else {
-                            $type = 'info';
-                        }
-                        return [
-                            'tag' => ['type' => $type, 'size' => 'small']
-                        ];
-                    },
-                ],
-                'TOTAL' => [
-                    'header' => '交易后余额',
-                    'value' => function ($row) {
-                        return (new Price([
-                            'value' => $row['TOTAL'],
-                        ]))->result();
-                    },
-                    'headerOther' => [
-                        'width' => '150',
-                    ],
-                ],
-                'ADMIN_NAME' => [
-                    'header' => '操作人',
-                    'headerOther' => ['width' => '110'],
-                ],
-                'REMARK' => [
-                    'header' => '备注',
-                    'headerOther' => ['width' => '250'],
-                ],
-            ];
-        }
-        return $this->columns;
-    }
-
-    /**
-     * 前台用于筛选的类型集合
-     * @return mixed
-     */
-    public function getFilterTypes() {
-        if (!$this->filterTypes) {
-            $this->filterTypes = [
-                'CREATED_AT' => ['isUserTable' => false, 'name' => '创建时间', 'other' => 'date'],
-                'PERIOD_NUM' => ['isUserTable' => false, 'name' => '期数'],
-                'CALC_MONTH' => ['isUserTable' => false, 'name' => '结算月', 'other' => 'month'],
-                'DEAL_TYPE_NAME' => ['isUserTable' => false, 'name' => '交易类型', 'other' => 'dealTypes'],
-                'USER_NAME' => ['isUserTable' => true, 'name' => '会员编号'],
-                'REAL_NAME' => ['isUserTable' => true, 'name' => '会员姓名'],
-                'LAST_DEC_LV_NAME' => ['isUserTable' => false, 'name' => '会员级别', 'other' => 'decLevel'],
-                'LAST_EMP_LV_NAME' => ['isUserTable' => false, 'name' => '聘级', 'other' => 'empLevel'],
-                'IS_DEC' => ['isUserTable' => true, 'name' => '是否报单中心', 'other' => 'yesOrNo'],
-                'AMOUNT' => ['isUserTable' => false, 'name' => '交易额'],
-                'TOTAL' => ['isUserTable' => false, 'name' => '交易后余额'],
-                'ADMIN_NAME' => ['isUserTable' => false, 'name' => '操作人'],
-                'REMARK' => ['isUserTable' => false, 'name' => '备注'],
-            ];
-        }
-        return $this->filterTypes;
-    }
+<?php
+
+namespace backendApi\modules\v1\models\lists\bonus;
+
+use common\helpers\Cache;
+use common\helpers\user\Info;
+use common\libs\dataList\column\Price;
+use common\libs\dataList\column\YesNo;
+use common\libs\dataList\DataListInterface;
+use common\models\DealType;
+use common\libs\dataList\column\DateTime;
+use common\models\FlowExchangePoints;
+use Yii;
+
+class FlowExchangePointsList extends \common\libs\dataList\DataList implements DataListInterface {
+    /**
+     * 列表名称
+     * @return string
+     */
+    public function getListName() {
+        return '兑换点数流水';
+    }
+
+    /**
+     * 列表筛选到的数据
+     * @throws \yii\base\Exception
+     */
+    public function dataHandle() {
+        $this->listData = FlowExchangePoints::lists($this->condition, $this->params, [
+            'orderBy' => 'CREATED_AT DESC, ID DESC',
+            'page' => $this->page,
+            'pageSize' => $this->pageSize,
+        ]);
+        foreach ($this->listData['list'] as $key => $value) {
+            $userInfo = Info::baseInfoZh($value['USER_ID']);
+            $this->listData['list'][$key] = array_merge($userInfo, $value);
+            $this->listData['list'][$key]['DEAL_TYPE_NAME'] = DealType::getAllTypesForShow()[$value['DEAL_TYPE_ID']]['TYPE_NAME'] ?? '';
+            $this->listData['list'][$key]['LAST_DEC_LV_NAME'] = Cache::getDecLevelConfig()[$value['LAST_DEC_LV']]['LEVEL_NAME'] ?? '';
+            $this->listData['list'][$key]['LAST_EMP_LV_NAME'] = Cache::getEmpLevelConfig()[$value['LAST_EMP_LV']]['LEVEL_NAME'] ?? '';
+            $this->listData['list'][$key]['LAST_STATUS_NAME'] = \Yii::$app->params['userStatus'][$value['LAST_STATUS']]['label'] ?? '';
+        }
+    }
+
+    /**
+     * 要展示和导出的所有字段
+     * @return array
+     */
+    public function getColumn() {
+        if (!$this->columns) {
+            $this->columns = [
+                'ID' => null,
+                'CREATED_AT' => [
+                    'header' => '创建时间',
+                    'value' => function ($row) {
+                        return (new DateTime([
+                            'value' => $row['CREATED_AT'],
+                        ]))->result();
+                    },
+                    'headerOther' => ['width' => '170'],
+                ],
+                'PERIOD_NUM' => '期数',
+                'CALC_MONTH' => '结算月',
+                'DEAL_TYPE_NAME' => [
+                    'header' => '交易类型',
+                    'headerOther' => [
+                        'width' => '150',
+                    ],
+                ],
+                'USER_NAME' => [
+                    'header' => '会员编号',
+                    'headerOther' => [
+                        'width' => '150',
+                    ],
+                    'valueOther' => [
+                        'tag' => ['type' => 'info', 'size' => 'small', 'class' => 'no-border']
+                    ],
+                ],
+                'REAL_NAME' => [
+                    'header' => '会员姓名',
+                    'headerOther' => [
+                        'width' => '120',
+                    ],
+                    'valueOther' => [
+                        'tag' => ['type' => 'success', 'size' => 'small', 'class' => 'no-border']
+                    ],
+                ],
+                'LAST_DEC_LV_NAME' => [
+                    'header' => '会员级别',
+                    'headerOther' => [
+                        'width' => '110',
+                    ],
+                    'valueOther' => [
+                        'tag' => ['type' => 'warning', 'size' => 'small', 'class' => 'no-border']
+                    ],
+                ],
+                'LAST_EMP_LV_NAME' => [
+                    'header' => '聘级',
+                    'headerOther' => [
+                        'width' => '130',
+                    ],
+                    'valueOther' => [
+                        'tag' => ['type' => 'warning', 'size' => 'small', 'class' => 'no-border']
+                    ],
+                ],
+                'IS_DEC' => [
+                    'header' => '是否报单中心',
+                    'value' => function ($row) {
+                        return (new YesNo([
+                            'value' => $row['IS_DEC'],
+                        ]))->result();
+                    },
+                    'headerOther' => function ($row) {
+                        return [
+                            'width' => '120',
+                        ];
+                    },
+                    'valueOther' => function ($row) {
+                        return [
+                            'tag' => ['type' => (isset($row['IS_DEC']) && $row['IS_DEC']) ? 'success' : 'info', 'size' => 'small']
+                        ];
+                    },
+                ],
+                'BEFORE_BALANCE' => [
+                    'header' => '交易前余额',
+                    'value' => function ($row) {
+                        return (new Price([
+                            'value' => $row['TOTAL'] - $row['AMOUNT'],
+                        ]))->result();
+                    },
+                    'headerOther' => [
+                        'width' => '150',
+                    ],
+                ],
+                'AMOUNT' => [
+                    'header' => '交易额',
+                    'value' => function ($row) {
+                        $result = (new Price([
+                            'value' => $row['AMOUNT'],
+                        ]))->result();
+                        return $row['IS_INCR'] > 0 ? '+' . $result : $result;
+                    },
+                    'headerOther' => [
+                        'width' => '150',
+                        'prop' => 'BONUS',
+                    ],
+                    'valueOther' => function ($row) {
+                        if ($row['IS_INCR'] > 0) {
+                            $type = 'success';
+                        } elseif ($row['IS_INCR'] == 0) {
+                            $type = 'danger';
+                        } else {
+                            $type = 'info';
+                        }
+                        return [
+                            'tag' => ['type' => $type, 'size' => 'small']
+                        ];
+                    },
+                ],
+                'TOTAL' => [
+                    'header' => '交易后余额',
+                    'value' => function ($row) {
+                        return (new Price([
+                            'value' => $row['TOTAL'],
+                        ]))->result();
+                    },
+                    'headerOther' => [
+                        'width' => '150',
+                    ],
+                ],
+                'ADMIN_NAME' => [
+                    'header' => '操作人',
+                    'headerOther' => ['width' => '110'],
+                ],
+                'REMARK' => [
+                    'header' => '备注',
+                    'headerOther' => ['width' => '250'],
+                ],
+            ];
+        }
+        return $this->columns;
+    }
+
+    /**
+     * 前台用于筛选的类型集合
+     * @return mixed
+     */
+    public function getFilterTypes() {
+        if (!$this->filterTypes) {
+            $this->filterTypes = [
+                'CREATED_AT' => ['isUserTable' => false, 'name' => '创建时间', 'other' => 'date'],
+                'PERIOD_NUM' => ['isUserTable' => false, 'name' => '期数'],
+                'CALC_MONTH' => ['isUserTable' => false, 'name' => '结算月', 'other' => 'month'],
+                'DEAL_TYPE_NAME' => ['isUserTable' => false, 'name' => '交易类型', 'other' => 'dealTypes'],
+                'USER_NAME' => ['isUserTable' => true, 'name' => '会员编号'],
+                'REAL_NAME' => ['isUserTable' => true, 'name' => '会员姓名'],
+                'LAST_DEC_LV_NAME' => ['isUserTable' => false, 'name' => '会员级别', 'other' => 'decLevel'],
+                'LAST_EMP_LV_NAME' => ['isUserTable' => false, 'name' => '聘级', 'other' => 'empLevel'],
+                'IS_DEC' => ['isUserTable' => true, 'name' => '是否报单中心', 'other' => 'yesOrNo'],
+                'AMOUNT' => ['isUserTable' => false, 'name' => '交易额'],
+                'TOTAL' => ['isUserTable' => false, 'name' => '交易后余额'],
+                'ADMIN_NAME' => ['isUserTable' => false, 'name' => '操作人'],
+                'REMARK' => ['isUserTable' => false, 'name' => '备注'],
+            ];
+        }
+        return $this->filterTypes;
+    }
 }

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

@@ -1,2043 +1,2043 @@
-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/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
+})

+ 327 - 327
common/config/params.php

@@ -1,327 +1,327 @@
-<?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 [
+    '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,
+    ],
+];

+ 290 - 290
common/models/CalcBonus.php

@@ -1,290 +1,290 @@
-<?php
-
-namespace common\models;
-
-use Yii;
-
-/**
- * This is the model class for table "{{%CALC_BONUS}}".
- *
- * @property string $ID
- * @property string $USER_ID 会员ID
- * @property string $LAST_USER_NAME 结算时会员编号
- * @property string $LAST_REAL_NAME 结算时会员姓名
- * @property string $LAST_DEC_LV 结算时会员级别
- * @property string $LAST_EMP_LV 结算时会员聘级
- * @property int $LAST_STATUS 结算时状态
- * @property string $LAST_MOBILE 结算时手机号码
- * @property int $LAST_PERIOD_AT 结算时加入期数
- * @property int $LAST_CREATED_AT 结算时加入时间
- * @property string $LAST_SUB_COM_ID 结算时所属分公司
- * @property int $LAST_PROVINCE 结算时所属省份
- * @property int $LAST_CITY 结算时所属城市
- * @property int $LAST_COUNTY 结算时所属地区
- * @property string $LAST_SYSTEM_ID 结算时体系
- * @property int $LAST_IS_DIRECT_SELLER 结算时是否直销员
- * @property string $LAST_REC_USER_NAME 结算时开拓者编号
- * @property string $LAST_REC_REAL_NAME 结算时开拓者姓名
- * @property string $LAST_CON_USER_NAME 结算时上级编号
- * @property string $LAST_CON_REAL_NAME 结算时上级姓名
- * @property int $LAST_LOCATION 结算时市场
- * @property string $BONUS_QY 区域津贴
- * @property string $BONUS_YC 育成津贴
- * @property string $BONUS_VIP VIP奖
- * @property string $BONUS_FX 复销奖
- * @property string $BONUS_LS 零售奖
- * @property string $BONUS_FW 服务奖
- * @property string $BONUS_BT 店补
- * @property string $BONUS_BT_PROD 产品补贴
- * @property string $BONUS_BT_TOOL 工具流补贴
- * @property string $DEDUCT_ZR 责任业绩扣除
- * @property string $BONUS_FL 形象店货补
- * @property string $BONUS_CF 车房养老奖
- * @property string $BONUS_LX 领袖分红
- * @property string $SHOULD_QY 应发区域津贴
- * @property string $SHOULD_DEDUCT_ZR 应扣责任业绩
- * @property string $PV_1L 一市场新增业绩
- * @property string $QY_1L 一市场区域业绩
- * @property string $SURPLUS_1L 一市场结余业绩
- * @property string $PV_2L 二市场新增业绩
- * @property string $QY_2L 二市场区域业绩
- * @property string $SURPLUS_2L 二市场结余业绩
- * @property string $PV_3L 三市场新增业绩
- * @property string $QY_3L 三市场区域业绩
- * @property string $SURPLUS_3L 三市场结余业绩
- * @property string $PV_4L 四市场新增业绩
- * @property string $QY_4L 四市场区域业绩
- * @property string $SURPLUS_4L 四市场结余业绩
- * @property string $PV_5L 五市场新增业绩
- * @property string $QY_5L 五市场区域业绩
- * @property string $SURPLUS_5L 五市场结余业绩
- * @property string $PV_PCS 当期零售
- * @property string $PV_LS_TOUCH 虚拟零售区新增业绩
- * @property string $SURPLUS_LS 虚拟零售区结余
- * @property string $QY_LS 虚拟零售区区域业绩
- * @property string $PV_TOUCH 新增业绩累计
- * @property string $BONUS_REAL 实际奖金
- * @property string $BONUS_TOTAL 总奖金
- * @property string $BONUS_INCOME 总收入
- * @property int $PERIOD_NUM 结算期数
- * @property int $CALC_YEAR 所在结算年
- * @property int $CALC_MONTH 所在结算月
- * @property int $CALCULATED_AT 结算时间
- * @property int $IS_SENT 是否挂网
- * @property int $SENT_AT 挂网时间
- * @property string $P_CALC_MONTH 表分区的日期索引
- * @property int $CREATED_AT 创建时间
- *
- * @property string $ORI_BONUS_QY 团队奖原奖金
- * @property string $ORI_BONUS_QY_BD 报单团队奖原奖金
- * @property string $ORI_BONUS_QY_FX 复消团队奖原奖金
- * @property string $ORI_BONUS_YC 荣衔奖奖原奖金
- * @property string $ORI_BONUS_VIP VIP奖奖原奖金
- * @property string $ORI_BONUS_STANDARD 达标奖原奖金
- * @property string $BONUS_BD 服务奖
- * @property string $ORI_BONUS_BD 服务奖原奖金
- * @property string $BONUS_TG 推广奖
- * @property string $ORI_BONUS_TG 推广奖原奖金
- * @property string $BONUS_XF 消费奖
- * @property string $ORI_BONUS_XF 消费奖原奖金
- * @property string $BONUS_YJ 业绩奖
- * @property string $ORI_BONUS_YJ 业绩奖原奖金
- * @property string $ORI_BONUS_YJ_BD 报单业绩奖原奖金
- * @property string $ORI_BONUS_YJ_FX 复消业绩奖原奖金
- * @property string $BONUS_GX 共享奖
- * @property string $ORI_BONUS_GX 共享奖原奖金
- * @property string $BONUS_BONUS_GX 实发共享奖奖金
- * @property string $BONUS_GL 管理奖
- * @property string $ORI_BONUS_GL 管理奖原奖金
- * @property string $BONUS_BONUS_GL 实发管理奖奖金
- * @property string $ORI_BONUS_GL_BD 报单管理奖原奖金
- * @property string $ORI_BONUS_GL_FX 复消管理奖原奖金
- * @property string $RECONSUME_POINTS 复消积分
- * @property string $MANAGE_TAX 管理费 
- * @property string $BONUS_BS 蓝星奖金(即新的管理奖)
- * @property string $ORI_BONUS_BS 蓝星原奖金(即新的管理奖,原奖金)
- */
-class CalcBonus extends \common\components\ActiveRecord
-{
-    /**
-     * {@inheritdoc}
-     */
-    public static function tableName()
-    {
-        return '{{%CALC_BONUS}}';
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function rules()
-    {
-        return [
-            [['USER_ID', 'LAST_USER_NAME', 'LAST_REAL_NAME', 'LAST_MOBILE', 'LAST_SYSTEM_ID','LAST_LOCATION', 'PERIOD_NUM', 'CALC_YEAR', 'CALC_MONTH', 'CALCULATED_AT', 'P_CALC_MONTH', 'CREATED_AT'], 'required'],
-            [['LAST_STATUS', 'LAST_PERIOD_AT', 'LAST_CREATED_AT', 'LAST_PROVINCE', 'LAST_CITY', 'LAST_COUNTY', 'LAST_IS_DIRECT_SELLER', 'LAST_LOCATION', 'PERIOD_NUM', 'CALC_YEAR', 'CALC_MONTH', 'CALCULATED_AT', 'IS_SENT', 'SENT_AT', 'CREATED_AT'], 'integer'],
-            [['ORI_BONUS_BS','EXCHANGE_POINTS','BONUS_BS','BONUS_QY', 'BONUS_YC', 'BONUS_VIP', 'BONUS_FX', 'BONUS_LS', 'BONUS_FW', 'BONUS_BT', 'BONUS_BT_PROD', 'BONUS_BT_TOOL', 'DEDUCT_ZR', 'BONUS_FL', 'BONUS_CF', 'BONUS_LX', 'SHOULD_QY', 'SHOULD_DEDUCT_ZR', 'PV_1L', 'QY_1L', 'SURPLUS_1L', 'PV_2L', 'QY_2L', 'SURPLUS_2L', 'PV_3L', 'QY_3L', 'SURPLUS_3L', 'PV_4L', 'QY_4L', 'SURPLUS_4L', 'PV_5L', 'QY_5L', 'SURPLUS_5L', 'PV_PCS', 'PV_LS_TOUCH', 'SURPLUS_LS', 'QY_LS', 'PV_TOUCH', 'BONUS_REAL', 'BONUS_TOTAL', 'BONUS_INCOME', 'ORI_BONUS_QY','ORI_BONUS_QY_BD','ORI_BONUS_QY_FX','ORI_BONUS_YC', 'ORI_BONUS_VIP','ORI_BONUS_STANDARD','BONUS_BD','ORI_BONUS_BD','BONUS_TG','ORI_BONUS_TG','BONUS_XF','ORI_BONUS_XF','BONUS_YJ','ORI_BONUS_YJ','ORI_BONUS_YJ_BD','ORI_BONUS_YJ_FX','BONUS_GX','ORI_BONUS_GX','REAL_BONUS_GX','BONUS_GL','ORI_BONUS_GL','REAL_BONUS_GL','ORI_BONUS_GL_BD','ORI_BONUS_GL_FX','RECONSUME_POINTS','MANAGE_TAX'], 'number'],
-            [['ID', 'USER_ID', 'LAST_DEC_LV', 'LAST_EMP_LV', 'LAST_SUB_COM_ID', 'LAST_SYSTEM_ID'], 'string', 'max' => 32],
-            [['LAST_USER_NAME', 'LAST_REC_USER_NAME', 'LAST_CON_USER_NAME'], 'string', 'max' => 16],
-            [['LAST_REAL_NAME', 'LAST_REC_REAL_NAME', 'LAST_CON_REAL_NAME'], 'string', 'max' => 128],
-            [['LAST_MOBILE'], 'string', 'max' => 11],
-            [['P_CALC_MONTH'], 'safe'],
-            [['ID'], 'unique'],
-        ];
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function attributeLabels()
-    {
-        return [
-            'ID' => 'ID',
-            'USER_ID' => '会员ID',
-            'LAST_USER_NAME' => '结算时会员编号',
-            'LAST_REAL_NAME' => '结算时会员姓名',
-            'LAST_DEC_LV' => '结算时会员级别',
-            'LAST_EMP_LV' => '结算时会员聘级',
-            'LAST_STATUS' => '结算时状态',
-            'LAST_MOBILE' => '结算时手机号码',
-            'LAST_PERIOD_AT' => '结算时加入期数',
-            'LAST_CREATED_AT' => '结算时加入时间',
-            'LAST_SUB_COM_ID' => '结算时所属分公司',
-            'LAST_PROVINCE' => '结算时所属省份',
-            'LAST_CITY' => '结算时所属城市',
-            'LAST_COUNTY' => '结算时所属地区',
-            'LAST_SYSTEM_ID' => '结算时体系',
-            'LAST_IS_DIRECT_SELLER' => '结算时是否直销员',
-            'LAST_REC_USER_NAME' => '结算时开拓者编号',
-            'LAST_REC_REAL_NAME' => '结算时开拓者姓名',
-            'LAST_CON_USER_NAME' => '结算时上级编号',
-            'LAST_CON_REAL_NAME' => '结算时上级姓名',
-            'LAST_LOCATION' => '结算时市场',
-            'BONUS_QY' => '区域津贴',
-            'BONUS_YC' => '荣衔奖',
-            'BONUS_VIP' => 'VIP奖',
-            'BONUS_FX' => '复销奖',
-            'BONUS_LS' => '零售奖',
-            'BONUS_FW' => '服务奖',
-            'BONUS_BT' => '店补',
-            'BONUS_BT_PROD' => '产品补贴',
-            'BONUS_BT_TOOL' => '工具流补贴',
-            'DEDUCT_ZR' => '责任业绩扣除',
-            'BONUS_FL' => '形象店货补',
-            'BONUS_CF' => '车房养老奖',
-            'BONUS_LX' => '领袖分红',
-            'SHOULD_QY' => '应发区域津贴',
-            'SHOULD_DEDUCT_ZR' => '应扣责任业绩',
-            'PV_1L' => '一市场新增业绩',
-            'QY_1L' => '一市场区域业绩',
-            'SURPLUS_1L' => '一市场结余业绩',
-            'PV_2L' => '二市场新增业绩',
-            'QY_2L' => '二市场区域业绩',
-            'SURPLUS_2L' => '二市场结余业绩',
-            'PV_3L' => '三市场新增业绩',
-            'QY_3L' => '三市场区域业绩',
-            'SURPLUS_3L' => '三市场结余业绩',
-            'PV_4L' => '四市场新增业绩',
-            'QY_4L' => '四市场区域业绩',
-            'SURPLUS_4L' => '四市场结余业绩',
-            'PV_5L' => '五市场新增业绩',
-            'QY_5L' => '五市场区域业绩',
-            'SURPLUS_5L' => '五市场结余业绩',
-            'PV_PCS' => '当期零售',
-            'PV_LS_TOUCH' => '虚拟零售区新增业绩',
-            'SURPLUS_LS' => '虚拟零售区结余',
-            'QY_LS' => '虚拟零售区区域业绩',
-            'PV_TOUCH' => '新增业绩累计',
-            'BONUS_REAL' => '实际奖金',
-            'BONUS_TOTAL' => '总奖金',
-            'BONUS_INCOME' => '总收入',
-            'PERIOD_NUM' => '结算期数',
-            'CALC_YEAR' => '所在结算年',
-            'CALC_MONTH' => '所在结算月',
-            'CALCULATED_AT' => '结算时间',
-            'IS_SENT' => '是否挂网',
-            'SENT_AT' => '挂网时间',
-            'P_CALC_MONTH' => '表分区的日期索引',
-            'CREATED_AT' => '创建时间',
-            'ORI_BONUS_QY'=> '团队奖原奖金',
-            'ORI_BONUS_QY_BD'=> '报单团队奖原奖金',
-            'ORI_BONUS_QY_FX'=> '复消团队奖原奖金',
-            'ORI_BONUS_YC'=> '荣衔奖原奖金',
-            'ORI_BONUS_VIP'=> 'VIP奖原奖金',
-            'ORI_BONUS_STANDARD'=> '达标奖原奖金',
-            'BONUS_BD'=> '服务奖',
-            'ORI_BONUS_BD'=> '服务奖原奖金',
-            'BONUS_TG'=> '推广奖',
-            'ORI_BONUS_TG'=> '推广奖原奖金',
-            'BONUS_XF'=> '消费奖',
-            'ORI_BONUS_XF'=> '消费奖原奖金',
-            'BONUS_YJ'=> '业绩奖',
-            'ORI_BONUS_YJ'=> '业绩奖原奖金',
-            'ORI_BONUS_YJ_BD'=> '报单业绩奖原奖金',
-            'ORI_BONUS_YJ_FX'=> '复消业绩奖原奖金',
-            'BONUS_GX'=> '共享奖',
-            'ORI_BONUS_GX'=> '共享奖原奖金',
-            'REAL_BONUS_GX'=> '实发共享奖奖金',
-            'BONUS_GL'=> '管理奖',
-            'ORI_BONUS_GL'=> '管理奖原奖金',
-            'REAL_BONUS_GL'=> '实发管理奖奖金',
-            'ORI_BONUS_GL_BD'=> '报单管理奖原奖金',
-            'ORI_BONUS_GL_FX'=> '复消管理奖原奖金',
-            'RECONSUME_POINTS'=> '复消积分',
-            'MANAGE_TAX'=> '管理费',
-            'EXCHANGE_POINTS' => '兑换积分',
-            'BONUS_BS' => '蓝星奖',
-            'ORI_BONUS_BS' => '蓝星原奖金'
-        ];
-    }
-
-    /**
-     * 近几期的奖金
-     * @param $userId
-     * @param int $num
-     * @return array
-     * @throws \yii\db\Exception
-     */
-    public static function periodBonus($userId, $num = 7){
-        // 获取近几期的年月
-        $periodYearMonths = Period::getNearlyPeriodYearMonth($num);
-        $allBonus = [];
-        foreach($periodYearMonths as $data){
-            $allBonus[] = static::findUseSlaves()->yearMonth($data['yearMonth'])->select('USER_ID,BONUS_QY, BONUS_YC, BONUS_FX, BONUS_LS, BONUS_FW, BONUS_BT, BONUS_BT_PROD, BONUS_BT_TOOL, DEDUCT_ZR, BONUS_FL, BONUS_CF, BONUS_LX, SHOULD_QY')->where('USER_ID=:USER_ID AND PERIOD_NUM=:PERIOD_NUM AND IS_SENT=1', [':USER_ID'=>$userId, ':PERIOD_NUM'=>$data['periodNum']])->asArray()->one();
-        }
-        return $allBonus;
-    }
-
-    /**
-     * 获取期数对应的奖金情况
-     * @param $userId
-     * @param $periodNum
-     * @return array|null|\yii\db\ActiveRecord
-     * @throws \yii\db\Exception
-     */
-    public static function periodNumBonus($userId, $periodNum){
-        $period = Period::instance();
-        $yearMonth = $period->getYearMonth($periodNum);
-        return static::findUseSlaves()->yearMonth($yearMonth)->where('USER_ID=:USER_ID AND PERIOD_NUM=:PERIOD_NUM', [':USER_ID'=>$userId, ':PERIOD_NUM'=>$periodNum])->select('USER_ID,BONUS_QY, BONUS_YC, BONUS_TG, BONUS_YJ, BONUS_GX, BONUS_GL, ORI_BONUS_QY, ORI_BONUS_YC, ORI_BONUS_TG, ORI_BONUS_YJ, ORI_BONUS_GX, ORI_BONUS_GL, RECONSUME_POINTS, MANAGE_TAX, BONUS_REAL, BONUS_TOTAL, BONUS_INCOME')->asArray()->one();
-    }
-
-    /**
-     * 根据期数获取月累计奖金
-     * @param $userId
-     * @param $periodNum
-     * @param string $type
-     * @return int|mixed
-     * @throws \yii\db\Exception
-     */
-    public static function monthBonus($userId, $periodNum=null, $type = 'BONUS_QY') {
-        if($periodNum) {
-            $period = Period::instance();
-            $yearMonth = $period->getYearMonth($periodNum);
-            if ($yearMonth) {
-                $bonus = CalcBonus::findUseSlaves()->yearMonth($yearMonth)->select('SUM(' . $type . ') AS ' . $type . '_SUM')->where('USER_ID=:USER_ID AND CALC_MONTH=:CALC_MONTH AND IS_SENT=1', [':USER_ID' => $userId, ':CALC_MONTH' => $yearMonth])->asArray()->one();
-            }
-        }else{
-            $bonus = CalcBonus::findUseSlaves()->select('SUM(' . $type . ') AS ' . $type . '_SUM')->where('USER_ID=:USER_ID AND IS_SENT=1', [':USER_ID' => $userId])->asArray()->one();
-        }
-        return $bonus[$type . '_SUM'] ?? 0;
-    }
-}
+<?php
+
+namespace common\models;
+
+use Yii;
+
+/**
+ * This is the model class for table "{{%CALC_BONUS}}".
+ *
+ * @property string $ID
+ * @property string $USER_ID 会员ID
+ * @property string $LAST_USER_NAME 结算时会员编号
+ * @property string $LAST_REAL_NAME 结算时会员姓名
+ * @property string $LAST_DEC_LV 结算时会员级别
+ * @property string $LAST_EMP_LV 结算时会员聘级
+ * @property int $LAST_STATUS 结算时状态
+ * @property string $LAST_MOBILE 结算时手机号码
+ * @property int $LAST_PERIOD_AT 结算时加入期数
+ * @property int $LAST_CREATED_AT 结算时加入时间
+ * @property string $LAST_SUB_COM_ID 结算时所属分公司
+ * @property int $LAST_PROVINCE 结算时所属省份
+ * @property int $LAST_CITY 结算时所属城市
+ * @property int $LAST_COUNTY 结算时所属地区
+ * @property string $LAST_SYSTEM_ID 结算时体系
+ * @property int $LAST_IS_DIRECT_SELLER 结算时是否直销员
+ * @property string $LAST_REC_USER_NAME 结算时开拓者编号
+ * @property string $LAST_REC_REAL_NAME 结算时开拓者姓名
+ * @property string $LAST_CON_USER_NAME 结算时上级编号
+ * @property string $LAST_CON_REAL_NAME 结算时上级姓名
+ * @property int $LAST_LOCATION 结算时市场
+ * @property string $BONUS_QY 区域津贴
+ * @property string $BONUS_YC 育成津贴
+ * @property string $BONUS_VIP VIP奖
+ * @property string $BONUS_FX 复销奖
+ * @property string $BONUS_LS 零售奖
+ * @property string $BONUS_FW 服务奖
+ * @property string $BONUS_BT 店补
+ * @property string $BONUS_BT_PROD 产品补贴
+ * @property string $BONUS_BT_TOOL 工具流补贴
+ * @property string $DEDUCT_ZR 责任业绩扣除
+ * @property string $BONUS_FL 形象店货补
+ * @property string $BONUS_CF 车房养老奖
+ * @property string $BONUS_LX 领袖分红
+ * @property string $SHOULD_QY 应发区域津贴
+ * @property string $SHOULD_DEDUCT_ZR 应扣责任业绩
+ * @property string $PV_1L 一市场新增业绩
+ * @property string $QY_1L 一市场区域业绩
+ * @property string $SURPLUS_1L 一市场结余业绩
+ * @property string $PV_2L 二市场新增业绩
+ * @property string $QY_2L 二市场区域业绩
+ * @property string $SURPLUS_2L 二市场结余业绩
+ * @property string $PV_3L 三市场新增业绩
+ * @property string $QY_3L 三市场区域业绩
+ * @property string $SURPLUS_3L 三市场结余业绩
+ * @property string $PV_4L 四市场新增业绩
+ * @property string $QY_4L 四市场区域业绩
+ * @property string $SURPLUS_4L 四市场结余业绩
+ * @property string $PV_5L 五市场新增业绩
+ * @property string $QY_5L 五市场区域业绩
+ * @property string $SURPLUS_5L 五市场结余业绩
+ * @property string $PV_PCS 当期零售
+ * @property string $PV_LS_TOUCH 虚拟零售区新增业绩
+ * @property string $SURPLUS_LS 虚拟零售区结余
+ * @property string $QY_LS 虚拟零售区区域业绩
+ * @property string $PV_TOUCH 新增业绩累计
+ * @property string $BONUS_REAL 实际奖金
+ * @property string $BONUS_TOTAL 总奖金
+ * @property string $BONUS_INCOME 总收入
+ * @property int $PERIOD_NUM 结算期数
+ * @property int $CALC_YEAR 所在结算年
+ * @property int $CALC_MONTH 所在结算月
+ * @property int $CALCULATED_AT 结算时间
+ * @property int $IS_SENT 是否挂网
+ * @property int $SENT_AT 挂网时间
+ * @property string $P_CALC_MONTH 表分区的日期索引
+ * @property int $CREATED_AT 创建时间
+ *
+ * @property string $ORI_BONUS_QY 团队奖原奖金
+ * @property string $ORI_BONUS_QY_BD 报单团队奖原奖金
+ * @property string $ORI_BONUS_QY_FX 复消团队奖原奖金
+ * @property string $ORI_BONUS_YC 荣衔奖奖原奖金
+ * @property string $ORI_BONUS_VIP VIP奖奖原奖金
+ * @property string $ORI_BONUS_STANDARD 达标奖原奖金
+ * @property string $BONUS_BD 服务奖
+ * @property string $ORI_BONUS_BD 服务奖原奖金
+ * @property string $BONUS_TG 推广奖
+ * @property string $ORI_BONUS_TG 推广奖原奖金
+ * @property string $BONUS_XF 消费奖
+ * @property string $ORI_BONUS_XF 消费奖原奖金
+ * @property string $BONUS_YJ 业绩奖
+ * @property string $ORI_BONUS_YJ 业绩奖原奖金
+ * @property string $ORI_BONUS_YJ_BD 报单业绩奖原奖金
+ * @property string $ORI_BONUS_YJ_FX 复消业绩奖原奖金
+ * @property string $BONUS_GX 共享奖
+ * @property string $ORI_BONUS_GX 共享奖原奖金
+ * @property string $BONUS_BONUS_GX 实发共享奖奖金
+ * @property string $BONUS_GL 管理奖
+ * @property string $ORI_BONUS_GL 管理奖原奖金
+ * @property string $BONUS_BONUS_GL 实发管理奖奖金
+ * @property string $ORI_BONUS_GL_BD 报单管理奖原奖金
+ * @property string $ORI_BONUS_GL_FX 复消管理奖原奖金
+ * @property string $RECONSUME_POINTS 复消积分
+ * @property string $MANAGE_TAX 管理费 
+ * @property string $BONUS_BS 蓝星奖金(即新的管理奖)
+ * @property string $ORI_BONUS_BS 蓝星原奖金(即新的管理奖,原奖金)
+ */
+class CalcBonus extends \common\components\ActiveRecord
+{
+    /**
+     * {@inheritdoc}
+     */
+    public static function tableName()
+    {
+        return '{{%CALC_BONUS}}';
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function rules()
+    {
+        return [
+            [['USER_ID', 'LAST_USER_NAME', 'LAST_REAL_NAME', 'LAST_MOBILE', 'LAST_SYSTEM_ID','LAST_LOCATION', 'PERIOD_NUM', 'CALC_YEAR', 'CALC_MONTH', 'CALCULATED_AT', 'P_CALC_MONTH', 'CREATED_AT'], 'required'],
+            [['LAST_STATUS', 'LAST_PERIOD_AT', 'LAST_CREATED_AT', 'LAST_PROVINCE', 'LAST_CITY', 'LAST_COUNTY', 'LAST_IS_DIRECT_SELLER', 'LAST_LOCATION', 'PERIOD_NUM', 'CALC_YEAR', 'CALC_MONTH', 'CALCULATED_AT', 'IS_SENT', 'SENT_AT', 'CREATED_AT'], 'integer'],
+            [['ORI_BONUS_BS','EXCHANGE_POINTS','BONUS_BS','BONUS_QY', 'BONUS_YC', 'BONUS_VIP', 'BONUS_FX', 'BONUS_LS', 'BONUS_FW', 'BONUS_BT', 'BONUS_BT_PROD', 'BONUS_BT_TOOL', 'DEDUCT_ZR', 'BONUS_FL', 'BONUS_CF', 'BONUS_LX', 'SHOULD_QY', 'SHOULD_DEDUCT_ZR', 'PV_1L', 'QY_1L', 'SURPLUS_1L', 'PV_2L', 'QY_2L', 'SURPLUS_2L', 'PV_3L', 'QY_3L', 'SURPLUS_3L', 'PV_4L', 'QY_4L', 'SURPLUS_4L', 'PV_5L', 'QY_5L', 'SURPLUS_5L', 'PV_PCS', 'PV_LS_TOUCH', 'SURPLUS_LS', 'QY_LS', 'PV_TOUCH', 'BONUS_REAL', 'BONUS_TOTAL', 'BONUS_INCOME', 'ORI_BONUS_QY','ORI_BONUS_QY_BD','ORI_BONUS_QY_FX','ORI_BONUS_YC', 'ORI_BONUS_VIP','ORI_BONUS_STANDARD','BONUS_BD','ORI_BONUS_BD','BONUS_TG','ORI_BONUS_TG','BONUS_XF','ORI_BONUS_XF','BONUS_YJ','ORI_BONUS_YJ','ORI_BONUS_YJ_BD','ORI_BONUS_YJ_FX','BONUS_GX','ORI_BONUS_GX','REAL_BONUS_GX','BONUS_GL','ORI_BONUS_GL','REAL_BONUS_GL','ORI_BONUS_GL_BD','ORI_BONUS_GL_FX','RECONSUME_POINTS','MANAGE_TAX'], 'number'],
+            [['ID', 'USER_ID', 'LAST_DEC_LV', 'LAST_EMP_LV', 'LAST_SUB_COM_ID', 'LAST_SYSTEM_ID'], 'string', 'max' => 32],
+            [['LAST_USER_NAME', 'LAST_REC_USER_NAME', 'LAST_CON_USER_NAME'], 'string', 'max' => 16],
+            [['LAST_REAL_NAME', 'LAST_REC_REAL_NAME', 'LAST_CON_REAL_NAME'], 'string', 'max' => 128],
+            [['LAST_MOBILE'], 'string', 'max' => 11],
+            [['P_CALC_MONTH'], 'safe'],
+            [['ID'], 'unique'],
+        ];
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function attributeLabels()
+    {
+        return [
+            'ID' => 'ID',
+            'USER_ID' => '会员ID',
+            'LAST_USER_NAME' => '结算时会员编号',
+            'LAST_REAL_NAME' => '结算时会员姓名',
+            'LAST_DEC_LV' => '结算时会员级别',
+            'LAST_EMP_LV' => '结算时会员聘级',
+            'LAST_STATUS' => '结算时状态',
+            'LAST_MOBILE' => '结算时手机号码',
+            'LAST_PERIOD_AT' => '结算时加入期数',
+            'LAST_CREATED_AT' => '结算时加入时间',
+            'LAST_SUB_COM_ID' => '结算时所属分公司',
+            'LAST_PROVINCE' => '结算时所属省份',
+            'LAST_CITY' => '结算时所属城市',
+            'LAST_COUNTY' => '结算时所属地区',
+            'LAST_SYSTEM_ID' => '结算时体系',
+            'LAST_IS_DIRECT_SELLER' => '结算时是否直销员',
+            'LAST_REC_USER_NAME' => '结算时开拓者编号',
+            'LAST_REC_REAL_NAME' => '结算时开拓者姓名',
+            'LAST_CON_USER_NAME' => '结算时上级编号',
+            'LAST_CON_REAL_NAME' => '结算时上级姓名',
+            'LAST_LOCATION' => '结算时市场',
+            'BONUS_QY' => '区域津贴',
+            'BONUS_YC' => '荣衔奖',
+            'BONUS_VIP' => 'VIP奖',
+            'BONUS_FX' => '复销奖',
+            'BONUS_LS' => '零售奖',
+            'BONUS_FW' => '服务奖',
+            'BONUS_BT' => '店补',
+            'BONUS_BT_PROD' => '产品补贴',
+            'BONUS_BT_TOOL' => '工具流补贴',
+            'DEDUCT_ZR' => '责任业绩扣除',
+            'BONUS_FL' => '形象店货补',
+            'BONUS_CF' => '车房养老奖',
+            'BONUS_LX' => '领袖分红',
+            'SHOULD_QY' => '应发区域津贴',
+            'SHOULD_DEDUCT_ZR' => '应扣责任业绩',
+            'PV_1L' => '一市场新增业绩',
+            'QY_1L' => '一市场区域业绩',
+            'SURPLUS_1L' => '一市场结余业绩',
+            'PV_2L' => '二市场新增业绩',
+            'QY_2L' => '二市场区域业绩',
+            'SURPLUS_2L' => '二市场结余业绩',
+            'PV_3L' => '三市场新增业绩',
+            'QY_3L' => '三市场区域业绩',
+            'SURPLUS_3L' => '三市场结余业绩',
+            'PV_4L' => '四市场新增业绩',
+            'QY_4L' => '四市场区域业绩',
+            'SURPLUS_4L' => '四市场结余业绩',
+            'PV_5L' => '五市场新增业绩',
+            'QY_5L' => '五市场区域业绩',
+            'SURPLUS_5L' => '五市场结余业绩',
+            'PV_PCS' => '当期零售',
+            'PV_LS_TOUCH' => '虚拟零售区新增业绩',
+            'SURPLUS_LS' => '虚拟零售区结余',
+            'QY_LS' => '虚拟零售区区域业绩',
+            'PV_TOUCH' => '新增业绩累计',
+            'BONUS_REAL' => '实际奖金',
+            'BONUS_TOTAL' => '总奖金',
+            'BONUS_INCOME' => '总收入',
+            'PERIOD_NUM' => '结算期数',
+            'CALC_YEAR' => '所在结算年',
+            'CALC_MONTH' => '所在结算月',
+            'CALCULATED_AT' => '结算时间',
+            'IS_SENT' => '是否挂网',
+            'SENT_AT' => '挂网时间',
+            'P_CALC_MONTH' => '表分区的日期索引',
+            'CREATED_AT' => '创建时间',
+            'ORI_BONUS_QY'=> '团队奖原奖金',
+            'ORI_BONUS_QY_BD'=> '报单团队奖原奖金',
+            'ORI_BONUS_QY_FX'=> '复消团队奖原奖金',
+            'ORI_BONUS_YC'=> '荣衔奖原奖金',
+            'ORI_BONUS_VIP'=> 'VIP奖原奖金',
+            'ORI_BONUS_STANDARD'=> '达标奖原奖金',
+            'BONUS_BD'=> '服务奖',
+            'ORI_BONUS_BD'=> '服务奖原奖金',
+            'BONUS_TG'=> '推广奖',
+            'ORI_BONUS_TG'=> '推广奖原奖金',
+            'BONUS_XF'=> '消费奖',
+            'ORI_BONUS_XF'=> '消费奖原奖金',
+            'BONUS_YJ'=> '业绩奖',
+            'ORI_BONUS_YJ'=> '业绩奖原奖金',
+            'ORI_BONUS_YJ_BD'=> '报单业绩奖原奖金',
+            'ORI_BONUS_YJ_FX'=> '复消业绩奖原奖金',
+            'BONUS_GX'=> '共享奖',
+            'ORI_BONUS_GX'=> '共享奖原奖金',
+            'REAL_BONUS_GX'=> '实发共享奖奖金',
+            'BONUS_GL'=> '管理奖',
+            'ORI_BONUS_GL'=> '管理奖原奖金',
+            'REAL_BONUS_GL'=> '实发管理奖奖金',
+            'ORI_BONUS_GL_BD'=> '报单管理奖原奖金',
+            'ORI_BONUS_GL_FX'=> '复消管理奖原奖金',
+            'RECONSUME_POINTS'=> '复消积分',
+            'MANAGE_TAX'=> '管理费',
+            'EXCHANGE_POINTS' => '兑换点数',
+            'BONUS_BS' => '蓝星奖',
+            'ORI_BONUS_BS' => '蓝星原奖金'
+        ];
+    }
+
+    /**
+     * 近几期的奖金
+     * @param $userId
+     * @param int $num
+     * @return array
+     * @throws \yii\db\Exception
+     */
+    public static function periodBonus($userId, $num = 7){
+        // 获取近几期的年月
+        $periodYearMonths = Period::getNearlyPeriodYearMonth($num);
+        $allBonus = [];
+        foreach($periodYearMonths as $data){
+            $allBonus[] = static::findUseSlaves()->yearMonth($data['yearMonth'])->select('USER_ID,BONUS_QY, BONUS_YC, BONUS_FX, BONUS_LS, BONUS_FW, BONUS_BT, BONUS_BT_PROD, BONUS_BT_TOOL, DEDUCT_ZR, BONUS_FL, BONUS_CF, BONUS_LX, SHOULD_QY')->where('USER_ID=:USER_ID AND PERIOD_NUM=:PERIOD_NUM AND IS_SENT=1', [':USER_ID'=>$userId, ':PERIOD_NUM'=>$data['periodNum']])->asArray()->one();
+        }
+        return $allBonus;
+    }
+
+    /**
+     * 获取期数对应的奖金情况
+     * @param $userId
+     * @param $periodNum
+     * @return array|null|\yii\db\ActiveRecord
+     * @throws \yii\db\Exception
+     */
+    public static function periodNumBonus($userId, $periodNum){
+        $period = Period::instance();
+        $yearMonth = $period->getYearMonth($periodNum);
+        return static::findUseSlaves()->yearMonth($yearMonth)->where('USER_ID=:USER_ID AND PERIOD_NUM=:PERIOD_NUM', [':USER_ID'=>$userId, ':PERIOD_NUM'=>$periodNum])->select('USER_ID,BONUS_QY, BONUS_YC, BONUS_TG, BONUS_YJ, BONUS_GX, BONUS_GL, ORI_BONUS_QY, ORI_BONUS_YC, ORI_BONUS_TG, ORI_BONUS_YJ, ORI_BONUS_GX, ORI_BONUS_GL, RECONSUME_POINTS, MANAGE_TAX, BONUS_REAL, BONUS_TOTAL, BONUS_INCOME')->asArray()->one();
+    }
+
+    /**
+     * 根据期数获取月累计奖金
+     * @param $userId
+     * @param $periodNum
+     * @param string $type
+     * @return int|mixed
+     * @throws \yii\db\Exception
+     */
+    public static function monthBonus($userId, $periodNum=null, $type = 'BONUS_QY') {
+        if($periodNum) {
+            $period = Period::instance();
+            $yearMonth = $period->getYearMonth($periodNum);
+            if ($yearMonth) {
+                $bonus = CalcBonus::findUseSlaves()->yearMonth($yearMonth)->select('SUM(' . $type . ') AS ' . $type . '_SUM')->where('USER_ID=:USER_ID AND CALC_MONTH=:CALC_MONTH AND IS_SENT=1', [':USER_ID' => $userId, ':CALC_MONTH' => $yearMonth])->asArray()->one();
+            }
+        }else{
+            $bonus = CalcBonus::findUseSlaves()->select('SUM(' . $type . ') AS ' . $type . '_SUM')->where('USER_ID=:USER_ID AND IS_SENT=1', [':USER_ID' => $userId])->asArray()->one();
+        }
+        return $bonus[$type . '_SUM'] ?? 0;
+    }
+}

+ 69 - 69
common/models/OrderGoods.php

@@ -1,69 +1,69 @@
-<?php
-
-namespace common\models;
-
-use Yii;
-
-/**
- * This is the model class for table "{{%ORDER_GOODS}}".
- *
- * @property string $ID
- * @property string $ORDER_SN 订单ID
- * @property string $GOODS_ID 商品ID
- * @property string $GOODS_TITLE 商品名称
- * @property string $PRICE 价格
- * @property string $REAL_PRICE 实际价格
- * @property string $PV 订货PV
- * @property string $REAL_PV 实际PV
- * @property string $POINT 兑换积分
- * @property string $SKU_CODE 商品编码
- * @property int $BUY_NUMS 购买数量
- * @property string $P_CALC_MONTH 分区日期
- */
-class OrderGoods extends \common\components\ActiveRecord
-{
-    /**
-     * {@inheritdoc}
-     */
-    public static function tableName()
-    {
-        return '{{%ORDER_GOODS}}';
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function rules()
-    {
-        return [
-            [['ORDER_SN', 'GOODS_ID', 'GOODS_TITLE', 'SKU_CODE'], 'required'],
-            [['PRICE', 'REAL_PRICE', 'PV', 'REAL_PV', 'POINT'], 'number'],
-            [['BUY_NUMS'], 'integer'],
-            [['ID', 'ORDER_SN', 'GOODS_ID'], 'string', 'max' => 32],
-            [['GOODS_TITLE'], 'string', 'max' => 255],
-            [['SKU_CODE'], 'string', 'max' => 16],
-            [['ID'], 'unique'],
-        ];
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function attributeLabels()
-    {
-        return [
-            'ID' => 'ID',
-            'ORDER_SN' => '订单ID',
-            'GOODS_ID' => '商品ID',
-            'GOODS_TITLE' => '商品名称',
-            'PRICE' => '价格',
-            'REAL_PRICE' => '实际价格',
-            'PV' => '订货PV',
-            'REAL_PV' => '实际PV',
-            'POINT' => '兑换积分',
-            'SKU_CODE' => '商品编码',
-            'BUY_NUMS' => '购买数量',
-            'P_CALC_MONTH' => '分区日期',
-        ];
-    }
-}
+<?php
+
+namespace common\models;
+
+use Yii;
+
+/**
+ * This is the model class for table "{{%ORDER_GOODS}}".
+ *
+ * @property string $ID
+ * @property string $ORDER_SN 订单ID
+ * @property string $GOODS_ID 商品ID
+ * @property string $GOODS_TITLE 商品名称
+ * @property string $PRICE 价格
+ * @property string $REAL_PRICE 实际价格
+ * @property string $PV 订货PV
+ * @property string $REAL_PV 实际PV
+ * @property string $POINT 兑换点数
+ * @property string $SKU_CODE 商品编码
+ * @property int $BUY_NUMS 购买数量
+ * @property string $P_CALC_MONTH 分区日期
+ */
+class OrderGoods extends \common\components\ActiveRecord
+{
+    /**
+     * {@inheritdoc}
+     */
+    public static function tableName()
+    {
+        return '{{%ORDER_GOODS}}';
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function rules()
+    {
+        return [
+            [['ORDER_SN', 'GOODS_ID', 'GOODS_TITLE', 'SKU_CODE'], 'required'],
+            [['PRICE', 'REAL_PRICE', 'PV', 'REAL_PV', 'POINT'], 'number'],
+            [['BUY_NUMS'], 'integer'],
+            [['ID', 'ORDER_SN', 'GOODS_ID'], 'string', 'max' => 32],
+            [['GOODS_TITLE'], 'string', 'max' => 255],
+            [['SKU_CODE'], 'string', 'max' => 16],
+            [['ID'], 'unique'],
+        ];
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function attributeLabels()
+    {
+        return [
+            'ID' => 'ID',
+            'ORDER_SN' => '订单ID',
+            'GOODS_ID' => '商品ID',
+            'GOODS_TITLE' => '商品名称',
+            'PRICE' => '价格',
+            'REAL_PRICE' => '实际价格',
+            'PV' => '订货PV',
+            'REAL_PV' => '实际PV',
+            'POINT' => '兑换点数',
+            'SKU_CODE' => '商品编码',
+            'BUY_NUMS' => '购买数量',
+            'P_CALC_MONTH' => '分区日期',
+        ];
+    }
+}

+ 71 - 71
common/models/OrderGoodsDec.php

@@ -1,71 +1,71 @@
-<?php
-
-namespace common\models;
-
-use Yii;
-
-/**
- * This is the model class for table "{{%ORDER_GOODS_DEC}}".
- *
- * @property string $ID
- * @property string $ORDER_SN 订单ID
- * @property string $GOODS_TITLE 商品名称
- * @property string $PRICE 价格
- * @property string $REAL_PRICE 实际价格
- * @property string $PV 订货PV
- * @property string $REAL_PV 实际PV
- * @property string $POINT 兑换积分
- * @property int $PERIOD_NUM 期数
- * @property int $ORDER_DAY 日期
- * @property string $SKU_CODE 商品编码
- * @property int $BUY_NUMS 购买数量
- * @property string $P_CALC_MONTH 分区日期
- */
-class OrderGoodsDec extends \common\components\ActiveRecord
-{
-    /**
-     * {@inheritdoc}
-     */
-    public static function tableName()
-    {
-        return '{{%ORDER_GOODS_DEC}}';
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function rules()
-    {
-        return [
-            [['ORDER_SN', 'GOODS_TITLE', 'SKU_CODE'], 'required'],
-            [['PRICE', 'REAL_PRICE', 'PV', 'REAL_PV', 'POINT'], 'number'],
-            [['BUY_NUMS', 'PERIOD_NUM'], 'integer'],
-            [['ID', 'ORDER_SN'], 'string', 'max' => 32],
-            [['GOODS_TITLE'], 'string', 'max' => 255],
-            [['SKU_CODE','ORDER_DAY'], 'string', 'max' => 16],
-            [['ID'], 'unique'],
-        ];
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function attributeLabels()
-    {
-        return [
-            'ID' => 'ID',
-            'ORDER_SN' => '订单ID',
-            'GOODS_TITLE' => '商品名称',
-            'PRICE' => '价格',
-            'REAL_PRICE' => '实际价格',
-            'PV' => '订货PV',
-            'REAL_PV' => '实际PV',
-            'POINT' => '兑换积分',
-            'PERIOD_NUM' => '期数',
-            'ORDER_DAY' => '日期',
-            'SKU_CODE' => '商品编码',
-            'BUY_NUMS' => '购买数量',
-            'P_CALC_MONTH' => '分区日期',
-        ];
-    }
-}
+<?php
+
+namespace common\models;
+
+use Yii;
+
+/**
+ * This is the model class for table "{{%ORDER_GOODS_DEC}}".
+ *
+ * @property string $ID
+ * @property string $ORDER_SN 订单ID
+ * @property string $GOODS_TITLE 商品名称
+ * @property string $PRICE 价格
+ * @property string $REAL_PRICE 实际价格
+ * @property string $PV 订货PV
+ * @property string $REAL_PV 实际PV
+ * @property string $POINT 兑换积分
+ * @property int $PERIOD_NUM 期数
+ * @property int $ORDER_DAY 日期
+ * @property string $SKU_CODE 商品编码
+ * @property int $BUY_NUMS 购买数量
+ * @property string $P_CALC_MONTH 分区日期
+ */
+class OrderGoodsDec extends \common\components\ActiveRecord
+{
+    /**
+     * {@inheritdoc}
+     */
+    public static function tableName()
+    {
+        return '{{%ORDER_GOODS_DEC}}';
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function rules()
+    {
+        return [
+            [['ORDER_SN', 'GOODS_TITLE', 'SKU_CODE'], 'required'],
+            [['PRICE', 'REAL_PRICE', 'PV', 'REAL_PV', 'POINT'], 'number'],
+            [['BUY_NUMS', 'PERIOD_NUM'], 'integer'],
+            [['ID', 'ORDER_SN'], 'string', 'max' => 32],
+            [['GOODS_TITLE'], 'string', 'max' => 255],
+            [['SKU_CODE','ORDER_DAY'], 'string', 'max' => 16],
+            [['ID'], 'unique'],
+        ];
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function attributeLabels()
+    {
+        return [
+            'ID' => 'ID',
+            'ORDER_SN' => '订单ID',
+            'GOODS_TITLE' => '商品名称',
+            'PRICE' => '价格',
+            'REAL_PRICE' => '实际价格',
+            'PV' => '订货PV',
+            'REAL_PV' => '实际PV',
+            'POINT' => '兑换点数',
+            'PERIOD_NUM' => '期数',
+            'ORDER_DAY' => '日期',
+            'SKU_CODE' => '商品编码',
+            'BUY_NUMS' => '购买数量',
+            'P_CALC_MONTH' => '分区日期',
+        ];
+    }
+}

+ 69 - 69
common/models/OrderGoodsShop.php

@@ -1,69 +1,69 @@
-<?php
-
-namespace common\models;
-
-use Yii;
-
-/**
- * This is the model class for table "{{%ORDER_GOODS}}".
- *
- * @property string $ID
- * @property string $ORDER_SN 订单ID
- * @property string $GOODS_TITLE 商品名称
- * @property string $PRICE 价格
- * @property string $REAL_PRICE 实际价格
- * @property string $PV 订货PV
- * @property string $REAL_PV 实际PV
- * @property string $POINT 兑换积分
- * @property int $PERIOD_NUM 期数
- * @property string $SKU_CODE 商品编码
- * @property int $BUY_NUMS 购买数量
- * @property string $P_CALC_MONTH 分区日期
- */
-class OrderGoodsShop extends \common\components\ActiveRecord
-{
-    /**
-     * {@inheritdoc}
-     */
-    public static function tableName()
-    {
-        return '{{%ORDER_GOODS_SHOP}}';
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function rules()
-    {
-        return [
-            [['ORDER_SN', 'GOODS_TITLE', 'SKU_CODE'], 'required'],
-            [['PRICE', 'REAL_PRICE', 'PV', 'REAL_PV', 'POINT'], 'number'],
-            [['BUY_NUMS', 'PERIOD_NUM'], 'integer'],
-            [['ID', 'ORDER_SN'], 'string', 'max' => 32],
-            [['GOODS_TITLE'], 'string', 'max' => 255],
-            [['SKU_CODE'], 'string', 'max' => 16],
-            [['ID'], 'unique'],
-        ];
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function attributeLabels()
-    {
-        return [
-            'ID' => 'ID',
-            'ORDER_SN' => '订单ID',
-            'GOODS_TITLE' => '商品名称',
-            'PRICE' => '价格',
-            'REAL_PRICE' => '实际价格',
-            'PV' => '订货PV',
-            'REAL_PV' => '实际PV',
-            'POINT' => '兑换积分',
-            'PERIOD_NUM' => '期数',
-            'SKU_CODE' => '商品编码',
-            'BUY_NUMS' => '购买数量',
-            'P_CALC_MONTH' => '分区日期',
-        ];
-    }
-}
+<?php
+
+namespace common\models;
+
+use Yii;
+
+/**
+ * This is the model class for table "{{%ORDER_GOODS}}".
+ *
+ * @property string $ID
+ * @property string $ORDER_SN 订单ID
+ * @property string $GOODS_TITLE 商品名称
+ * @property string $PRICE 价格
+ * @property string $REAL_PRICE 实际价格
+ * @property string $PV 订货PV
+ * @property string $REAL_PV 实际PV
+ * @property string $POINT 兑换积分
+ * @property int $PERIOD_NUM 期数
+ * @property string $SKU_CODE 商品编码
+ * @property int $BUY_NUMS 购买数量
+ * @property string $P_CALC_MONTH 分区日期
+ */
+class OrderGoodsShop extends \common\components\ActiveRecord
+{
+    /**
+     * {@inheritdoc}
+     */
+    public static function tableName()
+    {
+        return '{{%ORDER_GOODS_SHOP}}';
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function rules()
+    {
+        return [
+            [['ORDER_SN', 'GOODS_TITLE', 'SKU_CODE'], 'required'],
+            [['PRICE', 'REAL_PRICE', 'PV', 'REAL_PV', 'POINT'], 'number'],
+            [['BUY_NUMS', 'PERIOD_NUM'], 'integer'],
+            [['ID', 'ORDER_SN'], 'string', 'max' => 32],
+            [['GOODS_TITLE'], 'string', 'max' => 255],
+            [['SKU_CODE'], 'string', 'max' => 16],
+            [['ID'], 'unique'],
+        ];
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function attributeLabels()
+    {
+        return [
+            'ID' => 'ID',
+            'ORDER_SN' => '订单ID',
+            'GOODS_TITLE' => '商品名称',
+            'PRICE' => '价格',
+            'REAL_PRICE' => '实际价格',
+            'PV' => '订货PV',
+            'REAL_PV' => '实际PV',
+            'POINT' => '兑换点数',
+            'PERIOD_NUM' => '期数',
+            'SKU_CODE' => '商品编码',
+            'BUY_NUMS' => '购买数量',
+            'P_CALC_MONTH' => '分区日期',
+        ];
+    }
+}

+ 175 - 175
common/models/ShopGoods.php

@@ -1,175 +1,175 @@
-<?php
-
-namespace common\models;
-
-/**
- * This is the model class for table "{{%SHOP_GOODS}}".
- *
- * @property string $ID
- * @property string $GOODS_NAME 商品名称
- * @property string $CATE_ID 所属分类ID
- * @property string $TYPE 商品来源
- * @property string $GIFT_TYPE 商品类型
- * @property string $SELL_TYPE 允许购买方式
- * @property int $GOODS_NO 商品编号
- * @property string $UNIT 单位
- * @property string $COVER 商品封面
- * @property int $IMAGES 商品图片
- * @property string $CONTENT 商品内容
- * @property string $SELL_PRICE 销售价格
- * @property string $MARKET_PRICE 市场价格
- * @property int $PRICE_PV 价格PV
- * @property int $POINT 兑换积分
- * @property int $STORE_NUMS 库存
- * @property int $IS_DEL 是否删除
- * @property int $CREATED_AT 创建时间
- * @property int $UPDATED_AT 更新时间
- * @property int $DELETED_AT 删除时间
- * @property int $STATUS 状态
- * @property string $SORT 排序
- */
-class ShopGoods extends \common\components\ActiveRecord
-{
-    const SALE_TYPE = [
-        1 => [
-            'name' => '余额购买',
-        ],
-        2 => [
-            'name' => '复消兑换',
-        ],
-        3 => [
-            'name' => '积分兑换'
-        ]
-    ];
-    const GOODS_TYPE = [
-        1 =>[
-            'name'=>'国内商品',
-            'discount'=>'50',
-        ],
-        2 =>[
-            'name'=>'进口商品',
-            'discount'=>'60',
-        ],
-    ];
-    const GIFT_TYPE = [
-        1 =>[
-            'name'=>'报单区',
-        ],
-        2 =>[
-            'name'=>'复消区',
-        ],
-        3 =>[
-            'name'=>'工作室报单',
-        ],
-        4 =>[
-            'name'=>'工作室复消',
-        ],
-    ];
-    const STATUS_NAME = [
-        1 => '已上架',
-        0 => '已下架',
-    ];
-    /**
-     * @inheritdoc
-     */
-    public static function tableName()
-    {
-        return '{{%SHOP_GOODS}}';
-    }
-
-    /**
-     * @inheritdoc
-     */
-    public function rules()
-    {
-        return [
-            [['SELL_DISCOUNT','GOODS_NAME', 'CATE_ID','GIFT_TYPE', 'GOODS_NO', 'SELL_PRICE','MARKET_PRICE','PRICE_PV','STORE_NUMS'], 'required'],
-            [['STORE_NUMS'], 'integer'],
-            [['SELL_PRICE','MARKET_PRICE','PRICE_PV','POINT'], 'number'],
-            [['ID','CATE_ID', 'GOODS_NO','SELL_TYPE','GIFT_TYPE'], 'string', 'max' => 32],
-            [['UNIT'], 'string', 'max' => 16],
-            [['COVER', 'GOODS_NAME'], 'string', 'max' => 255],
-            [['IMAGES','CONTENT'], 'string', 'max' => 4000],
-            [['GOODS_NAME'], 'unique'],
-            [['ID'], 'unique'],
-        ];
-    }
-
-    /**
-     * @inheritdoc
-     */
-    public function attributeLabels()
-    {
-        return [
-            'ID' => 'ID',
-            'GOODS_NAME' => '商品名称',
-            'CATE_ID' => '所属分类ID',
-            // 'TYPE' => '商品来源',
-            'SELL_DISCOUNT' => '会员折扣',
-            'GIFT_TYPE' => '商品类型',
-            'SELL_TYPE' => '出售方式',
-            'GOODS_NO' => '商品编号',
-            'UNIT' => '商品单位',
-            'COVER' => '商品封面',
-            'IMAGES' => '商品图片',
-            'CONTENT' => '商品内容',
-            'SELL_PRICE' => '销售价格',
-            'MARKET_PRICE' => '市场价格',
-            'PRICE_PV' => '价格PV',
-            'POINT' => '兑换积分',
-            'STORE_NUMS' => '库存',
-            'STATUS' => '是否上架',
-            'IS_DEL' => '是否删除',
-            'CREATED_AT' => '创建时间',
-            'UPDATED_AT' => '更新时间',
-            'DELETED_AT' => '更新时间',
-            'SORT' => '排序',
-        ];
-    }
-
-    /**
-     * 判断提现状态
-     * @param $nowStatus
-     * @param $toStatus
-     * @return string
-     */
-    public static function chkAuditStatus($nowStatus, $toStatus) {
-        $statusName = self::STATUS_NAME;
-        $msg = '当前商品状态为【' . $statusName[$nowStatus] . '】,无法设置为【' . $statusName[$toStatus] . '】';
-        switch ($toStatus) {
-            // 下架
-            case 0:
-                if ($nowStatus == 1) {
-                    $msg = '';
-                }
-                break;
-            //上架
-            case 1:
-                if ($nowStatus == 0) {
-                    $msg = '';
-                }
-                break;
-            default:
-        }
-        return $msg;
-    }
-
-    /**
-     * 支付方式
-     * @return array
-     */
-    public static function payTypes(){
-        return [
-            'cash'=>[
-                'name'=>'余额支付'
-            ],
-            'point'=>[
-                'name'=>'积分支付'
-            ],
-            'exchange' => [
-                'name' => '无业绩兑换点数'
-            ]
-        ];
-    }
-
-}
+<?php
+
+namespace common\models;
+
+/**
+ * This is the model class for table "{{%SHOP_GOODS}}".
+ *
+ * @property string $ID
+ * @property string $GOODS_NAME 商品名称
+ * @property string $CATE_ID 所属分类ID
+ * @property string $TYPE 商品来源
+ * @property string $GIFT_TYPE 商品类型
+ * @property string $SELL_TYPE 允许购买方式
+ * @property int $GOODS_NO 商品编号
+ * @property string $UNIT 单位
+ * @property string $COVER 商品封面
+ * @property int $IMAGES 商品图片
+ * @property string $CONTENT 商品内容
+ * @property string $SELL_PRICE 销售价格
+ * @property string $MARKET_PRICE 市场价格
+ * @property int $PRICE_PV 价格PV
+ * @property int $POINT 兑换积分
+ * @property int $STORE_NUMS 库存
+ * @property int $IS_DEL 是否删除
+ * @property int $CREATED_AT 创建时间
+ * @property int $UPDATED_AT 更新时间
+ * @property int $DELETED_AT 删除时间
+ * @property int $STATUS 状态
+ * @property string $SORT 排序
+ */
+class ShopGoods extends \common\components\ActiveRecord
+{
+    const SALE_TYPE = [
+        1 => [
+            'name' => '余额购买',
+        ],
+        2 => [
+            'name' => '复消兑换',
+        ],
+        3 => [
+            'name' => '积分兑换'
+        ]
+    ];
+    const GOODS_TYPE = [
+        1 =>[
+            'name'=>'国内商品',
+            'discount'=>'50',
+        ],
+        2 =>[
+            'name'=>'进口商品',
+            'discount'=>'60',
+        ],
+    ];
+    const GIFT_TYPE = [
+        1 =>[
+            'name'=>'报单区',
+        ],
+        2 =>[
+            'name'=>'复消区',
+        ],
+        3 =>[
+            'name'=>'工作室报单',
+        ],
+        4 =>[
+            'name'=>'工作室复消',
+        ],
+    ];
+    const STATUS_NAME = [
+        1 => '已上架',
+        0 => '已下架',
+    ];
+    /**
+     * @inheritdoc
+     */
+    public static function tableName()
+    {
+        return '{{%SHOP_GOODS}}';
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function rules()
+    {
+        return [
+            [['SELL_DISCOUNT','GOODS_NAME', 'CATE_ID','GIFT_TYPE', 'GOODS_NO', 'SELL_PRICE','MARKET_PRICE','PRICE_PV','STORE_NUMS'], 'required'],
+            [['STORE_NUMS'], 'integer'],
+            [['SELL_PRICE','MARKET_PRICE','PRICE_PV','POINT'], 'number'],
+            [['ID','CATE_ID', 'GOODS_NO','SELL_TYPE','GIFT_TYPE'], 'string', 'max' => 32],
+            [['UNIT'], 'string', 'max' => 16],
+            [['COVER', 'GOODS_NAME'], 'string', 'max' => 255],
+            [['IMAGES','CONTENT'], 'string', 'max' => 4000],
+            [['GOODS_NAME'], 'unique'],
+            [['ID'], 'unique'],
+        ];
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function attributeLabels()
+    {
+        return [
+            'ID' => 'ID',
+            'GOODS_NAME' => '商品名称',
+            'CATE_ID' => '所属分类ID',
+            // 'TYPE' => '商品来源',
+            'SELL_DISCOUNT' => '会员折扣',
+            'GIFT_TYPE' => '商品类型',
+            'SELL_TYPE' => '出售方式',
+            'GOODS_NO' => '商品编号',
+            'UNIT' => '商品单位',
+            'COVER' => '商品封面',
+            'IMAGES' => '商品图片',
+            'CONTENT' => '商品内容',
+            'SELL_PRICE' => '销售价格',
+            'MARKET_PRICE' => '市场价格',
+            'PRICE_PV' => '价格PV',
+            'POINT' => '兑换点数',
+            'STORE_NUMS' => '库存',
+            'STATUS' => '是否上架',
+            'IS_DEL' => '是否删除',
+            'CREATED_AT' => '创建时间',
+            'UPDATED_AT' => '更新时间',
+            'DELETED_AT' => '更新时间',
+            'SORT' => '排序',
+        ];
+    }
+
+    /**
+     * 判断提现状态
+     * @param $nowStatus
+     * @param $toStatus
+     * @return string
+     */
+    public static function chkAuditStatus($nowStatus, $toStatus) {
+        $statusName = self::STATUS_NAME;
+        $msg = '当前商品状态为【' . $statusName[$nowStatus] . '】,无法设置为【' . $statusName[$toStatus] . '】';
+        switch ($toStatus) {
+            // 下架
+            case 0:
+                if ($nowStatus == 1) {
+                    $msg = '';
+                }
+                break;
+            //上架
+            case 1:
+                if ($nowStatus == 0) {
+                    $msg = '';
+                }
+                break;
+            default:
+        }
+        return $msg;
+    }
+
+    /**
+     * 支付方式
+     * @return array
+     */
+    public static function payTypes(){
+        return [
+            'cash'=>[
+                'name'=>'余额支付'
+            ],
+            'point'=>[
+                'name'=>'积分支付'
+            ],
+            'exchange' => [
+                'name' => '无业绩兑换点数'
+            ]
+        ];
+    }
+
+}

+ 59 - 59
common/models/UserPeriodExchangePoints.php

@@ -1,59 +1,59 @@
-<?php
-
-namespace common\models;
-
-use Yii;
-
-/**
- * This is the model class for table "{{%USER_PERIOD_POINTS}}".
- *
- * @property string $ID
- * @property string $USER_ID 会员ID
- * @property int $PERIOD_NUM 报单期数
- * @property string $EXCHANGE_POINTS 兑换积分
- * @property string $REMAINDER_POINTS 剩余积分
- * @property int EXPIRED 是否过期
- * @property int EXPIRED_PERIOD 过期期数
- * @property int EXPIRED_AT 过期时间
- * @property int $CREATED_AT 创建时间
- */
-class UserPeriodExchangePoints extends \common\components\ActiveRecord
-{
-    /**
-     * {@inheritdoc}
-     */
-    public static function tableName()
-    {
-        return '{{%USER_PERIOD_EXCHANGE_POINTS}}';
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function rules()
-    {
-        return [
-            [['USER_ID', 'PERIOD_NUM', 'CREATED_AT'], 'required'],
-            [['PERIOD_NUM', 'CREATED_AT', 'EXPIRED', 'EXPIRED_PERIOD', 'EXPIRED_AT'], 'integer'],
-            [['EXCHANGE_POINTS', 'REMAINDER_POINTS'], 'number'],
-            [['ID', 'USER_ID'], 'string', 'max' => 32],
-        ];
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function attributeLabels()
-    {
-        return [
-            'ID' => 'ID',
-            'USER_ID' => '会员ID',
-            'EXCHANGE_POINTS' => '兑换积分',
-            'REMAINDER_POINTS' => '剩余积分',
-            'EXPIRED' => '是否过期',
-            'EXPIRED_PERIOD' => '过期期数',
-            'EXPIRED_AT' => '过期时间',
-            'CREATED_AT' => '创建时间',
-        ];
-    }
-}
+<?php
+
+namespace common\models;
+
+use Yii;
+
+/**
+ * This is the model class for table "{{%USER_PERIOD_POINTS}}".
+ *
+ * @property string $ID
+ * @property string $USER_ID 会员ID
+ * @property int $PERIOD_NUM 报单期数
+ * @property string $EXCHANGE_POINTS 兑换点数
+ * @property string $REMAINDER_POINTS 剩余点数
+ * @property int EXPIRED 是否过期
+ * @property int EXPIRED_PERIOD 过期期数
+ * @property int EXPIRED_AT 过期时间
+ * @property int $CREATED_AT 创建时间
+ */
+class UserPeriodExchangePoints extends \common\components\ActiveRecord
+{
+    /**
+     * {@inheritdoc}
+     */
+    public static function tableName()
+    {
+        return '{{%USER_PERIOD_EXCHANGE_POINTS}}';
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function rules()
+    {
+        return [
+            [['USER_ID', 'PERIOD_NUM', 'CREATED_AT'], 'required'],
+            [['PERIOD_NUM', 'CREATED_AT', 'EXPIRED', 'EXPIRED_PERIOD', 'EXPIRED_AT'], 'integer'],
+            [['EXCHANGE_POINTS', 'REMAINDER_POINTS'], 'number'],
+            [['ID', 'USER_ID'], 'string', 'max' => 32],
+        ];
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function attributeLabels()
+    {
+        return [
+            'ID' => 'ID',
+            'USER_ID' => '会员ID',
+            'EXCHANGE_POINTS' => '兑换点数',
+            'REMAINDER_POINTS' => '剩余点数',
+            'EXPIRED' => '是否过期',
+            'EXPIRED_PERIOD' => '过期期数',
+            'EXPIRED_AT' => '过期时间',
+            'CREATED_AT' => '创建时间',
+        ];
+    }
+}

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

@@ -1,610 +1,610 @@
-<?php
-namespace common\models\forms;
-
-use common\helpers\Cache;
-use common\helpers\Date;
-use common\components\Model;
-use common\helpers\Form;
-use common\helpers\user\Balance;
-use common\helpers\user\Cash;
-use common\helpers\user\Info;
-use common\libs\logging\operate\AdminOperate;
-use common\models\DealType;
-use common\models\Order;
-use common\models\OrderGoods;
-use common\models\Period;
-use common\models\ReceiveAddress;
-use common\models\Region;
-use common\models\ShopGoods;
-use common\models\User;
-use common\models\UserNetwork;
-use yii\base\Exception;
-
-/**
- * Login form
- */
-class OrderForm extends Model
-{
-    public $sn;
-    public $expressCompany;
-    public $orderTrackNo;
-    public $status;
-    public $remark;
-
-    public $type;
-    public $addressId;
-    public $payType;
-    public $goodsId;
-    public $goodsNum;
-    public $payPassword;
-
-    public $userName;
-    public $consignee;
-    public $acceptMobile;
-    public $province;
-    public $city;
-    public $county;
-    public $detailaddress;
-
-    private $_address;
-    private $_decAmount;
-    private $_decPv;
-    private $_freight;
-    private $_payAmount;
-    private $_orderGoods;
-
-    /**
-     * @var Order
-     */
-    private $_model;
-
-    public function init() {
-        parent::init();
-        $this->adminOperateLogger = new AdminOperate([
-            'fetchClass' => Order::class,
-        ]);
-    }
-
-    /**
-     * @inheritdoc
-     */
-    public function rules()
-    {
-        return [
-            [['sn', 'expressCompany', 'orderTrackNo', 'status', 'remark','type','addressId','payType','goodsId','goodsNum', 'payPassword','userName','consignee','acceptMobile','province','city','county','detailaddress'], 'trim'],
-            [['sn', 'expressCompany', 'orderTrackNo', 'status', 'remark','type','addressId','payType','goodsId','goodsNum', 'payPassword','userName','consignee','acceptMobile','province','city','county','detailaddress'], 'required'],
-            [['status'], 'isStatus'],
-            [['addressId'], 'isAddress'],
-            [['payType'], 'isPayType'],
-            [['payPassword'], 'validatePassword'],
-        ];
-    }
-
-    public function attributeLabels()
-    {
-        return [
-            'sn' => '订单号',
-            'expressCompany' => '快递公司',
-            'orderTrackNo' => '快递单号',
-            'status' => '状态',
-            'remark' => '备注',
-            'type' => '订单类型',
-            'addressId' => '收货地址',
-            'payType' => '支付方式',
-            'goodsId' => '商品ID',
-            'goodsNum' => '商品数量',
-            'userName' => '复消会员编号',
-            'consignee' => '收货人',
-            'acceptMobile' => '收货电话',
-            'province' => '省',
-            'city' => '市',
-            'county' => '区',
-            'detailaddress' => '收货详细地址',
-        ];
-    }
-
-    /**
-     * 指定校验场景
-     * @return array
-     */
-    public function scenarios()
-    {
-        $parentScenarios =  parent::scenarios();
-        $customScenarios = [
-            // 管理员发货
-            'adminDelivery' => ['sn', 'expressCompany', 'orderTrackNo'],
-            // 会员确认收货
-            'userConfirm' => ['sn', 'expressCompany', 'orderTrackNo'],
-            // 管理员修改订单状态
-            'adminStatus' => ['sn', 'status'],
-            // 管理员修改备注
-            'adminRemark' => ['sn', 'remark'],
-            // 会员下单
-            'userOrder' => ['type','addressId', 'payType','goodsId','goodsNum', 'remark', 'payPassword'],
-            // 帮会员复消下单
-            'reconsumeOrder' => ['type','userName', 'payType','goodsId','goodsNum', 'remark', 'payPassword','consignee','acceptMobile','province','city','county','detailaddress'],
-        ];
-        return array_merge($parentScenarios, $customScenarios);
-    }
-
-    /**
-     * 校验之前
-     * @return bool
-     */
-    public function beforeValidate()
-    {
-        $parentValidate = parent::beforeValidate();
-        if ($this->sn) {
-            $this->_model = Order::findOne(['SN'=>$this->sn]);
-            if (!$this->_model){
-                $this->addError('sn', '订单不存在');
-                return false;
-            }
-        }
-        if ($this->scenario == 'adminDelivery'){
-            if($this->_model['STATUS'] == \Yii::$app->params['orderStatus']['cancel']) {
-                $this->addError('sn', '订单已取消不能发货');
-                return false;
-            }
-            if($this->_model['STATUS'] == \Yii::$app->params['orderStatus']['del']) {
-                $this->addError('sn', '订单已删除不能发货');
-                return false;
-            }
-        }
-
-        return $parentValidate;
-    }
-
-    /**
-     * 校验支付密码
-     * @param $attribute
-     * @param $params
-     */
-    public function validatePassword($attribute, $params) {
-        if (!User::validatePayPassword(\Yii::$app->user->id, $this->payPassword)) {
-            $this->addError($attribute, '支付密码不正确');
-        }
-    }
-
-    /**
-     * 判断收货地址是否存在
-     * @param $attribute
-     */
-    public function isAddress($attribute){
-        if (!$receiveAddress = ReceiveAddress::find()->where(' ID=:ID', [':ID' => $this->addressId])->asArray()->one()) {
-            $this->addError($attribute, '收货地址不存在');
-        } else {
-            $this->_address = $receiveAddress;
-        }
-    }
-
-    /**
-     * 判断支付方式
-     * @param $attribute
-     */
-    public function isPayType($attribute){
-        if(!array_key_exists($this->payType, ShopGoods::payTypes())){
-            $this->addError($attribute, '支付方式错误');
-            return;
-        }
-    }
-
-    /**
-     * 校验类型
-     * @param $attribute
-     */
-    public function isStatus($attribute){
-        if(!in_array($this->type, \Yii::$app->params['orderStatus'])){
-            $this->addError($attribute, '类型错误');
-            return ;
-        }
-        if ($this->scenario == 'adminStatus'){
-            if ($this->status == $this->_model['STATUS']) {
-                $this->addError($attribute, '订单状态没有改变');
-                return ;
-            }
-            if($this->status == \Yii::$app->params['orderStatus']['notPaid'] && $this->_model['STATUS'] >= \Yii::$app->params['orderStatus']['delivery']) {
-                $this->addError($attribute, '订单已经进入物流状态不能改为未支付');
-                return ;
-            }
-            elseif($this->status == \Yii::$app->params['orderStatus']['paid'] && $this->_model['STATUS'] >= \Yii::$app->params['orderStatus']['cancel']) {
-                $this->addError($attribute, '订单已失效不能处理');
-                return ;
-            }
-            elseif($this->status == \Yii::$app->params['orderStatus']['delivery']) {
-                $this->addError($attribute, '订单不能单独处理为物流状态');
-                return ;
-            }
-            elseif($this->status == \Yii::$app->params['orderStatus']['complete'] && $this->_model['STATUS'] > \Yii::$app->params['orderStatus']['cancel']) {
-                $this->addError($attribute, '订单已失效不能处理');
-                return ;
-            }
-            elseif($this->status == \Yii::$app->params['orderStatus']['cancel']) {
-                if($this->_model['STATUS'] == \Yii::$app->params['orderStatus']['complete']) {
-                    $this->addError($attribute, '订单已完成不能取消');
-                    return ;
-                }
-                if($this->_model['STATUS'] == \Yii::$app->params['orderStatus']['del']) {
-                    $this->addError($attribute, '订单已删除不能取消');
-                    return ;
-                }
-            }
-            elseif($this->status == \Yii::$app->params['orderStatus']['del']) {
-                if($this->_model['STATUS'] == \Yii::$app->params['orderStatus']['complete']) {
-                    $this->addError($attribute, '订单已完成不能删除');
-                    return ;
-                }
-            }
-        }
-
-    }
-
-    /**
-     * 管理员发货
-     * @return Order|null
-     * @throws \yii\db\Exception
-     */
-    public function adminDelivery(){
-        if(!$this->validate()){
-            return null;
-        }
-        $db = \Yii::$app->db;
-        $transaction = $db->beginTransaction();
-        try {
-            $period = Period::instance();
-            $this->_model->DELIVERY_STATUS = \Yii::$app->params['deliveryStatus']['delivered']['value'];
-            $this->_model->DELIVERY_PERIOD = $period->getNowPeriodNum();
-            $this->_model->DELIVERY_AT = Date::nowTime();
-            $this->_model->EXPRESS_COMPANY = $this->expressCompany;
-            $this->_model->ORDER_TRACK_NO = $this->orderTrackNo;
-            $this->_model->STATUS = \Yii::$app->params['orderStatus']['delivery']['value'];
-            if(!$this->_model->save()){
-                throw new Exception(Form::formatErrorsForApi($this->_model->getErrors()));
-            }
-            $transaction->commit();
-        } catch (Exception $e) {
-            $transaction->rollBack();
-            $this->addError('edit', $e->getMessage());
-            return null;
-        }
-        return $this->_model;
-    }
-
-    /**
-     * 复销
-     * @return bool|null
-     * @throws Exception
-     * @throws \yii\db\Exception
-     */
-    public function add(){
-        if(!$this->validate()){
-            return null;
-        }
-        $ids = $this->goodsId;
-        $totalAmount = 0;
-        $totalPv = 0;
-        $goodsType = ShopGoods::GOODS_TYPE;
-        foreach ($this->goodsNum as $k => $v) {
-            if ($v) {
-                $goods = ShopGoods::findOneAsArray('ID=:ID AND STATUS=1',[':ID'=> $ids[$k]]);
-                if($goods['STORE_NUMS']>0){
-                    if ($goods['TYPE'] == 1 || $goods['TYPE'] == 2) {
-                        $discount = $goodsType[$goods['TYPE']]['discount'];
-                        $realPrice = $goods['SELL_PRICE'] * $discount/100;
-                        $realPv = $goods['PRICE_PV'] * $discount/100;
-                    } else {
-                        $discount = $goods['SELL_DISCOUNT'];
-                        $realPrice = $goods['SELL_PRICE'] * $discount;
-                        $realPv = $goods['PRICE_PV'] * $discount;
-                    }
-                    $totalAmount += $realPrice * intval($v);
-                    $totalPv += $realPv * intval($v);
-//                    if($this->payType=='cash') {
-//                        $discount = $goodsType[$goods['TYPE']]['discount'];
-//                        $realPrice = $goods['SELL_PRICE'] * $discount/100;
-//                        $realPv = $goods['PRICE_PV'] * $discount/100;
-//                        $totalAmount += $realPrice * intval($v);
-//                        $totalPv += $realPv * intval($v);
-//                    }else{
-//                        $realPrice = $goods['SELL_PRICE'];
-//                        $realPv = $goods['PRICE_PV'];
-//                        $totalAmount += $realPrice * intval($v);
-//                        $totalPv += $realPv * intval($v);
-//                    }
-                    $this->_orderGoods[] = [
-                        'GOODS_ID' => $goods['ID'],
-                        'PRICE' => $goods['SELL_PRICE'],
-                        'PV' => $goods['PRICE_PV'],
-                        'REAL_PRICE' => $realPrice,
-                        'REAL_PV' => $realPv,
-                        'POINT' => $goods['POINT'],
-                        'BUY_NUMS' => intval($v),
-                        'SKU_CODE' => $goods['GOODS_NO'],
-                        'GOODS_TITLE' => $goods['GOODS_NAME']
-                    ];
-                }
-            }
-        }
-        $this->_decAmount = $totalAmount;
-        $this->_decPv = $totalPv;
-        $this->_freight = ($totalAmount>=300) ? 0 : 15;
-        $this->_payAmount = $this->_decAmount + $this->_freight;
-
-
-        $db = \Yii::$app->db;
-        $transaction = $db->beginTransaction();
-        try {
-            //判断用户余额是否充足
-            $loginUserId = \Yii::$app->user->id;
-            if($this->payType=='cash') {
-                if (Cash::getAvailableBalance($loginUserId) < $this->_payAmount) {
-                    throw new Exception('余额不足,无法购买商品');
-                }
-            } else if ($this->payType =='exchange') {
-                if ($this->_payAmount > Balance::getBalanceExchangePoints($loginUserId)) {
-                    throw new Exception('兑换积分不足,无法购买商品');
-                }
-            } else{
-                if ($this->_payAmount > Balance::getBalanceReconsumePoints($loginUserId)) {
-                    throw new Exception('复消积分不足,无法购买商品');
-                }
-            }
-            //写入订单
-            if (!$orderResult = $this->addOrder()) {
-                throw new Exception(Form::formatErrorsForApi($orderResult->getErrors()));
-            }
-            $transaction->commit();
-        }catch (\Exception $e){
-            $transaction->rollBack();
-            $this->addError('add', $e->getMessage());
-            return null;
-        }
-        return true;
-    }
-
-    /**
-     * 复销订单
-     */
-    public function addOrder(){
-        $periodObj = Period::instance();
-        $nowPeriodNum = $periodObj->getNowPeriodNum();
-        $nowCalcMonth = $periodObj->getYearMonth($nowPeriodNum);
-
-        $userId = \Yii::$app->user->id;
-        $userName = Info::getUserNameByUserId($userId);
-
-        // 加入订单信息
-        $warehouse = Region::getWarehouseByCode($this->_address['PROVINCE']);//仓库
-        if(!$warehouse){
-            throw new Exception('地区暂时不支持配送,具体联系客服');
-        }
-        $ordNo = $this->_generateSn();
-        $orderModel = new Order();
-        $orderModel->SN = 'OS'.$ordNo;
-        $orderModel->DEC_SN = 'DS'.$ordNo;
-        $orderModel->ORDER_TYPE = $this->type;
-        $orderModel->USER_ID = $userId;
-        $orderModel->USER_NAME = $userName;
-        $orderModel->ORDER_AMOUNT = $this->_decAmount;
-        $orderModel->PV = $this->payType =='exchange' ? 0 : $this->_decPv;
-        $orderModel->PAY_AMOUNT = $this->_payAmount;
-        $orderModel->PAY_PV = $this->payType =='exchange' ? 0 : $this->_decPv; // 兑换积分不能算业绩
-        $orderModel->PAY_AT = Date::nowTime();
-        $orderModel->PAY_TYPE = $this->payType;
-        $orderModel->PERIOD_NUM = $nowPeriodNum;
-        $orderModel->P_CALC_MONTH = Date::ociToDate($nowCalcMonth, Date::OCI_TIME_FORMAT_SHORT_MONTH);
-        $orderModel->FREIGHT = $this->_freight;
-        $orderModel->PAY_FREIGHT = $this->_freight;
-        $orderModel->CONSIGNEE = $this->_address['CONSIGNEE'];
-        $orderModel->MOBILE = $this->_address['MOBILE'];
-        $orderModel->PROVINCE = $this->_address['PROVINCE'];
-        $orderModel->CITY = $this->_address['CITY'];
-        $orderModel->COUNTY = $this->_address['COUNTY'];
-        $orderModel->ADDRESS = $this->_address['ADDRESS'];
-        $orderModel->FRONT_REMARK = $this->remark;
-        $orderModel->WAREHOUSE = $warehouse;
-        $orderModel->STATUS = 1;
-        $orderModel->CREATED_AT = Date::nowTime();
-        $orderModel->CREATE_USER = $userName;
-        if(!$orderModel->save()){
-            $this->addErrors($orderModel->getErrors());
-            return false;
-        }
-        // 加入商品到订单商品表
-        foreach($this->_orderGoods as $key=>$value){
-            // 增加判断,如果订单是兑换券购买,则AR_ORDER_GOODS中的REAL_PV真实PV应该是0
-            if ($orderModel->PAY_TYPE == 'exchange') {
-                $this->_orderGoods[$key]['REAL_PV'] = 0;
-            }
-            $this->_orderGoods[$key]['ORDER_SN'] = $orderModel->SN;
-            $this->_orderGoods[$key]['P_CALC_MONTH'] = Date::ociToDate($nowCalcMonth, Date::OCI_TIME_FORMAT_SHORT_MONTH);
-        }
-        OrderGoods::batchInsert($this->_orderGoods);
-
-        //扣除会员余额/积分
-        if($this->payType=='cash') {
-            Cash::changeUserCash(\Yii::$app->user->id, 'CASH', -abs($this->_payAmount), ['REMARK' => '会员复销余额支付']);
-        } else if ($this->payType=='exchange') {
-            Balance::changeUserBonus(\Yii::$app->user->id,'exchange_points', -abs($this->_payAmount),['DEAL_TYPE_ID' => DealType::EXCHANGE_POINTS_EXCHANGE,'REMARK' => '会员兑换积分兑换']);
-        } else{
-            Balance::changeUserBonus(\Yii::$app->user->id,'reconsume_points', -abs($this->_payAmount),['DEAL_TYPE_ID' => DealType::RECONSUME_POINTS_EXCHANGE,'REMARK' => '会员复销积分兑换']);
-        }
-        return $orderModel;
-    }
-
-    /**
-     * 帮会员复销
-     * @return bool|null
-     * @throws Exception
-     * @throws \yii\db\Exception
-     */
-    public function reconsumeAdd(){
-        if(!$this->validate()){
-            return null;
-        }
-        $ids = $this->goodsId;
-        $totalAmount = 0;
-        $totalPv = 0;
-        $goodsType = ShopGoods::GOODS_TYPE;
-        foreach ($this->goodsNum as $k => $v) {
-            if ($v) {
-                $goods = ShopGoods::findOneAsArray('ID=:ID AND STATUS=1',[':ID'=> $ids[$k]]);
-                if($goods['STORE_NUMS']>0){
-                    if ($goods['TYPE'] == 1 || $goods['TYPE'] == 2) {
-                        $discount = $goodsType[$goods['TYPE']]['discount'];
-                        $realPrice = $goods['SELL_PRICE'] * $discount/100;
-                        $realPv = $goods['PRICE_PV'] * $discount/100;
-                    } else {
-                        $discount = $goods['SELL_DISCOUNT'];
-                        $realPrice = $goods['SELL_PRICE'] * $discount;
-                        $realPv = $goods['PRICE_PV'] * $discount;
-                    }
-                    $totalAmount += $realPrice * intval($v);
-                    $totalPv += $realPv * intval($v);
-                    $this->_orderGoods[] = [
-                        'GOODS_ID' => $goods['ID'],
-                        'PRICE' => $goods['SELL_PRICE'],
-                        'PV' => $goods['PRICE_PV'],
-                        'REAL_PRICE' => $realPrice,
-                        'REAL_PV' => $realPv,
-                        'POINT' => $goods['POINT'],
-                        'BUY_NUMS' => intval($v),
-                        'SKU_CODE' => $goods['GOODS_NO'],
-                        'GOODS_TITLE' => $goods['GOODS_NAME']
-                    ];
-                }
-            }
-        }
-        $this->_decAmount = $totalAmount;
-        $this->_decPv = $totalPv;
-        $this->_freight = ($totalAmount>=300) ? 0 : 15;
-        $this->_payAmount = $this->_decAmount + $this->_freight;
-
-        $db = \Yii::$app->db;
-        $transaction = $db->beginTransaction();
-        try {
-            $loginUserId = \Yii::$app->user->id;
-
-            //是否开启伞下会员限制
-            $isResaleUmbrella = Cache::getSystemConfig()['isResaleUmbrella']['VALUE'];
-            if($isResaleUmbrella){
-                $userId = Info::getUserIdByUserName($this->userName);
-                $userNetwork = UserNetwork::find()->where("USER_ID=:USER_ID AND INSTR(PARENT_UIDS,'{$loginUserId}')>0", ['USER_ID'=>$userId])->count();
-                if(!$userNetwork){
-                    throw new Exception($this->userName.'不是您的伞下会员,不能为其复消!');
-                }
-            }
-            //判断用户余额是否充足
-            if($this->payType=='cash') {
-                if (Cash::getAvailableBalance($loginUserId) < $this->_payAmount) {
-                    throw new Exception('余额不足,无法购买商品');
-                }
-            }else{
-                if ($this->_payAmount > Balance::getBalanceReconsumePoints($loginUserId)) {
-                    throw new Exception('复消积分不足,无法购买商品');
-                }
-            }
-            //写入订单
-            if (!$orderResult = $this->addUserOrder()) {
-                throw new Exception(Form::formatErrorsForApi($orderResult->getErrors()));
-            }
-            $transaction->commit();
-        }catch (\Exception $e){
-            $transaction->rollBack();
-            $this->addError('add', $e->getMessage());
-            return null;
-        }
-        return true;
-    }
-
-    /**
-     * 帮会员复消的订单
-     */
-    public function addUserOrder(){
-        $periodObj = Period::instance();
-        $nowPeriodNum = $periodObj->getNowPeriodNum();
-        $nowCalcMonth = $periodObj->getYearMonth($nowPeriodNum);
-        //帮复消会员Id(登陆会员)
-        $loginUserId = \Yii::$app->user->id;
-        $loginUserName = Info::getUserNameByUserId($loginUserId);
-        //订单会员Id
-        $userId = Info::getUserIdByUserName($this->userName);
-
-        // 加入订单信息
-        $warehouse = Region::getWarehouseByCode($this->province);//仓库
-        if(!$warehouse){
-            throw new Exception('地区暂时不支持配送,具体联系客服');
-        }
-        $ordNo = $this->_generateSn();
-        $orderModel = new Order();
-        $orderModel->SN = 'OS'.$ordNo;
-        $orderModel->DEC_SN = 'DS'.$ordNo;
-        $orderModel->ORDER_TYPE = $this->type;
-        $orderModel->USER_ID = $userId;
-        $orderModel->USER_NAME = $this->userName;
-        $orderModel->ORDER_AMOUNT = $this->_decAmount;
-        $orderModel->PV = $this->_decPv;
-        $orderModel->PAY_AMOUNT = $this->_payAmount;
-        $orderModel->PAY_PV = $this->_decPv;
-        $orderModel->PAY_AT = Date::nowTime();
-        $orderModel->PAY_TYPE = $this->payType;
-        $orderModel->PERIOD_NUM = $nowPeriodNum;
-        $orderModel->P_CALC_MONTH = Date::ociToDate($nowCalcMonth, Date::OCI_TIME_FORMAT_SHORT_MONTH);
-        $orderModel->FREIGHT = $this->_freight;
-        $orderModel->PAY_FREIGHT = $this->_freight;
-        $orderModel->CONSIGNEE = $this->consignee;
-        $orderModel->MOBILE = $this->acceptMobile;
-        $orderModel->PROVINCE = $this->province;
-        $orderModel->CITY = $this->city;
-        $orderModel->COUNTY = $this->county;
-        $orderModel->ADDRESS = $this->detailaddress;
-        $orderModel->FRONT_REMARK = $this->remark;
-        $orderModel->WAREHOUSE = $warehouse;
-        $orderModel->STATUS = 1;
-        $orderModel->CREATED_AT = Date::nowTime();
-        $orderModel->CREATE_USER = $loginUserName;
-        if(!$orderModel->save()){
-            $this->addErrors($orderModel->getErrors());
-            return false;
-        }
-        // 加入商品到订单商品表
-        foreach($this->_orderGoods as $key=>$value){
-            $this->_orderGoods[$key]['ORDER_SN'] = $orderModel->SN;
-            $this->_orderGoods[$key]['P_CALC_MONTH'] = Date::ociToDate($nowCalcMonth, Date::OCI_TIME_FORMAT_SHORT_MONTH);
-        }
-        OrderGoods::batchInsert($this->_orderGoods);
-
-        //扣除会员余额/积分
-        if($this->payType=='cash') {
-            Cash::changeUserCash($loginUserId, 'CASH', -abs($this->_payAmount), ['REMARK' => '会员复销余额支付']);
-        }else{
-            Balance::changeUserBonus($loginUserId,'reconsume_points', -abs($this->_payAmount),['DEAL_TYPE_ID' => DealType::RECONSUME_POINTS_EXCHANGE, 'REMARK' => '会员复销积分兑换']);
-        }
-        return $orderModel;
-    }
-
-    /**
-     * 生成流水号
-     * @return string
-     */
-    private function _generateSn() {
-        return Date::today('Ymd') . $this->_random(10, 1);
-    }
-
-    /**
-     * 生成随机数
-     * @param $length
-     * @param int $numeric
-     * @return string
-     */
-    private function _random($length, $numeric = 0) {
-        $seed = base_convert(md5(microtime() . $_SERVER['DOCUMENT_ROOT']), 16, $numeric ? 10 : 35);
-        $seed = $numeric ? (str_replace('0', '', $seed) . '012340567890') : ($seed . 'zZ' . strtoupper($seed));
-        $hash = '';
-        $max = strlen($seed) - 1;
-        for ($i = 0; $i < $length; $i++) {
-            $hash .= $seed[mt_rand(0, $max)];
-        }
-        return $hash;
-    }
-}
+<?php
+namespace common\models\forms;
+
+use common\helpers\Cache;
+use common\helpers\Date;
+use common\components\Model;
+use common\helpers\Form;
+use common\helpers\user\Balance;
+use common\helpers\user\Cash;
+use common\helpers\user\Info;
+use common\libs\logging\operate\AdminOperate;
+use common\models\DealType;
+use common\models\Order;
+use common\models\OrderGoods;
+use common\models\Period;
+use common\models\ReceiveAddress;
+use common\models\Region;
+use common\models\ShopGoods;
+use common\models\User;
+use common\models\UserNetwork;
+use yii\base\Exception;
+
+/**
+ * Login form
+ */
+class OrderForm extends Model
+{
+    public $sn;
+    public $expressCompany;
+    public $orderTrackNo;
+    public $status;
+    public $remark;
+
+    public $type;
+    public $addressId;
+    public $payType;
+    public $goodsId;
+    public $goodsNum;
+    public $payPassword;
+
+    public $userName;
+    public $consignee;
+    public $acceptMobile;
+    public $province;
+    public $city;
+    public $county;
+    public $detailaddress;
+
+    private $_address;
+    private $_decAmount;
+    private $_decPv;
+    private $_freight;
+    private $_payAmount;
+    private $_orderGoods;
+
+    /**
+     * @var Order
+     */
+    private $_model;
+
+    public function init() {
+        parent::init();
+        $this->adminOperateLogger = new AdminOperate([
+            'fetchClass' => Order::class,
+        ]);
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function rules()
+    {
+        return [
+            [['sn', 'expressCompany', 'orderTrackNo', 'status', 'remark','type','addressId','payType','goodsId','goodsNum', 'payPassword','userName','consignee','acceptMobile','province','city','county','detailaddress'], 'trim'],
+            [['sn', 'expressCompany', 'orderTrackNo', 'status', 'remark','type','addressId','payType','goodsId','goodsNum', 'payPassword','userName','consignee','acceptMobile','province','city','county','detailaddress'], 'required'],
+            [['status'], 'isStatus'],
+            [['addressId'], 'isAddress'],
+            [['payType'], 'isPayType'],
+            [['payPassword'], 'validatePassword'],
+        ];
+    }
+
+    public function attributeLabels()
+    {
+        return [
+            'sn' => '订单号',
+            'expressCompany' => '快递公司',
+            'orderTrackNo' => '快递单号',
+            'status' => '状态',
+            'remark' => '备注',
+            'type' => '订单类型',
+            'addressId' => '收货地址',
+            'payType' => '支付方式',
+            'goodsId' => '商品ID',
+            'goodsNum' => '商品数量',
+            'userName' => '复消会员编号',
+            'consignee' => '收货人',
+            'acceptMobile' => '收货电话',
+            'province' => '省',
+            'city' => '市',
+            'county' => '区',
+            'detailaddress' => '收货详细地址',
+        ];
+    }
+
+    /**
+     * 指定校验场景
+     * @return array
+     */
+    public function scenarios()
+    {
+        $parentScenarios =  parent::scenarios();
+        $customScenarios = [
+            // 管理员发货
+            'adminDelivery' => ['sn', 'expressCompany', 'orderTrackNo'],
+            // 会员确认收货
+            'userConfirm' => ['sn', 'expressCompany', 'orderTrackNo'],
+            // 管理员修改订单状态
+            'adminStatus' => ['sn', 'status'],
+            // 管理员修改备注
+            'adminRemark' => ['sn', 'remark'],
+            // 会员下单
+            'userOrder' => ['type','addressId', 'payType','goodsId','goodsNum', 'remark', 'payPassword'],
+            // 帮会员复消下单
+            'reconsumeOrder' => ['type','userName', 'payType','goodsId','goodsNum', 'remark', 'payPassword','consignee','acceptMobile','province','city','county','detailaddress'],
+        ];
+        return array_merge($parentScenarios, $customScenarios);
+    }
+
+    /**
+     * 校验之前
+     * @return bool
+     */
+    public function beforeValidate()
+    {
+        $parentValidate = parent::beforeValidate();
+        if ($this->sn) {
+            $this->_model = Order::findOne(['SN'=>$this->sn]);
+            if (!$this->_model){
+                $this->addError('sn', '订单不存在');
+                return false;
+            }
+        }
+        if ($this->scenario == 'adminDelivery'){
+            if($this->_model['STATUS'] == \Yii::$app->params['orderStatus']['cancel']) {
+                $this->addError('sn', '订单已取消不能发货');
+                return false;
+            }
+            if($this->_model['STATUS'] == \Yii::$app->params['orderStatus']['del']) {
+                $this->addError('sn', '订单已删除不能发货');
+                return false;
+            }
+        }
+
+        return $parentValidate;
+    }
+
+    /**
+     * 校验支付密码
+     * @param $attribute
+     * @param $params
+     */
+    public function validatePassword($attribute, $params) {
+        if (!User::validatePayPassword(\Yii::$app->user->id, $this->payPassword)) {
+            $this->addError($attribute, '支付密码不正确');
+        }
+    }
+
+    /**
+     * 判断收货地址是否存在
+     * @param $attribute
+     */
+    public function isAddress($attribute){
+        if (!$receiveAddress = ReceiveAddress::find()->where(' ID=:ID', [':ID' => $this->addressId])->asArray()->one()) {
+            $this->addError($attribute, '收货地址不存在');
+        } else {
+            $this->_address = $receiveAddress;
+        }
+    }
+
+    /**
+     * 判断支付方式
+     * @param $attribute
+     */
+    public function isPayType($attribute){
+        if(!array_key_exists($this->payType, ShopGoods::payTypes())){
+            $this->addError($attribute, '支付方式错误');
+            return;
+        }
+    }
+
+    /**
+     * 校验类型
+     * @param $attribute
+     */
+    public function isStatus($attribute){
+        if(!in_array($this->type, \Yii::$app->params['orderStatus'])){
+            $this->addError($attribute, '类型错误');
+            return ;
+        }
+        if ($this->scenario == 'adminStatus'){
+            if ($this->status == $this->_model['STATUS']) {
+                $this->addError($attribute, '订单状态没有改变');
+                return ;
+            }
+            if($this->status == \Yii::$app->params['orderStatus']['notPaid'] && $this->_model['STATUS'] >= \Yii::$app->params['orderStatus']['delivery']) {
+                $this->addError($attribute, '订单已经进入物流状态不能改为未支付');
+                return ;
+            }
+            elseif($this->status == \Yii::$app->params['orderStatus']['paid'] && $this->_model['STATUS'] >= \Yii::$app->params['orderStatus']['cancel']) {
+                $this->addError($attribute, '订单已失效不能处理');
+                return ;
+            }
+            elseif($this->status == \Yii::$app->params['orderStatus']['delivery']) {
+                $this->addError($attribute, '订单不能单独处理为物流状态');
+                return ;
+            }
+            elseif($this->status == \Yii::$app->params['orderStatus']['complete'] && $this->_model['STATUS'] > \Yii::$app->params['orderStatus']['cancel']) {
+                $this->addError($attribute, '订单已失效不能处理');
+                return ;
+            }
+            elseif($this->status == \Yii::$app->params['orderStatus']['cancel']) {
+                if($this->_model['STATUS'] == \Yii::$app->params['orderStatus']['complete']) {
+                    $this->addError($attribute, '订单已完成不能取消');
+                    return ;
+                }
+                if($this->_model['STATUS'] == \Yii::$app->params['orderStatus']['del']) {
+                    $this->addError($attribute, '订单已删除不能取消');
+                    return ;
+                }
+            }
+            elseif($this->status == \Yii::$app->params['orderStatus']['del']) {
+                if($this->_model['STATUS'] == \Yii::$app->params['orderStatus']['complete']) {
+                    $this->addError($attribute, '订单已完成不能删除');
+                    return ;
+                }
+            }
+        }
+
+    }
+
+    /**
+     * 管理员发货
+     * @return Order|null
+     * @throws \yii\db\Exception
+     */
+    public function adminDelivery(){
+        if(!$this->validate()){
+            return null;
+        }
+        $db = \Yii::$app->db;
+        $transaction = $db->beginTransaction();
+        try {
+            $period = Period::instance();
+            $this->_model->DELIVERY_STATUS = \Yii::$app->params['deliveryStatus']['delivered']['value'];
+            $this->_model->DELIVERY_PERIOD = $period->getNowPeriodNum();
+            $this->_model->DELIVERY_AT = Date::nowTime();
+            $this->_model->EXPRESS_COMPANY = $this->expressCompany;
+            $this->_model->ORDER_TRACK_NO = $this->orderTrackNo;
+            $this->_model->STATUS = \Yii::$app->params['orderStatus']['delivery']['value'];
+            if(!$this->_model->save()){
+                throw new Exception(Form::formatErrorsForApi($this->_model->getErrors()));
+            }
+            $transaction->commit();
+        } catch (Exception $e) {
+            $transaction->rollBack();
+            $this->addError('edit', $e->getMessage());
+            return null;
+        }
+        return $this->_model;
+    }
+
+    /**
+     * 复销
+     * @return bool|null
+     * @throws Exception
+     * @throws \yii\db\Exception
+     */
+    public function add(){
+        if(!$this->validate()){
+            return null;
+        }
+        $ids = $this->goodsId;
+        $totalAmount = 0;
+        $totalPv = 0;
+        $goodsType = ShopGoods::GOODS_TYPE;
+        foreach ($this->goodsNum as $k => $v) {
+            if ($v) {
+                $goods = ShopGoods::findOneAsArray('ID=:ID AND STATUS=1',[':ID'=> $ids[$k]]);
+                if($goods['STORE_NUMS']>0){
+                    if ($goods['TYPE'] == 1 || $goods['TYPE'] == 2) {
+                        $discount = $goodsType[$goods['TYPE']]['discount'];
+                        $realPrice = $goods['SELL_PRICE'] * $discount/100;
+                        $realPv = $goods['PRICE_PV'] * $discount/100;
+                    } else {
+                        $discount = $goods['SELL_DISCOUNT'];
+                        $realPrice = $goods['SELL_PRICE'] * $discount;
+                        $realPv = $goods['PRICE_PV'] * $discount;
+                    }
+                    $totalAmount += $realPrice * intval($v);
+                    $totalPv += $realPv * intval($v);
+//                    if($this->payType=='cash') {
+//                        $discount = $goodsType[$goods['TYPE']]['discount'];
+//                        $realPrice = $goods['SELL_PRICE'] * $discount/100;
+//                        $realPv = $goods['PRICE_PV'] * $discount/100;
+//                        $totalAmount += $realPrice * intval($v);
+//                        $totalPv += $realPv * intval($v);
+//                    }else{
+//                        $realPrice = $goods['SELL_PRICE'];
+//                        $realPv = $goods['PRICE_PV'];
+//                        $totalAmount += $realPrice * intval($v);
+//                        $totalPv += $realPv * intval($v);
+//                    }
+                    $this->_orderGoods[] = [
+                        'GOODS_ID' => $goods['ID'],
+                        'PRICE' => $goods['SELL_PRICE'],
+                        'PV' => $goods['PRICE_PV'],
+                        'REAL_PRICE' => $realPrice,
+                        'REAL_PV' => $realPv,
+                        'POINT' => $goods['POINT'],
+                        'BUY_NUMS' => intval($v),
+                        'SKU_CODE' => $goods['GOODS_NO'],
+                        'GOODS_TITLE' => $goods['GOODS_NAME']
+                    ];
+                }
+            }
+        }
+        $this->_decAmount = $totalAmount;
+        $this->_decPv = $totalPv;
+        $this->_freight = ($totalAmount>=300) ? 0 : 15;
+        $this->_payAmount = $this->_decAmount + $this->_freight;
+
+
+        $db = \Yii::$app->db;
+        $transaction = $db->beginTransaction();
+        try {
+            //判断用户余额是否充足
+            $loginUserId = \Yii::$app->user->id;
+            if($this->payType=='cash') {
+                if (Cash::getAvailableBalance($loginUserId) < $this->_payAmount) {
+                    throw new Exception('余额不足,无法购买商品');
+                }
+            } else if ($this->payType =='exchange') {
+                if ($this->_payAmount > Balance::getBalanceExchangePoints($loginUserId)) {
+                    throw new Exception('兑换点数不足,无法购买商品');
+                }
+            } else{
+                if ($this->_payAmount > Balance::getBalanceReconsumePoints($loginUserId)) {
+                    throw new Exception('复消积分不足,无法购买商品');
+                }
+            }
+            //写入订单
+            if (!$orderResult = $this->addOrder()) {
+                throw new Exception(Form::formatErrorsForApi($orderResult->getErrors()));
+            }
+            $transaction->commit();
+        }catch (\Exception $e){
+            $transaction->rollBack();
+            $this->addError('add', $e->getMessage());
+            return null;
+        }
+        return true;
+    }
+
+    /**
+     * 复销订单
+     */
+    public function addOrder(){
+        $periodObj = Period::instance();
+        $nowPeriodNum = $periodObj->getNowPeriodNum();
+        $nowCalcMonth = $periodObj->getYearMonth($nowPeriodNum);
+
+        $userId = \Yii::$app->user->id;
+        $userName = Info::getUserNameByUserId($userId);
+
+        // 加入订单信息
+        $warehouse = Region::getWarehouseByCode($this->_address['PROVINCE']);//仓库
+        if(!$warehouse){
+            throw new Exception('地区暂时不支持配送,具体联系客服');
+        }
+        $ordNo = $this->_generateSn();
+        $orderModel = new Order();
+        $orderModel->SN = 'OS'.$ordNo;
+        $orderModel->DEC_SN = 'DS'.$ordNo;
+        $orderModel->ORDER_TYPE = $this->type;
+        $orderModel->USER_ID = $userId;
+        $orderModel->USER_NAME = $userName;
+        $orderModel->ORDER_AMOUNT = $this->_decAmount;
+        $orderModel->PV = $this->payType =='exchange' ? 0 : $this->_decPv;
+        $orderModel->PAY_AMOUNT = $this->_payAmount;
+        $orderModel->PAY_PV = $this->payType =='exchange' ? 0 : $this->_decPv; // 兑换积分不能算业绩
+        $orderModel->PAY_AT = Date::nowTime();
+        $orderModel->PAY_TYPE = $this->payType;
+        $orderModel->PERIOD_NUM = $nowPeriodNum;
+        $orderModel->P_CALC_MONTH = Date::ociToDate($nowCalcMonth, Date::OCI_TIME_FORMAT_SHORT_MONTH);
+        $orderModel->FREIGHT = $this->_freight;
+        $orderModel->PAY_FREIGHT = $this->_freight;
+        $orderModel->CONSIGNEE = $this->_address['CONSIGNEE'];
+        $orderModel->MOBILE = $this->_address['MOBILE'];
+        $orderModel->PROVINCE = $this->_address['PROVINCE'];
+        $orderModel->CITY = $this->_address['CITY'];
+        $orderModel->COUNTY = $this->_address['COUNTY'];
+        $orderModel->ADDRESS = $this->_address['ADDRESS'];
+        $orderModel->FRONT_REMARK = $this->remark;
+        $orderModel->WAREHOUSE = $warehouse;
+        $orderModel->STATUS = 1;
+        $orderModel->CREATED_AT = Date::nowTime();
+        $orderModel->CREATE_USER = $userName;
+        if(!$orderModel->save()){
+            $this->addErrors($orderModel->getErrors());
+            return false;
+        }
+        // 加入商品到订单商品表
+        foreach($this->_orderGoods as $key=>$value){
+            // 增加判断,如果订单是兑换券购买,则AR_ORDER_GOODS中的REAL_PV真实PV应该是0
+            if ($orderModel->PAY_TYPE == 'exchange') {
+                $this->_orderGoods[$key]['REAL_PV'] = 0;
+            }
+            $this->_orderGoods[$key]['ORDER_SN'] = $orderModel->SN;
+            $this->_orderGoods[$key]['P_CALC_MONTH'] = Date::ociToDate($nowCalcMonth, Date::OCI_TIME_FORMAT_SHORT_MONTH);
+        }
+        OrderGoods::batchInsert($this->_orderGoods);
+
+        //扣除会员余额/积分
+        if($this->payType=='cash') {
+            Cash::changeUserCash(\Yii::$app->user->id, 'CASH', -abs($this->_payAmount), ['REMARK' => '会员复销余额支付']);
+        } else if ($this->payType=='exchange') {
+            Balance::changeUserBonus(\Yii::$app->user->id,'exchange_points', -abs($this->_payAmount),['DEAL_TYPE_ID' => DealType::EXCHANGE_POINTS_EXCHANGE,'REMARK' => '会员兑换积分兑换']);
+        } else{
+            Balance::changeUserBonus(\Yii::$app->user->id,'reconsume_points', -abs($this->_payAmount),['DEAL_TYPE_ID' => DealType::RECONSUME_POINTS_EXCHANGE,'REMARK' => '会员复销积分兑换']);
+        }
+        return $orderModel;
+    }
+
+    /**
+     * 帮会员复销
+     * @return bool|null
+     * @throws Exception
+     * @throws \yii\db\Exception
+     */
+    public function reconsumeAdd(){
+        if(!$this->validate()){
+            return null;
+        }
+        $ids = $this->goodsId;
+        $totalAmount = 0;
+        $totalPv = 0;
+        $goodsType = ShopGoods::GOODS_TYPE;
+        foreach ($this->goodsNum as $k => $v) {
+            if ($v) {
+                $goods = ShopGoods::findOneAsArray('ID=:ID AND STATUS=1',[':ID'=> $ids[$k]]);
+                if($goods['STORE_NUMS']>0){
+                    if ($goods['TYPE'] == 1 || $goods['TYPE'] == 2) {
+                        $discount = $goodsType[$goods['TYPE']]['discount'];
+                        $realPrice = $goods['SELL_PRICE'] * $discount/100;
+                        $realPv = $goods['PRICE_PV'] * $discount/100;
+                    } else {
+                        $discount = $goods['SELL_DISCOUNT'];
+                        $realPrice = $goods['SELL_PRICE'] * $discount;
+                        $realPv = $goods['PRICE_PV'] * $discount;
+                    }
+                    $totalAmount += $realPrice * intval($v);
+                    $totalPv += $realPv * intval($v);
+                    $this->_orderGoods[] = [
+                        'GOODS_ID' => $goods['ID'],
+                        'PRICE' => $goods['SELL_PRICE'],
+                        'PV' => $goods['PRICE_PV'],
+                        'REAL_PRICE' => $realPrice,
+                        'REAL_PV' => $realPv,
+                        'POINT' => $goods['POINT'],
+                        'BUY_NUMS' => intval($v),
+                        'SKU_CODE' => $goods['GOODS_NO'],
+                        'GOODS_TITLE' => $goods['GOODS_NAME']
+                    ];
+                }
+            }
+        }
+        $this->_decAmount = $totalAmount;
+        $this->_decPv = $totalPv;
+        $this->_freight = ($totalAmount>=300) ? 0 : 15;
+        $this->_payAmount = $this->_decAmount + $this->_freight;
+
+        $db = \Yii::$app->db;
+        $transaction = $db->beginTransaction();
+        try {
+            $loginUserId = \Yii::$app->user->id;
+
+            //是否开启伞下会员限制
+            $isResaleUmbrella = Cache::getSystemConfig()['isResaleUmbrella']['VALUE'];
+            if($isResaleUmbrella){
+                $userId = Info::getUserIdByUserName($this->userName);
+                $userNetwork = UserNetwork::find()->where("USER_ID=:USER_ID AND INSTR(PARENT_UIDS,'{$loginUserId}')>0", ['USER_ID'=>$userId])->count();
+                if(!$userNetwork){
+                    throw new Exception($this->userName.'不是您的伞下会员,不能为其复消!');
+                }
+            }
+            //判断用户余额是否充足
+            if($this->payType=='cash') {
+                if (Cash::getAvailableBalance($loginUserId) < $this->_payAmount) {
+                    throw new Exception('余额不足,无法购买商品');
+                }
+            }else{
+                if ($this->_payAmount > Balance::getBalanceReconsumePoints($loginUserId)) {
+                    throw new Exception('复消积分不足,无法购买商品');
+                }
+            }
+            //写入订单
+            if (!$orderResult = $this->addUserOrder()) {
+                throw new Exception(Form::formatErrorsForApi($orderResult->getErrors()));
+            }
+            $transaction->commit();
+        }catch (\Exception $e){
+            $transaction->rollBack();
+            $this->addError('add', $e->getMessage());
+            return null;
+        }
+        return true;
+    }
+
+    /**
+     * 帮会员复消的订单
+     */
+    public function addUserOrder(){
+        $periodObj = Period::instance();
+        $nowPeriodNum = $periodObj->getNowPeriodNum();
+        $nowCalcMonth = $periodObj->getYearMonth($nowPeriodNum);
+        //帮复消会员Id(登陆会员)
+        $loginUserId = \Yii::$app->user->id;
+        $loginUserName = Info::getUserNameByUserId($loginUserId);
+        //订单会员Id
+        $userId = Info::getUserIdByUserName($this->userName);
+
+        // 加入订单信息
+        $warehouse = Region::getWarehouseByCode($this->province);//仓库
+        if(!$warehouse){
+            throw new Exception('地区暂时不支持配送,具体联系客服');
+        }
+        $ordNo = $this->_generateSn();
+        $orderModel = new Order();
+        $orderModel->SN = 'OS'.$ordNo;
+        $orderModel->DEC_SN = 'DS'.$ordNo;
+        $orderModel->ORDER_TYPE = $this->type;
+        $orderModel->USER_ID = $userId;
+        $orderModel->USER_NAME = $this->userName;
+        $orderModel->ORDER_AMOUNT = $this->_decAmount;
+        $orderModel->PV = $this->_decPv;
+        $orderModel->PAY_AMOUNT = $this->_payAmount;
+        $orderModel->PAY_PV = $this->_decPv;
+        $orderModel->PAY_AT = Date::nowTime();
+        $orderModel->PAY_TYPE = $this->payType;
+        $orderModel->PERIOD_NUM = $nowPeriodNum;
+        $orderModel->P_CALC_MONTH = Date::ociToDate($nowCalcMonth, Date::OCI_TIME_FORMAT_SHORT_MONTH);
+        $orderModel->FREIGHT = $this->_freight;
+        $orderModel->PAY_FREIGHT = $this->_freight;
+        $orderModel->CONSIGNEE = $this->consignee;
+        $orderModel->MOBILE = $this->acceptMobile;
+        $orderModel->PROVINCE = $this->province;
+        $orderModel->CITY = $this->city;
+        $orderModel->COUNTY = $this->county;
+        $orderModel->ADDRESS = $this->detailaddress;
+        $orderModel->FRONT_REMARK = $this->remark;
+        $orderModel->WAREHOUSE = $warehouse;
+        $orderModel->STATUS = 1;
+        $orderModel->CREATED_AT = Date::nowTime();
+        $orderModel->CREATE_USER = $loginUserName;
+        if(!$orderModel->save()){
+            $this->addErrors($orderModel->getErrors());
+            return false;
+        }
+        // 加入商品到订单商品表
+        foreach($this->_orderGoods as $key=>$value){
+            $this->_orderGoods[$key]['ORDER_SN'] = $orderModel->SN;
+            $this->_orderGoods[$key]['P_CALC_MONTH'] = Date::ociToDate($nowCalcMonth, Date::OCI_TIME_FORMAT_SHORT_MONTH);
+        }
+        OrderGoods::batchInsert($this->_orderGoods);
+
+        //扣除会员余额/积分
+        if($this->payType=='cash') {
+            Cash::changeUserCash($loginUserId, 'CASH', -abs($this->_payAmount), ['REMARK' => '会员复销余额支付']);
+        }else{
+            Balance::changeUserBonus($loginUserId,'reconsume_points', -abs($this->_payAmount),['DEAL_TYPE_ID' => DealType::RECONSUME_POINTS_EXCHANGE, 'REMARK' => '会员复销积分兑换']);
+        }
+        return $orderModel;
+    }
+
+    /**
+     * 生成流水号
+     * @return string
+     */
+    private function _generateSn() {
+        return Date::today('Ymd') . $this->_random(10, 1);
+    }
+
+    /**
+     * 生成随机数
+     * @param $length
+     * @param int $numeric
+     * @return string
+     */
+    private function _random($length, $numeric = 0) {
+        $seed = base_convert(md5(microtime() . $_SERVER['DOCUMENT_ROOT']), 16, $numeric ? 10 : 35);
+        $seed = $numeric ? (str_replace('0', '', $seed) . '012340567890') : ($seed . 'zZ' . strtoupper($seed));
+        $hash = '';
+        $max = strlen($seed) - 1;
+        for ($i = 0; $i < $length; $i++) {
+            $hash .= $seed[mt_rand(0, $max)];
+        }
+        return $hash;
+    }
+}

+ 549 - 549
console/controllers/BonusController.php

@@ -1,550 +1,550 @@
-<?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\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;
+    }
 }

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

@@ -257,7 +257,7 @@ class BonusController extends BaseController {
             $data[] = ['name' => '管理费', 'value' => Tool::formatPrice($calcBonus['MANAGE_TAX'])];
             $data[] = ['name' => '实发奖金', 'value' => Tool::formatPrice($calcBonus['BONUS_REAL'])];
             $data[] = ['name' => '复消积分', 'value' => Tool::formatPrice($calcBonus['RECONSUME_POINTS'])];
-            $data[] = ['name' => '兑换积分', 'value' => Tool::formatPrice($calcBonus['EXCHANGE_POINTS'])];
+            $data[] = ['name' => '兑换点数', 'value' => Tool::formatPrice($calcBonus['EXCHANGE_POINTS'])];
             $data[] = ['name' => '一市场新增业绩', 'value' => Tool::formatFrontPerf($calcBonus['PV_1L'])];
             $data[] = ['name' => '二市场新增业绩', 'value' => Tool::formatFrontPerf($calcBonus['PV_2L'])];
             $data[] = ['name' => '三市场新增业绩', 'value' => Tool::formatFrontPerf($calcBonus['PV_3L'])];

+ 48 - 47
frontendEle/src/views/bonus/new.vue

@@ -1,48 +1,49 @@
-<template>
-  <div v-loading="loading">
-    <div class="bonus-list">
-      <div class="bonus-item" v-for="(item,key) in newData" :key="key">
-        <el-tooltip effect="dark" :content="item.name" placement="top-end">
-          <div>{{item.value}}</div>
-        </el-tooltip>
-      </div>
-    </div>
-  </div>
-</template>
-
-<script>
-  import network from '@/utils/network'
-  import tool from '@/utils/tool'
-
-  export default {
-    name: 'bonus_new',
-    components: {},
-    mounted() {
-      this.getData()
-    },
-    data() {
-      return {
-        loading:false,
-        newData:null
-      }
-    },
-    methods: {
-      getData() {
-        let vueObj = this
-        vueObj.loading = true
+<template>
+  <div v-loading="loading">
+    <div class="bonus-list">
+      <div class="bonus-item" v-for="(item,key) in newData" :key="key">
+        <el-tooltip effect="dark" :content="item.name" placement="top-end">
+          <div>{{item.value}}</div>
+        </el-tooltip>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+  import network from '@/utils/network'
+  import tool from '@/utils/tool'
+
+  export default {
+    name: 'bonus_new',
+    components: {},
+    mounted() {
+      this.getData()
+    },
+    data() {
+      return {
+        loading:false,
+        newData:null
+      }
+    },
+    methods: {
+      getData() {
+        let vueObj = this
+        vueObj.loading = true
         network.getData('bonus/new').then(response => {
-          vueObj.newData = response
-          vueObj.loading = false
-        }).catch(response => {
-          vueObj.loading = false
-        })
-      },
-    }
-  }
-
-</script>
-<style>
-  .bonus-list:after{content: '';clear: both;display: table;}
-  .bonus-list .bonus-item{float: left;width: 33.333%;text-align: center;background: #fff;height:36px;line-height:36px;border: 1px solid #ddd;margin: -1px 0 0 -1px;box-sizing: border-box;}
-  .bonus-list .bonus-item:hover{background: #f5f5f5;cursor: pointer;}
-</style>
+          //console.log(response);
+          vueObj.newData = response
+          vueObj.loading = false
+        }).catch(response => {
+          vueObj.loading = false
+        })
+      },
+    }
+  }
+
+</script>
+<style>
+  .bonus-list:after{content: '';clear: both;display: table;}
+  .bonus-list .bonus-item{float: left;width: 33.333%;text-align: center;background: #fff;height:36px;line-height:36px;border: 1px solid #ddd;margin: -1px 0 0 -1px;box-sizing: border-box;}
+  .bonus-list .bonus-item:hover{background: #f5f5f5;cursor: pointer;}
+</style>

+ 125 - 125
mysql_db_yyj.sql

@@ -1,125 +1,125 @@
--- AR_SHOP_GOODS表结构修改
-ALTER TABLE `AR_SHOP_GOODS` ADD `IS_DEL` TINYINT(2) UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否删除';
-ALTER TABLE `AR_SHOP_GOODS` ADD `DELETED_AT` INT(10) NOT NULL DEFAULT '0' COMMENT '删除时间';
-ALTER TABLE `AR_SHOP_GOODS` ADD `POINT` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '兑换积分';
-ALTER TABLE `AR_SHOP_GOODS` ADD `SELL_TYPE` VARCHAR(32) NOT NULL DEFAULT '1,2' COMMENT '出售方式';
-
--- AR_ORDER_GOODS表结构修改
-ALTER TABLE `AR_ORDER_GOODS` ADD `POINT` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' COMMENT '兑换积分';
-
--- AR_ORDER表结构修改
-ALTER TABLE `AR_ORDER` ADD `PAY_TYPE` VARCHAR(32) NOT NULL DEFAULT 'cash' COMMENT '支付方式';
-
--- 03-15更新表结构
-ALTER TABLE `AR_FLOW_WALLET`
-ADD COLUMN `TRANSFER_SN` varchar(32) DEFAULT NULL AFTER `SORT`;
-
-ALTER TABLE `AR_DECLARATION_PACKAGE`
-ADD COLUMN `PACKAGE_NO` varchar(32) COLLATE utf8mb4_bin NOT NULL DEFAULT 'PG546763' AFTER `PACKAGE_NAME`;
-
-ALTER TABLE `AR_ORDER`
-ADD COLUMN `WAREHOUSE` varchar(16) COLLATE utf8mb4_bin NOT NULL DEFAULT '01' AFTER `PAY_TYPE`;
-
-UPDATE AR_CONFIG SET VALUE='[{"out":"bonus","in":"cash","outMin":"100","outMax":"0","fee":"3","feeMin":"0","feeMax":"0","weekMax":"0","monthMax":"0","isSystem":true,"isBind":true,"isOpen":true},{"out":"bonus","in":"bonus","outMin":"100","outMax":"0","fee":"0","feeMin":"0","feeMax":"0","weekMax":"0","monthMax":"0","isSystem":true,"isBind":true,"isOpen":true},{"out":"cash","in":"cash","outMin":"100","outMax":"0","fee":"0","feeMin":"0","feeMax":"0","weekMax":"0","monthMax":"0","isSystem":true,"isBind":true,"isOpen":true}]' WHERE CONFIG_NAME='allowWallet';
-
--- ALTER TABLE `AR_USER_WALLET`
--- MODIFY COLUMN `CASH` decimal(16, 2) UNSIGNED NOT NULL DEFAULT 0.00 AFTER `USER_ID`;
--- ALTER TABLE `AR_USER_BONUS`
--- MODIFY COLUMN `BONUS` decimal(16, 2) UNSIGNED NOT NULL DEFAULT 0.00 AFTER `USER_ID`;
-
-
-DROP TABLE IF EXISTS `AR_TMP_OLD_NETWORK`;
-CREATE TABLE `AR_TMP_OLD_NETWORK` (
-  `ID` varchar(32) NOT NULL,
-  `USER_NAME` varchar(16) NOT NULL,
-  `REAL_NAME` varchar(128) NOT NULL,
-  `PARENT_USER_NAME` varchar(16) NOT NULL,
-  `PARENT_REAL_NAME` varchar(128) NOT NULL,
-  `NET_USER_NAME` varchar(16) NOT NULL,
-  `NET_REAL_NAME` varchar(128) NOT NULL,
-  `SORT` int(10) UNSIGNED NOT NULL DEFAULT '0',
-  `NET_DEEP` int(10) UNSIGNED NOT NULL DEFAULT '0',
-  `REC_DEEP` int(10) UNSIGNED NOT NULL DEFAULT '0',
-  PRIMARY KEY (`ID`),
-  KEY `USER_NAME` (`USER_NAME`) USING BTREE,
-  KEY `PARENT_USER_NAME` (`PARENT_USER_NAME`) USING BTREE,
-  KEY `NET_USER_NAME` (`NET_USER_NAME`) USING BTREE,
-  KEY `SORT` (`SORT`) USING BTREE,
-  KEY `NET_DEEP` (`NET_DEEP`) USING BTREE,
-  KEY `REC_DEEP` (`REC_DEEP`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='excel新增会员关系临时表';
-
-
-CREATE TABLE `AR_TMP_OLD_NETWORK_ALL` (
-  `ID` varchar(32) NOT NULL,
-  `USER_NAME` varchar(16) NOT NULL,
-  `REAL_NAME` varchar(128) NOT NULL,
-  `PARENT_USER_NAME` varchar(16) NOT NULL,
-  `PARENT_REAL_NAME` varchar(128) NOT NULL,
-  `NET_USER_NAME` varchar(16) NOT NULL,
-  `NET_REAL_NAME` varchar(128) NOT NULL,
-  `REC_DEEP` int(10) UNSIGNED NOT NULL DEFAULT '0',
-  `NET_DEEP` int(10) UNSIGNED NOT NULL DEFAULT '0',
-  `SORT` int(10) UNSIGNED NOT NULL DEFAULT '0',
-  `NET_SAME` tinyint(2) NOT NULL DEFAULT '0' COMMENT '相同0 不同1',
-  `REC_SAME` tinyint(2) NOT NULL DEFAULT '0',
-  `OLD_IS_EXSIT` tinyint(2) NOT NULL DEFAULT '0' COMMENT '0 不存在 1 存在',
-  PRIMARY KEY (`ID`),
-  KEY `USER_NAME` (`USER_NAME`) USING BTREE,
-  KEY `PARENT_USER_NAME` (`PARENT_USER_NAME`) USING BTREE,
-  KEY `NET_USER_NAME` (`NET_USER_NAME`) USING BTREE,
-  KEY `SORT` (`SORT`) USING BTREE,
-  KEY `NET_DEEP` (`NET_DEEP`) USING BTREE,
-  KEY `REC_DEEP` (`REC_DEEP`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='老系统总会员关系临时表';
-
-
-
-CREATE TABLE `AR_TMP_DELETE_USER` (
-  `ID` varchar(32) NOT NULL,
-  `USER_NAME` varchar(16) NOT NULL,
-  `REAL_NAME` varchar(128) NOT NULL,
-  `USER_ID` varchar(32) NOT NULL COMMENT '用户ID',
-  PRIMARY KEY (`ID`),
-  KEY `USER_ID` (`USER_ID`) USING BTREE,
-  KEY `USER_NAME` (`USER_NAME`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='线上会员多于34w的会员';
-
-
-
-CREATE TABLE `AR_TMP_OLD_NETWORK_ERROR` (
-  `ID` varchar(32) NOT NULL,
-  `USER_NAME` varchar(16) NOT NULL,
-  `REAL_NAME` varchar(128) NOT NULL,
-  `PARENT_USER_NAME` varchar(16) NOT NULL,
-  `PARENT_REAL_NAME` varchar(128) NOT NULL,
-  `NET_USER_NAME` varchar(16) NOT NULL,
-  `NET_REAL_NAME` varchar(128) NOT NULL,
-  `REC_DEEP` int(10) UNSIGNED NOT NULL DEFAULT '0',
-  `NET_DEEP` int(10) UNSIGNED NOT NULL DEFAULT '0',
-  `SORT` int(10) UNSIGNED NOT NULL DEFAULT '0',
-  PRIMARY KEY (`ID`),
-  KEY `USER_NAME` (`USER_NAME`) USING BTREE,
-  KEY `PARENT_USER_NAME` (`PARENT_USER_NAME`) USING BTREE,
-  KEY `NET_USER_NAME` (`NET_USER_NAME`) USING BTREE,
-  KEY `SORT` (`SORT`) USING BTREE,
-  KEY `NET_DEEP` (`NET_DEEP`) USING BTREE,
-  KEY `REC_DEEP` (`REC_DEEP`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='改错表';
-
-
-
-CREATE TABLE `AR_USER_REG` (
-  `ID` varchar(32) NOT NULL,
-  `USER_NAME` varchar(16) NOT NULL,
-  `REAL_NAME` varchar(128) NOT NULL,
-  `CON_UID` varchar(32) NOT NULL,
-  `REC_UID` varchar(32) NOT NULL,
-  `PARENT_USER_NAME` varchar(16) NOT NULL,
-  `PARENT_REAL_NAME` varchar(128) NOT NULL,
-  `NET_USER_NAME` varchar(16) NOT NULL,
-  `NET_REAL_NAME` varchar(128) NOT NULL,
-  PRIMARY KEY (`ID`),
-  KEY `USER_NAME` (`USER_NAME`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='正式站报单用户44';
-
+-- AR_SHOP_GOODS表结构修改
+ALTER TABLE `AR_SHOP_GOODS` ADD `IS_DEL` TINYINT(2) UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否删除';
+ALTER TABLE `AR_SHOP_GOODS` ADD `DELETED_AT` INT(10) NOT NULL DEFAULT '0' COMMENT '删除时间';
+ALTER TABLE `AR_SHOP_GOODS` ADD `POINT` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '兑换点数';
+ALTER TABLE `AR_SHOP_GOODS` ADD `SELL_TYPE` VARCHAR(32) NOT NULL DEFAULT '1,2' COMMENT '出售方式';
+
+-- AR_ORDER_GOODS表结构修改
+ALTER TABLE `AR_ORDER_GOODS` ADD `POINT` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' COMMENT '兑换点数';
+
+-- AR_ORDER表结构修改
+ALTER TABLE `AR_ORDER` ADD `PAY_TYPE` VARCHAR(32) NOT NULL DEFAULT 'cash' COMMENT '支付方式';
+
+-- 03-15更新表结构
+ALTER TABLE `AR_FLOW_WALLET`
+ADD COLUMN `TRANSFER_SN` varchar(32) DEFAULT NULL AFTER `SORT`;
+
+ALTER TABLE `AR_DECLARATION_PACKAGE`
+ADD COLUMN `PACKAGE_NO` varchar(32) COLLATE utf8mb4_bin NOT NULL DEFAULT 'PG546763' AFTER `PACKAGE_NAME`;
+
+ALTER TABLE `AR_ORDER`
+ADD COLUMN `WAREHOUSE` varchar(16) COLLATE utf8mb4_bin NOT NULL DEFAULT '01' AFTER `PAY_TYPE`;
+
+UPDATE AR_CONFIG SET VALUE='[{"out":"bonus","in":"cash","outMin":"100","outMax":"0","fee":"3","feeMin":"0","feeMax":"0","weekMax":"0","monthMax":"0","isSystem":true,"isBind":true,"isOpen":true},{"out":"bonus","in":"bonus","outMin":"100","outMax":"0","fee":"0","feeMin":"0","feeMax":"0","weekMax":"0","monthMax":"0","isSystem":true,"isBind":true,"isOpen":true},{"out":"cash","in":"cash","outMin":"100","outMax":"0","fee":"0","feeMin":"0","feeMax":"0","weekMax":"0","monthMax":"0","isSystem":true,"isBind":true,"isOpen":true}]' WHERE CONFIG_NAME='allowWallet';
+
+-- ALTER TABLE `AR_USER_WALLET`
+-- MODIFY COLUMN `CASH` decimal(16, 2) UNSIGNED NOT NULL DEFAULT 0.00 AFTER `USER_ID`;
+-- ALTER TABLE `AR_USER_BONUS`
+-- MODIFY COLUMN `BONUS` decimal(16, 2) UNSIGNED NOT NULL DEFAULT 0.00 AFTER `USER_ID`;
+
+
+DROP TABLE IF EXISTS `AR_TMP_OLD_NETWORK`;
+CREATE TABLE `AR_TMP_OLD_NETWORK` (
+  `ID` varchar(32) NOT NULL,
+  `USER_NAME` varchar(16) NOT NULL,
+  `REAL_NAME` varchar(128) NOT NULL,
+  `PARENT_USER_NAME` varchar(16) NOT NULL,
+  `PARENT_REAL_NAME` varchar(128) NOT NULL,
+  `NET_USER_NAME` varchar(16) NOT NULL,
+  `NET_REAL_NAME` varchar(128) NOT NULL,
+  `SORT` int(10) UNSIGNED NOT NULL DEFAULT '0',
+  `NET_DEEP` int(10) UNSIGNED NOT NULL DEFAULT '0',
+  `REC_DEEP` int(10) UNSIGNED NOT NULL DEFAULT '0',
+  PRIMARY KEY (`ID`),
+  KEY `USER_NAME` (`USER_NAME`) USING BTREE,
+  KEY `PARENT_USER_NAME` (`PARENT_USER_NAME`) USING BTREE,
+  KEY `NET_USER_NAME` (`NET_USER_NAME`) USING BTREE,
+  KEY `SORT` (`SORT`) USING BTREE,
+  KEY `NET_DEEP` (`NET_DEEP`) USING BTREE,
+  KEY `REC_DEEP` (`REC_DEEP`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='excel新增会员关系临时表';
+
+
+CREATE TABLE `AR_TMP_OLD_NETWORK_ALL` (
+  `ID` varchar(32) NOT NULL,
+  `USER_NAME` varchar(16) NOT NULL,
+  `REAL_NAME` varchar(128) NOT NULL,
+  `PARENT_USER_NAME` varchar(16) NOT NULL,
+  `PARENT_REAL_NAME` varchar(128) NOT NULL,
+  `NET_USER_NAME` varchar(16) NOT NULL,
+  `NET_REAL_NAME` varchar(128) NOT NULL,
+  `REC_DEEP` int(10) UNSIGNED NOT NULL DEFAULT '0',
+  `NET_DEEP` int(10) UNSIGNED NOT NULL DEFAULT '0',
+  `SORT` int(10) UNSIGNED NOT NULL DEFAULT '0',
+  `NET_SAME` tinyint(2) NOT NULL DEFAULT '0' COMMENT '相同0 不同1',
+  `REC_SAME` tinyint(2) NOT NULL DEFAULT '0',
+  `OLD_IS_EXSIT` tinyint(2) NOT NULL DEFAULT '0' COMMENT '0 不存在 1 存在',
+  PRIMARY KEY (`ID`),
+  KEY `USER_NAME` (`USER_NAME`) USING BTREE,
+  KEY `PARENT_USER_NAME` (`PARENT_USER_NAME`) USING BTREE,
+  KEY `NET_USER_NAME` (`NET_USER_NAME`) USING BTREE,
+  KEY `SORT` (`SORT`) USING BTREE,
+  KEY `NET_DEEP` (`NET_DEEP`) USING BTREE,
+  KEY `REC_DEEP` (`REC_DEEP`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='老系统总会员关系临时表';
+
+
+
+CREATE TABLE `AR_TMP_DELETE_USER` (
+  `ID` varchar(32) NOT NULL,
+  `USER_NAME` varchar(16) NOT NULL,
+  `REAL_NAME` varchar(128) NOT NULL,
+  `USER_ID` varchar(32) NOT NULL COMMENT '用户ID',
+  PRIMARY KEY (`ID`),
+  KEY `USER_ID` (`USER_ID`) USING BTREE,
+  KEY `USER_NAME` (`USER_NAME`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='线上会员多于34w的会员';
+
+
+
+CREATE TABLE `AR_TMP_OLD_NETWORK_ERROR` (
+  `ID` varchar(32) NOT NULL,
+  `USER_NAME` varchar(16) NOT NULL,
+  `REAL_NAME` varchar(128) NOT NULL,
+  `PARENT_USER_NAME` varchar(16) NOT NULL,
+  `PARENT_REAL_NAME` varchar(128) NOT NULL,
+  `NET_USER_NAME` varchar(16) NOT NULL,
+  `NET_REAL_NAME` varchar(128) NOT NULL,
+  `REC_DEEP` int(10) UNSIGNED NOT NULL DEFAULT '0',
+  `NET_DEEP` int(10) UNSIGNED NOT NULL DEFAULT '0',
+  `SORT` int(10) UNSIGNED NOT NULL DEFAULT '0',
+  PRIMARY KEY (`ID`),
+  KEY `USER_NAME` (`USER_NAME`) USING BTREE,
+  KEY `PARENT_USER_NAME` (`PARENT_USER_NAME`) USING BTREE,
+  KEY `NET_USER_NAME` (`NET_USER_NAME`) USING BTREE,
+  KEY `SORT` (`SORT`) USING BTREE,
+  KEY `NET_DEEP` (`NET_DEEP`) USING BTREE,
+  KEY `REC_DEEP` (`REC_DEEP`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='改错表';
+
+
+
+CREATE TABLE `AR_USER_REG` (
+  `ID` varchar(32) NOT NULL,
+  `USER_NAME` varchar(16) NOT NULL,
+  `REAL_NAME` varchar(128) NOT NULL,
+  `CON_UID` varchar(32) NOT NULL,
+  `REC_UID` varchar(32) NOT NULL,
+  `PARENT_USER_NAME` varchar(16) NOT NULL,
+  `PARENT_REAL_NAME` varchar(128) NOT NULL,
+  `NET_USER_NAME` varchar(16) NOT NULL,
+  `NET_REAL_NAME` varchar(128) NOT NULL,
+  PRIMARY KEY (`ID`),
+  KEY `USER_NAME` (`USER_NAME`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='正式站报单用户44';
+