<template>
  <div v-if="data.status === '新建'" class="inline-16">
    <el-button size="mini" type="primary" @click="issusRow">下 达</el-button>
  </div>
</template>

<script>
export default {
  props:['data'],
  methods:{
    issusRow () {
      this.$confirm('是否确认下达项目目标,下达项目目标，则目标锁定，不可修改?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(async () => {
        const res = await this.$api.requested({
          "id": 20220901092502,
          "content": {
            "sa_salestargetbillid": this.data.sa_salestargetbillid
          },  
        })
        this.tool.showMessage(res,()=>{
          this.$emit('onSuccess')
        })
      })
    }
  }
}

</script>
<style>
</style>