<style>
  .CM_look {
    padding: 4px !important;
    position: relative;
    top: 1px;
  }

</style>
<template>
  <div class="flexOne">
    <table class="singeRowTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading">
      <tr>
        <th>公司</th>
        <th>部门</th>
        <th>姓名</th>
        <th>总人数</th>
        <th>提成金额</th>
        <th>期数</th>
        <th>详情</th>
      </tr>
      <tr v-for="item in dataList">
        <td>{{item.BName}}</td>
        <td>{{item.DName}}</td>
        <td>{{item.UName}}</td>
        <td>{{item.TotalPersion}}</td>
        <td>{{item.CommissionMoney}}</td>
        <td>{{item.Periods}}</td>
        <td><a @click="goUrl(item)" style="color:blue;text-decoration:underline;cursor:pointer;">详情</a></td>
      </tr>
    </table>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        msg: {
          MainId: 0
        },
        loading: false,
        //数据源
        dataList: [],

      }
    },
    mounted() {
      this.msg.MainId = this.$route.query.ID;
      this.getList();
    },
    methods: {
      //获取数据
      getList() {
        this.loading = true;
        this.apipost(
          "AirTicketRules_post_GetAirticketCommissionDetails",
          this.msg,
          res => {
            this.loading = false;
            if (res.data.resultCode == 1) {
              this.dataList = res.data.data;
            } else {
              this.Error(res.data.message);
            }
          },
          null
        );
      },
      goUrl(item) {
        this.$router.push({
          path: "flightPerformance",
          query: {
            UserId:item.UserId,
            Periods:item.Periods,
            blank: 'y',
            tab: '票务业绩详情'
          }
        });
      }
    },
  }
</script>