<template>
  <div>
    <el-button type="primary" size="mini" :disabled="disabled" @click="calc">分 摊</el-button>
  </div>
</template>

<script>
export default {
  props:['disabled'],
  name: '',
  data() {
    return {
    };
  },
  computed:{
  },
  watch:{
  },
  methods: {
    async calc () {
      this.$confirm(`确定分摊计算当前核销单吗?`,'提示',{
        "confirmButtonText":'确定',
        "cancelButtonText":'取消'
      }).then( async () => {
        let res = await this.$api.requested({
        "id":20221125113104,
          "content": {
            sa_writeoffbillid:this.$route.query.id
          }
        })
        this.tool.showMessage(res,() => {
          this.$emit('onSuccess')
        })
      })

      
    }
  },
};
</script>

<style scoped>

</style>
