<template>
  <div class="inline-16">
    <el-popconfirm title="确定删除当前订单吗？" @confirm="deleteRow()">
      <el-button slot="reference" type="text" size="mini" :disabled="disabled">删 除</el-button>
    </el-popconfirm>
  </div>
</template>

<script>
import { log } from '@antv/g2plot/lib/utils'
/* 
id:数据id
nameId:接口id
nameKey:接口字段
 */
export default {
  props: ['disabled','data'],
  data () {
    return {

    }
  },
  methods: {
    async deleteRow() {
      let res = await this.$api.requested({
        "id": 20221124091004,
        "content": {
            "sa_writeoffbillid":this.$route.query.id,
            "sa_writeoffbill_orderids":[this.data.sa_writeoffbill_orderid]
        }
      })
      this.tool.showMessage(res,() => {
        this.$emit('onSuccess')
      })
    },
  },
  created () {
    this.$emit('deleteCreate',this.param)
  }
}

</script>
