From f297282bf2f14b136b739bc18049ba13d9ad9595 Mon Sep 17 00:00:00 2001
From: luojiaquan <1583622118@qq.com>
Date: Mon, 21 Sep 2026 11:18:38 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E4=BB=98=E6=AC=BE=E9=93=B6?=
=?UTF-8?q?=E8=A1=8C=E8=B4=A6=E5=8F=B7=E8=AE=B0=E5=BD=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../customermoney/domain/CustomerReceipt.java | 6 +-
.../impl/CustomerMoneyServiceImpl.java | 6 +-
.../customerinfo/customermoney/index.vue | 65 ++++---------------
3 files changed, 21 insertions(+), 56 deletions(-)
diff --git a/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/customermoney/domain/CustomerReceipt.java b/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/customermoney/domain/CustomerReceipt.java
index ff60a150..6e4068e1 100644
--- a/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/customermoney/domain/CustomerReceipt.java
+++ b/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/customermoney/domain/CustomerReceipt.java
@@ -84,13 +84,13 @@ public class CustomerReceipt extends BaseEntity
/** 收款方式:BANK_TRANSFER/ALIPAY/WECHAT/CASH/OTHER */
private String payMethod;
- /** 收款银行账户ID(ar_bank_account) */
+ /** 客户银行账户ID(ar_bank_account) */
private Long bankAccountId;
- /** 收款账户户名(登记时快照) */
+ /** 客户银行账户户名(登记时快照) */
private String bankAccountName;
- /** 收款银行账号(登记时快照) */
+ /** 客户银行账号(登记时快照) */
private String bankAccountNo;
/** 开户行名称(登记时快照) */
diff --git a/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/customermoney/service/impl/CustomerMoneyServiceImpl.java b/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/customermoney/service/impl/CustomerMoneyServiceImpl.java
index 1a62a234..9fee29f5 100644
--- a/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/customermoney/service/impl/CustomerMoneyServiceImpl.java
+++ b/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/customermoney/service/impl/CustomerMoneyServiceImpl.java
@@ -142,8 +142,9 @@ public class CustomerMoneyServiceImpl implements ICustomerMoneyService
{
receipt.setCurrency(receipt.getCurrency().trim().toUpperCase());
}
- // 收款银行账户:以库中启用账户为准回填快照(不信任前端传入的户名/账号/开户行文本),
+ // 收款银行账户:以库中启用账户为准回填快照(不信任前端传入的户名/开户行文本),
// 账户后续停用或修改不影响历史单据展示。
+ // 未选账户时,允许只手工录入客户银行账号文本(bankAccountNo),户名/开户行清空。
if (receipt.getBankAccountId() != null)
{
ArBankAccount bankAccount = arBankAccountMapper.selectEnabledById(receipt.getBankAccountId());
@@ -158,8 +159,9 @@ public class CustomerMoneyServiceImpl implements ICustomerMoneyService
else
{
receipt.setBankAccountName(null);
- receipt.setBankAccountNo(null);
receipt.setBankName(null);
+ receipt.setBankAccountNo(StringUtils.hasText(receipt.getBankAccountNo())
+ ? receipt.getBankAccountNo().trim() : null);
}
// 汇率与本位币金额:CNY 固定 1:1;外币以收款日即期汇率表为基准,允许页面手工修改。
// 汇率来源由后端权威判定(不信任前端标记):与汇率表一致=RATE_TABLE,不一致/表未配置=MANUAL。
diff --git a/bms-front/src/views/customersuppliermanagement/customerinfo/customermoney/index.vue b/bms-front/src/views/customersuppliermanagement/customerinfo/customermoney/index.vue
index 01f7ed8d..1cd49360 100644
--- a/bms-front/src/views/customersuppliermanagement/customerinfo/customermoney/index.vue
+++ b/bms-front/src/views/customersuppliermanagement/customerinfo/customermoney/index.vue
@@ -152,10 +152,10 @@
{{ formatOption(payMethodOptions, scope.row.payMethod) }}
-
+
-
- {{ scope.row.bankName || '-' }} {{ scope.row.bankAccountNo || '' }}
+
+ {{ scope.row.bankName ? scope.row.bankName + ' ' : '' }}{{ scope.row.bankAccountNo }}
-
@@ -646,23 +646,13 @@
-
-
+
-
-
+ />
@@ -743,9 +733,9 @@
CNY {{ formatMoney(viewDialog.data.unallocatedAmount) }}
{{ formatOption(payMethodOptions, viewDialog.data.payMethod) }}
-
-
- {{ viewDialog.data.bankName || '-' }} {{ viewDialog.data.bankAccountNo || '' }}
+
+
+ {{ viewDialog.data.bankName ? viewDialog.data.bankName + ' ' : '' }}{{ viewDialog.data.bankAccountNo }}
({{ viewDialog.data.bankAccountName }})
-
@@ -1005,7 +995,6 @@ import { getCustomer } from "@/api/customersuppliermanagement/customerinfo/custo
import { listAccount, listReceipt, getReceipt, addReceipt, confirmReceipt, cancelReceipt, listFlow, listCreditFlow, applyCreditAdjust, listCreditApply, approveCreditApply, rejectCreditApply, cancelCreditApply, listMyCreditPools } from "@/api/customersuppliermanagement/customermoney/customermoney.js"
import { listUnsettledBill, listBalanceWriteoff, balanceWriteoff, cancelBalanceWriteoff } from "@/api/customersuppliermanagement/customermoney/customerbill.js"
import { convertToBase } from "@/api/data/exchangeRate"
-import { listBankAccountOptions } from "@/api/ar/bankAccount"
import { getToken } from "@/utils/auth"
import { AR_BALANCE_WRITEOFF_STATUS, AR_BALANCE_WRITEOFF_STATUS_OPTIONS, AR_BALANCE_WRITEOFF_STATUS_TYPES, AR_BILL_STATUS_OPTIONS, AR_BILL_STATUS_TYPES, arEnumLabel } from '@/constants/ar/enums'
@@ -1396,30 +1385,6 @@ const receiptDialog = reactive({
visible: false,
form: {}
})
-/** 收款银行账户下拉(按币种过滤,默认账户优先) */
-const bankAccountOptions = ref([])
-const bankAccountLoading = ref(false)
-
-function loadBankAccountOptions(currency, { autoPick = true } = {}) {
- bankAccountLoading.value = true
- listBankAccountOptions(currency || 'CNY').then(res => {
- bankAccountOptions.value = res.data || []
- if (!autoPick) return
- // 当前已选账户在新列表中仍存在则保留;否则默认选中默认账户(无默认取第一个)
- const cur = receiptDialog.form.bankAccountId
- const stillExists = cur && bankAccountOptions.value.some(a => a.bankAccountId === cur)
- if (!stillExists) {
- const def = bankAccountOptions.value.find(a => a.isDefault === '1') || bankAccountOptions.value[0]
- receiptDialog.form.bankAccountId = def ? def.bankAccountId : null
- }
- }).finally(() => {
- bankAccountLoading.value = false
- })
-}
-
-function handleBankAccountChange() {
- // 选项清空时无需额外处理;快照(户名/账号/开户行)由后端登记时回填
-}
const receiptRules = {
receivedAt: [{ required: true, message: '收款日期不能为空', trigger: 'change' }],
amount: [{ required: true, message: '收款金额不能为空', trigger: 'blur' }],
@@ -1438,7 +1403,7 @@ function resetReceiptForm() {
currency: 'CNY',
exchangeRate: 1,
payMethod: 'BANK_TRANSFER',
- bankAccountId: null,
+ bankAccountNo: '',
bankTransactionNo: '',
remark: '',
attachmentList: []
@@ -1448,7 +1413,6 @@ function resetReceiptForm() {
function handleAddReceipt() {
resetReceiptForm()
- loadBankAccountOptions(receiptDialog.form.currency)
receiptDialog.visible = true
}
@@ -1484,12 +1448,11 @@ function fetchDefaultRate() {
})
}
-/** 切换币种:重置手工标记并重新取默认汇率、刷新收款银行账户下拉 */
+/** 切换币种:重置手工标记并重新取默认汇率 */
function handleCurrencyChange() {
rateEdited.value = false
rateSourceInfo.value = { source: '', ratePath: '' }
fetchDefaultRate()
- loadBankAccountOptions(receiptDialog.form.currency)
}
/** 手工修改汇率 */