<!--
  @description: 减免收费单-弹窗
  @Modifier：王俊楠
  @routerPath:
  @date：  2020-11-03 09:31:27
-->
<template>
  <el-dialog
    :visible.sync="dialogDataVisible"
    :close-on-click-modal="false"
    :lock-scroll="false"
    title="减免收费单"
    width="1080px"
    custom-class="el-dialog__body-p8 el-dialog_table"
  >
    <orderReceiptCancelAdd
      v-if="dialogDataVisible"
      ref="orderReceiptCance"
      :order-receipt-info="orderReceiptInfo"
      @close="handelClose"
    />
    <span slot="footer" class="dialog-footer">
      <el-button type="primary" @click="ensure">
        确 定
      </el-button>
      <el-button @click="handelClose">取 消</el-button>
    </span>
  </el-dialog>
</template>

<script>
import orderReceiptCancelAdd from './orderReceiptCancel-add'
export default {
  name: 'OrderReceiptCancelDialog',
  components: {
    orderReceiptCancelAdd
  },
  data() {
    return {
      dialogDataVisible: false,
      orderReceiptInfo: {}
    }
  },
  methods: {
    // 减免收费单打开弹框
    openOrderReceiptCancel(data) {
      this.orderReceiptInfo = data
      this.dialogDataVisible = true
    },
    // 确定减免收费单
    ensure() {
      this.$refs.orderReceiptCance.submit()
    },
    handelClose() {
      this.$emit('close')
      this.dialogDataVisible = false
    }
  }
}
</script>
