<template>
  <div>
    <a-row>
      <a-col :span="24">
        <div class="tb-title">
          <span>经费预算 <strong>(单位：万元)</strong></span>
        </div>
      </a-col>
    </a-row>
    <a-row type="flex" class="row_center">
      <a-col :span="4" class="bg-gray">
        <div class="special-middle">
          <div>概算科目名称</div>
        </div>
      </a-col>
      <a-col :span="4" class="bg-gray">
        <div class="special-middle">
          <div >合计</div>
        </div>
      </a-col>
      <a-col :span="4" class="bg-gray">
        <div class="special-middle">
          <div>申请专项经费</div>
        </div>
      </a-col>
      <a-col :span="4" class="bg-gray">
        <div class="special-middle">
          <div>自筹经费</div>
        </div>
      </a-col>
      <a-col :span="8" class="bg-gray">
        <div class="special-middle">
          <div>备注</div>
        </div>
      </a-col>
    </a-row>
    <a-row v-for="(item, index) in budget" :key="index" type="flex" class="row_center">
      <a-col :span="4" style="text-align: left;">
        {{item.budgetName}}
      </a-col>
      <a-col :span="4">
        <div class="special-middle">{{parseFloat(item.totalBudget).toFixed(2)}}</div>
      </a-col>
      <a-col :span="4">
        <div class="special-middle">{{parseFloat(item.applyFunds).toFixed(2)}}</div>
      </a-col>
      <a-col :span="4">
        <div class="special-middle">{{parseFloat(item.selfFunds).toFixed(2)}}</div>
      </a-col>
      <a-col :span="8">
        <div class="special-middle">{{item.calculationBasis}}</div>
      </a-col>
    </a-row>
  </div>
</template>

<script>
const Budget = { id: null, budgetName: null, budgetId: null, objectId: null, totalBudget: null, applyFunds: null, selfFunds: null, calculationBasis: null }

export default {
  name: "budgetInfo",
  props: {
    budget: {
      type: Array,
      default: () => {
        return [{ ...Budget }];
      },
    },
  },
  data() {
    return {};
  },
  methods: {},
};
</script>