guoyujie
2025-09-12 8e6182fc84aa1873aa1e485dba1602f15df2bbc1
修改二维码生成规则
2个文件已修改
49 ■■■■ 已修改文件
north-glass-erp/northglass-erp/src/components/pp/TagStyleDesigner.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCardDetails.vue 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/components/pp/TagStyleDesigner.vue
@@ -627,15 +627,14 @@
    }
  },
  {
    tid: 'heat_layout_sort', title: '炉内序号', data: '', type: 'text',
    tid: 'heat_layout_sort', title: '玻璃ID',  type: 'text',
    options: {
      field: 'heat_layout_sort',
      testData: '',
      width:100,
      height: 16,
      fontSize: 11.25,
      textAlign: "left",
      textContentVerticalAlign: "middle"
      testData: '玻璃ID',
      height: 32,
      fontSize: 12,
      lineHeight: 18,
      textType: "qrcode"
    }
  },
  {
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCardDetails.vue
@@ -21,6 +21,7 @@
import {CircleCheck, Download, Printer} from "@element-plus/icons-vue/global";
import TagStyleDesigner from "@/components/pp/TagStyleDesigner.vue";
import {hiprint} from "vue-plugin-hiprint";
import {createTemplate} from "@/hook/createTemplateTag"
const company = companyInfo()
@@ -180,12 +181,15 @@
const data = ref({
  printList: []
})
let hiprintTemplate = ref(null)
onMounted(async () => {
  await getTags();
  await hiprint.init();
  hiprintTemplate.value = new hiprint.PrintTemplate({});
  hiprintTemplate.value.design("#hiprint-printTemplate1",{grid:true});
})
let hiprintTemplate = ref()
const tags = ref([])
@@ -200,21 +204,37 @@
})
const changeTag = () => {
  hiprintTemplate.value = new hiprint.PrintTemplate({});
  const json = JSON.parse(tag.value.value)
  const json = tag.value.value
  hiprintTemplate.value.update(json)
}
const getTags = () => {
  request.get('tagStyle/getTagList').then(res => {
    res.data.forEach(item => {
      item.value = JSON.parse(item.value)
    })
    tags.value = res.data
  })
}
const printOrder = (type) => {
  const list = hiprintTemplate.value.getJson()
  const list = JSON.parse(JSON.stringify(hiprintTemplate.value.getJson()))
  list.panels[0].printElements.forEach(element => {
    element.options.fontFamily = 'Arial'
    if( element.options.field !== undefined){
      if(type===3 ){
        element.options.hideTitle = true
      }
    }
    if(type!==3){
      element.options.hideTitle = false
      if( element.options.field === undefined){
        element.options.hideTitle = true
      }
    }
  })
  //hiprintTemplate.value.update(list)
  let object =  lastList.value
  //判断是否为表格
  let columnsNum = null
@@ -222,6 +242,12 @@
    object = {table:lastList.value}
    columnsNum = (list.panels[0].printElements[0].options.gridColumns || 1)
  }
  //判断是否有 嵌套自定义纸张
  if(tag.value.tagHeight && tag.value.tagWidth){
    const print =createTemplate(hiprintTemplate.value.getJson(),object,tag.value.tagWidth,tag.value.tagHeight)
    hiprintTemplate.value.update(print.template)
    object = print.printData
  }
  hiprintTemplate.value.print(object)
}