<template>
  <div>
    <el-button style="width:100%" slot="reference" block size="small" @click="onLock()">锁定</el-button>
  </div>
</template>

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

    }
  }
}
</script>

<style scoped>

</style>