
<!--
  @description: 采购-查看供应商报价信息
  @Modifier：gmy
  @routerPath:
  @date：  2020-09-23 15:00:28
-->
<template>
  <el-dialog
    v-dialogDrag
    :visible.sync="dialogData.dialog"
    :close-on-click-modal="false"
    append-to-body
    title="供应商报价单查看"
    width="1160px"
    custom-class="el-dialog__body-p8 el-dialog_table"
  >
    <div>
      <!-- 采购单查看 -->
      <procurementOrderSuppLierInfo
        v-if="orderSupplierOfferInfo.supplierId"
        :key="new Date()*1"
        :order-supplier-offer-info="orderSupplierOfferInfo"
      />
    </div>
    <span slot="footer" class="dialog-footer">
      <el-button @click="closeDialog">
        关闭
      </el-button>
    </span>
  </el-dialog>
</template>

<script>
/* 供应商报价单查看组件*/
import procurementOrderSuppLierInfo from '@/views/procurement/procurementOffer/procurementOfferUnderWay/procurementOfferUnderWay-detail'
export default {
  name: 'ProcurementOrderSupplierOfferInfoDialog',
  components: {
    procurementOrderSuppLierInfo
  },
  mixins: [],
  props: {
    dialogData: {
      type: Object,
      default: function() {
        return
      }
    }
  },
  data() {
    return {
      // 订单-供应商查看数据
      orderSupplierOfferInfo: {
        stageId: '', // 项目id
        packId: '', // 标段id
        supplierId: '' // 供应商id
      }
    }
  },
  watch: {
    'dialogData.dialog'(val) {
      if (val) {
        // 标段id
        this.orderSupplierOfferInfo.packId = this.dialogData.packId
        // 轮次id
        this.orderSupplierOfferInfo.stageId = this.dialogData.stageId
        // 供应商id
        this.orderSupplierOfferInfo.supplierId = this.dialogData.supplierId
      }
    }
  },
  methods: {
    // 关闭弹框
    closeDialog() {
      this.dialogData.dialog = false
    }
  }
}
</script>

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