From 9c3920d2d3dee6547053a4015200f7a98d308408 Mon Sep 17 00:00:00 2001
From: lion <120344285@qq.com>
Date: Wed, 24 Dec 2025 14:41:18 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.development | 2 +-
src/views/budget/budgetList.vue | 2 +-
.../components/paymentRegistration.vue | 16 ++++++++--
src/views/dashboard/index.vue | 30 +++++++++----------
4 files changed, 30 insertions(+), 20 deletions(-)
diff --git a/.env.development b/.env.development
index 10d6f17..0459c6b 100644
--- a/.env.development
+++ b/.env.development
@@ -3,7 +3,7 @@ ENV = 'development'
# base api
-VUE_APP_DOMIAN=http://192.168.60.99:8003/
+VUE_APP_DOMIAN=http://192.168.60.99:9003/
VUE_APP_BASE_API = ''
VUE_APP_UPLOAD=http://192.168.60.99:8003/api/admin/upload-file
VUE_APP_OUT_URL = http://192.168.60.18:8001
diff --git a/src/views/budget/budgetList.vue b/src/views/budget/budgetList.vue
index 50a6c02..bf99566 100644
--- a/src/views/budget/budgetList.vue
+++ b/src/views/budget/budgetList.vue
@@ -129,7 +129,7 @@
{{
item.prop.indexOf(".") > -1
- ? scope.row[item.prop.split(".")[0]][item.prop.split(".")[1]]
+ ? (scope.row[item.prop.split(".")[0]] && scope.row[item.prop.split(".")[0]][item.prop.split(".")[1]]) || ''
: scope.row[item.prop]
}}
diff --git a/src/views/contract/components/paymentRegistration.vue b/src/views/contract/components/paymentRegistration.vue
index 4487307..b424672 100644
--- a/src/views/contract/components/paymentRegistration.vue
+++ b/src/views/contract/components/paymentRegistration.vue
@@ -1197,8 +1197,10 @@ export default {
previousPaymentValue = parseFloat(contextData.other_data_fill[previousPaymentField.link_field]) || 0
}
- // 获取 currentPayment 的值(用于计算 totalPaid 和 totalPlanned)
+ // 获取 currentPayment 的值(用于计算 totalPlanned,使用扣款金额)
const currentPaymentValue = parseFloat(this.paymentRegistrationForm.deductionMoney) || 0
+ // 获取本次付款金额(用于计算 totalPaid,使用申请付款金额)
+ const currentApplyMoneyValue = parseFloat(this.paymentRegistrationForm.applyMoney) || 0
// 遍历模板字段,先设置字段值
fields.forEach(field => {
@@ -1217,8 +1219,16 @@ export default {
field.value = this.paymentRegistrationForm.type || ''
console.log('currentPaymentRemark field value:', field.value, 'from paymentRegistrationForm.type:', this.paymentRegistrationForm.type)
} else if (field.field === 'totalPaid') {
- // 累计已付款:previousPayment + currentPayment
- const totalPaidValue = previousPaymentValue + currentPaymentValue
+ // 累计已付款:对照值(从 link_field 或 previousPayment 获取)+ 本次付款金额(applyMoney)
+ let baseValue = 0
+ // 优先从 field.link_field 获取对照值
+ if (field.link_field && contextData && contextData.other_data_fill && contextData.other_data_fill[field.link_field]) {
+ baseValue = parseFloat(contextData.other_data_fill[field.link_field]) || 0
+ } else if (previousPaymentValue > 0) {
+ // 如果 field.link_field 不存在,使用 previousPayment 的值
+ baseValue = previousPaymentValue
+ }
+ const totalPaidValue = baseValue + currentApplyMoneyValue
field.value = totalPaidValue.toString()
} else if (field.field === 'totalPlanned') {
// 累计计划付款:对照值(从 other_data_fill 获取)+ currentPayment
diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue
index 033b662..7cf9335 100644
--- a/src/views/dashboard/index.vue
+++ b/src/views/dashboard/index.vue
@@ -148,7 +148,7 @@