feat: 认领收票单候选弹窗改为分页并悬浮展示推送失败原因

This commit is contained in:
刘泉佳
2026-11-02 16:12:52 +08:00
parent eae50ab909
commit b59e43c9b7
2 changed files with 44 additions and 8 deletions
+3 -3
View File
@@ -41,9 +41,9 @@ export const pushKingdee = ids =>
// 先票后款:发票明细查询(收票登记明细区块按票号带出发票明细行)
export const invoiceDetailQuery = invoiceNo =>
request({ url: `${baseUrl}/invoice-detail-query`, method: 'get', params: { invoiceNo } });
// 先票后款:结算单认领收票单候选(审批通过且未被有效应付结算单认领)
export const claimCandidates = keyword =>
request({ url: `${baseUrl}/claim-candidates`, method: 'get', params: { keyword } });
// 先票后款:结算单认领收票单候选分页(审批通过且未被有效应付结算单认领)
export const claimCandidates = params =>
request({ url: `${baseUrl}/claim-candidates`, method: 'get', params });
// 先票后款:结算单已认领收票登记列表(发票登记对话框回显已认领票)
export const claimedReceipts = formalSettlementId =>
request({ url: `${baseUrl}/claimed-list`, method: 'get', params: { formalSettlementId } });
@@ -38,14 +38,30 @@
</el-table-column>
<el-table-column label="推送状态" min-width="120" align="center">
<template #default="{ row }">
<el-tag :type="pushStatusType(row.kingdeePushStatus)" size="small">
{{ pushStatusName(row.kingdeePushStatus) }}
</el-tag>
<el-tooltip
:disabled="row.kingdeePushStatus !== 'failed'"
:content="row.kingdeePushMsg || '推送金蝶失败,可在收票登记列表重推'"
placement="top"
>
<el-tag :type="pushStatusType(row.kingdeePushStatus)" size="small">
{{ pushStatusName(row.kingdeePushStatus) }}
</el-tag>
</el-tooltip>
</template>
</el-table-column>
</el-table>
<div class="invoice-candidates-dialog__pagination">
<el-pagination
v-model:current-page="page.current"
v-model:page-size="page.size"
:total="page.total"
layout="total, sizes, prev, pager, next, jumper"
@current-change="load"
@size-change="handleSizeChange"
/>
</div>
<div class="invoice-candidates-dialog__tip">
仅列出审批通过且未被其他付款结算单认领的收票单,最多 200 条
仅列出审批通过且未被其他付款结算单认领的收票单
</div>
<template #footer>
<el-button @click="visible = false">取消</el-button>
@@ -71,6 +87,7 @@ export default {
keyword: '',
rows: [],
selection: [],
page: { current: 1, size: 10, total: 0 },
};
},
computed: {
@@ -90,17 +107,31 @@ export default {
},
handleOpen() {
this.keyword = '';
this.page = { current: 1, size: 10, total: 0 };
this.selection = [];
this.$refs.candidatesTable?.clearSelection?.();
this.load();
},
handleQuery() {
this.page.current = 1;
this.load();
},
handleSizeChange() {
this.page.current = 1;
this.load();
},
async load() {
this.loading = true;
try {
this.rows = this.unwrap(await claimCandidates(this.keyword)) || [];
const data = this.unwrap(
await claimCandidates({
current: this.page.current,
size: this.page.size,
keyword: this.keyword,
})
);
this.rows = data?.records || [];
this.page.total = Number(data?.total || 0);
} finally {
this.loading = false;
}
@@ -142,6 +173,11 @@ export default {
width: 360px;
}
}
.invoice-candidates-dialog__pagination {
display: flex;
justify-content: flex-end;
margin-top: 12px;
}
.invoice-candidates-dialog__tip {
margin-top: 8px;
color: #909399;