<!--
  @description: 订单管理-查询
  @author: 郝定康
  @date： 2021-1-8 10:30:12
-->
<template>
  <el-dialog
    :visible.sync="dialogData.dialog"
    :close-on-click-modal="false"
    :lock-scroll="false"
    class="procurement-result-dialog"
    title="采购单编号"
    width="1200px"
    custom-class="el-dialog_table el-dialog__body-p8"
  >
    <procurementResultGoodsAllotComp v-if="dialogData.dialog" :goods-data="dialogData.projectData" :audit-mark="false" :is-detail="true" :is-show-but="false" />
  </el-dialog>
</template>

<script>
/* 组件 */
import procurementResultGoodsAllotComp from '@views/procurement/procurementResult/procurementResultGoodsAllot/procurementResultGoodsAllotComp'// 来源编号
export default {
  name: 'ProcurementResultDialog',
  components: {
    procurementResultGoodsAllotComp // 采购单编号
  },
  props: {
    dialogData: {
      type: Object,
      default: function() {
        return {
          dialog: false,
          projectData: {}
        }
      }
    }
  },
  data() {
    return {
      // 业务参数
      goodsData: {
        tenderId: ''// 项目id
      }
    }
  },
  watch: {
    dialogData: {
      handler(val) {
        if (val) {
          this.init()// 初始化
        }
      },
      deep: true,
      immediate: true
    }
  },
  created() {
    // this.init()// 初始化
  },
  methods: {
    // 初始化
    init() {
      this.goodsData.tenderId = this.dialogData.projectData.tenderId // 项目id
    }
  }
}
</script>

<style lang="less" scoped>
  .procurement-result-dialog /deep/.el-dialog__body{
    padding: 10px;
  }
</style>
