<template>
  <div>
    <el-popconfirm
        title="确定解锁该客户吗？"
        @confirm="onUnLock()">
      <el-button style="width:100%" slot="reference" block size="small" >解锁</el-button>
    </el-popconfirm>
  </div>
</template>

<script>
export default {
  name: "unlock",
  props:["id"],
  methods:{
    async onUnLock(){
      const res = await this.$api.requested({
        "id": 20221012164002,
        "content": {
          "sa_customersids": [this.id],
          "datastatus": 0//（0:正常；1:作废；2:锁定）
        },
      })
      this.tool.showMessage(res,() => {
        this.$emit("onshow")
      })
    }
  }
}
</script>

<style scoped>

</style>