feat: 查看页指定失败行支持编辑匹配金额随重推生效
This commit is contained in:
@@ -67,12 +67,12 @@ export const invoiceAssignKingdee = id =>
|
||||
params: { id },
|
||||
});
|
||||
// 先票后款:查看页重推认领收票单(收票单A303-2+指定应付A302-6 一步式),涉及多次金蝶远程调用,覆盖全局超时
|
||||
export const repushClaimedInvoice = (id, invoiceNo) =>
|
||||
export const repushClaimedInvoice = (id, invoiceNo, matchedAmount) =>
|
||||
request({
|
||||
url: `${baseUrl}/repush-claimed-invoice`,
|
||||
method: 'post',
|
||||
timeout: 30000,
|
||||
params: { id, invoiceNo },
|
||||
params: { id, invoiceNo, matchedAmount },
|
||||
});
|
||||
export const queryInvoicePool = params =>
|
||||
request({ url: `${baseUrl}/invoice-pool`, method: 'get', params });
|
||||
|
||||
@@ -482,12 +482,12 @@
|
||||
align="center"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<!-- 匹配结算单金额支持手动修改(收款/付款一致),默认=发票金额全额认领,收票覆盖度按匹配合计判定 -->
|
||||
<!-- 匹配结算单金额支持手动修改:编辑态全放开;查看页仅指定失败行(failed)开放,重推时一并保存生效 -->
|
||||
<el-input-number
|
||||
v-if="editable"
|
||||
v-if="canEditMatchedAmount(row)"
|
||||
v-model="row.matchedAmount"
|
||||
:min="0"
|
||||
:max="Number(row.availableInvoiceAmount || 0)"
|
||||
:max="Number(row.availableInvoiceAmount || row.invoiceAmount || 0)"
|
||||
:precision="2"
|
||||
:controls="false"
|
||||
/>
|
||||
@@ -2711,6 +2711,16 @@ export default {
|
||||
['failed', 'pushed'].includes(row.kingdeePushStatus || '')
|
||||
);
|
||||
},
|
||||
// 查看页匹配金额编辑仅开放指定失败行(failed);pushed 行等待自动补偿指定,金额保持只读
|
||||
canEditMatchedAmount(row) {
|
||||
return (
|
||||
this.editable ||
|
||||
(this.form.settlementType !== 'receivable' &&
|
||||
this.form.approvalStatus === 'approved' &&
|
||||
this.form.kingdeeSyncStatus === 'synced' &&
|
||||
row.kingdeePushStatus === 'failed')
|
||||
);
|
||||
},
|
||||
// 重推 = 收票单A303-2 + 指定应付A302-6 一步式,服务端返回结果描述;完成后重载详情刷新状态
|
||||
async repushInvoice(row) {
|
||||
try {
|
||||
@@ -2725,7 +2735,7 @@ export default {
|
||||
this.repushing = true;
|
||||
try {
|
||||
const data = this.unwrapData(
|
||||
await repushClaimedInvoice(this.form.id, row.invoiceNo)
|
||||
await repushClaimedInvoice(this.form.id, row.invoiceNo, Number(row.matchedAmount || 0))
|
||||
);
|
||||
this.$message.success(data || '重新推送成功');
|
||||
await this.loadFormalDetail(this.form.id);
|
||||
|
||||
Reference in New Issue
Block a user