<!--
  @description:CA单位身份数字证书申请信息
  @Modifier:肖文龙
  @routerPath:/caManage/certificateInformationDetail
  @date:2019-12-6 14:32:45
-->
<template>
  <div class="p0-16">
    <!-- 返回 -->
    <section class="title">
      <router-link to="/caManage/invoiceManageList">
        <i class="iconfont icon-fanhui pointer" />
      </router-link>
      单位身份数字证书申请信息
    </section>
    <!-- 证书办理类型 -->
    <div class="page-title">
      01 证书办理类型
    </div>
    <table class="tableData">
      <tr>
        <td>服务名称</td>
        <td>{{ tableData.title }}</td>
        <td>证书有效期</td>
        <td>{{ tableData.purchaseMethod == "00" ? "否" : "是" }}</td>
      </tr>
      <tr>
        <td>购买数量</td>
        <td>{{ tableData.purchaseMethod == "00" ? "否" : "是" }}</td>
        <td>价格</td>
        <td>{{ tableData.contacts }}</td>
      </tr>
      <tr style="color: #FF6030;">
        <td>领取码</td>
        <td>{{ tableData.provinceCode }}</td>
        <td>领取码有效期</td>
        <td>{{ tableData.provinceCode }}</td>
      </tr>
    </table>

    <div class="page-title">
      02 申请单位资料
    </div>
    <table class="tableData">
      <tr>
        <td>单位名称</td>
        <td>{{ tableData.regionCode }}</td>
        <td>单位地址</td>
        <td>{{ tableData.billingStatus == "00" ? "否" : "是" }}</td>
      </tr>
      <tr>
        <td>单位电话</td>
        <td>{{ tableData.regionCode == "00" ? "否" : "是" }}</td>
        <td>单位传真</td>
        <td>{{ tableData.regionCode }}</td>
      </tr>
      <tr>
        <td>法人姓名</td>
        <td>{{ tableData.contactsNumber }}</td>
        <td>经办人</td>
        <td>{{ tableData.invoiceAmount }}</td>
      </tr>
      <tr>
        <td>经办人手机</td>
        <td>{{ tableData.regionCode }}</td>
        <td>身份证号码</td>
        <td>{{ tableData.regionCode }}</td>
      </tr>
      <tr>
        <td>电子邮箱</td>
        <td colspan="3">
          {{ tableData.materialType }}
        </td>
      </tr>
    </table>

    <div class="page-title">
      03 物流信息
    </div>
    <table class="tableData">
      <tr>
        <td>收件人</td>
        <td>{{ tableData.invoiceRise }}</td>
        <td>收件地址</td>
        <td>{{ tableData.billingStatus == "00" ? "否" : "是" }}</td>
      </tr>
      <tr>
        <td>所在省市</td>
        <td>{{ tableData.specialTicket == "00" ? "否" : "是" }}</td>
        <td>邮政编码</td>
        <td>{{ tableData.contacts }}</td>
      </tr>
      <tr>
        <td>联系电话</td>
        <td>{{ tableData.contactsNumber }}</td>
        <td>发票类型</td>
        <td>{{ tableData.invoiceAmount }}</td>
      </tr>
      <tr>
        <td>开票信息</td>
        <td colspan="3">
          {{ tableData.contactsNumber }}
        </td>
      </tr>
    </table>

    <div class="page-title">
      04 参与项目信息
    </div>
    <table class="tableData">
      <tr>
        <td>项目编号</td>
        <td colspan="3">
          {{ tableData.contactsNumber }}
        </td>
      </tr>
    </table>

    <div class="page-title">
      05 附件上传
    </div>
    <div>
      <el-form>
        <el-form-item
          style="width:50%"
          label="是否三证合一:"
          prop="specialTicket"
        >
          <el-radio-group v-model="tableData.specialTicket" disabled>
            <el-radio label="00">
              否
            </el-radio>
            <el-radio label="02">
              是
            </el-radio>
          </el-radio-group>
        </el-form-item>
      </el-form>
      <table class="tableData">
        <tr>
          <td style="color: #FF6030;">
            统一社会信用代码
          </td>
          <td>{{ tableData.contactsNumber }}</td>
          <td>申请表扫描件</td>
          <td>
            <a
              href="http://pic31.nipic.com/20130804/7487939_090818211000_2.jpg"
              download="http://www.baidu.com/xxxxxxx.png"
              style="color: #6687ED;margin-top: 30px;text-decoration: underline;"
            >123</a>
            <span
              style="cursor: pointer;color: #82848A;"
              @click="
                lookimg(
                  'http://pic31.nipic.com/20130804/7487939_090818211000_2.jpg'
                )
              "
            >示例-请上传清晰彩色原件</span>
          </td>
        </tr>
        <tr>
          <td style="color: #FF6030;">
            统一社会信用代码执照扫描件
          </td>
          <td>
            <img
              style="height: 70px;"
              src="http://pic31.nipic.com/20130804/7487939_090818211000_2.jpg'"
              alt=""
            >
            <span
              style="cursor: pointer;color: #82848A;"
              @click="
                lookimg(
                  'http://pic31.nipic.com/20130804/7487939_090818211000_2.jpg'
                )
              "
            >示例-请上传清晰彩色原件</span>
          </td>
          <td>经办人身份证照扫描件</td>
          <td>
            <img
              style="height: 70px;"
              src="http://pic31.nipic.com/20130804/7487939_090818211000_2.jpg'"
              alt=""
            >
            <span
              style="cursor: pointer;color: #82848A;"
              @click="
                lookimg(
                  'http://pic31.nipic.com/20130804/7487939_090818211000_2.jpg'
                )
              "
            >示例-请上传清晰彩色原件</span>
          </td>
        </tr>
      </table>
    </div>
    <div class="page-title">
      06 支付方式
    </div>
    <el-form>
      <el-form-item style="width:50%" prop="specialTicket">
        <span style="margin-left: 10px;">{{
          tableData.paymentMode == "00" ? "易支付" : "支付宝"
        }}</span>
      </el-form-item>
    </el-form>
    <div class="page-title">
      07 审核信息
    </div>
    <table class="tableData">
      <tr>
        <td>审核人</td>
        <td>{{ tableData.invoiceRise }}</td>
        <td>审核时间</td>
        <td>{{ tableData.billingStatus == "00" ? "否" : "是" }}</td>
      </tr>
      <tr>
        <td>审核状态</td>
        <td>{{ tableData.specialTicket == "00" ? "否" : "是" }}</td>
        <td>审核意见</td>
        <td>{{ tableData.contacts }}</td>
      </tr>
    </table>

    <div class="page-title">
      08 费用审核信息
    </div>
    <table class="tableData">
      <tr>
        <td>审核人</td>
        <td>{{ tableData.invoiceRise }}</td>
        <td>审核时间</td>
        <td>{{ tableData.billingStatus == "00" ? "否" : "是" }}</td>
      </tr>
      <tr>
        <td>审核状态</td>
        <td>{{ tableData.specialTicket == "00" ? "否" : "是" }}</td>
        <td>审核意见</td>
        <td>{{ tableData.contacts }}</td>
      </tr>
    </table>
    <div style="height: 16px" />
  </div>
</template>

<script>
import { getSublist } from '@/api/purchase/purchaseMain'
export default {
  name: 'CertificateInformationDetail',
  components: {},
  data() {
    return {
      title: '',
      // 发票信息
      formData: {
        information: {
          id: '', //
          invoiceRise: '', // 发票抬头
          specialTicket: '', // 是否专票
          billingStatus: '', // 是否开票
          contacts: '', // 联系人
          contactsNumber: '', // 联系电话
          invoiceAmount: '', // 发票金额（元)
          invoice: '', // 发票号码
          invoiceEnclosure: '', // 发票附件
          purchasePlan: '', // 采购计划
          billingInvoice: '', // 开票信息
          openAccountBank: '', // 开户银行
          basicAccountAccount: '', // 基本账户账号
          mobilePhone: '', // 移动电话
          address: '', // 地址
          dutyParagraph: '', // 税号
          paymentAmount: '' // 缴费金额（元）
        }
      },
      // 发票信息
      tableData: {},
      returnPrev: '' // 返回
    }
  },
  mounted() {
    const projectId = this.$route.query.id
    getSublist(projectId).then(response => {
      // ==============初始化===================
      // 采购项目信息
      this.tableData = response.data.tbpurchaseMainEntityVO
      // 物料类型
      if (response.data.tbpurchaseMainEntityVO.materialType === '00') {
        this.tableData.materialType = '现货/标准品'
      } else if (response.data.tbpurchaseMainEntityVO.materialType === '01') {
        this.tableData.materialType = '加工/定制品'
      } else {
        this.tableData.materialType = '服务'
      }
      // 订单类型
      if (response.data.tbpurchaseMainEntityVO.orderType === '00') {
        this.tableData.orderType = '标准订单(单次采购)'
      } else {
        this.tableData.orderType = '价格协议(长期采购)'
      }
      // 组织形式
      if (response.data.tbpurchaseMainEntityVO.orgMethod === '00') {
        this.tableData.orgMethod = '自行采购'
      } else {
        this.tableData.orgMethod = '委托代理机构采购'
      }
      // 采购方式
      if (response.data.tbpurchaseMainEntityVO.purchaseType === '00') {
        this.tableData.purchaseType = '一次询价'
      } else if (response.data.tbpurchaseMainEntityVO.purchaseType === '01') {
        this.tableData.purchaseType = '竞价'
      } else {
        this.tableData.purchaseType = '二次询价'
      }
    })
  },
  methods: {
    lookimg(str) {
      var newwin = window.open()
      newwin.document.write(
        `<div style='text-align: center;width: 100%;'><img src='${str}' /></div>`)
    }
  }
}
</script>

<style lang="less" scoped>

</style>
