新增密炼物料皮重策略功能,包括相关实体、服务、控制器及接口,支持桌面端免密CRUD操作,优化打印记录与原料入场记录的衍生字段填充逻辑,提升用户体验。

This commit is contained in:
geht
2026-06-02 16:28:51 +08:00
parent 37239e1b0a
commit fef7d25e3c
75 changed files with 4407 additions and 170 deletions

View File

@@ -467,20 +467,20 @@ public partial class PrintPreviewWindow : HandyControl.Controls.Window
{
if (_printDotService == null)
{
HandyControl.Controls.Growl.Warning("PrintDot 服务不可用");
HandyControl.Controls.MessageBox.Warning("PrintDot 服务不可用");
return;
}
if (string.IsNullOrWhiteSpace(_templateJson) || _templateJson == "{}")
{
HandyControl.Controls.Growl.Warning("当前模板没有可打印内容");
HandyControl.Controls.MessageBox.Warning("当前模板没有可打印内容");
return;
}
var selected = PrinterCombo.SelectedItem as PrintDotPrinter;
if (selected == null || string.IsNullOrWhiteSpace(selected.Name))
{
HandyControl.Controls.Growl.Warning("请先选择打印机");
HandyControl.Controls.MessageBox.Warning("请先选择打印机");
return;
}
@@ -521,13 +521,13 @@ public partial class PrintPreviewWindow : HandyControl.Controls.Window
await _printDotService.PrintAsync(selected.Name, pdfBase64, jobName, copies: 1);
SetStatus("打印任务已发送");
HandyControl.Controls.Growl.Success("打印任务已发送至 PrintDot");
HandyControl.Controls.MessageBox.Success("打印任务已发送至 PrintDot");
}
catch (Exception ex)
{
// 顶部状态栏单行显示首行,完整多行处理步骤在 Growl 弹窗中展示
// 独立预览窗无 Growl 面板,用状态栏 + MessageBox 展示错误,避免 NullReferenceException
SetStatus($"打印失败:{ex.Message}");
HandyControl.Controls.Growl.Error($"打印失败:{ex.Message}");
HandyControl.Controls.MessageBox.Error($"打印失败:{ex.Message}");
}
finally
{