<template>
  <div style="display:inline;margin:0 16px">
    <el-popconfirm title="确定删除当前产品吗？" @confirm="deleteRow()">
      <el-button slot="reference" size="small" type="text" :disabled="!rowData.itemclassname && projectid == 0">删 除</el-button>
    </el-popconfirm>
  </div>
</template>

<script>
export default {
  props: ['rowData','projectid'],
  methods: {
    async deleteRow() {
      let res = await this.$api.requested({
        "id": 20220906155103,
        "version":1,
        "content": {
            "sa_salesforecastid":this.rowData.sa_salesforecastid,
            "sa_projectid":this.projectid,
            "sa_salesforecastbillid":this.rowData.sa_salesforecastbillid
        }
      })
      this.tool.showMessage(res,() => {
        console.log(111);
        
        this.$emit('deleteSuccess')
      })
    },
  }
}

</script>
