<!--
  @description: 服务费开票申请查看
  @Modifier: sunxinman/haofengxian
  @routerPath: /fee/serviceInvoiceApplyDetail
  @date: 2020/04/07-13:25
-->
<template>
  <div>
    <section class="title p0-16 clearfix">
      <!-- 返回 -->
      <div class="title-back pointer" @click="back()">
        <i class="iconfont icon-fanhui mr10" />服务费开票申请查看
      </div>
    </section>
    <div class="p0-16">
      <table class="tableData">
        <tr>
          <td>招标项目编号</td>
          <td>{{ formData.tenderNo }}</td>
          <td>招标项目名称</td>
          <td>{{ formData.tenderName }}</td>
        </tr>
        <tr>
          <td>标段（包）编号</td>
          <td>{{ formData.packNo }}</td>
          <td>标段（包）名称</td>
          <td>{{ formData.packName }}</td>
        </tr>
        <tr>
          <td>委托合同</td>
          <td />
          <td>开票单位</td>
          <td />
        </tr>
        <tr>
          <td>
            招标代理服务费收取对象
          </td>
          <td>
            <span
              v-for="(item,index) in collectionObjList"
              v-if="formData.paymentParty === item.typecode"
              :key="index"
            >{{ item.typename }}</span>
          </td>
          <td>招标代理服务费收取方式</td>
          <td>
            <span
              v-for="(item,index) in collectionWayList"
              v-if="formData.paymentMethod === item.typecode"
              :key="index"
            >{{ item.typename }}</span>
          </td>
        </tr>
        <tr>
          <td>行业分类</td>
          <td />
          <td>中标人</td>
          <td>{{ formData.supplierName }}</td>
        </tr>
        <tr>
          <td>联系人</td>
          <td>{{ formData.supplierLinker }}</td>
          <td>联系电话</td>
          <td>{{ formData.supplierTel }}</td>
        </tr>
        <tr>
          <td>发票抬头</td>
          <td>{{ formData.invoiceTittle }}</td>
          <td>开票金额（元）</td>
          <td>{{ formData.invoiceAmount }}</td>
        </tr>
        <tr>
          <td>纳税人识别号</td>
          <td>{{ formData.invoiceAmount }}</td>
          <td>地址及电话</td>
          <td>{{ formData.invoiceAddress }}</td>
        </tr>
        <tr>
          <td>开户银行及账号</td>
          <td>{{ formData.invoiceBank }}</td>
          <td>中标金额</td>
          <td>{{ formData.winPrice }}</td>
        </tr>
        <tr>
          <td>开票级别</td>
          <td>
            <span
              v-for="(item,index) in invoiceLevelList"
              v-if="formData.invoiceLevel === item.typecode"
              :key="index"
            >{{ item.typename }}</span>
          </td>
          <td>发票类型</td>
          <td>
            <span
              v-for="(item,index) in invoiceTypeList"
              v-if="formData.invoiceType === item.typecode"
              :key="index"
            >{{ item.typename }}</span>
          </td>
        </tr>
        <tr>
          <td>备注</td>
          <td colspan="3">
            {{ formData.remark }}
          </td>
        </tr>
        <tr>
          <td>收件人名称</td>
          <td>{{ formData.recipientName }}</td>
          <td>收件人单位</td>
          <td>{{ formData.recipientCompany }}</td>
        </tr>
        <tr>
          <td>联系电话</td>
          <td>{{ formData.recipientTel }}</td>
          <td>联系人邮箱</td>
          <td>{{ formData.recipientEmail }}</td>
        </tr>
        <tr>
          <td>邮政编码</td>
          <td colspan="3">
            {{ formData.recipientPostcode }}
          </td>
        </tr>
        <tr>
          <td>收货地址</td>
          <td colspan="3">
            {{ formData.recipientAddress }}
          </td>
        </tr>
      </table>
    </div>
    <!--操作按钮-->
    <div class="but_footer">
      <div class="but_footer-h" />
      <div class="but_footer-but">
        <el-button @click="back">
          关闭
        </el-button>
      </div>
    </div>
  </div>
</template>

<script>
/* 接口*/
import { detailTenderFeeWinService } from '@/api/fee/servicefee'
/* 混入公共方法 */
import { ServiceGroupMixin } from '../../mixins/serviceFeeGroupMixin'
export default {
  name: 'ServiceInvoiceApplyDetail',
  mixins: [ServiceGroupMixin],
  data() {
    return {
      formData: {
        auditStatus: '', // 审批状态
        createTime: '', // 创建日期
        createUser: '', // 创建人名称
        djbh: '', // 单据编号
        industryCode: '', // 行业分类代码
        industryName: '', // 行业分类
        invoiceAddress: '', // 地址电话
        invoiceAmount: 0, // 开票金额
        invoiceBank: '', // 银行行号
        invoiceLevel: '00', // 开票级别
        invoiceParty: '', // 开票单位
        invoiceTax: '', // 发票税号
        invoiceTittle: '', // 发票抬头
        invoiceType: '00', // 发票类型
        outId: '', // 退款申请ID
        packId: '', // 标段ID
        packName: '', // 标段名称
        packNo: '', // 标段编号
        paymentMethod: '', // 服务费支付方式00差额定率累进制 01固定金额 02固定比例
        paymentParty: '', // 服务费支付方服务费支付方00中标人 01招标人
        postCode: '', // 运单号
        postStatus: '', // 邮寄状态
        postTime: '', // 邮寄时间
        recipientAddress: '', // 收件人地址
        recipientCompany: '', // 收件人单位
        recipientEmail: '', // 收件人邮箱
        recipientName: '', // 收件人名称
        recipientPostcode: '', // 收件人邮编
        recipientTel: '', // 收件人电话
        remark: '', // 备注
        sendTime: '', // 审批发送时间
        stageId: '', // 阶段ID
        supplierId: '', // 供应商id
        supplierLinker: '', // 供应商联系人
        supplierName: '', // 供应商名称
        supplierTel: '', // 供应商联系电话
        tenderDepart: '', // 业务部门
        tenderDepartId: '', // 业务部门ID
        tenderId: '', // 项目id
        tenderManager: '', // 项目经理
        tenderManagerId: '', // 项目经理ID
        tenderName: '', // 项目名称
        tenderNo: '', // 项目编号
        updateTime: '', // 更新日期
        updateUser: '', // 更新人名称
        useStatus: '', // 使用状态
        winPrice: 0, // 中标价格
        winServiceId: '' // 服务费开票信息ID
      }
    }
  },
  created() {
    // 查看中标服务费开票信息
    this.getTenderFeeWinServiceDetail()
  },
  methods: {
    // 查看中标服务费开票信息
    getTenderFeeWinServiceDetail() {
      const winServiceId = this.$route.query.winServiceId // 中标服务费ID
      detailTenderFeeWinService(winServiceId).then(res => {
        this.formData = res.data
      }).catch(() => {
      })
    },
    // 返回
    back() {
      this.$router.push({
        path: '/fee/serviceInvoiceRecords',
        query: {
          ...this.$route.query
        }
      })
    }
  }
}
</script>

<style lang="less" scoped>

</style>
