<style>

</style>
<template>
    <div class="Business">
      <div class="add-Enclosure" v-show="false">
        <el-button icon="el-icon-plus" class="crm-btn query-btn crm-btn-mini margin-right0" @click="addBusiness">新建商机</el-button>
      </div>
      <el-table
        v-loading="loading"
        stripe
        ref="multipleTable"
        :data="dataList"
        tooltip-effect="dark"
        style="width: 100%"
        row-class-name="font-size-12">
        <el-table-column 
            prop="BusinessName"
            label="商机名称"
            show-overflow-tooltip>
        </el-table-column>
        <el-table-column 
            prop="BudgetPrice"
            label="商机金额"
            show-overflow-tooltip>
        </el-table-column>
        <el-table-column 
            prop="CustomerName"
            label="客户名称"
            show-overflow-tooltip>
        </el-table-column>
        <el-table-column 
            prop="BusinessStatusStr"
            label="商机阶段"
            show-overflow-tooltip>
        </el-table-column>
      </el-table>
    </div>
</template>
<script>
export default {
  props: ['ID', 'BusinessType'],
  data() {
    return {
      dataList: [],
      loading: false
    };
  },watch:{
    
 },
  mounted() {
      this.GetBusinessList()
    
  },
  methods: {
    GetBusinessList(){
      this.apipost('/api/Customer/GetBusinessList', {CustomerId: this.ID}, res=>{
        if (res.data.resultCode == 1) {
          console.log(res.data.data)
          this.dataList = res.data.data
        } else {
          this.$message.error(res.data.message);
        }
      })
    },
    addBusiness(){
      let $this= this
      this.MsgBus.$emit('addBusinessBoxOpen', $this.ID, 0)
    },
    guanlian(){

    },
    jiechuguanlian(){

    },
  }
}
</script>