🐛 收款流水认领额度改用收款金额并新增剩余可认领金额列

认领只登记本地,额度由本地累计认领控制,金蝶未匹配金额不再作为上限;批量认领校验复用剩余可认领金额口径。
This commit is contained in:
刘泉佳
2026-10-29 20:07:53 +08:00
parent 2cf966d6e3
commit 78bb38e955
3 changed files with 16 additions and 22 deletions
+8 -7
View File
@@ -6,17 +6,18 @@ export const receiptFlowTableColumns = [
{ prop: 'counterpartyAccount', label: '对方账号', minWidth: 170 },
{ prop: 'counterpartyBank', label: '对方开户行', minWidth: 150 },
{ prop: 'payeeName', label: '收款人(公司)', minWidth: 150 },
{ prop: 'orgNumber', label: '收款公司编码', minWidth: 130 },
{ prop: 'openOrgNumber', label: '核算组织编码', minWidth: 130 },
//{ prop: 'orgNumber', label: '收款公司编码', minWidth: 130 },
//{ prop: 'openOrgNumber', label: '核算组织编码', minWidth: 130 },
{ prop: 'summary', label: '摘要', minWidth: 160 },
{ prop: 'transactionTime', label: '交易时间', minWidth: 170 },
{ prop: 'claimStatusName', label: '认领状态', minWidth: 110, status: true },
{ prop: 'claimedAmount', label: '已认领金额', minWidth: 130, money: true },
{ prop: 'remainingAmount', label: '剩余可认领金额', minWidth: 140, money: true },
{ prop: 'unmatchAmountRec', label: '未匹配金额', minWidth: 140, money: true },
{ prop: 'matchAmountRec', label: '已匹配收款金额', minWidth: 140, money: true },
{ prop: 'matchAmountPay', label: '已匹配付款金额', minWidth: 140, money: true },
{ prop: 'unmatchAmountPay', label: '未匹配付款金额', minWidth: 140, money: true },
{ prop: 'settleAmount', label: '已结算金额', minWidth: 130, money: true },
{ prop: 'unsettleAmount', label: '未结算金额', minWidth: 130, money: true },
//{ prop: 'matchAmountRec', label: '已匹配收款金额', minWidth: 140, money: true },
//{ prop: 'matchAmountPay', label: '已匹配付款金额', minWidth: 140, money: true },
//{ prop: 'unmatchAmountPay', label: '未匹配付款金额', minWidth: 140, money: true },
//{ prop: 'settleAmount', label: '已结算金额', minWidth: 130, money: true },
//{ prop: 'unsettleAmount', label: '未结算金额', minWidth: 130, money: true },
{ prop: 'kingdeeBillStatusName', label: '金蝶状态', minWidth: 110 },
];
+5 -11
View File
@@ -43,7 +43,7 @@
<el-table-column label="已认领金额" min-width="130" align="right">
<template #default="{ row }">{{ formatMoney(row.claimedAmount) }}</template>
</el-table-column>
<el-table-column label="金蝶未认领金额" min-width="140" align="right">
<el-table-column label="未匹配金额" min-width="140" align="right">
<template #default="{ row }">{{ formatMoney(row.unmatchAmountRec) }}</template>
</el-table-column>
<el-table-column label="剩余可认领金额" min-width="140" align="right">
@@ -302,10 +302,8 @@ export default {
);
},
flowRemaining(flow) {
const unclaimed = Number(flow.unmatchAmountRec || 0);
const receipt = Number(flow.receiptAmount || 0);
const ceiling = unclaimed > 0 && receipt > 0 ? Math.min(unclaimed, receipt) : unclaimed || receipt;
return Math.max(ceiling - Number(flow.claimedAmount || 0), 0);
// 认领只登记本地:剩余可认领 = 收款金额 − 已认领金额
return Math.max(Number(flow.receiptAmount || 0) - Number(flow.claimedAmount || 0), 0);
},
maxAllocation(row) {
const current = Number(row.settlement.allocations?.[row.flow.id] || 0);
@@ -355,12 +353,8 @@ export default {
}
for (const flow of this.flows) {
const total = this.flowAllocatedTotal(flow.id);
const remaining = Math.max(
Number(flow.unmatchAmountRec || 0) - Number(flow.claimedAmount || 0),
0
);
if (total > remaining + 0.001) {
this.$message.warning(`流水${flow.receiptNoticeNo}的累计认领金额不能超过未匹配金额`);
if (total > this.flowRemaining(flow) + 0.001) {
this.$message.warning(`流水${flow.receiptNoticeNo}的累计认领金额不能超过剩余可认领金额`);
return;
}
}
+3 -4
View File
@@ -252,11 +252,10 @@ export default {
);
},
claimableAmount() {
const unclaimed = Number(this.form.unmatchAmountRec || 0);
// 认领只登记本地:剩余可认领 = 收款金额 − 已认领金额
const receipt = Number(this.form.receiptAmount || 0);
const ceiling =
unclaimed > 0 && receipt > 0 ? Math.min(unclaimed, receipt) : unclaimed || receipt;
return Math.max(ceiling - Number(this.form.claimedAmount || 0), 0);
const claimed = Number(this.form.claimedAmount || 0);
return Math.max(receipt - claimed, 0);
},
},
created() {