<!--
  @description: 正在参与项目-采购文件-缴费容器
  @author: gmy
  @routerPath:/procurement/procurementDriveSupplier/procurementTenderfeeVessel
  @date: 2020-5-20 8:43:58
-->
<template>
  <div class="main">
    <!-- 是否收取标书费 00 不收取 01 收取-->
    <procurementSubscription v-if="isReceiveTenderDocumentPrice === '01'" :procfile-id="procfileId" />
    <procurementSubscription v-if="isReceiveTenderDocumentPrice === '00'" :procfile-id="procfileId" />
  </div>
</template>

<script>
/* api*/
import { paymentOfTenderFeeMessage } from '@/api/procurement/procurementProtdoc'//  获取缴纳纳标书费信息
// import procurementCollectionAdd from '../procurementCollection/procurementCollection-add' // 收取标书费
import procurementSubscription from '../procurementSubscription/procurementSubscription-detail' // 不收取标书费
export default {
  name: 'ProcurementBiddingVesselVue',
  inject: ['getTenderBase'],
  components: {
    procurementSubscription
  },
  data() {
    return {
      // 获取联系人数据参数
      packId: '', // 标段id
      isReceiveTenderDocumentPrice: '', // 是否收取标书费00 不收取 01 收取标书费
      procfileId: '', // 文件id
      payStatus: '',
      auditStatus: '',
      payType: '',
      // 获取缴费信息数据
      feeData: {
        packId: '', // 标段Id
        feeType: '', // 保证金 标书费
        payAmount: 0, // 金额
        invoiceType: ''
      },
      tenderBase: this.getTenderBase() // 获取项目信息
    }
  },
  created() {
    // 调用获取是否收取标书费方法
    this.getSupplierDriveTaskData()
  },
  methods: {
    // 是否收取标书费
    getSupplierDriveTaskData() {
      const packId = this.tenderBase.packId
      paymentOfTenderFeeMessage(packId).then(res => {
        this.isReceiveTenderDocumentPrice = res.data.isReceiveTenderDocumentPrice
        this.procfileId = res.data.procfileId // 文件id
      }).catch(res => {
        this.loading = false
      })
    }
  }
}
</script>

<style scoped>

</style>
