<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>
      </tr>
      <tr v-for="(item,index) in dataList" :key="index">
        <td>{{item.BName}}</td>
        <td>{{item.DName}}</td>
        <td>{{item.UName}}</td>
        <td> {{item.CommissionPercent}} %
        </td>
        <td>
          {{item.CommissionMoney}}
        </td>
        <td>
          {{item.Periods}}
        </td>
      </tr>
    </table>
  </div>
</template>
<script>
  export default {
    data() {
      return {
        msg: {
          MainId: 0
        },
        loading: false,
        //数据源
        dataList: [],
      }
    },
    mounted() {
      let userInfo = this.getLocalStorage()
      this.msg.MainId = this.$route.query.ID;
      this.getList();
    },
    methods: {
      //获取数据
      getList() {
        this.loading = true;
        this.apipost(
          "ViittoCommission_get_GetViittoListService",
          this.msg,
          res => {
            this.loading = false;
            if (res.data.resultCode == 1) {
              this.dataList = res.data.data;
            } else {
              this.Error(res.data.message);
            }
          },
          null
        );
      },
    },
  }

</script>