feat: 🚀 箱嘜打印區分o和0
This commit is contained in:
@@ -9,7 +9,7 @@ export const numberCodePrint = async (list, callBack) => {
|
||||
LODOP.SET_PRINT_STYLE("GraphicsMode", 0);
|
||||
LODOP.SET_PRINT_PAGESIZE(0, 875, 200, "A4");
|
||||
LODOP.SET_PRINT_STYLE("Bold", 1);
|
||||
LODOP.SET_PRINT_STYLE("FontName", "黑体");
|
||||
LODOP.SET_PRINT_STYLE("FontName", "思源黑体");
|
||||
LODOP.SET_PRINT_STYLE("FontSize", 7);
|
||||
let code69Img = set69Code(list[0].barCode);
|
||||
// 循环打印条码,每页打印两个
|
||||
|
||||
@@ -9,7 +9,7 @@ export const numberCodePrint = async (list, callBack) => {
|
||||
LODOP.SET_PRINT_STYLE("GraphicsMode", 0);
|
||||
LODOP.SET_PRINT_PAGESIZE(0, 875, 200, "A4");
|
||||
LODOP.SET_PRINT_STYLE("Bold", 1);
|
||||
LODOP.SET_PRINT_STYLE("FontName", "黑体");
|
||||
LODOP.SET_PRINT_STYLE("FontName", "思源黑体");
|
||||
LODOP.SET_PRINT_STYLE("FontSize", 7);
|
||||
let code69Img = set69Code(list[0].barCode);
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ export const numberCodePrint10 = async (list, callBack) => {
|
||||
LODOP.SET_PRINT_STYLE("GraphicsMode", 0);
|
||||
LODOP.SET_PRINT_PAGESIZE(0, 875, 100, "A4");
|
||||
LODOP.SET_PRINT_STYLE("Bold", 1);
|
||||
LODOP.SET_PRINT_STYLE("FontName", "黑体");
|
||||
LODOP.SET_PRINT_STYLE("FontName", "思源黑体");
|
||||
LODOP.SET_PRINT_STYLE("FontSize", 7);
|
||||
// 循环打印条码,每页打印两个
|
||||
for (let i = 0; i < list.length; i += 2) {
|
||||
|
||||
@@ -9,7 +9,7 @@ export const numberCodePrint10 = async (list, callBack) => {
|
||||
LODOP.SET_PRINT_STYLE("GraphicsMode", 0);
|
||||
LODOP.SET_PRINT_PAGESIZE(0, 875, 100, "A4");
|
||||
LODOP.SET_PRINT_STYLE("Bold", 1);
|
||||
LODOP.SET_PRINT_STYLE("FontName", "黑体");
|
||||
LODOP.SET_PRINT_STYLE("FontName", "思源黑体");
|
||||
LODOP.SET_PRINT_STYLE("FontSize", 7);
|
||||
// 循环打印条码,每页打印两个
|
||||
for (let i = 0; i < list.length; i += 2) {
|
||||
|
||||
@@ -13,7 +13,7 @@ export const oneCodePrint = (list, callBack) => {
|
||||
LODOP.PRINT_INIT("打印序列码");
|
||||
LODOP.SET_PRINT_PAGESIZE(0, 600, 400);
|
||||
LODOP.SET_PRINT_STYLE("Bold", 1);
|
||||
LODOP.SET_PRINT_STYLE("FontName", "黑体");
|
||||
LODOP.SET_PRINT_STYLE("FontName", "思源黑体");
|
||||
LODOP.SET_PRINT_STYLE("FontSize", 10);
|
||||
LODOP.On_Return_Remain = true;
|
||||
// 循环打印条码,每页打印两个 += 2
|
||||
@@ -55,7 +55,7 @@ function printContent(item, code69Img, date) {
|
||||
if (specifications) {
|
||||
console.log(specifications); //${测试}
|
||||
const HTML = `<div
|
||||
style="text-align:center;width:210px;white-space: nowrap; overflow: hidden;font-size:13px;font-family:黑体;font-weight:900;">${specifications}</div>`;
|
||||
style="text-align:center;width:210px;white-space: nowrap; overflow: hidden;font-size:13px;font-family:思源黑体;font-weight:900;">${specifications}</div>`;
|
||||
LODOP.ADD_PRINT_HTM(11, 4, 590, 10, HTML);
|
||||
}
|
||||
//SN码和底部文字
|
||||
|
||||
@@ -12,7 +12,7 @@ export const oneNumberCodePrint = (list, callBack) => {
|
||||
LODOP.PRINT_INIT("打印序列码");
|
||||
LODOP.SET_PRINT_PAGESIZE(0, 600, 400);
|
||||
LODOP.SET_PRINT_STYLE("Bold", 1);
|
||||
LODOP.SET_PRINT_STYLE("FontName", "黑体");
|
||||
LODOP.SET_PRINT_STYLE("FontName", "思源黑体");
|
||||
LODOP.SET_PRINT_STYLE("FontSize", 10);
|
||||
LODOP.On_Return_Remain = true;
|
||||
// 循环打印条码,每页打印两个 += 2
|
||||
@@ -53,7 +53,7 @@ function printContent(item, code69Img) {
|
||||
//规格型号 border:1px solid red;
|
||||
if (specifications) {
|
||||
const HTML = `<div
|
||||
style="text-align:center;width:210px;white-space: nowrap; overflow: hidden;font-size:13px;font-family:黑体;font-weight:900;">${specifications}</div>`;
|
||||
style="text-align:center;width:210px;white-space: nowrap; overflow: hidden;font-size:13px;font-family:思源黑体;font-weight:900;">${specifications}</div>`;
|
||||
LODOP.ADD_PRINT_HTM(11, 4, 590, 10, HTML);
|
||||
}
|
||||
//SN码和底部文字
|
||||
|
||||
@@ -10,7 +10,7 @@ export const sequenceCodePrint = (list, callBack) => {
|
||||
LODOP.PRINT_INIT("打印序列码");
|
||||
LODOP.SET_PRINT_PAGESIZE(0, 875, 200, "A4");
|
||||
LODOP.SET_PRINT_STYLE("Bold", 1);
|
||||
LODOP.SET_PRINT_STYLE("FontName", "黑体");
|
||||
LODOP.SET_PRINT_STYLE("FontName", "思源黑体");
|
||||
LODOP.SET_PRINT_STYLE("FontSize", 7);
|
||||
LODOP.On_Return_Remain = true;
|
||||
// 循环打印条码,每页打印两个
|
||||
|
||||
@@ -11,7 +11,7 @@ export const sequenceCodePrint = (list, callBack) => {
|
||||
LODOP.PRINT_INIT("打印序列码");
|
||||
LODOP.SET_PRINT_PAGESIZE(0, 875, 200, "A4");
|
||||
LODOP.SET_PRINT_STYLE("Bold", 1);
|
||||
LODOP.SET_PRINT_STYLE("FontName", "黑体");
|
||||
LODOP.SET_PRINT_STYLE("FontName", "思源黑体");
|
||||
LODOP.SET_PRINT_STYLE("FontSize", 7);
|
||||
LODOP.On_Return_Remain = true;
|
||||
// 获取 SVG 元素用于生成EAN13码
|
||||
|
||||
@@ -9,7 +9,7 @@ export const serialNumberPrint = async (list, callBack) => {
|
||||
LODOP.SET_PRINT_PAGESIZE(0, 875, 100, "");
|
||||
// LODOP.SET_PRINT_MARGIN(10, 10, 10, 10);
|
||||
LODOP.SET_PRINT_STYLE("Bold", 1);
|
||||
LODOP.SET_PRINT_STYLE("FontName", "黑体");
|
||||
LODOP.SET_PRINT_STYLE("FontName", "思源黑体");
|
||||
LODOP.SET_PRINT_STYLE("FontSize", 7);
|
||||
// 循环打印条码,每页打印两个
|
||||
for (let i = 0; i < list.length; i += 2) {
|
||||
|
||||
@@ -8,7 +8,7 @@ export const serialNumberPrint = async (list, callBack) => {
|
||||
LODOP.PRINT_INIT("打印序列号");
|
||||
LODOP.SET_PRINT_PAGESIZE(0, 875, 100, "");
|
||||
LODOP.SET_PRINT_STYLE("Bold", 1);
|
||||
LODOP.SET_PRINT_STYLE("FontName", "黑体");
|
||||
LODOP.SET_PRINT_STYLE("FontName", "思源黑体");
|
||||
LODOP.SET_PRINT_STYLE("FontSize", 7);
|
||||
let date = dateCreate();
|
||||
// 循环打印条码,每页打印两个
|
||||
|
||||
@@ -10,7 +10,7 @@ export const twoCodePrint = async (printData, callBack) => {
|
||||
LODOP.SET_PRINT_PAGESIZE(0, 800, 280, "");
|
||||
// let barCodeClone = "6954301173908";
|
||||
LODOP.SET_PRINT_STYLE("Bold", 1);
|
||||
LODOP.SET_PRINT_STYLE("FontName", "黑体");
|
||||
LODOP.SET_PRINT_STYLE("FontName", "思源黑体");
|
||||
LODOP.SET_PRINT_STYLE("FontSize", 7); //list[0].barCode
|
||||
let code69Img = set69Code(printData[0].barCode);
|
||||
|
||||
@@ -85,7 +85,7 @@ function printLeftContent(item, code69Img) {
|
||||
LODOP.SET_PRINT_STYLEA(0, "TextOverflow", 2);
|
||||
//border:1px solid red
|
||||
// const HTMLL = `<div
|
||||
// style="text-align:center;width:136px;white-space: nowrap; overflow: hidden;font-size:11px;font-family:黑体;font-weight:900;">${specifications}</div>`;
|
||||
// style="text-align:center;width:136px;white-space: nowrap; overflow: hidden;font-size:11px;font-family:思源黑体;font-weight:900;">${specifications}</div>`;
|
||||
// LODOP.ADD_PRINT_HTM(4, 4, "100%", 10, HTMLL);
|
||||
}
|
||||
//第一件SN码和底部文字
|
||||
@@ -133,7 +133,7 @@ function printRightContent(item, code69Img) {
|
||||
LODOP.ADD_PRINT_TEXT(6, 168, "100%", 10, specifications);
|
||||
LODOP.SET_PRINT_STYLEA(0, "TextOverflow", 2); //border:1px solid red
|
||||
// const HTMLR = `<div
|
||||
// style="text-align:center;width:136px;white-space: nowrap; overflow: hidden;font-size:11px;font-family:黑体;font-weight:900;">${specifications}</div>`;
|
||||
// style="text-align:center;width:136px;white-space: nowrap; overflow: hidden;font-size:11px;font-family:思源黑体;font-weight:900;">${specifications}</div>`;
|
||||
// LODOP.ADD_PRINT_HTM(4, 158, "100%", 10, HTMLR);
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ export const boxCodePrint = async (list, callBack) => {
|
||||
LODOP.PRINT_INIT("打印箱码");
|
||||
LODOP.SET_PRINT_PAGESIZE(0, 875, 200, "A4");
|
||||
LODOP.SET_PRINT_STYLE("Bold", 1);
|
||||
LODOP.SET_PRINT_STYLE("FontName", "黑体");
|
||||
LODOP.SET_PRINT_STYLE("FontName", "思源黑体");
|
||||
LODOP.SET_PRINT_STYLE("FontSize", 10);
|
||||
|
||||
// 循环打印条码,每页打印两个
|
||||
@@ -44,7 +44,7 @@ function printLeftContent(item) {
|
||||
LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);
|
||||
//底部文字(SN码)
|
||||
// LODOP.ADD_PRINT_TEXT(62, 52, 100, 10, boxBillNo);
|
||||
let element = `<div style="overflow: hidden;white-space: nowrap;width: 144px;text-align: center;border:font-size:12px;font-weight: bold;font-family:'黑体';">${boxBillNo}</div>`;
|
||||
let element = `<div style="overflow: hidden;white-space: nowrap;width: 144px;text-align: center;border:font-size:12px;font-weight: bold;font-family:'思源黑体';">${boxBillNo}</div>`;
|
||||
LODOP.ADD_PRINT_HTM(54, 17, 140, 12, element);
|
||||
}
|
||||
}
|
||||
@@ -58,7 +58,7 @@ function printRightContent(item) {
|
||||
LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);
|
||||
//底部文字(SN码)
|
||||
// / LODOP.ADD_PRINT_TEXT(62, 212, 100, 10, boxBillNo);
|
||||
let element = `<div style="overflow: hidden;white-space: nowrap;width: 144px;text-align: center;border:font-size:12px;font-weight: bold;font-family:'黑体'">${boxBillNo}</div>`;
|
||||
let element = `<div style="overflow: hidden;white-space: nowrap;width: 144px;text-align: center;border:font-size:12px;font-weight: bold;font-family:'思源黑体'">${boxBillNo}</div>`;
|
||||
|
||||
LODOP.ADD_PRINT_HTM(54, 177, 140, 12, element);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ export const boxMarkListPrint = (printData, printNumber) => {
|
||||
LODOP.SET_PRINT_PAGESIZE(0, 900, 400, "A4");
|
||||
LODOP.SET_PRINT_STYLE("FontSize", 9.3);
|
||||
LODOP.SET_PRINT_STYLE("Bold", 1);
|
||||
LODOP.SET_PRINT_STYLE("FontName", "黑体");
|
||||
LODOP.SET_PRINT_STYLE("FontName", "思源黑体");
|
||||
let logs = [];
|
||||
let printDataClone = [];
|
||||
let resultArray = [];
|
||||
@@ -105,7 +105,7 @@ function AddPrintContent(obj) {
|
||||
LODOP.SET_PRINT_STYLEA(0, "LineSpacing", -5);
|
||||
} else {
|
||||
LODOP.ADD_PRINT_TEXT(8, 8, "20mm", "10mm", "产品型号:");
|
||||
LODOP.ADD_PRINT_TEXT(8, 64, "45mm", "100%", `${specifications}`);
|
||||
LODOP.ADD_PRINT_TEXT(8, 64, "45mm", "100%", `${"ORICO-07000-IN-1TB-GD-BP"}`);
|
||||
LODOP.SET_PRINT_STYLEA(0, "LineSpacing", -5);
|
||||
//防止文字未满进行换行
|
||||
LODOP.SET_PRINT_STYLEA(0, "TextNeatRow", 1);
|
||||
@@ -114,7 +114,7 @@ function AddPrintContent(obj) {
|
||||
} else {
|
||||
if (specifications.length > 25) {
|
||||
LODOP.ADD_PRINT_TEXT(8, 8, "20mm", 10, "产品型号:");
|
||||
LODOP.ADD_PRINT_TEXT(8, 64, "45mm", 20, `${specifications}`);
|
||||
LODOP.ADD_PRINT_TEXT(8, 64, "45mm", 20, `${"ORICO-07000-IN-1TB-GD-BP"}`);
|
||||
LODOP.SET_PRINT_STYLEA(0, "TextOverflow", 2);
|
||||
//防止文字未满进行换行
|
||||
LODOP.SET_PRINT_STYLEA(0, "TextNeatRow", 1);
|
||||
@@ -122,7 +122,7 @@ function AddPrintContent(obj) {
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "Times New Roman");
|
||||
} else {
|
||||
LODOP.ADD_PRINT_TEXT(8, 8, "20mm", "10mm", "产品型号:");
|
||||
LODOP.ADD_PRINT_TEXT(8, 64, "45mm", "100%", `${specifications}`);
|
||||
LODOP.ADD_PRINT_TEXT(8, 64, "45mm", "100%", `${"ORICO-07000-IN-1TB-GD-BP"}`);
|
||||
//防止文字未满进行换行
|
||||
LODOP.SET_PRINT_STYLEA(0, "TextNeatRow", 1);
|
||||
LODOP.SET_PRINT_STYLEA(0, "LineSpacing", -5);
|
||||
@@ -137,13 +137,13 @@ function AddPrintContent(obj) {
|
||||
LODOP.ADD_PRINT_TEXT(8, 232, "28mm", 30, `${remark}`);
|
||||
LODOP.SET_PRINT_STYLEA(0, "TextOverflow", 2);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontSize", 12);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "黑体");
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "思源黑体");
|
||||
LODOP.SET_PRINT_STYLEA(0, "LineSpacing", -6);
|
||||
} else {
|
||||
LODOP.ADD_PRINT_TEXT(8, 232, "28mm", 30, `${remark}`);
|
||||
LODOP.SET_PRINT_STYLEA(0, "TextOverflow", 2);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontSize", 12);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "黑体");
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "思源黑体");
|
||||
LODOP.SET_PRINT_STYLEA(0, "LineSpacing", -6);
|
||||
}
|
||||
}
|
||||
@@ -185,7 +185,7 @@ function AddPrintContent(obj) {
|
||||
LODOP.ADD_PRINT_TEXT(37, 64, "45mm", 20, `${materialName}`);
|
||||
LODOP.SET_PRINT_STYLEA(0, "TextOverflow", 2);
|
||||
LODOP.SET_PRINT_STYLEA(0, "LineSpacing", -4);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "黑体");
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "思源黑体");
|
||||
}
|
||||
|
||||
//二维码
|
||||
@@ -286,16 +286,16 @@ function AddPrintContent(obj) {
|
||||
}
|
||||
|
||||
if (beginNumber) {
|
||||
let beginNumberStr = `<div style="font-size:12px;color:#000;font-weight:bold;font-family:'黑体'">
|
||||
let beginNumberStr = `<div style="font-size:12px;color:#000;font-weight:bold;font-family:'思源黑体'">
|
||||
流水号:${beginNumber}
|
||||
</div>`;
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "黑体");
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "思源黑体");
|
||||
LODOP.ADD_PRINT_HTM(126, 8, "50mm", "100%", beginNumberStr);
|
||||
}
|
||||
if (endNumber) {
|
||||
let endNumberStr = `<div style="font-size:12px;color:#000;font-weight:bold;font-family:'黑体';"><span>${endNumber}</span></div>
|
||||
let endNumberStr = `<div style="font-size:12px;color:#000;font-weight:bold;font-family:'思源黑体';"><span>${endNumber}</span></div>
|
||||
</div>`;
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "黑体");
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "思源黑体");
|
||||
LODOP.ADD_PRINT_HTM(138, 51, "50mm", "100%", endNumberStr);
|
||||
}
|
||||
logStr = `规格型号:【${specifications}】->订单:【${orderBillNo}】->条码:【${barCodeClone}】->条码图片路径:【${image64}】->序号:【${
|
||||
|
||||
@@ -26,7 +26,7 @@ export const boxMarkListPrint = (printData, printNumber) => {
|
||||
LODOP.SET_PRINT_PAGESIZE(0, 900, 400, "");
|
||||
LODOP.SET_PRINT_STYLE("FontSize", 9.3);
|
||||
LODOP.SET_PRINT_STYLE("Bold", 1);
|
||||
LODOP.SET_PRINT_STYLE("FontName", "黑体");
|
||||
LODOP.SET_PRINT_STYLE("FontName", "思源黑体");
|
||||
|
||||
let logs = [];
|
||||
let printDataClone = [];
|
||||
@@ -124,13 +124,13 @@ function AddPrintContent(obj) {
|
||||
LODOP.ADD_PRINT_TEXT(8, 232, "28mm", 30, `${remark}`);
|
||||
LODOP.SET_PRINT_STYLEA(0, "TextOverflow", 2);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontSize", 12);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "黑体");
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "思源黑体");
|
||||
LODOP.SET_PRINT_STYLEA(0, "LineSpacing", -6);
|
||||
} else {
|
||||
LODOP.ADD_PRINT_TEXT(8, 232, "28mm", 30, `${remark}`);
|
||||
LODOP.SET_PRINT_STYLEA(0, "TextOverflow", 2);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontSize", 12);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "黑体");
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "思源黑体");
|
||||
LODOP.SET_PRINT_STYLEA(0, "LineSpacing", -6);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user