| | |
| | | onMounted(async () => { |
| | | await getTags(); |
| | | await hiprint.init(); |
| | | hiprintTemplate.value = new hiprint.PrintTemplate({}); |
| | | hiprintTemplate.value.design("#hiprint-printTemplate1",{grid:true}); |
| | | |
| | | |
| | | }) |
| | | |
| | |
| | | }) |
| | | |
| | | const changeTag = () => { |
| | | |
| | | hiprintTemplate.value = new hiprint.PrintTemplate({}); |
| | | hiprintTemplate.value.design("#hiprint-printTemplate1",{grid:true}); |
| | | const json = tag.value.value |
| | | hiprintTemplate.value.update(json) |
| | | } |
| | |
| | | }) |
| | | } |
| | | const printOrder = (type) => { |
| | | const list = JSON.parse(JSON.stringify(hiprintTemplate.value.getJson())) |
| | | printNumber() |
| | | const list = tag.value.value |
| | | list.panels[0].printElements.forEach(element => { |
| | | element.options.fontFamily = 'Arial' |
| | | if( element.options.field !== undefined){ |
| | |
| | | }) |
| | | |
| | | //hiprintTemplate.value.update(list) |
| | | let object = lastList.value |
| | | let object = JSON.parse(JSON.stringify(lastList.value)) |
| | | //判断是否为表格 |
| | | let columnsNum = null |
| | | if(list.panels[0].printElements[0].options.field==='table'){ |
| | |
| | | } |
| | | //判断是否有 嵌套自定义纸张 |
| | | if(tag.value.tagHeight && tag.value.tagWidth){ |
| | | const print =createTemplate(hiprintTemplate.value.getJson(),object,tag.value.tagWidth,tag.value.tagHeight) |
| | | const print =createTemplate(list,object,tag.value.tagWidth,tag.value.tagHeight) |
| | | hiprintTemplate.value.update(print.template) |
| | | object = print.printData |
| | | } |
| | |
| | | const printNumber = () => { |
| | | |
| | | selectRecordsData.value.printList = selectRecords |
| | | request.post(`/processCard/updatePrintNumber`, selectRecordsData.value).then((res) => { |
| | | request.post(`/tagStyle/updatePrintNumber`, selectRecordsData.value).then((res) => { |
| | | if (res.code == 200 && res.data === true) { |
| | | } else { |
| | | |
| | |
| | | destroy-on-close |
| | | style="width: 75%;height:75% "> |
| | | <template #header="{ close, titleId, titleClass }"> |
| | | <el-button v-print="printContent" :icon="Printer" circle @click="printNumber"/> |
| | | <el-button v-print="printContent" :icon="Printer" circle /> |
| | | </template> |
| | | <print-process |
| | | id="child" |
| | |
| | | destroy-on-close |
| | | style="width: 80%;height:75% "> |
| | | <template #header="{ close, titleId, titleClass }"> |
| | | <el-button v-print="printContentLabelSemi" :icon="Printer" circle/> |
| | | <el-button v-print="printContentLabelSemi" :icon="Printer" circle @click="printNumber"/> |
| | | </template> |
| | | <print-custom-label-semi id="childLabelSemi" |
| | | :faceOrientation="labelRow.faceOrientation" |
| | |
| | | destroy-on-close |
| | | style="width: 80%;height:75% "> |
| | | <template #header="{ close, titleId, titleClass }"> |
| | | <el-button :icon="Printer" circle @click="printOrder(1)"/> |
| | | <el-tooltip |
| | | class="box-item" |
| | | effect="dark" |
| | | :content="$t('processCard.yesTitle')" |
| | | placement="top" |
| | | > |
| | | <el-button :icon="Printer" circle @click="printOrder(1)"/> |
| | | </el-tooltip> |
| | | <el-tooltip |
| | | class="box-item" |
| | | effect="dark" |
| | | :content="$t('processCard.noTitle')" |
| | | placement="top" |
| | | > |
| | | <el-button @click="printOrder(3)"> |
| | | <i class="vxe-icon-print"></i> |
| | | </el-button> |
| | | </el-tooltip> |
| | | </template> |
| | | <print-custom-label-x-j id="childLabel" |
| | | :faceOrientation="labelRow.faceOrientation" |