feat(PrintConfig): 添加打印模板设计功能并优化相关视图

- 移除TestData字段的Required验证
- 将Template字段从textbox改为textarea以支持多行输入
- 添加打印模板设计界面,支持拖拽元素和自定义纸张
- 新增GetTemplateByName接口用于获取模板
- 优化视图布局,统一使用单列显示
This commit is contained in:
zhougf committed 2025-09-27 23:51:10 +08:00
1 parent 48c63bb15d
commit d89f6ffb3e
7 files changed
+208 -8

No files matched your search

@@ -19,6 +19,24 @@
<script>
let template =
{"panels":[{"index":0,"height":30,"width":60,"paperHeader":0,"paperFooter":85.03937007874016,"printElements":[{"options":{"left":10,"top":9,"height":55,"width":145,"title":"code","testData":"C0006","field":"code","fontSize":12,"textAlign":"center","lineHeight":12,"textType":"barcode"},"printElementType":{"type":"text"}}],"paperNumberLeft":140,"paperNumberTop":63,"paperNumberDisabled":true}]}
@*let template = ""
$.ajax({
type: "post",
dataType: "json",
url: "/configs/PrintConfig/GetTemplateByName/",
data:{name:"container"},
success: (json) => {
if (json.Code == 200) {
template = JSON.parse(json.Data.replace(/&quot;/g, '"'))
} else {
layui.layer.msg(json.Msg || '获取模板失败');
}
},
error: (xhr, status, error) => {
layui.layer.msg('获取模板失败:' + error);
}
});*@
let printData = [];