From 06de9477e5fbfc8c78d8330bfb15f36807f4709f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B3=89=E4=BD=B3?= <1107186916@qq.com> Date: Sat, 31 Oct 2026 10:16:38 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=A2=E5=95=86=E6=94=B6=E6=AC=BE?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=BC=80=E6=88=B7=E8=A1=8C=E5=A4=B1=E7=84=A6?= =?UTF-8?q?=E5=8C=B9=E9=85=8D=E9=87=91=E8=9D=B6=E5=B8=A6=E5=87=BA=E8=81=94?= =?UTF-8?q?=E8=A1=8C=E5=8F=B7=E5=B9=B6=E4=BF=9D=E5=AD=98=E5=89=8D=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 开户行 label 加问号提示,失焦调 A905-3 按行名精确匹配自动回填联行号,未命中提示检查 - 保存前按联行号校验金蝶档案,查不到拦截保存,接口异常提示稍后重试 - 回填后清除联行号字段残留校验提示 --- src/api/vehicle/customer-archive.js | 24 ++++++++ src/views/vehicle/customer-archive.vue | 81 ++++++++++++++++++++++---- 2 files changed, 93 insertions(+), 12 deletions(-) diff --git a/src/api/vehicle/customer-archive.js b/src/api/vehicle/customer-archive.js index 222ca13..0637e27 100644 --- a/src/api/vehicle/customer-archive.js +++ b/src/api/vehicle/customer-archive.js @@ -175,6 +175,30 @@ export const querySupplierCode = creditCode => { }); }; +// 金蝶开户行查询(A905-3):收款信息填写开户行失焦后精确匹配带出联行号 +export const queryKingdeeBank = bankName => { + return request({ + url: '/blade-transport/customer-archive/query-bank', + method: 'get', + timeout: 30000, + params: { + bankName, + }, + }); +}; + +// 金蝶联行号校验(A905-3):收款信息保存前按联行号精确匹配,查不到不允许保存 +export const queryKingdeeBankByNumber = cnapsCode => { + return request({ + url: '/blade-transport/customer-archive/query-bank-by-number', + method: 'get', + timeout: 30000, + params: { + cnapsCode, + }, + }); +}; + export const syncKingdee = id => { return request({ url: '/blade-transport/customer-archive/sync-kingdee', diff --git a/src/views/vehicle/customer-archive.vue b/src/views/vehicle/customer-archive.vue index 4c2ffca..62a3dac 100644 --- a/src/views/vehicle/customer-archive.vue +++ b/src/views/vehicle/customer-archive.vue @@ -1100,8 +1100,18 @@ - - + + + @@ -1608,6 +1618,8 @@ import { remove, getScoreTemplate, recognizeBusinessLicenseOcr, + queryKingdeeBank, + queryKingdeeBankByNumber, queryKingdeeCustomer, querySupplierCode, syncKingdee, @@ -3657,18 +3669,50 @@ export default { this.receiptForm = this.emptyReceiptAccount(); this.$refs.receiptForm?.clearValidate(); }, - saveReceipt() { - this.$refs.receiptForm.validate(valid => { - if (!valid) return; - const receipt = this.normalizeReceipt(this.receiptForm); - if (this.receiptIndex > -1) { - this.archiveForm.receiptAccounts.splice(this.receiptIndex, 1, receipt); + // 开户行失焦后按行名精确匹配金蝶行名行号档案(A905-3),命中自动带出联行号,未命中提示检查 + async fetchReceiptCnapsCode() { + const bankName = String(this.receiptForm.bankName || '').trim(); + if (!bankName) return; + try { + const res = await queryKingdeeBank(bankName); + // 防止响应返回时用户已修改开户行 + if (String(this.receiptForm.bankName || '').trim() !== bankName) return; + const bank = res?.data?.data || null; + if (bank && bank.unionNumber) { + this.receiptForm.cnapsCode = bank.unionNumber; + this.$refs.receiptForm?.clearValidate('cnapsCode'); } else { - this.archiveForm.receiptAccounts.push(receipt); - this.handleDetailCurrentChange('receipt', this.getDetailPageCount('receipt')); + this.$message.warning('未查询到金蝶开户行信息,请检查开户行名称'); } - this.receiptBox = false; - }); + } catch (error) { + // 忽略查询异常,联行号留空由用户手填 + } + }, + async saveReceipt() { + const valid = await this.$refs.receiptForm.validate().catch(() => false); + if (!valid) return; + // 保存前按联行号精确校验金蝶行名行号档案(A905-3),查不到不允许保存 + const cnapsCode = String(this.receiptForm.cnapsCode || '').trim(); + let bank = null; + try { + const res = await queryKingdeeBankByNumber(cnapsCode); + bank = res?.data?.data || null; + } catch (error) { + this.$message.warning('金蝶联行号校验失败,请稍后重试'); + return; + } + if (!bank || !bank.unionNumber) { + this.$message.warning('未查询到金蝶联行号信息,不能保存,请检查联行号'); + return; + } + const receipt = this.normalizeReceipt(this.receiptForm); + if (this.receiptIndex > -1) { + this.archiveForm.receiptAccounts.splice(this.receiptIndex, 1, receipt); + } else { + this.archiveForm.receiptAccounts.push(receipt); + this.handleDetailCurrentChange('receipt', this.getDetailPageCount('receipt')); + } + this.receiptBox = false; }, deleteReceipt(index) { this.$confirm('确定删除该收款信息?', '提示', { @@ -6127,6 +6171,19 @@ export default { :deep(.el-select) { width: 60%; } + + .receipt-bank-label { + display: inline-flex; + align-items: center; + gap: 4px; + } + + .receipt-bank-help { + color: #a8abb2; + cursor: help; + font-size: 14px; + flex: none; + } } .receipt-dialog__footer-actions {