From f7759fd9e75161808b31a8a06a847b5edd83a622 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B3=89=E4=BD=B3?= <1107186916@qq.com> Date: Fri, 16 Oct 2026 15:26:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=89=B9=E9=87=8F=E8=AE=A4=E9=A2=86?= =?UTF-8?q?=E8=A1=A5=E5=85=85=E5=89=A9=E4=BD=99=E5=8F=AF=E8=AE=A4=E9=A2=86?= =?UTF-8?q?=E9=87=91=E9=A2=9D=E5=B1=95=E7=A4=BA=E4=B8=8E=E6=B5=81=E6=B0=B4?= =?UTF-8?q?=E7=BB=B4=E5=BA=A6=E5=88=86=E6=91=8A=E4=B8=8A=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/payment/receipt-flow-batch-form.vue | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/views/payment/receipt-flow-batch-form.vue b/src/views/payment/receipt-flow-batch-form.vue index b7f0bd8..156a5f5 100644 --- a/src/views/payment/receipt-flow-batch-form.vue +++ b/src/views/payment/receipt-flow-batch-form.vue @@ -46,6 +46,9 @@ + + + @@ -298,10 +301,21 @@ export default { 0 ); }, + flowRemaining(flow) { + return Math.max(Number(flow.unclaimedAmount || 0) - Number(flow.claimedAmount || 0), 0); + }, maxAllocation(row) { const current = Number(row.settlement.allocations?.[row.flow.id] || 0); const otherTotal = this.settlementAllocatedTotal(row.settlement) - current; - return Math.max(this.settlementRemaining(row.settlement) - otherTotal, 0); + // 流水维度:该流水其余分摊已占用部分同样挤占剩余可认领金额 + const flowOtherTotal = this.flowAllocatedTotal(row.flow.id) - current; + return Math.max( + Math.min( + this.settlementRemaining(row.settlement) - otherTotal, + this.flowRemaining(row.flow) - flowOtherTotal + ), + 0 + ); }, handleAllocationChange(settlement) { const total = this.settlementAllocatedTotal(settlement);