<template>
    <div class="table">
      <el-table
        v-loading="loading"
        :data="deptList"
        row-key="deptId"
        max-height="350px"
        style="width:130%"
      >
        <el-table-column
          prop="seriervs"
          label="序号"
          min-width="60"
        ></el-table-column>
        <el-table-column
          prop="applyDate"
          label="申请日期"
          :show-overflow-tooltip="true"
          min-width="130"
        >
        </el-table-column>
        <el-table-column prop="batchNo" label="批次号" min-width="100" align="center">
        </el-table-column>
        <el-table-column
          label="销售方"
          align="center"
          prop="seller"
          :show-overflow-tooltip="true"
          min-width="130"
        >
        </el-table-column>
        <el-table-column
          label="购买方"
          align="center"
          prop="buyer"
          min-width="130"
          :show-overflow-tooltip="true"
        >
        </el-table-column>
        <el-table-column
          label="主业WBS编码"
          align="center"
          prop="projectNo"
          min-width="150"
          :show-overflow-tooltip="true"
        >
        </el-table-column>
        <el-table-column
          label="主业项目名称"
          align="center"
          prop="projectName"
          min-width="150"
          :show-overflow-tooltip="true"
        >
        </el-table-column>
        <el-table-column
          label="产业项目编码"
          align="center"
          prop="ynProjectNo"
          min-width="150"
          :show-overflow-tooltip="true"
        >
        </el-table-column>
        <el-table-column
          label="产业项目名称"
          align="center"
          prop="ynProjectName"
          min-width="150"
          :show-overflow-tooltip="true"
        >
        </el-table-column>
        <el-table-column
          label="申请单分类"
          align="center"
          prop="applyType"
          min-width="180"
          :show-overflow-tooltip="true"
        >
        </el-table-column>
        <el-table-column
          label="费用类型"
          align="center"
          prop="costType"
          min-width="150"
          :show-overflow-tooltip="true"
        >
        </el-table-column>
        <el-table-column
          label="合同金额"
          align="center"
          prop="contractAmount"
          min-width="150"
          :show-overflow-tooltip="true"
        >
        </el-table-column>
<!--        <el-table-column-->
<!--          label="可用预算"-->
<!--          align="center"-->
<!--          prop="validBudgetAmount"-->
<!--          min-width="150"-->
<!--          :show-overflow-tooltip="true"-->
<!--        >-->
<!--        </el-table-column>-->
        <el-table-column
          label="本次开票金额(含税)"
          align="center"
          min-width="150"
          prop="taxAmount"
          :show-overflow-tooltip="true"
        >
        </el-table-column>
        <el-table-column
          label="税率"
          align="center"
          min-width="150"
          prop="taxRate"
          :show-overflow-tooltip="true"
        >
        </el-table-column>
        <el-table-column
          label="收票人(业务人员)"
          align="center"
          prop="taker"
          min-width="150"
          :show-overflow-tooltip="true"
        >
        </el-table-column>
        <el-table-column
          label="收票人单位(部门)"
          align="center"
          prop="takerUnit"
          min-width="150"
          :show-overflow-tooltip="true"
        >
        </el-table-column>
        <el-table-column
          label="联系电话"
          align="center"
          prop="telephone"
          :show-overflow-tooltip="true"
          min-width="150"
        >
        </el-table-column>
        <el-table-column
          label="发票代码"
          align="center"
          prop="invoiceCode"
          min-width="150"
          :show-overflow-tooltip="true"
        >
        </el-table-column>
        <el-table-column
          label="开票日期"
          align="center"
          prop="makeInvoiceDate"
          min-width="150"
          :show-overflow-tooltip="true"
        >
        </el-table-column>
        <el-table-column
          label="主业入账凭证号"
          align="center"
          prop="voucherCode"
          min-width="150"
          :show-overflow-tooltip="true"
        >
        </el-table-column>
        <el-table-column
          label="产业入账凭证号"
          align="center"
          prop="ynVoucherCode"
          min-width="150"
          :show-overflow-tooltip="true"
        >
        </el-table-column>
      </el-table>
    </div>
</template>

<script>
import  {applyDetail} from '@/api/utils'
export default {
  props:['data'],
  data() {
    return {
      title: "详情",
      deptList:[],
      dialogVisible: false,
      loading: false,
      pageNo:1,
      pageSize:10,
      total:0,
    };
  },
  created() {
    this.getData()
  },
  mounted() {
  },
  updated() {
    this.getData()
  },
  methods: {
    async getData(){
      let res= await applyDetail({id:this.data.id})
      res.data.invoiceList.forEach((item,index)=>{
        item.seriervs=index+1
      })
      this.deptList=res.data.invoiceList
    },
  }
};
</script>

<style lang="scss" scoped>

.table {
  height: 450px !important;
  width: 100%;
}
</style>
