<!--
  @description: 供应商联系人审核
  @author: gmy
  @routerPath:/procurement/procurementParticipateNobiddingclass
  @routerPath:/procurement/procurementDriveSupplier/procurementBiddingAudit
  @date: 2020-5-20 8:43:58
-->
<template>
  <div v-if="auditStatus!== ''" class="main">
    <!-- 审核不通过待审核页面 -->
    <contactsApplyAudit v-if="auditStatus === '00' || auditStatus === '01'" :project-data="projectCaseData" :procurement-sign-up-audit-list="procurementSignUpAuditList" />
    <!-- 审核不通过或首次提交页面 -->
    <contactsApplyAuditAdd v-if="auditStatus==='02'" :project-data="projectCaseData" :procurement-sign-up-audit-list="procurementSignUpAuditList" />
  </div>
</template>

<script>
/* api*/
import { notBiddingInfo } from '@/api/procurement/procurementSignup' // 供应商-报名可参与项目列表-非竞价数据 报名提交
import contactsApplyAudit from './procurementContactsApplyAudit-detail'
import contactsApplyAuditAdd from '../procurementContactsApplyInfo/procurementContactsApplyInfo-add'
import { procurementContactsApplyMinxs } from '../mixins/procurementContactsApplyMixins'

export default {
  name: 'ProcurementBiddingVue',
  inject: ['getTenderBase'],
  components: {
    contactsApplyAudit, // 待审核或者审核通过
    contactsApplyAuditAdd // 审核不通过
  },
  mixins: [procurementContactsApplyMinxs],
  data() {
    return {
      // 获取联系人数据参数
      pathData: {
        packId: '' // 标段Id
      },
      procurementSignUpAuditList: [], // 审核信息数据procurementSignUpAuditList: [], // 审核信息数据
      auditStatus: '', // 审核状态 00待审核 01 审核通过 02 审核不通过
      tenderBaer: this.getTenderBase() // 获取项目信息
    }
  },
  created() {
    this.pathData.packId = this.tenderBaer.packId
    this.initData(this.pathData)
  },
  methods: {
    // 获取采购项目信息
    initData(pathData) {
      notBiddingInfo(pathData).then((response) => {
        this.auditStatus = response.data.immediatelyQuotedPriceVo.auditStatus // 审核状态
        this.projectCaseData = response.data.immediatelyQuotedPriceVo // 采购项目信息
        this.procurementSignUpAuditList = response.data.procurementSignUpAuditList ? response.data.procurementSignUpAuditList : [] // 审核信息
      })
    }
  }
}
</script>

<style scoped>

</style>
