Browse Source

20250227

master
qiezi 11 months ago
parent
commit
0c4500cae1
  1. 2
      src/printFormat/RF_RFID.js
  2. 14
      src/printFormat/alphaHardTagPrintFormat.js
  3. 6
      src/printFormat/antenna.js
  4. 2
      src/printFormat/logisticLabel.js
  5. 4
      src/views/modules/label/printer.vue

2
src/printFormat/RF_RFID.js

@ -25,7 +25,7 @@ export const printRF_RFIDLabel = (printList, icons, printerName,testFlag = false
LODOP.NewPageA();
LODOP.PRINT_INITA(offsetY,offsetX,1100,512)
LODOP.SET_PRINTER_INDEXA(printerName)
LODOP.SET_PRINT_PAGESIZE(direction === 'Vertical'?2:0,1100,512,"");
LODOP.SET_PRINT_PAGESIZE(direction === 'Vertical'?0:0,1100,512,"");
LODOP.ADD_PRINT_IMAGE(-5,20,"26mm","26mm",row.qrCode);
LODOP.SET_PRINT_STYLEA(0,"Stretch",1);
LODOP.ADD_PRINT_IMAGE(4,+255,90,16,"<img src=\"data:image/png;base64," + ckpLogo + "\"/>");

14
src/printFormat/alphaHardTagPrintFormat.js

@ -35,8 +35,6 @@ export function printAlphaHardTagLabel (printList, icons, printerName, flag) {
}
//如果打印正常的标签
LODOP.NewPageA();
LODOP.PRINT_INITA(offsetY,offsetX,1100,512)
LODOP.SET_PRINTER_INDEXA(printerName)
if (flag === 'Y'){
if (row.printLabelType === 0){
sizeTop = 190;
@ -44,13 +42,19 @@ export function printAlphaHardTagLabel (printList, icons, printerName, flag) {
sizeTop = 0;
}
if (row.printLabelType === 0 || row.printLabelType === 1){
printCartonLabel(LODOP,row,icons,direction === 'Vertical'?2:0) // 箱标签
LODOP.PRINT_INITA(offsetY,offsetX,1100,512)
LODOP.SET_PRINTER_INDEXA(printerName)
printCartonLabel(LODOP,row,icons,direction === 'Vertical'?0:0) // 箱标签
}
if (row.printLabelType === 0 || row.printLabelType === 2){
printProductLabel(LODOP,row,direction === 'Vertical'?2:0)
LODOP.PRINT_INITA(offsetY,offsetX,1100,512)
LODOP.SET_PRINTER_INDEXA(printerName)
printProductLabel(LODOP,row,direction === 'Vertical'?0:0)
}
}else {
printCartonLabel(LODOP,row,icons,direction === 'Vertical'?2:0) // 箱标签
LODOP.PRINT_INITA(offsetY,offsetX,1100,512)
LODOP.SET_PRINTER_INDEXA(printerName)
printCartonLabel(LODOP,row,icons,direction === 'Vertical'?0:0) // 箱标签
}
LODOP.PRINT()
}

6
src/printFormat/antenna.js

@ -42,13 +42,13 @@ export const printAntennaLabel = (printList, icons, printerName,flag,testFlag =
sizeTop = 0;
}
if (row.printLabelType === 0 || row.printLabelType === 1){
printLabel(LODOP,row,icons,direction === 'Vertical'?2:0) // 箱标签
printLabel(LODOP,row,icons,direction === 'Vertical'?0:0) // 箱标签
}
if (row.printLabelType === 0 || row.printLabelType === 2){
printProductLabel(LODOP,row,direction === 'Vertical'?2:0)
printProductLabel(LODOP,row,direction === 'Vertical'?0:0)
}
}else {
printLabel(LODOP,row,icons,direction === 'Vertical'?2:0) // 箱标签
printLabel(LODOP,row,icons,direction === 'Vertical'?0:0) // 箱标签
}
}
//LODOP.PREVIEW();

2
src/printFormat/logisticLabel.js

@ -24,7 +24,7 @@ const ckpLogo = 'iVBORw0KGgoAAAANSUhEUgAAAlkAAABxCAYAAADmmLY1AAAAAXNSR0IArs4c6QA
LODOP.NewPageA();
LODOP.PRINT_INITA(offsetY,offsetX,1100,512)
LODOP.SET_PRINTER_INDEXA(printerName)
LODOP.SET_PRINT_PAGESIZE(direction === 'Vertical'?2:0,1100,512,"");
LODOP.SET_PRINT_PAGESIZE(direction === 'Vertical'?0:0,1100,512,"");
LODOP.ADD_PRINT_IMAGE(-5,20,"26mm","26mm",row.qrCode);
LODOP.SET_PRINT_STYLEA(0,"Stretch",1);
LODOP.ADD_PRINT_IMAGE(4,255,90,16,"<img src=\"data:image/png;base64," + ckpLogo + "\"/>");

4
src/views/modules/label/printer.vue

@ -906,8 +906,8 @@ export default {
}else if (item.printType === 'RF' || this.currentPart.category === 'RFID'){
printRF_RFIDLabel([params],icons,item.printerName,this.printTest)
}
this.printTest = false
}
this.printTest = false
// let notFound = [];
// //
// let labelList = this.labelFormatList.filter((item)=> item.labelType === 'Shipment Carton')
@ -1259,12 +1259,12 @@ export default {
}
printLogisticLabel([row],label.defaultPrinterName,this.printTest)
}
this.printTest = false
if (notFound.length > 0){
this.$message.warning(`The printer ${notFound.join(',')} is not found`)
return
}
}
this.printTest = false
this.$message.success(data.msg)
}else {
this.$message.warning(data.msg)

Loading…
Cancel
Save