Browse Source

refactor(print): 重构打印标签功能并更新印度版布局

- 移除注释代码和调试信息
- 更新PageA、PageB、PageC、PageD打印函数实现
- 新增左侧列打印函数printLeftColumn和printZeroLeftColumn
- 统一使用newQrCode字段替换旧的二维码内容
- 调整页面布局为2024印度版双列条码标签设计
- 修改PageB、PageC、PageD的参数传递方式
- 优化二维码和文本元素的位置及样式设置
master
qiankanghui 3 weeks ago
parent
commit
76ed923103
  1. 236
      external/print/print_qc_label.js
  2. 284
      external/print/print_qc_zero_label.js

236
external/print/print_qc_label.js

@ -1,4 +1,4 @@
var LODOP = getCLodop();
var LODOP = getCLodop();
//初始化 //初始化
function initPrintSetting(clodoplisence) { function initPrintSetting(clodoplisence) {
@ -6,21 +6,9 @@ function initPrintSetting(clodoplisence) {
var LODOP= getCLodop(); var LODOP= getCLodop();
if (LODOP.VERSION) { if (LODOP.VERSION) {
if (LODOP.CVERSION){ if (LODOP.CVERSION){
//alert("当前有WEB打印服务C-Lodop可用!\n C-Lodop版本:"+LODOP.CVERSION+"(内含Lodop"+LODOP.VERSION+")");
//如果没有问题打印的信息
//LODOP.SET_LICENSES("","646464550585055535859561289003","688858710010010811411756128900","");
LODOP.SET_LICENSES("",clodoplisence,"",""); 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 { }else {
alert("本机已成功安装了Lodop控件!\n 版本号:"+LODOP.VERSION);
alert("本机已成功安装了Lodop控件!\n 版本号"+LODOP.VERSION);
} }
}; };
}catch(err){ }catch(err){
@ -38,13 +26,13 @@ function printQcRollLabel(printRow, printerData){
printPageA(printRow, printerData); printPageA(printRow, printerData);
break; break;
case "B": case "B":
printPageB(printRow, printerData);
printPageB(printRow);
break; break;
case "C": case "C":
printPageC(printRow, printerData);
printPageC(printRow);
break; break;
case "D": case "D":
printPageD(printRow, printerData);
printPageD(printRow);
break; break;
default: default:
break; break;
@ -61,146 +49,99 @@ function printQcRollLabel(printRow, printerData){
} }
} }
// 参考2024 India布局:左列条码标签
function printLeftColumn(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 printPageA(printRow, printerInfo){ function printPageA(printRow, printerInfo){
LODOP.NewPage(); LODOP.NewPage();
LODOP.SET_PRINT_PAGESIZE(2,800,1125,""); 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);
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);
//左列
printLeftColumn(printRow, 0);
//右列 (offsetX = 173, 同2024布局)
printLeftColumn(printRow, 173);
//底部 - 卷号大QR + 状态 (参考2024底部布局)
LODOP.ADD_PRINT_BARCODE(4,348,110,80,"QRCode",printRow.finalRollNo); LODOP.ADD_PRINT_BARCODE(4,348,110,80,"QRCode",printRow.finalRollNo);
LODOP.ADD_PRINT_TEXT(73,309,100,15,printRow.finalRollNo);
LODOP.ADD_PRINT_TEXT(73,310,100,15,printRow.finalRollNo);
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); LODOP.SET_PRINT_STYLEA(0,"FontSize",7);
LODOP.SET_PRINT_STYLEA(0,"Alignment",3); 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,304,100,15,printRow.status);
LODOP.SET_PRINT_STYLEA(0,"FontSize",11);
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.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
} }
// PageB: 扩展字段版 - 增加Week Code、Rev条码
function printPageB(printRow){ function printPageB(printRow){
LODOP.NewPage(); LODOP.NewPage();
LODOP.SET_PRINT_PAGESIZE(2,800,1125,""); LODOP.SET_PRINT_PAGESIZE(2,800,1125,"");
LODOP.ADD_PRINT_TEXT(3,3,135,15,"(P)HH P/N:"+printRow.customerPartNo);
//左列 - 8个条码字段 + QR
LODOP.ADD_PRINT_TEXT(3,3,135,15,"P/N:"+printRow.customerPartNo);
LODOP.SET_PRINT_STYLEA(0,"FontSize",6); LODOP.SET_PRINT_STYLEA(0,"FontSize",6);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_BARCODE(12,3,135,20,"128A",printRow.customerPartNo); LODOP.ADD_PRINT_BARCODE(12,3,135,20,"128A",printRow.customerPartNo);
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0);
LODOP.ADD_PRINT_TEXT(33,3,135,15,"(Q)QTY:"+printRow.standardRollQty);
LODOP.ADD_PRINT_TEXT(33,3,135,15,"QTY:"+printRow.standardRollQty);
LODOP.SET_PRINT_STYLEA(0,"FontSize",6); LODOP.SET_PRINT_STYLEA(0,"FontSize",6);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_BARCODE(42,3,65,20,"128A",printRow.standardRollQty); LODOP.ADD_PRINT_BARCODE(42,3,65,20,"128A",printRow.standardRollQty);
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0);
LODOP.ADD_PRINT_TEXT(62,3,135,15,"(M)Mfr P/N:"+printRow.partNo);
LODOP.ADD_PRINT_TEXT(62,3,135,15,"Mfr P/N:"+printRow.partNo);
LODOP.SET_PRINT_STYLEA(0,"FontSize",6); LODOP.SET_PRINT_STYLEA(0,"FontSize",6);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_BARCODE(71,3,65,20,"128A",printRow.partNo); LODOP.ADD_PRINT_BARCODE(71,3,65,20,"128A",printRow.partNo);
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0);
LODOP.ADD_PRINT_TEXT(93,3,135,15,"(D)Date Code:"+printRow.rollDate2);
LODOP.ADD_PRINT_TEXT(93,3,135,15,"Date Code:"+printRow.rollDate2);
LODOP.SET_PRINT_STYLEA(0,"FontSize",6); LODOP.SET_PRINT_STYLEA(0,"FontSize",6);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_BARCODE(102,5,135,20,"128A",printRow.rollDate2); LODOP.ADD_PRINT_BARCODE(102,5,135,20,"128A",printRow.rollDate2);
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0);
LODOP.ADD_PRINT_TEXT(123,5,135,20,"(W)Week Code:"+printRow.dateCode);
LODOP.ADD_PRINT_TEXT(123,5,135,20,"Week Code:"+printRow.dateCode);
LODOP.SET_PRINT_STYLEA(0,"FontSize",6); LODOP.SET_PRINT_STYLEA(0,"FontSize",6);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_BARCODE(132,5,96,20,"128A",printRow.dateCode); LODOP.ADD_PRINT_BARCODE(132,5,96,20,"128A",printRow.dateCode);
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0);
LODOP.ADD_PRINT_TEXT(153,5,135,15,"(L)Lot NO:"+printRow.finalRollNo);
LODOP.ADD_PRINT_TEXT(153,5,135,15,"Lot NO:"+printRow.finalRollNo);
LODOP.SET_PRINT_STYLEA(0,"FontSize",6); LODOP.SET_PRINT_STYLEA(0,"FontSize",6);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_BARCODE(162,5,135,20,"128A",printRow.finalRollNo); LODOP.ADD_PRINT_BARCODE(162,5,135,20,"128A",printRow.finalRollNo);
@ -218,8 +159,8 @@ function printPageB(printRow){
LODOP.ADD_PRINT_BARCODE(222,5,135,20,"128A",printRow.pkcId); LODOP.ADD_PRINT_BARCODE(222,5,135,20,"128A",printRow.pkcId);
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0);
//二维码以及下面的部分
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);
//QR码及底部信息 (2024风格)
LODOP.ADD_PRINT_BARCODE(243,5,74,74,"QRCode",printRow.newQrCode);
LODOP.ADD_PRINT_TEXT(261,50,30,20,"HF"); LODOP.ADD_PRINT_TEXT(261,50,30,20,"HF");
LODOP.SET_PRINT_STYLEA(0,"FontSize",12); LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
@ -230,28 +171,28 @@ function printPageB(printRow){
LODOP.ADD_PRINT_TEXT(276,50,117,15,"机种:"+printRow.resource); LODOP.ADD_PRINT_TEXT(276,50,117,15,"机种:"+printRow.resource);
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); LODOP.SET_PRINT_STYLEA(0,"FontSize",7);
//第二部分的标签
LODOP.ADD_PRINT_TEXT(3,130,188,21,"(P)HH P/N:"+printRow.customerPartNo);
//右列 - 同左列内容 (offsetX = 130, 2024风格紧凑布局)
LODOP.ADD_PRINT_TEXT(3,130,188,21,"P/N:"+printRow.customerPartNo);
LODOP.ADD_PRINT_BARCODE(18,130,156,15,"128A",printRow.customerPartNo); LODOP.ADD_PRINT_BARCODE(18,130,156,15,"128A",printRow.customerPartNo);
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0);
LODOP.ADD_PRINT_TEXT(33,130,186,21,"(Q)QTY:"+printRow.standardRollQty);
LODOP.ADD_PRINT_TEXT(33,130,186,21,"QTY:"+printRow.standardRollQty);
LODOP.ADD_PRINT_BARCODE(47,130,65,15,"128A",printRow.standardRollQty); LODOP.ADD_PRINT_BARCODE(47,130,65,15,"128A",printRow.standardRollQty);
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0);
LODOP.ADD_PRINT_TEXT(62,130,189,20,"(M)Mfr P/N:"+printRow.partNo );
LODOP.ADD_PRINT_TEXT(62,130,189,20,"Mfr P/N:"+printRow.partNo );
LODOP.ADD_PRINT_BARCODE(76,130,161,15,"128A",printRow.partNo ); LODOP.ADD_PRINT_BARCODE(76,130,161,15,"128A",printRow.partNo );
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0);
LODOP.ADD_PRINT_TEXT(93,130,190,20,"(D)Date Code:"+printRow.rollDate2);
LODOP.ADD_PRINT_TEXT(93,130,190,20,"Date Code:"+printRow.rollDate2);
LODOP.ADD_PRINT_BARCODE(108,130,132,15,"128A",printRow.rollDate2); LODOP.ADD_PRINT_BARCODE(108,130,132,15,"128A",printRow.rollDate2);
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0);
LODOP.ADD_PRINT_TEXT(123,130,136,20,"(W)Week Code:"+printRow.dateCode);
LODOP.ADD_PRINT_TEXT(123,130,136,20,"Week Code:"+printRow.dateCode);
LODOP.ADD_PRINT_BARCODE(138,130,96,15,"128A",printRow.dateCode); LODOP.ADD_PRINT_BARCODE(138,130,96,15,"128A",printRow.dateCode);
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0);
LODOP.ADD_PRINT_TEXT(153,130,192,20,"(L)Lot NO:"+printRow.finalRollNo);
LODOP.ADD_PRINT_TEXT(153,130,192,20,"Lot NO:"+printRow.finalRollNo);
LODOP.ADD_PRINT_BARCODE(167,130,161,16,"128A",printRow.finalRollNo); LODOP.ADD_PRINT_BARCODE(167,130,161,16,"128A",printRow.finalRollNo);
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0);
@ -263,23 +204,19 @@ function printPageB(printRow){
LODOP.ADD_PRINT_BARCODE(226,130,168,15,"128A",printRow.pkcId); LODOP.ADD_PRINT_BARCODE(226,130,168,15,"128A",printRow.pkcId);
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); 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);
//右列QR码及底部
LODOP.ADD_PRINT_BARCODE(241,141,105,76,"QRCode",printRow.newQrCode);
LODOP.ADD_PRINT_TEXT(261,205,30,20,"HF"); LODOP.ADD_PRINT_TEXT(261,205,30,20,"HF");
LODOP.SET_PRINT_STYLEA(0,"FontSize",12); LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_TEXT(286,205,117,15,printRow.username); LODOP.ADD_PRINT_TEXT(286,205,117,15,printRow.username);
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); LODOP.SET_PRINT_STYLEA(0,"FontSize",7);
LODOP.ADD_PRINT_IMAGE(241,198,55,20,"<img src='/img/cclimg.png'>"); LODOP.ADD_PRINT_IMAGE(241,198,55,20,"<img src='/img/cclimg.png'>");
LODOP.SET_PRINT_STYLEA(0,"Stretch",1); LODOP.SET_PRINT_STYLEA(0,"Stretch",1);
LODOP.ADD_PRINT_TEXT(276,205,117,15,"机种:"+printRow.resource); LODOP.ADD_PRINT_TEXT(276,205,117,15,"机种:"+printRow.resource);
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); LODOP.SET_PRINT_STYLEA(0,"FontSize",7);
//第二部分右侧的部分
//底部 - 卷号QR + 状态 (2024风格)
LODOP.ADD_PRINT_BARCODE(4,300,110,80,"QRCode",printRow.finalRollNo); LODOP.ADD_PRINT_BARCODE(4,300,110,80,"QRCode",printRow.finalRollNo);
LODOP.ADD_PRINT_TEXT(73,261,100,15,printRow.finalRollNo); LODOP.ADD_PRINT_TEXT(73,261,100,15,printRow.finalRollNo);
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); LODOP.SET_PRINT_STYLEA(0,"FontSize",7);
@ -296,35 +233,35 @@ function printPageB(printRow){
LODOP.SET_PRINT_STYLEA(0,"FontSize",11); LODOP.SET_PRINT_STYLEA(0,"FontSize",11);
LODOP.SET_PRINT_STYLEA(0,"Alignment",3); LODOP.SET_PRINT_STYLEA(0,"Alignment",3);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
} }
// PageD: 右列 + 底部版 (同PageB下半部分)
function printPageD(printRow){ function printPageD(printRow){
LODOP.NewPage(); LODOP.NewPage();
LODOP.SET_PRINT_PAGESIZE(2,800,1125,""); LODOP.SET_PRINT_PAGESIZE(2,800,1125,"");
//第二部分的标签
LODOP.ADD_PRINT_TEXT(3,130,188,21,"(P)HH P/N:"+printRow.customerPartNo);
//右列条码
LODOP.ADD_PRINT_TEXT(3,130,188,21,"P/N:"+printRow.customerPartNo);
LODOP.ADD_PRINT_BARCODE(18,130,156,15,"128A",printRow.customerPartNo); LODOP.ADD_PRINT_BARCODE(18,130,156,15,"128A",printRow.customerPartNo);
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0);
LODOP.ADD_PRINT_TEXT(33,130,186,21,"(Q)QTY:"+printRow.standardRollQty);
LODOP.ADD_PRINT_TEXT(33,130,186,21,"QTY:"+printRow.standardRollQty);
LODOP.ADD_PRINT_BARCODE(47,130,65,15,"128A",printRow.standardRollQty); LODOP.ADD_PRINT_BARCODE(47,130,65,15,"128A",printRow.standardRollQty);
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0);
LODOP.ADD_PRINT_TEXT(62,130,189,20,"(M)Mfr P/N:"+printRow.partNo );
LODOP.ADD_PRINT_TEXT(62,130,189,20,"Mfr P/N:"+printRow.partNo );
LODOP.ADD_PRINT_BARCODE(76,130,161,15,"128A",printRow.partNo ); LODOP.ADD_PRINT_BARCODE(76,130,161,15,"128A",printRow.partNo );
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0);
LODOP.ADD_PRINT_TEXT(93,130,190,20,"(D)Date Code:"+printRow.rollDate2);
LODOP.ADD_PRINT_TEXT(93,130,190,20,"Date Code:"+printRow.rollDate2);
LODOP.ADD_PRINT_BARCODE(108,130,132,15,"128A",printRow.rollDate2); LODOP.ADD_PRINT_BARCODE(108,130,132,15,"128A",printRow.rollDate2);
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0);
LODOP.ADD_PRINT_TEXT(123,130,136,20,"(W)Week Code:"+printRow.dateCode);
LODOP.ADD_PRINT_TEXT(123,130,136,20,"Week Code:"+printRow.dateCode);
LODOP.ADD_PRINT_BARCODE(138,130,96,15,"128A",printRow.dateCode); LODOP.ADD_PRINT_BARCODE(138,130,96,15,"128A",printRow.dateCode);
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0);
LODOP.ADD_PRINT_TEXT(153,130,192,20,"(L)Lot NO:"+printRow.finalRollNo);
LODOP.ADD_PRINT_TEXT(153,130,192,20,"Lot NO:"+printRow.finalRollNo);
LODOP.ADD_PRINT_BARCODE(167,130,161,16,"128A",printRow.finalRollNo); LODOP.ADD_PRINT_BARCODE(167,130,161,16,"128A",printRow.finalRollNo);
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0);
@ -336,23 +273,19 @@ function printPageD(printRow){
LODOP.ADD_PRINT_BARCODE(226,130,168,15,"128A",printRow.pkcId); LODOP.ADD_PRINT_BARCODE(226,130,168,15,"128A",printRow.pkcId);
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); 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);
//右列QR码及底部
LODOP.ADD_PRINT_BARCODE(241,141,105,76,"QRCode",printRow.newQrCode);
LODOP.ADD_PRINT_TEXT(261,205,30,20,"HF"); LODOP.ADD_PRINT_TEXT(261,205,30,20,"HF");
LODOP.SET_PRINT_STYLEA(0,"FontSize",12); LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_TEXT(286,205,117,15,printRow.username); LODOP.ADD_PRINT_TEXT(286,205,117,15,printRow.username);
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); LODOP.SET_PRINT_STYLEA(0,"FontSize",7);
LODOP.ADD_PRINT_IMAGE(241,198,55,20,"<img src='/img/cclimg.png'>"); LODOP.ADD_PRINT_IMAGE(241,198,55,20,"<img src='/img/cclimg.png'>");
LODOP.SET_PRINT_STYLEA(0,"Stretch",1); LODOP.SET_PRINT_STYLEA(0,"Stretch",1);
LODOP.ADD_PRINT_TEXT(276,205,117,15,"机种:"+printRow.resource); LODOP.ADD_PRINT_TEXT(276,205,117,15,"机种:"+printRow.resource);
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); LODOP.SET_PRINT_STYLEA(0,"FontSize",7);
//第二部分右侧的部分
//底部 - 卷号QR + 状态
LODOP.ADD_PRINT_BARCODE(4,300,110,80,"QRCode",printRow.finalRollNo); LODOP.ADD_PRINT_BARCODE(4,300,110,80,"QRCode",printRow.finalRollNo);
LODOP.ADD_PRINT_TEXT(73,261,100,15,printRow.finalRollNo); LODOP.ADD_PRINT_TEXT(73,261,100,15,printRow.finalRollNo);
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); LODOP.SET_PRINT_STYLEA(0,"FontSize",7);
@ -369,13 +302,14 @@ function printPageD(printRow){
LODOP.SET_PRINT_STYLEA(0,"FontSize",11); LODOP.SET_PRINT_STYLEA(0,"FontSize",11);
LODOP.SET_PRINT_STYLEA(0,"Alignment",3); LODOP.SET_PRINT_STYLEA(0,"Alignment",3);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
} }
// PageC: 详细条码页 - 2024风格的紧凑布局
function printPageC(printRow){ function printPageC(printRow){
LODOP.NewPage(); LODOP.NewPage();
LODOP.SET_PRINT_PAGESIZE(1,800,1125,""); LODOP.SET_PRINT_PAGESIZE(1,800,1125,"");
//第一部分 - 小字体密集条码 (上半部分)
LODOP.ADD_PRINT_TEXT(3,5,200,10,"Project:"+printRow.project); LODOP.ADD_PRINT_TEXT(3,5,200,10,"Project:"+printRow.project);
LODOP.SET_PRINT_STYLEA(0,"FontSize",6); LODOP.SET_PRINT_STYLEA(0,"FontSize",6);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
@ -411,7 +345,7 @@ function printPageC(printRow){
LODOP.ADD_PRINT_TEXT(103,5,163,10,printRow.partNo); LODOP.ADD_PRINT_TEXT(103,5,163,10,printRow.partNo);
LODOP.SET_PRINT_STYLEA(0,"FontSize",6); LODOP.SET_PRINT_STYLEA(0,"FontSize",6);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
//第一部分 中间的标签
//中间标识
LODOP.ADD_PRINT_TEXT(65,110,88,15,"RoHS+HF"); LODOP.ADD_PRINT_TEXT(65,110,88,15,"RoHS+HF");
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_TEXT(79,120,53,15,"CCL"); LODOP.ADD_PRINT_TEXT(79,120,53,15,"CCL");
@ -419,7 +353,7 @@ function printPageC(printRow){
LODOP.ADD_PRINT_TEXT(97,115,91,15,printRow.username); LODOP.ADD_PRINT_TEXT(97,115,91,15,printRow.username);
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); LODOP.SET_PRINT_STYLEA(0,"FontSize",7);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
//第一部分最右侧的标签
//右侧信息
LODOP.ADD_PRINT_TEXT(3,100,148,15,"Stage:"+printRow.stage); LODOP.ADD_PRINT_TEXT(3,100,148,15,"Stage:"+printRow.stage);
LODOP.SET_PRINT_STYLEA(0,"FontSize",6); LODOP.SET_PRINT_STYLEA(0,"FontSize",6);
LODOP.SET_PRINT_STYLEA(0,"Alignment",3); LODOP.SET_PRINT_STYLEA(0,"Alignment",3);
@ -434,7 +368,7 @@ function printPageC(printRow){
LODOP.SET_PRINT_STYLEA(0, "ScalX", 0.75); LODOP.SET_PRINT_STYLEA(0, "ScalX", 0.75);
LODOP.SET_PRINT_STYLEA(0, "ScalY", 0.75); LODOP.SET_PRINT_STYLEA(0, "ScalY", 0.75);
//第二部分的代码
//第二部分 - 大字体条码 (下半部分)
LODOP.ADD_PRINT_TEXT(127,5,200,16,"Project:"+printRow.project); LODOP.ADD_PRINT_TEXT(127,5,200,16,"Project:"+printRow.project);
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); LODOP.SET_PRINT_STYLEA(0,"FontSize",7);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);

284
external/print/print_qc_zero_label.js

@ -1,4 +1,4 @@
var LODOP = getCLodop();
var LODOP = getCLodop();
//初始化 //初始化
function initPrintSetting(clodoplisence) { function initPrintSetting(clodoplisence) {
@ -6,21 +6,9 @@ function initPrintSetting(clodoplisence) {
var LODOP= getCLodop(); var LODOP= getCLodop();
if (LODOP.VERSION) { if (LODOP.VERSION) {
if (LODOP.CVERSION){ if (LODOP.CVERSION){
//alert("当前有WEB打印服务C-Lodop可用!\n C-Lodop版本:"+LODOP.CVERSION+"(内含Lodop"+LODOP.VERSION+")");
//如果没有问题打印的信息
//LODOP.SET_LICENSES("","646464550585055535859561289003","688858710010010811411756128900","");
LODOP.SET_LICENSES("",clodoplisence,"",""); 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 { }else {
alert("本机已成功安装了Lodop控件!\n 版本号:"+LODOP.VERSION);
alert("本机已成功安装了Lodop控件!\n 版本号"+LODOP.VERSION);
} }
}; };
}catch(err){ }catch(err){
@ -35,16 +23,16 @@ function printQcZeroRollLabel(printRow, printerData){
initPrintSetting(printerData.clodopLicense); initPrintSetting(printerData.clodopLicense);
switch (labelFlag) { switch (labelFlag) {
case "A": case "A":
this.printZeroPageA(printRow, printerData);
printZeroPageA(printRow, printerData);
break; break;
case "B": case "B":
this.printZeroPageB(printRow, printerData);
printZeroPageB(printRow);
break; break;
case "C": case "C":
this.printZeroPageC(printRow, printerData);
printZeroPageC(printRow);
break; break;
case "D": case "D":
this.printZeroPageD(printRow, printerData);
printZeroPageD(printRow);
break; break;
default: default:
break; break;
@ -61,145 +49,99 @@ 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){ function printZeroPageA(printRow, printerInfo){
LODOP.NewPage(); LODOP.NewPage();
LODOP.SET_PRINT_PAGESIZE(2,800,1125,""); 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);
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);
//左列
printZeroLeftColumn(printRow, 0);
//右列 (offsetX = 173, 同2024布局)
printZeroLeftColumn(printRow, 173);
//底部 - 卷号大QR + 状态 (零检版用qrtextDate/qrtext)
LODOP.ADD_PRINT_BARCODE(4,348,110,80,"QRCode",printRow.qrtextDate); LODOP.ADD_PRINT_BARCODE(4,348,110,80,"QRCode",printRow.qrtextDate);
LODOP.ADD_PRINT_TEXT(73,309,100,15,printRow.qrtext);
LODOP.ADD_PRINT_TEXT(73,310,100,15,printRow.qrtext);
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); LODOP.SET_PRINT_STYLEA(0,"FontSize",7);
LODOP.SET_PRINT_STYLEA(0,"Alignment",3); 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,304,100,15,printRow.status);
LODOP.SET_PRINT_STYLEA(0,"FontSize",11);
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.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
} }
// PageB: 扩展字段版 - 增加Week Code、Rev条码
function printZeroPageB(printRow){ function printZeroPageB(printRow){
LODOP.NewPage(); LODOP.NewPage();
LODOP.SET_PRINT_PAGESIZE(2,800,1125,""); LODOP.SET_PRINT_PAGESIZE(2,800,1125,"");
LODOP.ADD_PRINT_TEXT(3,3,135,15,"(P)HH P/N:"+printRow.customerPartNo);
//左列 - 8个条码字段 + QR
LODOP.ADD_PRINT_TEXT(3,3,135,15,"P/N:"+printRow.customerPartNo);
LODOP.SET_PRINT_STYLEA(0,"FontSize",6); LODOP.SET_PRINT_STYLEA(0,"FontSize",6);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_BARCODE(12,3,135,20,"128A",printRow.customerPartNo); LODOP.ADD_PRINT_BARCODE(12,3,135,20,"128A",printRow.customerPartNo);
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0);
LODOP.ADD_PRINT_TEXT(33,3,135,15,"(Q)QTY:"+printRow.standardRollQty);
LODOP.ADD_PRINT_TEXT(33,3,135,15,"QTY:"+printRow.standardRollQty);
LODOP.SET_PRINT_STYLEA(0,"FontSize",6); LODOP.SET_PRINT_STYLEA(0,"FontSize",6);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_BARCODE(42,3,65,20,"128A",printRow.standardRollQty); LODOP.ADD_PRINT_BARCODE(42,3,65,20,"128A",printRow.standardRollQty);
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0);
LODOP.ADD_PRINT_TEXT(62,3,135,15,"(M)Mfr P/N:"+printRow.partNo);
LODOP.ADD_PRINT_TEXT(62,3,135,15,"Mfr P/N:"+printRow.partNo);
LODOP.SET_PRINT_STYLEA(0,"FontSize",6); LODOP.SET_PRINT_STYLEA(0,"FontSize",6);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_BARCODE(71,3,135,20,"128A",printRow.partNo);
LODOP.ADD_PRINT_BARCODE(71,3,65,20,"128A",printRow.partNo);
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0);
LODOP.ADD_PRINT_TEXT(93,3,135,15,"(D)Date Code:"+printRow.rollDate2);
LODOP.ADD_PRINT_TEXT(93,3,135,15,"Date Code:"+printRow.rollDate2);
LODOP.SET_PRINT_STYLEA(0,"FontSize",6); LODOP.SET_PRINT_STYLEA(0,"FontSize",6);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_BARCODE(102,5,135,20,"128A",printRow.rollDate2); LODOP.ADD_PRINT_BARCODE(102,5,135,20,"128A",printRow.rollDate2);
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0);
LODOP.ADD_PRINT_TEXT(123,5,135,20,"(W)Week Code:"+printRow.dateCode);
LODOP.ADD_PRINT_TEXT(123,5,135,20,"Week Code:"+printRow.dateCode);
LODOP.SET_PRINT_STYLEA(0,"FontSize",6); LODOP.SET_PRINT_STYLEA(0,"FontSize",6);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_BARCODE(132,5,96,20,"128A",printRow.dateCode); LODOP.ADD_PRINT_BARCODE(132,5,96,20,"128A",printRow.dateCode);
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0);
LODOP.ADD_PRINT_TEXT(153,5,135,15,"(L)Lot NO:"+printRow.finalRollNo);
LODOP.ADD_PRINT_TEXT(153,5,135,15,"Lot NO:"+printRow.finalRollNo);
LODOP.SET_PRINT_STYLEA(0,"FontSize",6); LODOP.SET_PRINT_STYLEA(0,"FontSize",6);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_BARCODE(162,5,135,20,"128A",printRow.finalRollNo); LODOP.ADD_PRINT_BARCODE(162,5,135,20,"128A",printRow.finalRollNo);
@ -217,8 +159,8 @@ function printZeroPageB(printRow){
LODOP.ADD_PRINT_BARCODE(222,5,135,20,"128A",printRow.pkcId); LODOP.ADD_PRINT_BARCODE(222,5,135,20,"128A",printRow.pkcId);
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0);
//二维码以及下面的部分
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);
//QR码及底部信息 (2024风格)
LODOP.ADD_PRINT_BARCODE(243,5,74,74,"QRCode",printRow.newQrCode);
LODOP.ADD_PRINT_TEXT(261,50,30,20,"HF"); LODOP.ADD_PRINT_TEXT(261,50,30,20,"HF");
LODOP.SET_PRINT_STYLEA(0,"FontSize",12); LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
@ -229,32 +171,41 @@ function printZeroPageB(printRow){
LODOP.ADD_PRINT_TEXT(276,50,117,15,"机种:"+printRow.resource); LODOP.ADD_PRINT_TEXT(276,50,117,15,"机种:"+printRow.resource);
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); LODOP.SET_PRINT_STYLEA(0,"FontSize",7);
//第二部分的标签
LODOP.ADD_PRINT_TEXT(3,130,188,21,"(P)HH P/N:"+printRow.customerPartNo);
//右列 - 同左列内容 (offsetX = 130, 2024风格紧凑布局)
LODOP.ADD_PRINT_TEXT(3,130,188,21,"P/N:"+printRow.customerPartNo);
LODOP.ADD_PRINT_BARCODE(18,130,156,15,"128A",printRow.customerPartNo); LODOP.ADD_PRINT_BARCODE(18,130,156,15,"128A",printRow.customerPartNo);
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0);
LODOP.ADD_PRINT_TEXT(33,130,186,21,"(Q)QTY:"+printRow.standardRollQty);
LODOP.ADD_PRINT_TEXT(33,130,186,21,"QTY:"+printRow.standardRollQty);
LODOP.ADD_PRINT_BARCODE(47,130,65,15,"128A",printRow.standardRollQty); LODOP.ADD_PRINT_BARCODE(47,130,65,15,"128A",printRow.standardRollQty);
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0);
LODOP.ADD_PRINT_TEXT(62,130,189,20,"(M)Mfr P/N:"+printRow.partNo );
LODOP.ADD_PRINT_TEXT(62,130,189,20,"Mfr P/N:"+printRow.partNo );
LODOP.ADD_PRINT_BARCODE(76,130,161,15,"128A",printRow.partNo ); LODOP.ADD_PRINT_BARCODE(76,130,161,15,"128A",printRow.partNo );
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0);
LODOP.ADD_PRINT_TEXT(93,130,190,20,"(D)Date Code:"+printRow.rollDate2);
LODOP.ADD_PRINT_TEXT(93,130,190,20,"Date Code:"+printRow.rollDate2);
LODOP.ADD_PRINT_BARCODE(108,130,132,15,"128A",printRow.rollDate2); LODOP.ADD_PRINT_BARCODE(108,130,132,15,"128A",printRow.rollDate2);
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0);
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(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);
LODOP.ADD_PRINT_TEXT(123,130,136,20,"(W)Week Code:"+printRow.dateCode);
LODOP.ADD_PRINT_TEXT(123,130,136,20,"Week Code:"+printRow.dateCode);
LODOP.ADD_PRINT_BARCODE(138,130,96,15,"128A",printRow.dateCode); LODOP.ADD_PRINT_BARCODE(138,130,96,15,"128A",printRow.dateCode);
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0);
LODOP.ADD_PRINT_TEXT(153,130,192,20,"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_TEXT(183,130,75,20,"Rev:"+printRow.revNo);
LODOP.ADD_PRINT_BARCODE(197,130,69,15,"128A",printRow.revNo); LODOP.ADD_PRINT_BARCODE(197,130,69,15,"128A",printRow.revNo);
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); 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(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(261,205,30,20,"HF"); LODOP.ADD_PRINT_TEXT(261,205,30,20,"HF");
LODOP.SET_PRINT_STYLEA(0,"FontSize",12); LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
@ -265,7 +216,7 @@ function printZeroPageB(printRow){
LODOP.ADD_PRINT_TEXT(276,205,117,15,"机种:"+printRow.resource); LODOP.ADD_PRINT_TEXT(276,205,117,15,"机种:"+printRow.resource);
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); LODOP.SET_PRINT_STYLEA(0,"FontSize",7);
//第二部分右侧的部分
//底部 - 卷号QR + 状态 (零检版用qrtextDate/qrtext)
LODOP.ADD_PRINT_BARCODE(4,300,110,80,"QRCode",printRow.qrtextDate); LODOP.ADD_PRINT_BARCODE(4,300,110,80,"QRCode",printRow.qrtextDate);
LODOP.ADD_PRINT_TEXT(73,261,100,15,printRow.qrtext); LODOP.ADD_PRINT_TEXT(73,261,100,15,printRow.qrtext);
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); LODOP.SET_PRINT_STYLEA(0,"FontSize",7);
@ -282,40 +233,48 @@ function printZeroPageB(printRow){
LODOP.SET_PRINT_STYLEA(0,"FontSize",11); LODOP.SET_PRINT_STYLEA(0,"FontSize",11);
LODOP.SET_PRINT_STYLEA(0,"Alignment",3); LODOP.SET_PRINT_STYLEA(0,"Alignment",3);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
} }
// PageD: 右列 + 底部版
function printZeroPageD(printRow){ function printZeroPageD(printRow){
LODOP.NewPage(); LODOP.NewPage();
LODOP.SET_PRINT_PAGESIZE(2,800,1125,""); LODOP.SET_PRINT_PAGESIZE(2,800,1125,"");
//第二部分的标签
LODOP.ADD_PRINT_TEXT(3,130,188,21,"(P)HH P/N:"+printRow.customerPartNo);
//右列条码
LODOP.ADD_PRINT_TEXT(3,130,188,21,"P/N:"+printRow.customerPartNo);
LODOP.ADD_PRINT_BARCODE(18,130,156,15,"128A",printRow.customerPartNo); LODOP.ADD_PRINT_BARCODE(18,130,156,15,"128A",printRow.customerPartNo);
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0);
LODOP.ADD_PRINT_TEXT(33,130,186,21,"(Q)QTY:"+printRow.standardRollQty);
LODOP.ADD_PRINT_TEXT(33,130,186,21,"QTY:"+printRow.standardRollQty);
LODOP.ADD_PRINT_BARCODE(47,130,65,15,"128A",printRow.standardRollQty); LODOP.ADD_PRINT_BARCODE(47,130,65,15,"128A",printRow.standardRollQty);
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0);
LODOP.ADD_PRINT_TEXT(62,130,189,20,"(M)Mfr P/N:"+printRow.partNo );
LODOP.ADD_PRINT_TEXT(62,130,189,20,"Mfr P/N:"+printRow.partNo );
LODOP.ADD_PRINT_BARCODE(76,130,161,15,"128A",printRow.partNo ); LODOP.ADD_PRINT_BARCODE(76,130,161,15,"128A",printRow.partNo );
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0);
LODOP.ADD_PRINT_TEXT(93,130,190,20,"(D)Date Code:"+printRow.rollDate2);
LODOP.ADD_PRINT_TEXT(93,130,190,20,"Date Code:"+printRow.rollDate2);
LODOP.ADD_PRINT_BARCODE(108,130,132,15,"128A",printRow.rollDate2); LODOP.ADD_PRINT_BARCODE(108,130,132,15,"128A",printRow.rollDate2);
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0);
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(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);
LODOP.ADD_PRINT_TEXT(123,130,136,20,"(W)Week Code:"+printRow.dateCode);
LODOP.ADD_PRINT_TEXT(123,130,136,20,"Week Code:"+printRow.dateCode);
LODOP.ADD_PRINT_BARCODE(138,130,96,15,"128A",printRow.dateCode); LODOP.ADD_PRINT_BARCODE(138,130,96,15,"128A",printRow.dateCode);
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0);
LODOP.ADD_PRINT_TEXT(153,130,192,20,"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_TEXT(183,130,75,20,"Rev:"+printRow.revNo);
LODOP.ADD_PRINT_BARCODE(197,130,69,15,"128A",printRow.revNo); LODOP.ADD_PRINT_BARCODE(197,130,69,15,"128A",printRow.revNo);
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); 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(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(261,205,30,20,"HF"); LODOP.ADD_PRINT_TEXT(261,205,30,20,"HF");
LODOP.SET_PRINT_STYLEA(0,"FontSize",12); LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
@ -326,7 +285,7 @@ function printZeroPageD(printRow){
LODOP.ADD_PRINT_TEXT(276,205,117,15,"机种:"+printRow.resource); LODOP.ADD_PRINT_TEXT(276,205,117,15,"机种:"+printRow.resource);
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); LODOP.SET_PRINT_STYLEA(0,"FontSize",7);
//第二部分右侧的部分
//底部 - 卷号QR + 状态 (零检版)
LODOP.ADD_PRINT_BARCODE(4,300,110,80,"QRCode",printRow.qrtextDate); LODOP.ADD_PRINT_BARCODE(4,300,110,80,"QRCode",printRow.qrtextDate);
LODOP.ADD_PRINT_TEXT(73,261,100,15,printRow.qrtext); LODOP.ADD_PRINT_TEXT(73,261,100,15,printRow.qrtext);
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); LODOP.SET_PRINT_STYLEA(0,"FontSize",7);
@ -343,19 +302,22 @@ function printZeroPageD(printRow){
LODOP.SET_PRINT_STYLEA(0,"FontSize",11); LODOP.SET_PRINT_STYLEA(0,"FontSize",11);
LODOP.SET_PRINT_STYLEA(0,"Alignment",3); LODOP.SET_PRINT_STYLEA(0,"Alignment",3);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
} }
// PageC: 详细条码页 - 2024风格的紧凑布局
function printZeroPageC(printRow){ function printZeroPageC(printRow){
LODOP.NewPage(); LODOP.NewPage();
LODOP.SET_PRINT_PAGESIZE(1,800,1125,""); LODOP.SET_PRINT_PAGESIZE(1,800,1125,"");
//第一部分 - 小字体密集条码 (上半部分)
LODOP.ADD_PRINT_TEXT(3,5,200,10,"Project:"+printRow.project); LODOP.ADD_PRINT_TEXT(3,5,200,10,"Project:"+printRow.project);
LODOP.SET_PRINT_STYLEA(0,"FontSize",6); LODOP.SET_PRINT_STYLEA(0,"FontSize",6);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_TEXT(11,5,133,10,"Config:"+printRow.config); LODOP.ADD_PRINT_TEXT(11,5,133,10,"Config:"+printRow.config);
LODOP.SET_PRINT_STYLEA(0,"FontSize",6); LODOP.SET_PRINT_STYLEA(0,"FontSize",6);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_TEXT(19,5,240,15,"OEMPN+VC:"+printRow.oempn); LODOP.ADD_PRINT_TEXT(19,5,240,15,"OEMPN+VC:"+printRow.oempn);
LODOP.SET_PRINT_STYLEA(0,"FontSize",6); LODOP.SET_PRINT_STYLEA(0,"FontSize",6);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
@ -383,37 +345,39 @@ function printZeroPageC(printRow){
LODOP.ADD_PRINT_TEXT(103,5,163,10,printRow.partNo); LODOP.ADD_PRINT_TEXT(103,5,163,10,printRow.partNo);
LODOP.SET_PRINT_STYLEA(0,"FontSize",6); LODOP.SET_PRINT_STYLEA(0,"FontSize",6);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
//第一部分 中间的标签
LODOP.ADD_PRINT_TEXT(61,130,88,15,"RoHS+HF");
//中间标识
LODOP.ADD_PRINT_TEXT(65,110,88,15,"RoHS+HF");
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_TEXT(75,140,53,15,"CCL");
LODOP.ADD_PRINT_TEXT(79,120,53,15,"CCL");
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_TEXT(93,140,91,15,printRow.username);
LODOP.ADD_PRINT_TEXT(97,115,91,15,printRow.username);
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); LODOP.SET_PRINT_STYLEA(0,"FontSize",7);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
//第一部分最右侧的标签
//右侧信息
LODOP.ADD_PRINT_TEXT(3,100,148,15,"Stage:"+printRow.stage); LODOP.ADD_PRINT_TEXT(3,100,148,15,"Stage:"+printRow.stage);
LODOP.SET_PRINT_STYLEA(0,"FontSize",6); LODOP.SET_PRINT_STYLEA(0,"FontSize",6);
LODOP.SET_PRINT_STYLEA(0,"Alignment",3); LODOP.SET_PRINT_STYLEA(0,"Alignment",3);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_TEXT(35,135,155,15,"Rev.:"+printRow.revNo);
LODOP.ADD_PRINT_TEXT(35,230,40,15,"Rev.:"+printRow.revNo);
LODOP.SET_PRINT_STYLEA(0,"FontSize",6); LODOP.SET_PRINT_STYLEA(0,"FontSize",6);
LODOP.SET_PRINT_STYLEA(0,"Alignment",3); LODOP.SET_PRINT_STYLEA(0,"Alignment",3);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_BARCODE(45,245,50,12,"128A",printRow.revNo);
LODOP.ADD_PRINT_BARCODE(45,245,40,12,"128A",printRow.revNo);
LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0);
LODOP.ADD_PRINT_BARCODE(60,230,79,79,"QRCode",printRow.newQrCode);
LODOP.ADD_PRINT_BARCODE(60,225,79,79,"QRCode",printRow.newQrCode);
LODOP.SET_PRINT_STYLEA(0, "ScalX", 0.75); LODOP.SET_PRINT_STYLEA(0, "ScalX", 0.75);
LODOP.SET_PRINT_STYLEA(0, "ScalY", 0.75); LODOP.SET_PRINT_STYLEA(0, "ScalY", 0.75);
//第二部分的代码
//第二部分 - 大字体条码 (下半部分)
LODOP.ADD_PRINT_TEXT(127,5,200,16,"Project:"+printRow.project); LODOP.ADD_PRINT_TEXT(127,5,200,16,"Project:"+printRow.project);
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); LODOP.SET_PRINT_STYLEA(0,"FontSize",7);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_TEXT(127,100,148,15,"Stage:"+printRow.stage); LODOP.ADD_PRINT_TEXT(127,100,148,15,"Stage:"+printRow.stage);
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); LODOP.SET_PRINT_STYLEA(0,"FontSize",7);
LODOP.SET_PRINT_STYLEA(0,"Alignment",3); LODOP.SET_PRINT_STYLEA(0,"Alignment",3);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_TEXT(136,5,133,16,"Config:"+printRow.config); LODOP.ADD_PRINT_TEXT(136,5,133,16,"Config:"+printRow.config);
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); LODOP.SET_PRINT_STYLEA(0,"FontSize",7);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
@ -421,6 +385,7 @@ function printZeroPageC(printRow){
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); LODOP.SET_PRINT_STYLEA(0,"FontSize",7);
LODOP.SET_PRINT_STYLEA(0,"Alignment",3); LODOP.SET_PRINT_STYLEA(0,"Alignment",3);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_TEXT(147,5,240,15,"OEMPN+VC:"+printRow.oempn); LODOP.ADD_PRINT_TEXT(147,5,240,15,"OEMPN+VC:"+printRow.oempn);
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); LODOP.SET_PRINT_STYLEA(0,"FontSize",7);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
@ -454,6 +419,7 @@ function printZeroPageC(printRow){
LODOP.ADD_PRINT_TEXT(275,120,91,15,printRow.username); LODOP.ADD_PRINT_TEXT(275,120,91,15,printRow.username);
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); LODOP.SET_PRINT_STYLEA(0,"FontSize",7);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
//底部大QR (零检版用qrtextDate,显示qrtext)
LODOP.ADD_PRINT_BARCODE(302,10,110,80,"QRCode",printRow.qrtextDate); LODOP.ADD_PRINT_BARCODE(302,10,110,80,"QRCode",printRow.qrtextDate);
LODOP.ADD_PRINT_TEXT(313,89,100,15,printRow.qrtext); LODOP.ADD_PRINT_TEXT(313,89,100,15,printRow.qrtext);
LODOP.SET_PRINT_STYLEA(0,"FontSize",7); LODOP.SET_PRINT_STYLEA(0,"FontSize",7);

Loading…
Cancel
Save