From d1e2350d3d88202a0ccd289ab38fe11204005e3c Mon Sep 17 00:00:00 2001
From: guoyujie <guoyujie@ng.com>
Date: 星期三, 11 六月 2025 13:25:51 +0800
Subject: [PATCH] 提交打印相关程序
---
north-glass-erp/northglass-erp/src/components/pp/TagStyleDesigner.vue | 40 +++++++++++++++++++++++++++++-----------
1 files changed, 29 insertions(+), 11 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/components/pp/TagStyleDesigner.vue b/north-glass-erp/northglass-erp/src/components/pp/TagStyleDesigner.vue
index dca03bd..c9fa6c6 100644
--- a/north-glass-erp/northglass-erp/src/components/pp/TagStyleDesigner.vue
+++ b/north-glass-erp/northglass-erp/src/components/pp/TagStyleDesigner.vue
@@ -142,7 +142,8 @@
height: 16,
fontSize: 11.25,
textAlign: "center",
- textContentVerticalAlign: "middle"
+ textContentVerticalAlign: "middle",
+ type:'custom'
}
},
{
@@ -154,7 +155,8 @@
height: 16,
fontSize: 11.25,
textAlign: "center",
- textContentVerticalAlign: "middle"
+ textContentVerticalAlign: "middle",
+ type:'custom'
}
},
{
@@ -166,7 +168,8 @@
height: 16,
fontSize: 11.25,
textAlign: "center",
- textContentVerticalAlign: "middle"
+ textContentVerticalAlign: "middle",
+ type:'custom'
}
},
{
@@ -603,7 +606,8 @@
height: 16,
fontSize: 11.25,
textAlign: "left",
- textContentVerticalAlign: "middle"
+ textContentVerticalAlign: "middle",
+ type:'custom'
}
},
{
@@ -615,7 +619,8 @@
height: 16,
fontSize: 11.25,
textAlign: "left",
- textContentVerticalAlign: "middle"
+ textContentVerticalAlign: "middle",
+ type:'custom'
}
},
{
@@ -627,7 +632,8 @@
height: 16,
fontSize: 11.25,
textAlign: "left",
- textContentVerticalAlign: "middle"
+ textContentVerticalAlign: "middle",
+ type:'custom'
}
},
{
@@ -639,7 +645,8 @@
height: 16,
fontSize: 11.25,
textAlign: "left",
- textContentVerticalAlign: "middle"
+ textContentVerticalAlign: "middle",
+ type:'custom'
}
},
{
@@ -651,7 +658,8 @@
height: 16,
fontSize: 11.25,
textAlign: "left",
- textContentVerticalAlign: "middle"
+ textContentVerticalAlign: "middle",
+ type:'custom'
}
},
@@ -738,7 +746,10 @@
TgaStyleSet.value.forEach(item => {
let para = {
text: item.title,
- field: item.options.field || item.options.title
+ field: item.options.field || item.options.title,
+ }
+ if(item.options.type){
+ para.type = item.options.type
}
list.push(para)
})
@@ -817,14 +828,20 @@
const tableFlag = json.panels[0].printElements.filter(item => item.options.field==='table')
json.panels[0].printElements.forEach((item,index) => {
if (item.options.field === 'table') {
+ const fields = json.panels[0].printElements[index].options.fields.filter(item => item.type)
+ const result = Object.fromEntries(
+ fields.map(item => [item.field, true]) // 杞崲鎴� [key, value] 鏁扮粍
+ )
let funct = "function(value,row,index,options){return `"
json.panels[0].printElements[index].options.columns[0].forEach(item => {
- if(item.field){
+ if(item.field && !result[item.field ]){
if (company.printShowTitle){
funct += item.title+':${row.'+item.field+' || "" } <br>'
}else{
funct += '${row.'+item.field+' || "" } <br>'
}
+ }else if(item.field && result[item.field]){
+ funct += item.title+'<br>'
}
})
funct+='`}'
@@ -852,7 +869,7 @@
}
})
}
-
+ hiprintTemplate.value.update(json)
})
}
@@ -941,6 +958,7 @@
const printOrder = (type) => {
const list = hiprintTemplate.value.getJson()
+
list.panels[0].printElements.forEach(element => {
element.options.fontFamily = 'Arial'
if(element.printElementType.title!==''){
--
Gitblit v1.8.0