From be2674c8827dcff74092b6e6ed45bfa5a4fdc5d6 Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期二, 25 二月 2025 23:12:16 +0800 Subject: [PATCH] 项目投资及资金来源:金额自动合计 --- src/views/projectEngineering/projectLibrary/component/investmentFunds.vue | 68 +++++++++++++++++++++++++++++----- 1 files changed, 58 insertions(+), 10 deletions(-) diff --git a/src/views/projectEngineering/projectLibrary/component/investmentFunds.vue b/src/views/projectEngineering/projectLibrary/component/investmentFunds.vue index 6280f9f..ae4de71 100644 --- a/src/views/projectEngineering/projectLibrary/component/investmentFunds.vue +++ b/src/views/projectEngineering/projectLibrary/component/investmentFunds.vue @@ -5,7 +5,7 @@ <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-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> @@ -86,8 +86,8 @@ <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> @@ -118,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> @@ -150,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> @@ -159,7 +159,7 @@ <el-row :gutter="20"> <el-col :span="6"> <el-form-item label="1.鍖�(鍘�)棰勭畻鍐呮姇璧�" label-width="180px" prop="fundsType" style="width: 100%"> - <el-input v-model.trim="investmentFundsForm.countyBudgetInvestment" class="item" clearable maxlength="255" style="width: 90%" + <el-input v-model.trim="investmentFundsForm.countyBudgetInvestment" class="item" clearable style="width: 90%" placeholder="璇疯緭鍏�"/> <span class="money">涓囧厓</span> </el-form-item> @@ -167,7 +167,7 @@ <el-col :span="6"> <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> @@ -175,7 +175,7 @@ <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> @@ -183,7 +183,7 @@ <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 maxlength="255" style="width: 90%" + <el-input v-model.trim="investmentFundsForm.deptBond" class="item" clearable style="width: 90%" placeholder="璇疯緭鍏�"/> <span class="money">涓囧厓</span> </el-form-item> @@ -257,6 +257,54 @@ 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: {}, -- Gitblit v1.8.0