guoyujie
2025-06-11 d1e2350d3d88202a0ccd289ab38fe11204005e3c
提交打印相关程序
1个文件已修改
40 ■■■■ 已修改文件
north-glass-erp/northglass-erp/src/components/pp/TagStyleDesigner.vue 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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!==''){