WithdrawalDialog.vue 1.09 KB
<template>
  <el-dialog title='提示' :visible.sync='dialogVisible' width='30%'>
    <div v-html='textTooltip'></div>
    <span slot='footer' class='dialog-footer'>
        <el-button @click='dialogVisible = false'>取 消</el-button>
        <el-button type='primary' @click='comfirmDialog()'
        >确 定</el-button
        >
      </span>
  </el-dialog>
</template>

<script>
import { withdrawalApi } from '@/api/withdrawalManagement'

export default {
  name: 'WithdrawalDialog',
  props: ['textTooltip', 'auditId'],
  data() {
    return {
      dialogVisible: false
    }
  },
  methods: {
   async  comfirmDialog() {
      const params = {
        ...JSON.parse(JSON.stringify(
          { idList: this.auditId }
        ))
      }
      await withdrawalApi.batchWithdrawal(params).then(res => {
        if (res.code == '0'){
          this.$message.success('审核成功')
          this.dialogVisible = false
        }else{
          this.$message.error('审核失败')
        }
      }).catch(err =>{
        this.$message.error('审核失败')
      })
    }
  }
}
</script>

<style scoped>

</style>