<template>
  <div >
    <el-button @click="deleteRow" slot="reference" size="mini" type="primary">终 止</el-button>
  </div>
</template>

<script>
export default {
  props: ['id'],
  methods: {
    deleteRow () {
      this.$confirm('确定终止当前合同吗？','提示',{
        confirmButtonText:'确定',
        cancelButtonText:'取消'
      }).then(async () => {
        let res = await this.$api.requested({
          "id": "20221212102802",
          "version": 1,
          "content": {
            "sa_contractid": this.id
          }
        })
        this.tool.showMessage(res, () => {
          this.$emit('onSuccess')
        })
      })
    },
  }
}

</script>
