feat(M08-B): 补结算批量同步

This commit is contained in:
Codex
2026-07-02 08:10:37 +08:00
parent 2ce59eee3b
commit 9f6e267d43
7 changed files with 71 additions and 11 deletions
+10
View File
@@ -131,6 +131,7 @@
@confirm="handleConfirmSettlement"
@transfer="handleTransfer"
@sync-transfer="handleSyncTransfer"
@sync-transfer-many="handleSyncTransferMany"
@failure="handleFailure"
/>
</el-tab-pane>
@@ -478,6 +479,15 @@ async function handleSyncTransfer(input: { settlementId: string; note?: string }
}, '已同步微信状态');
}
async function handleSyncTransferMany(input: { settlementIds: string[]; note?: string }) {
await runAction(async () => {
for (const settlementId of input.settlementIds) {
await syncWechatTransfer(session.value, settlementId, input.note);
}
await Promise.all([loadSettlements(), loadStatistics()]);
}, `已批量同步 ${input.settlementIds.length} 个结算单`);
}
async function handleFailure(
input: { settlementId: string; error: string; payoutReference?: string; note?: string }
) {