xiangpei
2025-03-11 84a14c24edf92f7072e50b51ee37143d658ecfd4
src/views/projectEngineering/projectLibrary/component/investmentFunds.vue
@@ -1,11 +1,11 @@
<template>
  <div class="basic-info">
    <el-form ref="demoFormRef" :disabled="disabled" :model="investmentFundsForm" class="dialog_form">
    <el-form ref="demoFormRef" :disabled="disabled" :model="investmentFundsForm" :rules="rules" class="dialog_form">
      <!-- 保持原有模板内容不变 -->
      <el-row :gutter="20">
        <el-col :span="6">
          <el-form-item label="项目总投资额" label-width="130px" prop="fundsType" style="width: 100%">
            <el-input v-model.trim="investmentFundsForm.totalInvestment" class="item" clearable maxlength="255" style="width: 90%"
          <el-form-item label="项目总投资额" label-width="130px" prop="totalInvestment" required style="width: 100%">
            <el-input v-model.trim="totalInvestment" class="item" clearable disabled style="width: 90%"
                      placeholder="请输入"/>
            <span class="money">万元</span>
          </el-form-item>
@@ -30,7 +30,7 @@
      <el-row :gutter="20">
        <el-col :span="18">
          <el-form-item label="(一)中央投资" label-width="130px" prop="projectType" style="width: 100%">
            <el-input v-model.trim="investmentFundsForm.centralInvestmentTotal" class="item" clearable maxlength="255" style="width: 90%"
            <el-input v-model.trim="centralInvestmentTotal" class="item" clearable disabled style="width: 90%"
                      placeholder="请输入"/>
            <span class="money">万元</span>
          </el-form-item>
@@ -38,7 +38,7 @@
      </el-row>
      <el-row :gutter="20">
        <el-col :span="6">
          <el-form-item label="1.中央预算投资" label-width="130px" prop="fundsType" style="width: 100%">
          <el-form-item label="1.中央预算投资" label-width="160px" prop="fundsType" style="width: 100%">
            <el-input v-model.trim="investmentFundsForm.centralBudgetInvestment" class="item" clearable maxlength="255" style="width: 90%"
                      placeholder="请输入"/>
            <span class="money">万元</span>
@@ -61,10 +61,24 @@
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="18">
          <el-form-item label="4.中央专项建设基金" label-width="130px" prop="engineering" style="width: 100%">
        <el-col :span="6">
          <el-form-item label="4.中央专项建设基金" label-width="180px" prop="engineering" style="width: 100%">
            <el-input v-model.trim="investmentFundsForm.centralSpecialFundInvestment" class="item" clearable style="width: 90%"
                      maxlength="255" placeholder="请输入"/>
            <span class="money">万元</span>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="5.超长期特别国债资金" label-width="150px" prop="engineering" style="width: 100%">
            <el-input v-model.trim="investmentFundsForm.nationalDebt" class="item" clearable maxlength="255" style="width: 90%"
                      placeholder="请输入"/>
            <span class="money">万元</span>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="6.2023年增发国债资金" label-width="150px" prop="engineering" style="width: 100%">
            <el-input v-model.trim="investmentFundsForm.additionalNationalDebt" class="item" clearable maxlength="255" style="width: 90%"
                      placeholder="请输入"/>
            <span class="money">万元</span>
          </el-form-item>
        </el-col>
@@ -72,15 +86,15 @@
      <el-row :gutter="20">
        <el-col :span="18">
          <el-form-item label="(二)省级投资" label-width="130px" prop="engineering" style="width: 100%">
            <el-input v-model.trim="investmentFundsForm.provincialInvestmentTotal" class="item" clearable style="width: 90%"
                      maxlength="255" placeholder="请输入"/>
            <el-input v-model.trim="provincialInvestmentTotal" class="item" clearable disabled style="width: 90%"
                      placeholder="请输入"/>
            <span class="money">万元</span>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="6">
          <el-form-item label="1.省预算内投资" label-width="130px" prop="fundsType" style="width: 100%">
          <el-form-item label="1.省预算内投资" label-width="160px" prop="fundsType" style="width: 100%">
            <el-input v-model.trim="investmentFundsForm.provincialBudgetInvestment" class="item" clearable style="width: 90%"
                      maxlength="255" placeholder="请输入"/>
            <span class="money">万元</span>
@@ -104,7 +118,7 @@
      <el-row :gutter="20">
        <el-col :span="18">
          <el-form-item label="(三)市(州)投资" label-width="130px" prop="engineering" style="width: 100%">
            <el-input v-model.trim="investmentFundsForm.cityInvestmentTotal" class="item" clearable maxlength="255" style="width: 90%"
            <el-input v-model.trim="cityInvestmentTotal" class="item" clearable disabled style="width: 90%"
                      placeholder="请输入"/>
            <span class="money">万元</span>
          </el-form-item>
@@ -112,7 +126,7 @@
      </el-row>
      <el-row :gutter="20">
        <el-col :span="6">
          <el-form-item label="1.市(州)预算内投资" label-width="130px" prop="fundsType" style="width: 100%">
          <el-form-item label="1.市(州)预算内投资" label-width="170px" prop="fundsType" style="width: 100%">
            <el-input v-model.trim="investmentFundsForm.cityBudgetInvestment" class="item" clearable maxlength="255" style="width: 90%"
                      placeholder="请输入"/>
            <span class="money">万元</span>
@@ -136,7 +150,7 @@
      <el-row :gutter="20">
        <el-col :span="18">
          <el-form-item label="(四)县(市、区)投资" label-width="130px" prop="engineering" style="width: 100%">
            <el-input v-model.trim="investmentFundsForm.countyInvestmentTotal" class="item" clearable maxlength="255" style="width: 90%"
            <el-input v-model.trim="countyInvestmentTotal" class="item" disabled style="width: 90%"
                      placeholder="请输入"/>
            <span class="money">万元</span>
          </el-form-item>
@@ -144,16 +158,16 @@
      </el-row>
      <el-row :gutter="20">
        <el-col :span="6">
          <el-form-item label="1.区(县)预算内投资" label-width="130px" prop="fundsType" style="width: 100%">
            <el-input v-model.trim="investmentFundsForm.countyBudgetInvestment" class="item" clearable maxlength="255" style="width: 90%"
          <el-form-item label="1.区(县)预算内投资" label-width="180px" prop="fundsType" style="width: 100%">
            <el-input v-model.trim="investmentFundsForm.countyBudgetInvestment" class="item" clearable style="width: 90%"
                      placeholder="请输入"/>
            <span class="money">万元</span>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item class="items" label="2.区(县)财政性建设资金" label-width="130px" prop="investmentType"
          <el-form-item label="2.区(县)财政性建设资金" label-width="170px" prop="investmentType"
                        style="width: 100%">
            <el-input v-model.trim="investmentFundsForm.countyFiscalInvestment" class="item" clearable maxlength="255" style="width: 90%"
            <el-input v-model.trim="investmentFundsForm.countyFiscalInvestment" class="item" clearable style="width: 90%"
                      placeholder="请输入"/>
            <span class="money">万元</span>
          </el-form-item>
@@ -161,7 +175,16 @@
        <el-col :span="6">
          <el-form-item label="3.区(县)专项资金" label-width="130px" prop="investmentType" style="width: 100%">
            <el-input v-model.trim="investmentFundsForm.countySpecialFundInvestment" class="item" clearable style="width: 90%"
                      maxlength="255" placeholder="请输入"/>
                      type="number" placeholder="请输入"/>
            <span class="money">万元</span>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="6">
          <el-form-item label="4.地方政府专项债券" label-width="180px" prop="engineering" style="width: 100%">
            <el-input v-model.trim="investmentFundsForm.deptBond" class="item" clearable style="width: 90%"
                      placeholder="请输入"/>
            <span class="money">万元</span>
          </el-form-item>
        </el-col>
@@ -211,6 +234,7 @@
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>
@@ -233,9 +257,60 @@
      required: true
    },
  },
  computed: {
    totalInvestment() {
      this.investmentFundsForm.totalInvestment =
        parseFloat(this.investmentFundsForm.governmentInvestmentTotal ? this.investmentFundsForm.governmentInvestmentTotal : 0) +
        this.centralInvestmentTotal +
        this.provincialInvestmentTotal +
        this.cityInvestmentTotal +
        this.countyInvestmentTotal +
        parseFloat(this.investmentFundsForm.domesticLoanTotal ? this.investmentFundsForm.domesticLoanTotal : 0) +
        parseFloat(this.investmentFundsForm.bankLoan ? this.investmentFundsForm.bankLoan : 0) +
        parseFloat(this.investmentFundsForm.foreignInvestmentTotal ? this.investmentFundsForm.foreignInvestmentTotal : 0) +
        parseFloat(this.investmentFundsForm.enterpriseSelfRaisedTotal ? this.investmentFundsForm.enterpriseSelfRaisedTotal : 0) +
        parseFloat(this.investmentFundsForm.otherInvestmentTotal ? this.investmentFundsForm.otherInvestmentTotal : 0)
      return this.investmentFundsForm.totalInvestment;
    },
    centralInvestmentTotal() {
      this.investmentFundsForm.centralInvestmentTotal =
        parseFloat(this.investmentFundsForm.centralBudgetInvestment ? this.investmentFundsForm.centralBudgetInvestment : 0) +
        parseFloat(this.investmentFundsForm.centralFiscalInvestment ? this.investmentFundsForm.centralFiscalInvestment : 0) +
        parseFloat(this.investmentFundsForm.centralSpecialBondInvestment ? this.investmentFundsForm.centralSpecialBondInvestment : 0) +
        parseFloat(this.investmentFundsForm.centralSpecialFundInvestment ? this.investmentFundsForm.centralSpecialFundInvestment : 0) +
        parseFloat(this.investmentFundsForm.nationalDebt ? this.investmentFundsForm.nationalDebt : 0) +
        parseFloat(this.investmentFundsForm.additionalNationalDebt ? this.investmentFundsForm.additionalNationalDebt : 0)
      return this.investmentFundsForm.centralInvestmentTotal;
    },
    provincialInvestmentTotal() {
      this.investmentFundsForm.provincialInvestmentTotal =
        parseFloat(this.investmentFundsForm.provincialBudgetInvestment ? this.investmentFundsForm.provincialBudgetInvestment : 0) +
        parseFloat(this.investmentFundsForm.provincialFiscalInvestment ? this.investmentFundsForm.provincialFiscalInvestment : 0) +
        parseFloat(this.investmentFundsForm.provincialSpecialFundInvestment ? this.investmentFundsForm.provincialSpecialFundInvestment : 0)
      return this.investmentFundsForm.provincialInvestmentTotal;
    },
    cityInvestmentTotal() {
      this.investmentFundsForm.cityInvestmentTotal =
        parseFloat(this.investmentFundsForm.cityBudgetInvestment ? this.investmentFundsForm.cityBudgetInvestment : 0) +
        parseFloat(this.investmentFundsForm.cityFiscalInvestment ? this.investmentFundsForm.cityFiscalInvestment : 0) +
        parseFloat(this.investmentFundsForm.citySpecialFundInvestment ? this.investmentFundsForm.citySpecialFundInvestment : 0)
      return this.investmentFundsForm.cityInvestmentTotal;
    },
    countyInvestmentTotal() {
      this.investmentFundsForm.countyInvestmentTotal =
        parseFloat(this.investmentFundsForm.countyBudgetInvestment ? this.investmentFundsForm.countyBudgetInvestment : 0) +
        parseFloat(this.investmentFundsForm.countyFiscalInvestment ? this.investmentFundsForm.countyFiscalInvestment : 0) +
        parseFloat(this.investmentFundsForm.countySpecialFundInvestment ? this.investmentFundsForm.countySpecialFundInvestment : 0) +
        parseFloat(this.investmentFundsForm.deptBond ? this.investmentFundsForm.deptBond : 0)
      return this.investmentFundsForm.countyInvestmentTotal;
    }
  },
  data() {
    return {
      projectForm: {},
      rules: {
      },
      investmentFundsForm: {
        // id: '',
        // projectId: '',