|
|
|
@ -1,4 +1,4 @@ |
|
|
|
var LODOP = getCLodop(); |
|
|
|
var LODOP = getCLodop(); |
|
|
|
|
|
|
|
//初始化
|
|
|
|
function initPrintSetting(clodoplisence) { |
|
|
|
@ -6,9 +6,21 @@ function initPrintSetting(clodoplisence) { |
|
|
|
var LODOP= getCLodop(); |
|
|
|
if (LODOP.VERSION) { |
|
|
|
if (LODOP.CVERSION){ |
|
|
|
//alert("当前有WEB打印服务C-Lodop可用!\n C-Lodop版本:"+LODOP.CVERSION+"(内含Lodop"+LODOP.VERSION+")");
|
|
|
|
//如果没有问题打印的信息
|
|
|
|
//LODOP.SET_LICENSES("","646464550585055535859561289003","688858710010010811411756128900","");
|
|
|
|
LODOP.SET_LICENSES("",clodoplisence,"",""); |
|
|
|
//判断当前打印模式
|
|
|
|
/* if(printerData.seq >= 0){ |
|
|
|
LODOP.SET_PRINTER_INDEXA(printerData.printName); |
|
|
|
LODOP.PRINT(); |
|
|
|
}else if(printerData.seq === -1){ |
|
|
|
LODOP.PREVIEW(); |
|
|
|
}else if(printerData.seq === -2){ |
|
|
|
LODOP.PRINT_DESIGN(); |
|
|
|
}*/ |
|
|
|
}else { |
|
|
|
alert("本机已成功安装了Lodop控件!\n 版本号"+LODOP.VERSION); |
|
|
|
alert("本机已成功安装了Lodop控件!\n 版本号:"+LODOP.VERSION); |
|
|
|
} |
|
|
|
}; |
|
|
|
}catch(err){ |
|
|
|
@ -23,16 +35,16 @@ function printQcZeroRollLabel(printRow, printerData){ |
|
|
|
initPrintSetting(printerData.clodopLicense); |
|
|
|
switch (labelFlag) { |
|
|
|
case "A": |
|
|
|
printZeroPageA(printRow, printerData); |
|
|
|
this.printZeroPageA(printRow, printerData); |
|
|
|
break; |
|
|
|
case "B": |
|
|
|
printZeroPageB(printRow); |
|
|
|
this.printZeroPageB(printRow, printerData); |
|
|
|
break; |
|
|
|
case "C": |
|
|
|
printZeroPageC(printRow); |
|
|
|
this.printZeroPageC(printRow, printerData); |
|
|
|
break; |
|
|
|
case "D": |
|
|
|
printZeroPageD(printRow); |
|
|
|
this.printZeroPageD(printRow, printerData); |
|
|
|
break; |
|
|
|
default: |
|
|
|
break; |
|
|
|
@ -49,99 +61,145 @@ function printQcZeroRollLabel(printRow, printerData){ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 参考2024 India布局:左列条码标签
|
|
|
|
function printZeroLeftColumn(printRow, offsetX){ |
|
|
|
LODOP.ADD_PRINT_TEXT(3,5+offsetX,220,21,"P/N:"+printRow.customerPartNo); |
|
|
|
LODOP.ADD_PRINT_BARCODE(16,5+offsetX,156,20,"128A",printRow.customerPartNo); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); |
|
|
|
LODOP.ADD_PRINT_TEXT(37,5+offsetX,160,21,"QTY:"+printRow.standardRollQty); |
|
|
|
LODOP.ADD_PRINT_BARCODE(50,5+offsetX,65,20,"128A",printRow.standardRollQty); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); |
|
|
|
LODOP.ADD_PRINT_TEXT(71,5+offsetX,220,20,"Mfr P/N:"+printRow.partNo); |
|
|
|
LODOP.ADD_PRINT_BARCODE(84,5+offsetX,161,20,"128A",printRow.partNo); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); |
|
|
|
LODOP.ADD_PRINT_TEXT(105,5+offsetX,220,20,"Date Code:"+printRow.dateCode); |
|
|
|
LODOP.ADD_PRINT_BARCODE(118,5+offsetX,132,20,"128A",printRow.dateCode); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); |
|
|
|
LODOP.ADD_PRINT_TEXT(139,5+offsetX,220,20,"Lot NO:"+printRow.finalRollNo); |
|
|
|
LODOP.ADD_PRINT_BARCODE(152,5+offsetX,161,20,"128A",printRow.finalRollNo); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); |
|
|
|
LODOP.ADD_PRINT_TEXT(173,5+offsetX,220,20,"PKG ID:"+printRow.pkcId); |
|
|
|
LODOP.ADD_PRINT_BARCODE(186,5+offsetX,168,20,"128A",printRow.pkcId); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); |
|
|
|
|
|
|
|
LODOP.ADD_PRINT_BARCODE(208,5+offsetX,105,105,"QRCode",printRow.newQrCode); |
|
|
|
LODOP.ADD_PRINT_TEXT(208,105+offsetX,75,20,"Rev:"+printRow.revNo); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",12); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Bold",1); |
|
|
|
LODOP.ADD_PRINT_IMAGE(225,101+offsetX,59,28,"<img src='/img/cclimg.png'>"); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Stretch",1); |
|
|
|
LODOP.ADD_PRINT_TEXT(258,105+offsetX,50,20,"HF"); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",14); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Bold",1); |
|
|
|
LODOP.ADD_PRINT_TEXT(280,5+offsetX,80,15,printRow.username); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); |
|
|
|
} |
|
|
|
|
|
|
|
// PageA: 2024 India风格 - 双列条码标签 + 底部卷号QR + 状态
|
|
|
|
function printZeroPageA(printRow, printerInfo){ |
|
|
|
LODOP.NewPage(); |
|
|
|
LODOP.SET_PRINT_PAGESIZE(2,800,1125,""); |
|
|
|
LODOP.SET_PRINT_MODE("PRINT_NOCOLLATE",1); |
|
|
|
LODOP.ADD_PRINT_TEXT(7,7,220,20,"LUXSANTECH"); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",16); |
|
|
|
LODOP.ADD_PRINT_LINE(28,7,29,167,0,1); |
|
|
|
LODOP.ADD_PRINT_TEXT(31,7,160,20,"Vendor: CCL-SZ"); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",10); |
|
|
|
LODOP.ADD_PRINT_LINE(48,7,49,167,0,1); |
|
|
|
LODOP.ADD_PRINT_TEXT(53,7,190,20,"P/N:"+printRow.customerPartNo); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",8); |
|
|
|
LODOP.ADD_PRINT_LINE(68,7,69,167,0,1); |
|
|
|
LODOP.ADD_PRINT_TEXT(71,7,160,20,"APN: "+printRow.pgppn); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",10); |
|
|
|
LODOP.ADD_PRINT_LINE(88,7,89,167,0,1); |
|
|
|
LODOP.ADD_PRINT_TEXT(93,7,190,20,"DESC:"+printRow.partDesc); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",8); |
|
|
|
LODOP.ADD_PRINT_LINE(108,7,109,167,0,1); |
|
|
|
LODOP.ADD_PRINT_TEXT(111,7,160,20,"DateCode:"+printRow.dateCode); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",10); |
|
|
|
LODOP.ADD_PRINT_LINE(128,7,129,167,0,1); |
|
|
|
LODOP.ADD_PRINT_TEXT(134,7,160,20,"QTY: "+printRow.standardRollQty+" Rev:"+printRow.revNo); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",10); |
|
|
|
LODOP.ADD_PRINT_LINE(152,7,153,167,0,1); |
|
|
|
LODOP.ADD_PRINT_TEXT(152,7,160,20,"Stage: "+printRow.stage); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",10); |
|
|
|
LODOP.ADD_PRINT_TEXT(169,7,160,20,printRow.partNo ); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",10); |
|
|
|
LODOP.ADD_PRINT_TEXT(186,7,160,20,printRow.finalRollNo); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",10); |
|
|
|
LODOP.ADD_PRINT_TEXT(203,7,160,20,printRow.rollDate2); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",10); |
|
|
|
LODOP.ADD_PRINT_TEXT(220,7,84,20,printRow.username); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",10); |
|
|
|
LODOP.ADD_PRINT_BARCODE(154,104,69,69,"QRCode", printRow.pgppn); |
|
|
|
LODOP.ADD_PRINT_TEXT(222,78,88,20,printRow.pgppn); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",8); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Alignment",3); |
|
|
|
LODOP.ADD_PRINT_IMAGE(243,87,70,25,"<img src='/img/cclimg.png'>"); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Stretch",1); |
|
|
|
LODOP.ADD_PRINT_BARCODE(266,7,100,25,"128A",printRow.lineBarcodeTime); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); |
|
|
|
LODOP.ADD_PRINT_TEXT(243,6,71,20,"Config "+printRow.config); |
|
|
|
|
|
|
|
//左列
|
|
|
|
printZeroLeftColumn(printRow, 0); |
|
|
|
|
|
|
|
//右列 (offsetX = 173, 同2024布局)
|
|
|
|
printZeroLeftColumn(printRow, 173); |
|
|
|
LODOP.ADD_PRINT_TEXT(7,178,160,20,"LUXSANTECH"); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",16); |
|
|
|
LODOP.ADD_PRINT_LINE(28,178,29,338,0,1); |
|
|
|
LODOP.ADD_PRINT_TEXT(31,178,160,20,"Vendor: CCL-SZ"); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",10); |
|
|
|
LODOP.ADD_PRINT_LINE(48,178,49,338,0,1); |
|
|
|
LODOP.ADD_PRINT_TEXT(53,178,190,20,"P/N:"+printRow.customerPartNo); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",8); |
|
|
|
LODOP.ADD_PRINT_LINE(68,178,69,338,0,1); |
|
|
|
LODOP.ADD_PRINT_TEXT(71,178,160,20,"APN: "+printRow.pgppn); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",10); |
|
|
|
LODOP.ADD_PRINT_LINE(88,178,89,338,0,1); |
|
|
|
LODOP.ADD_PRINT_TEXT(93,178,190,20,"DESC:"+printRow.partDesc); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",8); |
|
|
|
LODOP.ADD_PRINT_LINE(108,178,109,338,0,1); |
|
|
|
LODOP.ADD_PRINT_TEXT(111,178,160,20,"DateCode:"+printRow.dateCode); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",10); |
|
|
|
LODOP.ADD_PRINT_LINE(128,178,129,338,0,1); |
|
|
|
LODOP.ADD_PRINT_TEXT(134,178,160,20,"QTY: "+printRow.standardRollQty+" Rev:"+printRow.revNo); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",10); |
|
|
|
LODOP.ADD_PRINT_LINE(152,178,153,338,0,1); |
|
|
|
LODOP.ADD_PRINT_TEXT(152,178,160,20,"Stage: "+printRow.stage); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",10); |
|
|
|
LODOP.ADD_PRINT_TEXT(169,178,160,20,printRow.partNo ); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",10); |
|
|
|
LODOP.ADD_PRINT_TEXT(186,178,160,20,printRow.finalRollNo); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",10); |
|
|
|
LODOP.ADD_PRINT_TEXT(203,178,160,20,printRow.rollDate2); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",10); |
|
|
|
LODOP.ADD_PRINT_TEXT(220,178,84,20,printRow.username); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",10); |
|
|
|
LODOP.ADD_PRINT_BARCODE(154,275,69,69,"QRCode",printRow.pgppn); |
|
|
|
LODOP.ADD_PRINT_TEXT(222,249,88,20,printRow.pgppn); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",8); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Alignment",3); |
|
|
|
LODOP.ADD_PRINT_IMAGE(243,258,70,25,"<img src='/img/cclimg.png'>"); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Stretch",1); |
|
|
|
LODOP.ADD_PRINT_BARCODE(266,178,100,25,"128A",printRow.lineBarcodeTime); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); |
|
|
|
LODOP.ADD_PRINT_TEXT(243,177,71,20,"Config "+printRow.config); |
|
|
|
|
|
|
|
//底部 - 卷号大QR + 状态 (零检版用qrtextDate/qrtext)
|
|
|
|
LODOP.ADD_PRINT_BARCODE(4,348,110,80,"QRCode",printRow.qrtextDate); |
|
|
|
LODOP.ADD_PRINT_TEXT(73,310,100,15,printRow.qrtext); |
|
|
|
LODOP.ADD_PRINT_TEXT(73,309,100,15,printRow.qrtext); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Alignment",3); |
|
|
|
LODOP.ADD_PRINT_TEXT(88,372,35,15,"新"); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",12); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Alignment",3); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Bold",1); |
|
|
|
LODOP.ADD_PRINT_TEXT(114,304,100,15,printRow.qty); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",8); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Alignment",3); |
|
|
|
|
|
|
|
LODOP.ADD_PRINT_TEXT(135,340,100,30,printRow.status); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",10); |
|
|
|
LODOP.ADD_PRINT_TEXT(135,304,100,15,printRow.status); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",11); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Alignment",3); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Bold",1); |
|
|
|
} |
|
|
|
|
|
|
|
// PageB: 扩展字段版 - 增加Week Code、Rev条码
|
|
|
|
function printZeroPageB(printRow){ |
|
|
|
LODOP.NewPage(); |
|
|
|
LODOP.SET_PRINT_PAGESIZE(2,800,1125,""); |
|
|
|
LODOP.SET_PRINT_PAGESIZE(2,800,975,""); |
|
|
|
|
|
|
|
//左列 - 8个条码字段 + QR
|
|
|
|
LODOP.ADD_PRINT_TEXT(3,3,135,15,"P/N:"+printRow.customerPartNo); |
|
|
|
LODOP.ADD_PRINT_TEXT(3,3,135,15,"(P)HH P/N:"+printRow.customerPartNo); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",6); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Bold",1); |
|
|
|
LODOP.ADD_PRINT_BARCODE(12,3,135,20,"128A",printRow.customerPartNo); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); |
|
|
|
|
|
|
|
LODOP.ADD_PRINT_TEXT(33,3,135,15,"QTY:"+printRow.standardRollQty); |
|
|
|
LODOP.ADD_PRINT_TEXT(33,3,135,15,"(Q)QTY:"+printRow.standardRollQty); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",6); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Bold",1); |
|
|
|
LODOP.ADD_PRINT_BARCODE(42,3,65,20,"128A",printRow.standardRollQty); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); |
|
|
|
|
|
|
|
LODOP.ADD_PRINT_TEXT(62,3,135,15,"Mfr P/N:"+printRow.partNo); |
|
|
|
LODOP.ADD_PRINT_TEXT(62,3,135,15,"(M)Mfr P/N:"+printRow.partNo); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",6); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Bold",1); |
|
|
|
LODOP.ADD_PRINT_BARCODE(71,3,65,20,"128A",printRow.partNo); |
|
|
|
LODOP.ADD_PRINT_BARCODE(71,3,135,20,"128A",printRow.partNo); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); |
|
|
|
|
|
|
|
LODOP.ADD_PRINT_TEXT(93,3,135,15,"Date Code:"+printRow.rollDate2); |
|
|
|
LODOP.ADD_PRINT_TEXT(93,3,135,15,"(D)Date Code:"+printRow.rollDate2); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",6); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Bold",1); |
|
|
|
LODOP.ADD_PRINT_BARCODE(102,5,135,20,"128A",printRow.rollDate2); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); |
|
|
|
|
|
|
|
LODOP.ADD_PRINT_TEXT(123,5,135,20,"Week Code:"+printRow.dateCode); |
|
|
|
LODOP.ADD_PRINT_TEXT(123,5,135,20,"(W)Week Code:"+printRow.dateCode); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",6); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Bold",1); |
|
|
|
LODOP.ADD_PRINT_BARCODE(132,5,96,20,"128A",printRow.dateCode); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); |
|
|
|
|
|
|
|
LODOP.ADD_PRINT_TEXT(153,5,135,15,"Lot NO:"+printRow.finalRollNo); |
|
|
|
LODOP.ADD_PRINT_TEXT(153,5,135,15,"(L)Lot NO:"+printRow.finalRollNo); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",6); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Bold",1); |
|
|
|
LODOP.ADD_PRINT_BARCODE(162,5,135,20,"128A",printRow.finalRollNo); |
|
|
|
@ -159,8 +217,8 @@ function printZeroPageB(printRow){ |
|
|
|
LODOP.ADD_PRINT_BARCODE(222,5,135,20,"128A",printRow.pkcId); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); |
|
|
|
|
|
|
|
//QR码及底部信息 (2024风格)
|
|
|
|
LODOP.ADD_PRINT_BARCODE(243,5,74,74,"QRCode",printRow.newQrCode); |
|
|
|
//二维码以及下面的部分
|
|
|
|
LODOP.ADD_PRINT_BARCODE(243,5,74,74,"QRCode",printRow.customerPartNo+","+printRow.standardRollQty+","+printRow.partNo +","+printRow.rollDate2+","+printRow.dateCode+","+printRow.finalRollNo+","+printRow.revNo+","+printRow.pkcId); |
|
|
|
LODOP.ADD_PRINT_TEXT(261,50,30,20,"HF"); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",12); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Bold",1); |
|
|
|
@ -171,41 +229,32 @@ function printZeroPageB(printRow){ |
|
|
|
LODOP.ADD_PRINT_TEXT(276,50,117,15,"机种:"+printRow.resource); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); |
|
|
|
|
|
|
|
//右列 - 同左列内容 (offsetX = 130, 2024风格紧凑布局)
|
|
|
|
LODOP.ADD_PRINT_TEXT(3,130,188,21,"P/N:"+printRow.customerPartNo); |
|
|
|
//第二部分的标签
|
|
|
|
LODOP.ADD_PRINT_TEXT(3,130,188,21,"(P)HH P/N:"+printRow.customerPartNo); |
|
|
|
LODOP.ADD_PRINT_BARCODE(18,130,156,15,"128A",printRow.customerPartNo); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); |
|
|
|
|
|
|
|
LODOP.ADD_PRINT_TEXT(33,130,186,21,"QTY:"+printRow.standardRollQty); |
|
|
|
LODOP.ADD_PRINT_TEXT(33,130,186,21,"(Q)QTY:"+printRow.standardRollQty); |
|
|
|
LODOP.ADD_PRINT_BARCODE(47,130,65,15,"128A",printRow.standardRollQty); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); |
|
|
|
|
|
|
|
LODOP.ADD_PRINT_TEXT(62,130,189,20,"Mfr P/N:"+printRow.partNo ); |
|
|
|
LODOP.ADD_PRINT_TEXT(62,130,189,20,"(M)Mfr P/N:"+printRow.partNo ); |
|
|
|
LODOP.ADD_PRINT_BARCODE(76,130,161,15,"128A",printRow.partNo ); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); |
|
|
|
|
|
|
|
LODOP.ADD_PRINT_TEXT(93,130,190,20,"Date Code:"+printRow.rollDate2); |
|
|
|
LODOP.ADD_PRINT_TEXT(93,130,190,20,"(D)Date Code:"+printRow.rollDate2); |
|
|
|
LODOP.ADD_PRINT_BARCODE(108,130,132,15,"128A",printRow.rollDate2); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); |
|
|
|
|
|
|
|
LODOP.ADD_PRINT_TEXT(123,130,136,20,"Week Code:"+printRow.dateCode); |
|
|
|
LODOP.ADD_PRINT_BARCODE(138,130,96,15,"128A",printRow.dateCode); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); |
|
|
|
|
|
|
|
LODOP.ADD_PRINT_TEXT(153,130,192,20,"Lot NO:"+printRow.finalRollNo); |
|
|
|
LODOP.ADD_PRINT_TEXT(153,130,192,20,"(L)Lot NO:"+printRow.finalRollNo); |
|
|
|
LODOP.ADD_PRINT_BARCODE(167,130,161,16,"128A",printRow.finalRollNo); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); |
|
|
|
|
|
|
|
LODOP.ADD_PRINT_TEXT(183,130,75,20,"Rev:"+printRow.revNo); |
|
|
|
LODOP.ADD_PRINT_BARCODE(197,130,69,15,"128A",printRow.revNo); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); |
|
|
|
|
|
|
|
LODOP.ADD_PRINT_TEXT(211,130,192,20,"PKG ID:"+printRow.pkcId); |
|
|
|
LODOP.ADD_PRINT_BARCODE(226,130,168,15,"128A",printRow.pkcId); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); |
|
|
|
|
|
|
|
//右列QR码及底部
|
|
|
|
LODOP.ADD_PRINT_BARCODE(241,141,105,76,"QRCode",printRow.newQrCode); |
|
|
|
LODOP.ADD_PRINT_TEXT(123,130,136,20,"(W)Week Code:"+printRow.dateCode); |
|
|
|
LODOP.ADD_PRINT_BARCODE(138,130,96,15,"128A",printRow.dateCode); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); |
|
|
|
LODOP.ADD_PRINT_TEXT(183,130,75,20,"Rev:"+printRow.revNo); |
|
|
|
LODOP.ADD_PRINT_BARCODE(197,130,69,15,"128A",printRow.revNo); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); |
|
|
|
LODOP.ADD_PRINT_BARCODE(241,141,105,76,"QRCode",printRow.customerPartNo+","+printRow.standardRollQty+","+printRow.partNo +","+printRow.rollDate2+","+printRow.dateCode+","+printRow.finalRollNo+","+printRow.revNo+","+printRow.pkcId); |
|
|
|
LODOP.ADD_PRINT_TEXT(261,205,30,20,"HF"); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",12); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Bold",1); |
|
|
|
@ -216,7 +265,7 @@ function printZeroPageB(printRow){ |
|
|
|
LODOP.ADD_PRINT_TEXT(276,205,117,15,"机种:"+printRow.resource); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); |
|
|
|
|
|
|
|
//底部 - 卷号QR + 状态 (零检版用qrtextDate/qrtext)
|
|
|
|
//第二部分右侧的部分
|
|
|
|
LODOP.ADD_PRINT_BARCODE(4,300,110,80,"QRCode",printRow.qrtextDate); |
|
|
|
LODOP.ADD_PRINT_TEXT(73,261,100,15,printRow.qrtext); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); |
|
|
|
@ -233,48 +282,40 @@ function printZeroPageB(printRow){ |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",11); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Alignment",3); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Bold",1); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// PageD: 右列 + 底部版
|
|
|
|
function printZeroPageD(printRow){ |
|
|
|
LODOP.NewPage(); |
|
|
|
LODOP.SET_PRINT_PAGESIZE(2,800,1125,""); |
|
|
|
LODOP.SET_PRINT_PAGESIZE(2,800,975,""); |
|
|
|
|
|
|
|
//右列条码
|
|
|
|
LODOP.ADD_PRINT_TEXT(3,130,188,21,"P/N:"+printRow.customerPartNo); |
|
|
|
|
|
|
|
//第二部分的标签
|
|
|
|
LODOP.ADD_PRINT_TEXT(3,130,188,21,"(P)HH P/N:"+printRow.customerPartNo); |
|
|
|
LODOP.ADD_PRINT_BARCODE(18,130,156,15,"128A",printRow.customerPartNo); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); |
|
|
|
|
|
|
|
LODOP.ADD_PRINT_TEXT(33,130,186,21,"QTY:"+printRow.standardRollQty); |
|
|
|
LODOP.ADD_PRINT_TEXT(33,130,186,21,"(Q)QTY:"+printRow.standardRollQty); |
|
|
|
LODOP.ADD_PRINT_BARCODE(47,130,65,15,"128A",printRow.standardRollQty); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); |
|
|
|
|
|
|
|
LODOP.ADD_PRINT_TEXT(62,130,189,20,"Mfr P/N:"+printRow.partNo ); |
|
|
|
LODOP.ADD_PRINT_TEXT(62,130,189,20,"(M)Mfr P/N:"+printRow.partNo ); |
|
|
|
LODOP.ADD_PRINT_BARCODE(76,130,161,15,"128A",printRow.partNo ); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); |
|
|
|
|
|
|
|
LODOP.ADD_PRINT_TEXT(93,130,190,20,"Date Code:"+printRow.rollDate2); |
|
|
|
LODOP.ADD_PRINT_TEXT(93,130,190,20,"(D)Date Code:"+printRow.rollDate2); |
|
|
|
LODOP.ADD_PRINT_BARCODE(108,130,132,15,"128A",printRow.rollDate2); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); |
|
|
|
|
|
|
|
LODOP.ADD_PRINT_TEXT(123,130,136,20,"Week Code:"+printRow.dateCode); |
|
|
|
LODOP.ADD_PRINT_BARCODE(138,130,96,15,"128A",printRow.dateCode); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); |
|
|
|
|
|
|
|
LODOP.ADD_PRINT_TEXT(153,130,192,20,"Lot NO:"+printRow.finalRollNo); |
|
|
|
LODOP.ADD_PRINT_TEXT(153,130,192,20,"(L)Lot NO:"+printRow.finalRollNo); |
|
|
|
LODOP.ADD_PRINT_BARCODE(167,130,161,16,"128A",printRow.finalRollNo); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); |
|
|
|
|
|
|
|
LODOP.ADD_PRINT_TEXT(183,130,75,20,"Rev:"+printRow.revNo); |
|
|
|
LODOP.ADD_PRINT_BARCODE(197,130,69,15,"128A",printRow.revNo); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); |
|
|
|
|
|
|
|
LODOP.ADD_PRINT_TEXT(211,130,192,20,"PKG ID:"+printRow.pkcId); |
|
|
|
LODOP.ADD_PRINT_BARCODE(226,130,168,15,"128A",printRow.pkcId); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); |
|
|
|
|
|
|
|
//右列QR码及底部
|
|
|
|
LODOP.ADD_PRINT_BARCODE(241,141,105,76,"QRCode",printRow.newQrCode); |
|
|
|
LODOP.ADD_PRINT_TEXT(123,130,136,20,"(W)Week Code:"+printRow.dateCode); |
|
|
|
LODOP.ADD_PRINT_BARCODE(138,130,96,15,"128A",printRow.dateCode); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); |
|
|
|
LODOP.ADD_PRINT_TEXT(183,130,75,20,"Rev:"+printRow.revNo); |
|
|
|
LODOP.ADD_PRINT_BARCODE(197,130,69,15,"128A",printRow.revNo); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); |
|
|
|
LODOP.ADD_PRINT_BARCODE(241,141,105,76,"QRCode",printRow.customerPartNo+","+printRow.standardRollQty+","+printRow.partNo +","+printRow.rollDate2+","+printRow.dateCode+","+printRow.finalRollNo+","+printRow.revNo+","+printRow.pkcId); |
|
|
|
LODOP.ADD_PRINT_TEXT(261,205,30,20,"HF"); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",12); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Bold",1); |
|
|
|
@ -285,7 +326,7 @@ function printZeroPageD(printRow){ |
|
|
|
LODOP.ADD_PRINT_TEXT(276,205,117,15,"机种:"+printRow.resource); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); |
|
|
|
|
|
|
|
//底部 - 卷号QR + 状态 (零检版)
|
|
|
|
//第二部分右侧的部分
|
|
|
|
LODOP.ADD_PRINT_BARCODE(4,300,110,80,"QRCode",printRow.qrtextDate); |
|
|
|
LODOP.ADD_PRINT_TEXT(73,261,100,15,printRow.qrtext); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); |
|
|
|
@ -302,22 +343,19 @@ function printZeroPageD(printRow){ |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",11); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Alignment",3); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Bold",1); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// PageC: 详细条码页 - 2024风格的紧凑布局
|
|
|
|
function printZeroPageC(printRow){ |
|
|
|
LODOP.NewPage(); |
|
|
|
LODOP.SET_PRINT_PAGESIZE(1,800,1125,""); |
|
|
|
LODOP.SET_PRINT_PAGESIZE(1,800,975,""); |
|
|
|
|
|
|
|
//第一部分 - 小字体密集条码 (上半部分)
|
|
|
|
LODOP.ADD_PRINT_TEXT(3,5,200,10,"Project:"+printRow.project); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",6); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Bold",1); |
|
|
|
|
|
|
|
LODOP.ADD_PRINT_TEXT(11,5,133,10,"Config:"+printRow.config); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",6); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Bold",1); |
|
|
|
|
|
|
|
LODOP.ADD_PRINT_TEXT(19,5,240,15,"OEMPN+VC:"+printRow.oempn); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",6); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Bold",1); |
|
|
|
@ -345,39 +383,37 @@ function printZeroPageC(printRow){ |
|
|
|
LODOP.ADD_PRINT_TEXT(103,5,163,10,printRow.partNo); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",6); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Bold",1); |
|
|
|
//中间标识
|
|
|
|
LODOP.ADD_PRINT_TEXT(65,110,88,15,"RoHS+HF"); |
|
|
|
//第一部分 中间的标签
|
|
|
|
LODOP.ADD_PRINT_TEXT(61,130,88,15,"RoHS+HF"); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Bold",1); |
|
|
|
LODOP.ADD_PRINT_TEXT(79,120,53,15,"CCL"); |
|
|
|
LODOP.ADD_PRINT_TEXT(75,140,53,15,"CCL"); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Bold",1); |
|
|
|
LODOP.ADD_PRINT_TEXT(97,115,91,15,printRow.username); |
|
|
|
LODOP.ADD_PRINT_TEXT(93,140,91,15,printRow.username); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Bold",1); |
|
|
|
//右侧信息
|
|
|
|
//第一部分最右侧的标签
|
|
|
|
LODOP.ADD_PRINT_TEXT(3,100,148,15,"Stage:"+printRow.stage); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",6); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Alignment",3); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Bold",1); |
|
|
|
LODOP.ADD_PRINT_TEXT(35,230,40,15,"Rev.:"+printRow.revNo); |
|
|
|
LODOP.ADD_PRINT_TEXT(35,135,155,15,"Rev.:"+printRow.revNo); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",6); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Alignment",3); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Bold",1); |
|
|
|
LODOP.ADD_PRINT_BARCODE(45,245,40,12,"128A",printRow.revNo); |
|
|
|
LODOP.ADD_PRINT_BARCODE(45,245,50,12,"128A",printRow.revNo); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); |
|
|
|
LODOP.ADD_PRINT_BARCODE(60,225,79,79,"QRCode",printRow.newQrCode); |
|
|
|
LODOP.ADD_PRINT_BARCODE(60,230,79,79,"QRCode",printRow.newQrCode); |
|
|
|
LODOP.SET_PRINT_STYLEA(0, "ScalX", 0.75); |
|
|
|
LODOP.SET_PRINT_STYLEA(0, "ScalY", 0.75); |
|
|
|
|
|
|
|
//第二部分 - 大字体条码 (下半部分)
|
|
|
|
//第二部分的代码
|
|
|
|
LODOP.ADD_PRINT_TEXT(127,5,200,16,"Project:"+printRow.project); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Bold",1); |
|
|
|
|
|
|
|
LODOP.ADD_PRINT_TEXT(127,100,148,15,"Stage:"+printRow.stage); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Alignment",3); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Bold",1); |
|
|
|
|
|
|
|
LODOP.ADD_PRINT_TEXT(136,5,133,16,"Config:"+printRow.config); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Bold",1); |
|
|
|
@ -385,7 +421,6 @@ function printZeroPageC(printRow){ |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Alignment",3); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Bold",1); |
|
|
|
|
|
|
|
LODOP.ADD_PRINT_TEXT(147,5,240,15,"OEMPN+VC:"+printRow.oempn); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Bold",1); |
|
|
|
@ -419,7 +454,6 @@ function printZeroPageC(printRow){ |
|
|
|
LODOP.ADD_PRINT_TEXT(275,120,91,15,printRow.username); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"Bold",1); |
|
|
|
//底部大QR (零检版用qrtextDate,显示qrtext)
|
|
|
|
LODOP.ADD_PRINT_BARCODE(302,10,110,80,"QRCode",printRow.qrtextDate); |
|
|
|
LODOP.ADD_PRINT_TEXT(313,89,100,15,printRow.qrtext); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); |
|
|
|
|