新增打印模板绑定功能,支持业务与打印模板的映射配置。实现打印模板的增删改查操作,优化打印数据的生成逻辑,提升打印模板的灵活性和用户体验。同时,新增打印机查询接口,增强打印服务的可用性和实时性。
This commit is contained in:
@@ -23,7 +23,8 @@ public partial class PrintPreviewWindow : HandyControl.Controls.Window
|
||||
}
|
||||
|
||||
public PrintPreviewWindow(PrintTemplate template, string? templateJson,
|
||||
IPrintDotService? printDotService, string? selectedPrinterName)
|
||||
IPrintDotService? printDotService, string? selectedPrinterName,
|
||||
string? initialParamJson = null)
|
||||
{
|
||||
InitializeComponent();
|
||||
_template = template;
|
||||
@@ -36,7 +37,9 @@ public partial class PrintPreviewWindow : HandyControl.Controls.Window
|
||||
$"尺寸:{template.PaperWidthMm ?? 210}×{template.PaperHeightMm ?? 297} mm " +
|
||||
$"方向:{template.PaperOrientation ?? "纵向"}";
|
||||
|
||||
TbParamJson.Text = BuildMockParamJson(_templateJson);
|
||||
TbParamJson.Text = !string.IsNullOrWhiteSpace(initialParamJson)
|
||||
? initialParamJson!
|
||||
: BuildMockParamJson(_templateJson);
|
||||
|
||||
// 没有 PrintDot 服务时禁用打印相关按钮
|
||||
if (_printDotService == null)
|
||||
|
||||
Reference in New Issue
Block a user