Kaynağa Gözat

ng新增团队查询,请求计算服务系统

theojeng 3 yıl önce
ebeveyn
işleme
5dca496b35

+ 1 - 0
backendApi/config/urlManagerRules.php

@@ -571,6 +571,7 @@ return [
         'extraPatterns' => [
             'GET record-list/<periodNum>' => 'record-list',
             'GET auto-calc/<periodNum>' => 'auto-calc',
+            'GET auto-perf/<periodNum>' => 'auto-perf',
             'GET perf-order/<periodNum>' => 'perf-order',
             'GET init-data/<periodNum>' => 'init-data',
             'GET calc-perf-period/<periodNum>' => 'calc-perf-period',

+ 25 - 0
backendApi/modules/v1/controllers/CalcController.php

@@ -27,6 +27,31 @@ class CalcController extends BaseController
         return $behaviors;
     }
 
+    public function actionAutoPerf() {
+        $periodNum = \Yii::$app->request->get('periodNum');
+        if (!$periodNum) {
+            return static::notice('期数不存在', 400);
+        }
+        if (Period::isProcessing($periodNum)) {
+            return static::notice('有操作正在进行中请稍后', 400);
+        }
+        //设置计算进行中标识
+        Period::updatePeriodIsProcessing($periodNum, Period::IS_PROCESSING);
+        //设置自动计算标识
+        Period::updatePeriodIsAutoExec($periodNum, Period::MANUAL_EXEC_CALC);
+        //记录开始计算的时间
+        Period::updateAll(['START_EXEC_TIME' => time()], ['PERIOD_NUM' => $periodNum]);
+
+        $formModel = new PeriodForm();
+        $formModel->scenario = 'autoPerf';
+
+        if ($formModel->load(Yii::$app->request->get(), '') && $formModel->autoPerf()) {
+            return static::notice('自动计算已开始,请等待');
+        } else {
+            return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
+        }
+    }
+
     public function actionAutoCalc()
     {
         $periodNum = \Yii::$app->request->get('periodNum');

+ 23 - 5
backendEle/src/views/bonus/period.vue

@@ -67,6 +67,7 @@
         </el-table-column>
         <el-table-column fixed="right" label="Action" width="180"><!-- 操作 -->
           <template slot-scope="scope">
+            <el-button class="button" type="primary" @click.native="autoPerfHandle(scope.row.PERIOD_NUM)" >预计算</el-button>
             <el-button v-if="scope.row.IS_CAN_CLOSE && permission.hasPermission(`bonus/close-period`)" type="primary" class="button"
                        @click.native="closeHandle(scope.row)">
               Closure period<!-- 封期 -->
@@ -104,6 +105,7 @@
                   <el-row><el-button class="button" type="primary" @click.native="pullPerfPeriodHandle(currentPeriod)" >拉取期业绩</el-button></el-row>
                   <el-row><el-button class="button" type="primary" @click.native="calcBonusHandle(currentPeriod)" >计算奖金</el-button></el-row>
                   <el-row><el-button class="button" type="primary" @click.native="pullBonusHandle(currentPeriod)" >拉取奖金数据</el-button></el-row>
+<!--                  <el-row><el-button class="button" type="primary" @click.native="autoPerfHandle(currentPeriod)" >计算和拉取期业绩</el-button></el-row>-->
                 </div>
               </div>
             </el-dialog>
@@ -368,8 +370,24 @@ export default {
       }).catch(response => {
       })
     },
+    autoPerfHandle (currentPeriod) {
+      this.$confirm('Confirm to calculate bonus data for the current period?', 'Hint', { // '确定对当前期进行生成业绩单操作?', '提示'
+        confirmButtonText: 'confirm', // 确定
+        cancelButtonText: 'cancel', // 取消
+        type: 'warning'
+      }).then(() => {
+        return network.getData(`calc/auto-perf/${currentPeriod}`)
+      }).then(response => {
+        this.$message({
+          message: response,
+          type: 'success'
+        })
+        this.getDialogData(this.currentPage, this.pageSize)
+      }).catch(response => {
+      })
+    },
 
-    getDialogData() {
+    getDialogData () {
       let vueObj = this
       let paramsData = {
         page: this.currentDialogPage,
@@ -380,11 +398,11 @@ export default {
           vueObj.dialogData = response.list
           vueObj.dialogLoading = false;
         }).catch(response => {
-        this.$message({
-          message: response,
-          type: 'fail'
+          this.$message({
+            message: response,
+            type: 'fail'
+          })
         })
-      })
     },
 
     closeHandle (row) {

+ 2 - 1
common/components/SwooleAsyncTimer.php

@@ -48,11 +48,12 @@ class SwooleAsyncTimer extends SwooleAsyncTimerComponent implements SocketInterf
      */
     public function timerCallback($timerId, $server){
         // 自动封期
-        AutoClosePeriod::instance()->autoClose();
+//        AutoClosePeriod::instance()->autoClose();
         // 自动执行任务队列中的任务
         Queue::instance()->consumeTask();
         // 实时监听计算系统修改的period表字段
         CalcConsole::listenCalcPeriod();
+        CalcConsole::listenAutoPerfPeriod();
         return true;
     }
 

+ 41 - 1
common/helpers/bonus/Calc/CalcConsole.php

@@ -23,7 +23,9 @@ class CalcConsole extends BaseBusiness
                 break;
             }
         }
-
+if (empty($period)){
+    return true;
+}
         $businessPeriod = Period::find()->where(['PERIOD_NUM' => $period['PERIOD_NUM']])
             ->asArray()->one();
         //用户选择是否自动执行
@@ -94,6 +96,44 @@ class CalcConsole extends BaseBusiness
         return true;
     }
 
+    public static function listenAutoPerfPeriod()
+    {
+        $db        = self::CALC_DB_NAME;
+        $allPeriod = \Yii::$app->$db->createCommand("SELECT * FROM AR_PERIOD ")->queryAll();
+        $period    = [];
+        foreach ($allPeriod as $v) {
+            if ($v['IS_PREPARE'] > 0
+                //&& todo 补全状态
+            ) {
+                $period = $v;
+                break;
+            }
+        }
+        if (empty($period)){
+            return true;
+        }
+        if (2 == $period['IS_PREPARE'] && 1 == $period['IS_PERFED']) {
+            //拉取期业绩
+            CalcRecord::record($period['PERIOD_NUM'], '第' . $period['PERIOD_NUM'] . '期的业绩数据已生成');
+            CalcRecord::record($period['PERIOD_NUM'], '开始获取第' . $period['PERIOD_NUM'] . '期的期业绩数据');
+
+            Period::updatePeriodIsProcessing($period['PERIOD_NUM'], Period::IS_PROCESSING);
+            $res = (new PullPerfDataFromCalc($period['PERIOD_NUM']))->start();
+            if (200 == $res['code']) {
+                Period::updatePeriodIsProcessing($period['PERIOD_NUM'], Period::NOT_PROCESSING);
+                CalcRecord::record($period['PERIOD_NUM'], '第' . $period['PERIOD_NUM'] . '期的期业绩数据已获取55');
+                \Yii::$app->$db->createCommand()->update('AR_PERIOD', ['IS_PERFED' => 3], 'PERIOD_NUM=:PERIOD_NUM', ['PERIOD_NUM' => $period['PERIOD_NUM']])->execute();
+                return $res;
+            } else {
+                //结束计算状态
+                Period::updatePeriodIsProcessing($period['PERIOD_NUM'], Period::NOT_PROCESSING);
+                CalcRecord::record($period['PERIOD_NUM'], '第' . $period['PERIOD_NUM'] . '期的期业绩数据获取失败,原因:' . $res['msg']);
+                return $res;
+            }
+        }
+        return true;
+    }
+
     /**
      * 同步计算系统的计算进度日志到业务系统计算步骤表
      * @param $periodNum

+ 9 - 0
common/models/PerfMonth.php

@@ -151,6 +151,15 @@ class PerfMonth extends \common\components\ActiveRecord
         return $result;
     }
 
+    // 校验业绩状态
+    public static function checkStatus($pv) {
+        if ($pv >= 300) {
+            return true;
+        }
+
+        return false;
+    }
+
     /**
      * 操作日志记录条件
      * @return array

+ 30 - 0
common/models/forms/PeriodForm.php

@@ -47,6 +47,7 @@ class PeriodForm extends Model
             'calc' => ['periodNum'],
             'send' => ['periodNum'],
             'autoClose' => ['periodNum'],
+            'autoPerf' => ['periodNum'],
         ];
         return array_merge($parentScenarios, $customScenarios);
     }
@@ -395,6 +396,35 @@ class PeriodForm extends Model
         return $model;
     }
 
+    /**
+     * 页面请求异步处理 自动计算
+     * @return string | null
+     */
+    public function autoPerf()
+    {
+        if (!$this->validate()) {
+            return null;
+        }
+//        // 把正在结算标记为真
+        $model = $this->_periodModel;
+//        $model->IS_CALCING    = 1;
+//        $model->CALC_ADMIN_ID = \Yii::$app->user->id;
+//        if (!$model->save()) {
+//            $this->addError('calc', Form::formatErrorsForApi($model->getErrors()));
+//            return null;
+//        }
+        // 异步处理添加任务
+        $settings      = \Yii::$app->params['swooleAsyncTimer'];
+        $bonusSettings = \Yii::$app->params['swooleBonusConfig'];
+        $settings      = array_merge($settings, $bonusSettings);
+        $taskKey       = \Yii::$app->swooleAsyncTimer->asyncHandle('calc/auto-perf', \Yii::$app->request->get(), $settings);
+        if ($taskKey === false) {
+            $this->addError('send', '请求失败');
+            return null;
+        }
+        return $model;
+    }
+
     /**
      * 页面请求异步处理 生成业绩单
      * @return string | null

+ 51 - 2
console/controllers/CalcController.php

@@ -36,7 +36,7 @@ class CalcController extends BaseController
             \Yii::$app->swooleAsyncTimer->pushAsyncResultToAdmin($params['handleUserId'], "第{$params['periodNum']}期生成业绩单更新成功");
             return true;
         } else {
-            self::recordCalcAndProcessStatus($periodNum, '业绩单生成失败,原因:' . $res['msg'] ?? '');
+            self::recordCalcAndProcessStatus($periodNum, '业绩单生成失败,原因:' . substr($res['msg'],0,1000) ?? '');
             \Yii::$app->swooleAsyncTimer->pushAsyncResultToAdmin($params['handleUserId'], "第{$params['periodNum']}期生成业绩单更新失败,原因:" . $res['msg'] ?? '', false);
             return false;
         }
@@ -60,7 +60,56 @@ class CalcController extends BaseController
             CalcRecord::record($periodNum, '业绩单已生成');
         } else {
             Period::updatePeriodIsProcessing($periodNum, Period::NOT_PROCESSING);
-            CalcRecord::record($periodNum, '第' . $periodNum . '期业绩单生成失败,原因:' . $res['msg']);
+            CalcRecord::record($periodNum, '第' . $periodNum . '期业绩单生成失败,原因:' . substr($res['msg'],0,100));
+            return false;
+        }
+
+        //推送基础数据
+        CalcRecord::record($periodNum, '开始推送基础数据');
+        $res = (new PushBaseDataToCalc($periodNum))->start();
+        if (200 == $res['code']) {
+            CalcRecord::record($periodNum, '基础数据完成推送');
+        } else {
+            Period::updatePeriodIsProcessing($periodNum, Period::NOT_PROCESSING);
+            CalcRecord::record($periodNum, '第' . $periodNum . '期基础数据推送失败,原因:' . $res['msg']);
+            return false;
+        }
+        //todo 完成需要修改状态
+
+        //通知结算系统生成期业绩
+        CalcRecord::record($periodNum, '开始生成' . $periodNum . '期的期业绩');
+        \Yii::$app->$db->createCommand()->update('AR_PERIOD', ['IS_PREPARE' => 1], 'PERIOD_NUM=' . $periodNum)->execute();
+        //todo 完成需要修改状态
+
+        //自动监听 拉取期业绩 并计算奖金
+//        (new PullPerfDataFromCalc($periodNum))->start();
+        //通知结算系统计算奖金
+//        \Yii::$app->$db->createCommand()->update('AR_PERIOD', ['IS_PREPARE' => 3], 'PERIOD_NUM=' . $periodNum)->execute();
+
+        //自动监听 计算完成 自动拉取奖金结果并修改状态
+//        (new PullCalcBonusData($period['PERIOD_NUM']))->start();
+        return true;
+    }
+
+    //自动计算业绩
+    public static function actionAutoPerf($taskKey): bool
+    {
+        $params    = Cache::getAsyncParams($taskKey);
+        $periodNum = $params['periodNum'] ?? 0;
+        //生成业绩单 状态已修改
+        CalcRecord::record($periodNum, '开始生成业绩单');
+        //重置业务系统的计算进度标识
+        \Yii::$app->db->createCommand()->update('AR_PERIOD', ['IS_PERFED' => 0, 'IS_CALCULATED' => 0], 'PERIOD_NUM=' . $periodNum)->execute();
+        //重置计算系统的计算进度标识
+        $db = CalcConsole::CALC_DB_NAME;
+        \Yii::$app->$db->createCommand()->update('AR_PERIOD', ['IS_PREPARE' => 0, 'IS_PERFED' => 0, 'IS_CALCULATED' => 0], 'PERIOD_NUM=' . $periodNum)->execute();
+
+        $res = (new GeneratePerfOrder($periodNum))->start();
+        if (200 == $res['code']) {
+            CalcRecord::record($periodNum, '业绩单已生成');
+        } else {
+            Period::updatePeriodIsProcessing($periodNum, Period::NOT_PROCESSING);
+            CalcRecord::record($periodNum, '第' . $periodNum . '期业绩单生成失败,原因:' . substr($res['msg'],0,100));
             return false;
         }
 

+ 1 - 0
frontendApi/config/menu.php

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

+ 1 - 0
frontendApi/config/urlManagerRules.php

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

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

@@ -35,6 +35,7 @@ use common\models\FlowExchangePoints;
 use common\models\ScoreMonth;
 use common\models\UserBonus;
 use common\models\UserWallet;
+use common\models\UserRelation;
 use frontendApi\modules\v1\models\User;
 
 class BonusController extends BaseController {
@@ -103,6 +104,75 @@ class BonusController extends BaseController {
         return static::notice(['wallet' => $wallet,'dealSwitch'=>$dealSwitch]);
     }
 
+    /**
+     * 团队查询
+     * @return mixed
+     * @throws \yii\web\HttpException
+     */
+    public function actionTeams() {
+        $userId = \Yii::$app->user->id;
+        $period = Period::instance();
+        $periodNum = $period->getNowPeriodNum();
+        $month = $period->getNowYearMonth();
+        $userInfo = User::getEnCodeInfo($userId);
+        $user[0] = [
+            'number' => $userInfo['USER_NAME'],
+            'name' => $userInfo['REAL_NAME'],
+            'perf_status' => '0', // 0  未达标  1为已达标
+            'perf_status_name' => '不达标',
+            'user_perf' => 0, // 个人业绩
+            'team_perf' => 0, // 团队新增累计业绩
+            'total_perf' => 0 // 合计业绩
+        ];
+        $teamInfo = [];
+        $calcAt = PerfMonth::find()->select(['CREATED_AT'])->where('CALC_MONTH=:CALC_MONTH', ['CALC_MONTH'=>$month])->asArray()->one();
+
+        if(!$calcAt){
+            $periodStartTime = $period->nowPeriodArr['START_TIME'];
+            return static::notice(['user' => $user,'team'=>[],'calcAt' => $periodStartTime]);
+        }
+        // 查询此用户的推荐(开拓)团队一级信息
+        $relation = UserRelation::getChildrenWithDeepAndLayer($userId, 1, 1, $periodNum);
+        $userStatusFlag = false;
+        if ($relation) {
+            // 循环一级开拓用户
+            foreach($relation as $k=>$v) {
+                // 获取此用户预计算月业绩
+                $relationPerf = PerfMonth::getMonthPerf($month, $v['USER_ID']);
+                if (empty($relationPerf)) {
+                    $relationPerf['PV_PCS'] = 0;
+                    $relationPerf['PV_PSS'] = 0;
+                }
+                $relationCheck = PerfMonth::checkStatus($relationPerf['PV_PCS']+$relationPerf['PV_PSS']);
+                $teamInfo[]['perf_status'] = $relationCheck ? '1' : '0';
+                if ($relationCheck) {
+                    $userStatusFlag = true; // 只要有一个达标,则个人就达标
+                    $teamInfo[$k]['number'] = '';
+                    $teamInfo[$k]['name'] = '';
+                    $teamInfo[$k]['user_perf'] = '';
+                    $teamInfo[$k]['team_perf'] = '';
+                    $teamInfo[$k]['total_perf'] = '';
+                    $teamInfo[$k]['perf_status'] = '1';
+                    $teamInfo[$k]['perf_status_name'] = '达标';
+                } else {
+                    $teamInfo[$k]['number'] = $v['USER_NAME'];
+                    $teamInfo[$k]['name'] = $v['REAL_NAME'];
+                    $teamInfo[$k]['user_perf'] = $relationPerf['PV_PCS'];
+                    $teamInfo[$k]['team_perf'] = $relationPerf['PV_PSS'];
+                    $teamInfo[$k]['total_perf'] = $relationPerf['PV_PCS']+$relationPerf['PV_PSS'];
+                    $teamInfo[$k]['perf_status'] = '0';
+                    $teamInfo[$k]['perf_status_name'] = '不达标';
+                } 
+            }
+        }
+        if ($userStatusFlag === true) {
+            $user[0]['perf_status'] = '1';
+            $user[0]['perf_status_name'] = '达标';
+        }
+        
+        return static::notice(['user' => $user,'team'=>$teamInfo,'calcAt' => $calcAt['CREATED_AT']]);
+    }
+
     /**
      * 交易记录
      * @return mixed

+ 1 - 0
frontendEle/package.json

@@ -22,6 +22,7 @@
     "countup.js": "^1.9.3",
     "echarts": "^4.1.0",
     "element-ui": "^2.13.0",
+    "moment": "^2.29.4",
     "font-awesome": "^4.7.0",
     "nix-tinymce": "^1.0.7",
     "v-charts": "^1.16.20",

+ 2 - 0
frontendEle/src/main.js

@@ -10,7 +10,9 @@ import router from './router'
 import axios from './utils/axiosPlugin'
 import errorInfo from './utils/errorCode'
 import webSocketService from './utils/websocket';
+import moment from 'moment'
 
+Vue.prototype.$moment = moment
 Vue.use(ElementUI,{locale})
 Vue.prototype.$webSocket = webSocketService;
 

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

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

+ 252 - 0
frontendEle/src/views/bonus/teams.vue

@@ -0,0 +1,252 @@
+<template>
+  <div v-loading="loading">
+    <el-table
+    border
+    :data="userData"
+    style="width: 100%"
+    :cell-style="tableCellStyle"
+    >
+    <el-table-column label="个人情况">
+      <el-table-column
+      type="index"
+      :index="indexMethod"
+          width="60px"
+          label=""
+          >
+        </el-table-column>
+        <el-table-column
+          prop="number"
+          label="会员编号"
+          >
+        </el-table-column>
+        <el-table-column
+          prop="name"
+          label="会员姓名"
+          >
+        </el-table-column>
+        <el-table-column
+          prop="perf_status_name"
+          label="状态"
+          >
+        </el-table-column>
+        <el-table-column
+          prop="user_perf"
+          label="个人业绩"
+          >
+        </el-table-column>
+         <el-table-column
+          prop="team_perf"
+          label="累计业绩"
+          >
+        </el-table-column>
+         <el-table-column
+          prop="total_perf"
+          label="合计"
+          >
+        </el-table-column>
+      </el-table-column>
+
+  </el-table>
+
+  <el-table
+    border
+    :data="tableData"
+    style="width: 100%;margin-top:20px;"
+    :cell-style="tableCellStyle"
+   >
+    <el-table-column label="团队情况">
+      <el-table-column
+      type="index"
+      :index="indexMethod"
+          width="60px"
+          label=""
+          >
+        </el-table-column>
+         <el-table-column
+          prop="number"
+          label="会员编号"
+          >
+        </el-table-column>
+        <el-table-column
+          prop="name"
+          label="会员姓名"
+          >
+        </el-table-column>
+        <el-table-column
+          class="dsdd"
+          prop="perf_status_name"
+          label="状态"
+          >
+        </el-table-column>
+        <el-table-column
+          prop="user_perf"
+          label="个人业绩"
+          >
+        </el-table-column>
+         <el-table-column
+          prop="team_perf"
+          label="累计业绩"
+          >
+        </el-table-column>
+         <el-table-column
+          prop="total_perf"
+          label="合计"
+          >
+        </el-table-column>
+      </el-table-column>
+
+  </el-table>
+  <el-descriptions  :column="2"  >
+  <el-descriptions-item label="最新计算时间" >{{getWatTime(calcTime)}}</el-descriptions-item>
+</el-descriptions>
+  </div>
+</template>
+
+<script>
+import network from '@/utils/network'
+import tool from '@/utils/tool'
+import Pagination from '@/components/Pagination'
+
+export default {
+  name: 'bonus_teams',
+  components: {Pagination},
+  mounted () {
+    this.getData()
+  },
+  data () {
+    return {
+      calcTime: '',
+      userData: [],
+      tableData: [],
+      allData: null,
+      walletData: null,
+      dealSwitch: null,
+      loading: true,
+      dialogFlowVisible: false,
+      currentPage: 1,
+      totalPages: 1,
+      totalCount: 1,
+      pageSize: 20,
+      walletType: 'bonus',
+      walletName: '',
+      dialogLoading: false,
+      tool: tool,
+      createAt: '',
+      dealType: null,
+      remark: '',
+      dealTypes: []
+    }
+  },
+  methods: {
+    tableCellStyle ({row, column, rowIndex, columnIndex}) {
+      // console.log(row,column,rowIndex,columnIndex)
+      if (row.perf_status === '0' && columnIndex === 3) {
+        return 'background-color:rgb(225, 25, 98);font-weight:bold'
+      } else if (row.perf_status === '1' && columnIndex === 3) {
+        return 'background-color:rgb(31, 156, 18);font-weight:bold'
+      }
+    },
+    indexMethod (index) {
+      return index + 1
+    },
+    getData () {
+      let vueObj = this
+      vueObj.loading = true
+      network.getData('bonus/teams').then(response => {
+        this.userData = response.user
+        this.tableData = response.team
+        this.calcTime = response.calcAt
+        console.log(this.calcTime)
+        vueObj.loading = false
+      }).catch(response => {
+        vueObj.loading = false
+      })
+    },
+    showFlow (walletType, walletName) {
+      let vueObj = this
+      this.$message({
+        message: '正在获取数据',
+        type: 'info'
+      })
+      this.walletType = walletType
+      this.walletName = walletName
+      vueObj.dialogFlowVisible = true
+      vueObj.dialogLoading = true
+      this.handleFilterClear()
+    },
+    getWatTime (ts) {
+      ts = parseInt(ts)
+      if (ts) {
+        return this.$moment(ts * 1000).utcOffset('+0100').format('YYYY-MM-DD HH:mm:ss')
+      } else {
+        return ''
+      }
+    }
+  }
+}
+
+</script>
+<style scoped>
+  .leo-filter {
+    padding: 0 0 15px 0;
+  }
+
+  .leo-filter .filter-hidden {
+    display: none;
+  }
+
+  .filter-item {
+    margin-right: 10px;
+  }
+
+  @media (min-width: 768px) {
+    .leo-filter {
+    }
+
+    .leo-filter .filter-item {
+      display: inline-block;
+      max-width: 200px;
+    }
+
+    .leo-filter .filter-item.filter-date-month-picker {
+      display: inline-block;
+      max-width: 220px;
+    }
+
+    .leo-filter .filter-item.filter-date-range-picker {
+      display: inline-block;
+      max-width: 380px;
+    }
+
+    .leo-filter .filter-item.filter-filter-btn {
+      height: 38px;
+      width: 80px;
+    }
+
+    .leo-filter .filter-hidden {
+      display: none;
+    }
+  }
+</style>
+<style scoped>
+.dialog-footer:after{content: '';
+  clear: both;display: table;
+}
+.el-table .warning-row {
+  background: oldlace;
+}
+
+.el-table .success-row {
+  background: #f0f9eb;
+    /* color:rgb(225, 25, 98)   */
+}
+.el-descriptions {
+  margin-top:20px;
+}
+/deep/ .el-descriptions-item__container {
+  margin-top:10px;
+}
+/deep/ .el-descriptions-item__label.has-colon {
+  margin-left:10px;
+}
+</style>