<!--
  @description: 联系人信息-竞价类/非竞价类-报名详情-审核通过/审核不通过列表
  @Modifier：wxy
  @routerPath:/procurement/procurementDrive/supplierResponse/contactInfoAuditList
  @date：  2020-6-2 11:45:19
-->
<template>
  <div class="main">
    <p class="page-title">
      1、采购项目情况
    </p>
    <table class="tableData mb16">
      <tr>
        <td>采购项目名称</td>
        <td>
          {{ immediatelyQuotedPriceVo.tenderName }}
        </td>
        <td>采购项目编号</td>
        <td>
          {{ immediatelyQuotedPriceVo.tenderNo }}
        </td>
      </tr>
      <tr>
        <td>公告标题</td>
        <td colspan="3">
          {{ immediatelyQuotedPriceVo.title }}
        </td>
      </tr>
      <tr>
        <td>采购单位</td>
        <td colspan="3">
          {{ immediatelyQuotedPriceVo.projectBuyersName }}
        </td>
      </tr>
      <tr>
        <td>公告发布时间</td>
        <td>{{ immediatelyQuotedPriceVo.publishTime }}</td>
        <td>报价截止时间</td>
        <td>{{ immediatelyQuotedPriceVo.quoteEndTime }}</td>
      </tr>
    </table>
    <p class="page-title">
      2、联系人信息
    </p>
    <table class="tableData mb16">
      <tr>
        <td>单位名称</td>
        <td>{{ immediatelyQuotedPriceVo.supplierName }}</td>
        <td>联系人</td>
        <td>{{ immediatelyQuotedPriceVo.linker }}</td>
      </tr>
      <tr>
        <td>联系电话</td>
        <td>{{ immediatelyQuotedPriceVo.linkerTel }}</td>
        <td>邮箱</td>
        <td>{{ immediatelyQuotedPriceVo.linkerEmail }}</td>
      </tr>
      <tr>
        <td>附件</td>
        <td colspan="3">
          <downloadFile :data="upLoadData" />
        </td>
      </tr>
    </table>
    <p v-if="immediatelyQuotedPriceVo.tenderMethod === '14'||immediatelyQuotedPriceVo.tenderMethod==='15'" class="page-title">
      3、响应条件
    </p>
    <section v-if="immediatelyQuotedPriceVo.tenderMethod === '14'||immediatelyQuotedPriceVo.tenderMethod==='15'">
      <el-table
        ref="smallTable"
        :data="signUpList"
        class="tableLimit mb16"
      >
        <el-table-column
          type="index"
          label="序号"
          width="60"
          align="center"
        />
        <el-table-column
          prop="conditionName"
          label="响应条件名称"
          header-align="center"
        />
        <el-table-column
          prop="conditionContent"
          align="left"
          label="响应条件内容"
          header-align="center"
        />
        <el-table-column
          prop="conditionState"
          align="center"
          label="响应情况"
          header-align="center"
        />
        <el-table-column
          prop="remark"
          align="left"
          label="备注"
          header-align="center"
        />
      </el-table>
    </section>
    <p class="page-title">
      审核消息
    </p>
    <section>
      <el-table
        ref="smallTable"
        :data="procurementSignUpAuditList"
      >
        <el-table-column
          prop="auditTime"
          label="审核时间"
          align="center"
        />
        <el-table-column
          prop="auditUserRealName"
          label="审核人"
          header-align="center"
        />
        <el-table-column
          prop="auditStatus"
          align="center"
          label="审核状态"
          header-align="center"
        >
          <template slot-scope="scope">
            <!-- 判断审核状态 00未审核  01审核通过  02审核未通过 -->
            <span v-if="scope.row.auditStatus === '00'">未审核</span>
            <span v-else-if="scope.row.auditStatus === '01'">审核通过</span>
            <span v-else>审核不通过</span>
          </template>
        </el-table-column>
        <el-table-column
          prop="auditNotPassReason"
          align="left"
          label="审核意见"
          header-align="center"
        />
      </el-table>
    </section>
    <!--操作按钮-->
    <div class="but_footer">
      <div class="but_footer-h">
        <div class="but_footer-but">
          <el-button @click="close">
            关闭
          </el-button>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
/** api */
import { immediatelyQuotedPrice } from '@/api/procurement/procurementSignup'
import downloadFile from '@comp/common/updownload/downloadFile.vue'
export default {
  inject: ['getTenderBase'],
  components: {
    downloadFile
  },
  data() {
    return {
      tableData: [],
      immediatelyQuotedPriceVo: {}, // 采购项目详情
      procurementSignUpAuditList: [], // 审核信息
      upLoadData: { // 附件
        bizId: this.$route.query.data.id,
        fileType: 'pay_extinfo_invoice_attachment_base'
      },
      signUpList: [], // 响应情况
      tenderBase: this.getTenderBase() // 获取项目信息
    }
  },
  created() {
    // 查询邀请函信息
    this.initData()
  },
  methods: {
    // 获取邀请函信息
    initData() {
      const data = {
        packId: this.tenderBase.packId,
        supplierId: this.$route.query.data.supplierId
      }
      immediatelyQuotedPrice(data).then(res => {
        if (res.header.ret === '0') {
          this.immediatelyQuotedPriceVo = { ...res.data.immediatelyQuotedPriceVo }
          this.procurementSignUpAuditList = res.data.procurementSignUpAuditList
          this.signUpList = res.data.signUpConditionVoList
        }
      })
    },
    // 关闭
    close() {
      this.$router.history.go('-1')
    }
  }
}
</script>

<style>

</style>
