<!--
  @description:专票查看
  @Modifier:qk
  @routerPath:/supperManagement/specialTicket
  @date:2020/3/24-10:27
-->
<template>
  <div>
    <section class="title p0-16">
      <router-link :to="'/supperManagement/enterpriseManage/bidding/bidProjectStep/bidProjectMaterielment-list'">
        <div class="title-back pointer">
          <i class="iconfont icon-fanhui mr10" />录入开票信息
        </div>
      </router-link>
    </section>
    <section class="main md16">
      <table class="tableData">
        <tr>
          <td>发票类型</td>
          <td colspan="3">
            专票
          </td>
        </tr>
        <tr>
          <td>开票抬头</td>
          <td>{{ formData.invoiceTitle }}</td>
          <td>纳税人识别号</td>
          <td>{{ formData.taxpayerIdentificationNumber }}</td>
        </tr>
        <tr>
          <td>开户行</td>
          <td>{{ formData.bankname }}</td>
          <td>开户行卡号</td>
          <td>{{ formData.bankaccount }}</td>
        </tr>
        <tr>
          <td>地址</td>
          <td>{{ formData.consigneeAddress }}</td>
          <td>电话</td>
          <td>{{ formData.consigneeMobilenum }}</td>
        </tr>
        <tr>
          <td>一般纳税人证明文件说明</td>
          <td>
            <el-link type="primary" @click="checkDoc">
              点击查看开具增值税专用发票证明文件说明
            </el-link>
          </td>
          <td>一般纳税人证明</td>
          <td><downloadFile :data="principalData" /></td>
        </tr>
      </table>
    </section>
    <invoiceInFormation v-if="dialogData.consignContractVisible" :dialog-data="dialogData" />
  </div>
</template>

<script>
import { getInvoiceById } from '@/api/supplier/enterpriseManagement'
/* 混入 */
import { invoiceInformationMixin } from './mixins/invoiceInformationMixin'
/* 组件*/
import downloadFile from '@comp/common/updownload/downloadFile'
import invoiceInFormation from './invoiceInFormation-dialog'
export default {
  name: 'BusinessManagerInfo',
  components: {
    downloadFile,
    invoiceInFormation
  },
  mixins: [invoiceInformationMixin],
  data() {
    return {
      dialogData: {
        consignContractVisible: false // 专票说明查看
      },
      formData: {
        invoiceTitle: '', // 发票抬头
        taxpayerIdentificationNumber: '', // 纳税人识别号
        consigneeAddress: '', // 地址
        consigneeMobilenum: '', // 电话
        bankname: '', // 开户银行
        bankaccount: '', // 账号
        principalData: ''
      }
    }
  },
  created() {
    this.initData()
  },
  methods: {
    checkDoc() {
      this.dialogData.consignContractVisible = true
    },
    initData() {
      getInvoiceById(this.$route.query.id).then(res => {
        this.formData = res.data.invoice
      })
    }
  }
}
</script>

<style lang="less" scoped>
</style>
