diff --git a/src/api/payment/receiptClaimRecord.js b/src/api/payment/receiptClaimRecord.js index 570888d..90e8633 100644 --- a/src/api/payment/receiptClaimRecord.js +++ b/src/api/payment/receiptClaimRecord.js @@ -8,20 +8,12 @@ export const getDetail = id => request({ url: `${baseUrl}/detail`, method: 'get' export const updateAttachments = data => request({ url: `${baseUrl}/attachments`, method: 'post', data }); export const voidClaim = id => request({ url: `${baseUrl}/void`, method: 'post', params: { id } }); -export const queryKingdeeResult = () => - request({ url: `${baseUrl}/query-kingdee-result`, method: 'post' }); export const claimStatusOptions = [ { label: '已认领', value: 'claimed' }, { label: '已作废', value: 'voided' }, ]; -export const pushStatusOptions = [ - { label: '未推送', value: 'none' }, - { label: '已推送', value: 'pushed' }, - { label: '推送失败', value: 'failed' }, -]; - export const kingdeeBillStatusOptions = [ { label: '未生成', value: 'none' }, { label: '已推送', value: 'pushed' }, diff --git a/src/api/payment/receiptFlow.js b/src/api/payment/receiptFlow.js index 231e0ac..4520988 100644 --- a/src/api/payment/receiptFlow.js +++ b/src/api/payment/receiptFlow.js @@ -2,6 +2,9 @@ import request from '@/axios'; const baseUrl = '/blade-transport/receipt-flow'; +/** 收款流水同步需远程拉取金蝶收款单并逐条落库,覆盖全局 10s 超时 */ +export const SYNC_TIMEOUT = 30000; + export const getList = (current, size, params) => request({ url: `${baseUrl}/list`, method: 'get', params: { current, size, ...params } }); export const getDetail = id => request({ url: `${baseUrl}/detail`, method: 'get', params: { id } }); @@ -12,9 +15,7 @@ export const getSettlementCandidates = (keyword, flowId) => params: { keyword, flowId }, }); export const claim = data => request({ url: `${baseUrl}/claim`, method: 'post', data }); -export const sync = () => request({ url: `${baseUrl}/sync`, method: 'post' }); -export const pushKingdee = flowId => - request({ url: `${baseUrl}/push-kingdee`, method: 'post', params: { flowId } }); +export const sync = () => request({ url: `${baseUrl}/sync`, method: 'post', timeout: SYNC_TIMEOUT }); export const claimStatusOptions = [ { label: '未认领', value: 'unclaimed' }, @@ -22,12 +23,6 @@ export const claimStatusOptions = [ { label: '认领完成', value: 'claimed' }, ]; -export const pushStatusOptions = [ - { label: '未推送', value: 'none' }, - { label: '已推送', value: 'pushed' }, - { label: '推送失败', value: 'failed' }, -]; - export const kingdeeBillStatusOptions = [ { label: '已推送', value: 'pushed' }, { label: '审核通过', value: 'approved' }, diff --git a/src/option/payment/receiptClaimRecord.js b/src/option/payment/receiptClaimRecord.js index d1f1d96..c445762 100644 --- a/src/option/payment/receiptClaimRecord.js +++ b/src/option/payment/receiptClaimRecord.js @@ -1,7 +1,7 @@ export const receiptClaimRecordTableColumns = [ - { prop: 'receiptNoticeNo', label: '认领通知单', minWidth: 150, link: true }, + { prop: 'receiptNoticeNo', label: '收款单号', minWidth: 150, link: true }, { prop: 'payerName', label: '付款人', minWidth: 130 }, - { prop: 'receiptAmount', label: '付款金额', minWidth: 130, money: true }, + { prop: 'receiptAmount', label: '收款金额', minWidth: 130, money: true }, { prop: 'counterpartyName', label: '对方户名', minWidth: 150 }, { prop: 'counterpartyAccount', label: '对方账号', minWidth: 170 }, { prop: 'counterpartyBank', label: '对方开户行', minWidth: 150 }, diff --git a/src/option/payment/receiptFlow.js b/src/option/payment/receiptFlow.js index 983f4a1..ff2ac33 100644 --- a/src/option/payment/receiptFlow.js +++ b/src/option/payment/receiptFlow.js @@ -1,18 +1,23 @@ export const receiptFlowTableColumns = [ - { prop: 'receiptNoticeNo', label: '认领通知单', minWidth: 150, link: true }, + { prop: 'receiptNoticeNo', label: '收款单号', minWidth: 150, link: true }, { prop: 'payerName', label: '付款人', minWidth: 130 }, - { prop: 'receiptAmount', label: '付款金额', minWidth: 130, money: true }, + { prop: 'receiptAmount', label: '收款金额', minWidth: 130, money: true }, { prop: 'counterpartyName', label: '对方户名', minWidth: 150 }, { 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: 'summary', label: '摘要', minWidth: 160 }, { prop: 'transactionTime', label: '交易时间', minWidth: 170 }, { prop: 'claimStatusName', label: '认领状态', minWidth: 110, status: true }, - { prop: 'kingdeeClaimStatusName', label: '公告状态', minWidth: 110 }, { prop: 'claimedAmount', label: '已认领金额', minWidth: 130, money: true }, - { prop: 'unclaimedAmount', label: '金蝶未认领金额', minWidth: 140, money: true }, - { prop: 'pushStatusName', label: '推送状态', minWidth: 110, status: true }, - { prop: 'pushFailReason', label: '推送失败原因', minWidth: 160 }, - { prop: 'kingdeeBillNo', label: '金蝶收款单号', minWidth: 150 }, + { 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: 'kingdeeBillStatusName', label: '金蝶状态', minWidth: 110 }, ]; diff --git a/src/views/payment/receipt-claim-record-form.vue b/src/views/payment/receipt-claim-record-form.vue index 0df5b49..9d6f41b 100644 --- a/src/views/payment/receipt-claim-record-form.vue +++ b/src/views/payment/receipt-claim-record-form.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/payment/receipt-claim-record.vue b/src/views/payment/receipt-claim-record.vue index bce6f40..df9d3cc 100644 --- a/src/views/payment/receipt-claim-record.vue +++ b/src/views/payment/receipt-claim-record.vue @@ -3,7 +3,7 @@
- + @@ -56,16 +56,6 @@ - - - - -
- - 查询金蝶认领结果 - - + @@ -302,10 +302,8 @@ export default { ); }, flowRemaining(flow) { - const unclaimed = Number(flow.unclaimedAmount || 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.unclaimedAmount || 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; } } diff --git a/src/views/payment/receipt-flow-form.vue b/src/views/payment/receipt-flow-form.vue index 8497954..8778966 100644 --- a/src/views/payment/receipt-flow-form.vue +++ b/src/views/payment/receipt-flow-form.vue @@ -12,7 +12,7 @@ ({ transactionTime: '', detailSerialNo: '', claimedAmount: 0, - unclaimedAmount: 0, + unmatchAmountRec: 0, claimerName: '', claimerDeptName: '', claimDate: '', @@ -252,11 +252,10 @@ export default { ); }, claimableAmount() { - const unclaimed = Number(this.form.unclaimedAmount || 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() { diff --git a/src/views/payment/receipt-flow.vue b/src/views/payment/receipt-flow.vue index 8fcf069..29ad100 100644 --- a/src/views/payment/receipt-flow.vue +++ b/src/views/payment/receipt-flow.vue @@ -3,7 +3,7 @@