<template>
  <div class="inline-16">
    <el-button type="default" size="small" @click="onDel">{{status === '已审核'?'反审核':'审 核'}}</el-button>
  </div>
</template>

<script>
export default {
  props:['status'],
  methods:{
    onDel () {
       this.$confirm(`确认${this.status === '已审核'?'反审核':'审核'}吗?`, '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(async () => {
        const res = await this.$api.requested({
         "classname":"webmanage.saletool.orderclue.orderclue",
          "method": "check",
          "content": {
            "sat_orderclueuploadbillid": this.$route.query.id,
            "ischeck":this.status === '已审核'?false:true
          }
        })
        this.tool.showMessage(res,()=>{
          this.$emit('onSuccess')
        })
      })
      
    }
  }
}

</script>
<style>
</style>