<!--
  @description:采购-报价-采购项目信息
  @Modifier:gmy
  @date:2020/10/8-14:58
-->
<template>
  <div class="mb16">
    <table v-if="projectBase" class="tableData">
      <tr>
        <td>采购执行单位</td>
        <td>
          <p>{{ projectBase.projectBuyersName }}</p>
        </td>
        <td>采购项目编号</td>
        <td>
          <p>{{ projectBase.tenderNo }}</p>
        </td>
      </tr>
      <tr>
        <td>采购方式</td>
        <td>
          <p>{{ filterDictText(tender_methodList,projectBase.tenderMethod) }}</p>
        </td>
        <td>公开/邀请</td>
        <td>
          <p>{{ filterDictText(tenderTypeList,projectBase.tenderType) }}</p>
        </td>
      </tr>
      <tr>
        <td>采购组织形式</td>
        <td colspan="3">
          <p>{{ filterDictText(plan_purchase_organizationList,projectBase.tenderOrgMethod) }}</p>
        </td>
      </tr>
      <tr>
        <td>付款方式</td>
        <td>{{ filterDictText(protproject_payTypeList,projectBase.payType) }}</td>
        <td>是否含运费</td>
        <td>{{ filterDictText(protproject_containsFreightList,projectBase.isContainsFreight) }}</td>
      </tr>
      <!-- tenderMethod采购方式 11询价 12单一来源 13竞争性谈判 14竞价 12单一来源不显示报价截止时间-->
      <template v-if="tenderBase.tenderMethod==='12'">
        <tr>
          <!-- 报价有效期 -->
          <td>报价有效期</td>
          <td colspan="3">
            <p v-if="projectBase.quoteValidity">
              {{ $Moment(projectBase.quoteValidity).format( momentDate) }}
            </p>
          </td>
        </tr>
      </template>
      <!-- tenderMethod采购方式 11询价 12单一来源 13竞争性谈判 14竞价 除单一来源外的采购方式的项目都显示报价截止时间-->
      <template v-if="tenderBase.tenderMethod!=='12'">
        <!-- 报价截止时间 -->
        <tr>
          <td>报价截止时间</td>
          <td>
            <p v-if="projectBase.quoteEndTime">
              {{ $Moment(projectBase.quoteEndTime).format( momentDateTime) }}
            </p>
          </td>
          <!-- 报价有效期 -->
          <td>报价有效期</td>
          <td>
            <p v-if="projectBase.quoteValidity">
              {{ $Moment(projectBase.quoteValidity).format( momentDate) }}
            </p>
          </td>
        </tr>
      </template>
      <template v-if="tenderBase.tenderMethod!=='11' && activeValue!=0">
        <!-- 报价说明文件 -->
        <tr>
          <td>报价说明文件</td>
          <td colspan="3">
            <downloadFile :data="quotationDescriptionFileData" :dis-block="'block'" />
          </td>
        </tr>
        <tr>
          <td>谈判说明</td>
          <td colspan="3">
            {{ projectBase.negotiationsThat }}
          </td>
        </tr>
      </template>
    </table>
  </div>
</template>

<script>
/* 组件*/
import downloadFile from '@comp/common/updownload/downloadFile' // 上传文件反显
/* 公共方法 */
import { filterDictText } from '@/assets/js/utils' // 计算总价 randomData
import { procurementOfferMixin } from '@/views/procurement/procurementOffer/mixins/procurementOfferMixin'
import { procurementGroupMixins } from '@/views/procurement/mixins/procurementGrounpMixins' // 公共字典

export default {
  name: 'ProcurementOfferProjectCompVue',
  inject: ['getTenderBase'],
  components: {
    downloadFile
  },
  mixins: [procurementGroupMixins, procurementOfferMixin],
  props: {
    // 项目基本信息
    projectBase: {
      type: Object,
      default: () => {
        return {}
      }
    },
    stageId: {
      type: String,
      default: ''
    },
    // 当前轮次
    activeValue: {
      type: String,
      default: ''
    }
  },
  data() {
    return {
      tenderBase: this.getTenderBase()
    }
  },
  created() {
    if (this.activeValue !== '0') {
      this.$forceUpdate()
    }
    this.quotationDescriptionFileData.bizId = this.stageId
    // 查看项目信息
    this.initWebTypeGroup()
    // 查询项目字典方法
    this.initqueryProcurementProjectRuleInitInfo()
  },
  methods: {
    filterDictText
  }
}
</script>

<style>

</style>
