<!--
  @description: 不分包查看已邀请供应商列表详情
  @Modifier: haoFx
  @routerPath:
  @date: 2020/3/8-14:42
-->
<template>
  <div>
    <el-table
      ref="multipleTable"
      :data="selectedBidderList"
    >
      <el-table-column
        type="index"
        label="序号"
        width="60"
        align="center"
      />
      <el-table-column
        header-align="center"
        prop="supplierName"
        min-width="260"
        label="投标人/投标人名称"
      />
      <el-table-column
        header-align="center"
        prop="linkName"
        label="联系人"
      />
      <el-table-column
        header-align="center"
        prop="linkTel"
        label="联系电话"
      />
      <el-table-column
        header-align="center"
        prop="email"
        label="邮箱"
      />
      <el-table-column
        prop="invitationStateType"
        label="状态"
        align="center"
      >
        <template slot-scope="scope">
          <span v-if="scope.row.invitationStateType==='00'" class="status3">拒绝</span>
          <span v-if="scope.row.invitationStateType==='01'" class="status1">接受</span>
          <span v-if="scope.row.invitationStateType==='02'" class="status2">待接受</span>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
/* api*/
import { getAddTenderInvitationSupplierDetailed } from '@/api/bidding/bidInvitation'
export default {
  name: 'NoPackageSupplierInvitationDetail',
  data() {
    return {
      flowStatus: this.$route.query.flowStatus, // true 工作流进入驳回编辑
      selectedBidderList: []
    }
  },
  created() {
    // 根据邀请函id 查询供应商明细
    this.getAddTenderInvitationSupplierDetail()
  },
  methods: {
    getAddTenderInvitationSupplierDetail() {
      // flowStatus为true 工作流进入 否则是驱动进入
      const invitationId = this.flowStatus ? this.$route.query.bizId : this.$route.query.invitationId
      getAddTenderInvitationSupplierDetailed(invitationId).then(res => {
        this.selectedBidderList = res.data
        this.$emit('getSupplier', this.selectedBidderList)
      }).catch(() => {

      })
    }
  }
}
</script>

<style scoped>

</style>
