<!--
  @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"
    append-to-body
    custom-class="el-dialog__body-p8 el-dialog_table"
  >
    <orderReceiptCreateAdd
      v-if="dialogDataVisible"
      ref="orderReceiptCreate"
      :order-receipt-info="orderReceiptInfo"
      @close="handelClose"
    />
    <span slot="footer" class="dialog-footer">
      <el-button type="primary" @click="ensure('formData')">
        确 定
      </el-button>
      <el-button @click="handelClose">取 消</el-button>
    </span>
  </el-dialog>
</template>

<script>
import orderReceiptCreateAdd from './orderReceiptCreate-add'
export default {
  name: 'OrderReceiptCreateDialog',
  components: {
    orderReceiptCreateAdd
  },
  data() {
    return {
      dialogDataVisible: false,
      orderReceiptInfo: {}
    }
  },
  methods: {
    // 生成收款单打开弹框
    openOrderReceiptCreate(data) {
      this.orderReceiptInfo = data
      this.dialogDataVisible = true
    },
    // 确定生成收款单
    ensure() {
      this.$refs.orderReceiptCreate.submit()
    },
    handelClose() {
      this.$emit('close')
      this.dialogDataVisible = false
    }
  }
}
</script>

<style scoped lang="less">
</style>
