feat: 发票登记选票暂存展示且确认后才保存推送
This commit is contained in:
@@ -743,7 +743,7 @@ export default {
|
||||
this.$message.warning('所选收票单均已登记');
|
||||
return;
|
||||
}
|
||||
// 全额认领:匹配金额固定=发票金额
|
||||
// 全额认领:匹配金额固定=发票金额(仅暂存展示,点保存认领确认后才落库)
|
||||
this.invoiceRegisterDialog.candidates.push(
|
||||
...added.map(row => ({ ...row, matchedAmount: Number(row.invoiceAmount || 0) }))
|
||||
);
|
||||
@@ -758,23 +758,22 @@ export default {
|
||||
availableInvoiceAmount: Number(row.invoiceAmount || 0),
|
||||
matchedAmount: Number(row.invoiceAmount || 0),
|
||||
}));
|
||||
try {
|
||||
// 先确认后保存:确定才认领并推送指定应付,取消不保存任何数据
|
||||
await this.$confirm('确认认领并推送金蝶指定应付?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
});
|
||||
} catch {
|
||||
return;
|
||||
}
|
||||
this.invoiceRegisterDialog.saving = true;
|
||||
try {
|
||||
await api.claimInvoices({ formalSettlementId: settlement.id, invoices });
|
||||
this.invoiceRegisterDialog.visible = false;
|
||||
this.onLoad(this.page);
|
||||
try {
|
||||
await this.$confirm('是否将发票匹配数据推送金蝶?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
});
|
||||
} catch {
|
||||
this.$message.info('已保存认领,未推送金蝶');
|
||||
return;
|
||||
}
|
||||
const data = this.unwrapData(await api.invoiceAssignKingdee(settlement.id));
|
||||
this.$message.success(data || '发票登记推送金蝶成功');
|
||||
this.invoiceRegisterDialog.visible = false;
|
||||
this.onLoad(this.page);
|
||||
} finally {
|
||||
this.invoiceRegisterDialog.saving = false;
|
||||
|
||||
Reference in New Issue
Block a user