批量开票增加停止

This commit is contained in:
chfei committed 2026-09-21 09:49:26 +08:00
1 parent 32976d41cd
commit 86d30e57d1
2 files changed
+20 -1

No files matched your search

@@ -232,7 +232,13 @@
<Button
Padding="10,0"
Command="{Binding BatchInvoiceCommand}"
Content="批量开票" />
Content="批量开票"
Visibility="{Binding IsBatchInvoicing, Converter={StaticResource Boolean2VisibilityReConverter}}" />
<Button
Padding="10,0"
Command="{Binding StopBatchInvoiceCommand}"
Content="停止开票"
Visibility="{Binding IsBatchInvoicing, Converter={StaticResource Boolean2VisibilityConverter}}" />
<Button
Padding="10,0"
Command="{Binding ShowSettingDialogCommand}"
@@ -464,6 +464,13 @@ public partial class PDDInvoiceViewModel : BindableBaseEx
await BatchInvoiceAsync(targets);
}
public ICommand StopBatchInvoiceCommand => new AsyncDelegateCommand(StopBatchInvoice);
private async Task StopBatchInvoice()
{
IsBatchInvoicing = false;
}
public ICommand ShowSettingDialogCommand => new DelegateCommand(ShowSettingDialog);
private void ShowSettingDialog()
@@ -494,6 +501,12 @@ public partial class PDDInvoiceViewModel : BindableBaseEx
for (int i = 0; i < targets.Count; i++)
{
if (IsBatchInvoicing == false)
{
BottomMsg = "已取消批量开票";
return;
}
if (AmountTotal >= Config.MaxAmount)
{
return;