打印样式调整
This commit is contained in:
@@ -51,12 +51,13 @@ public class FeiPrinter extends PrinterHandler implements PrinterImpl {
|
|||||||
private final PrintSignLabel printSignLabel = new PrintSignLabel()
|
private final PrintSignLabel printSignLabel = new PrintSignLabel()
|
||||||
.setBr("<BR>")
|
.setBr("<BR>")
|
||||||
.setCut("")
|
.setCut("")
|
||||||
|
.setCenterBold(new String[]{"<CB>", "</CB>"})
|
||||||
.setF(new String[]{"<F>", "</F>"})
|
.setF(new String[]{"<F>", "</F>"})
|
||||||
.setL(new String[]{"<L>", "</L>"})
|
.setL(new String[]{"<L>", "</L>"})
|
||||||
.setS(new String[]{"", ""})
|
.setS(new String[]{"", ""})
|
||||||
.setF(new String[]{"<B>", "</B>"})
|
.setF(new String[]{"<B>", "</B>"})
|
||||||
.setQr(new String[]{"<QR>", "</QR>"})
|
.setQr(new String[]{"<QR>", "</QR>"})
|
||||||
.setCenter(new String[]{"<CB>", "</CB>"})
|
.setCenter(new String[]{"<C>", "</C>"})
|
||||||
.setBold(new String[]{"<BOLD>", "</BOLD>"});
|
.setBold(new String[]{"<BOLD>", "</BOLD>"});
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -237,11 +237,10 @@ public interface PrinterImpl {
|
|||||||
data.append(getFormatLabel(printInfoDTO.getShopName(), signLabelInfo.center, signLabelInfo.f)).append(signLabelInfo.br);
|
data.append(getFormatLabel(printInfoDTO.getShopName(), signLabelInfo.center, signLabelInfo.f)).append(signLabelInfo.br);
|
||||||
// data.append(StrUtil.format("<C><F>{}</F></C><BR>", printInfoDTO.getShopName()));
|
// data.append(StrUtil.format("<C><F>{}</F></C><BR>", printInfoDTO.getShopName()));
|
||||||
// data.append("<BR>");
|
// data.append("<BR>");
|
||||||
data.append(signLabelInfo.br);
|
|
||||||
// data.append("<OUT:30>");
|
// data.append("<OUT:30>");
|
||||||
data.append(getFormatLabel(StrUtil.format("{}【{}】", printInfoDTO.getPrintTitle(), printInfoDTO.getPickupNum()), signLabelInfo.center, signLabelInfo.bold))
|
data.append(getFormatLabel(StrUtil.format("{}【{}】", printInfoDTO.getPrintTitle(), printInfoDTO.getPickupNum()), signLabelInfo.l, signLabelInfo.center))
|
||||||
.append(signLabelInfo.br)
|
|
||||||
.append(signLabelInfo.br);
|
.append(signLabelInfo.br);
|
||||||
|
|
||||||
// data.append(StrUtil.format("<C><BOLD>{}【{}】</BOLD></C><BR>", printInfoDTO.getPrintTitle(), printInfoDTO.getPickupNum()));
|
// data.append(StrUtil.format("<C><BOLD>{}【{}】</BOLD></C><BR>", printInfoDTO.getPrintTitle(), printInfoDTO.getPickupNum()));
|
||||||
//if (Objects.nonNull(printInfoDTO.getOutNumber())) {
|
//if (Objects.nonNull(printInfoDTO.getOutNumber())) {
|
||||||
// data.append(StrUtil.format("<CB><BOLD>{}</BOLD></CB>",printInfoDTO.getOutNumber()));
|
// data.append(StrUtil.format("<CB><BOLD>{}</BOLD></CB>",printInfoDTO.getOutNumber()));
|
||||||
@@ -375,34 +374,34 @@ public interface PrinterImpl {
|
|||||||
PrintSignLabel signLabelInfo = getSignLabelInfo();
|
PrintSignLabel signLabelInfo = getSignLabelInfo();
|
||||||
StringBuilder builder = new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
if (isReturn) {
|
if (isReturn) {
|
||||||
builder.append(getFormatLabel(StrUtil.format("{}【退】", pickupNumber), signLabelInfo.center, signLabelInfo.bold))
|
builder.append(getFormatLabel(StrUtil.format("{}【退】", pickupNumber), signLabelInfo.centerBold))
|
||||||
.append(signLabelInfo.br)
|
.append(signLabelInfo.br)
|
||||||
.append(signLabelInfo.br);
|
.append(signLabelInfo.br);
|
||||||
// builder.append("<C><B>").append(pickupNumber).append("【退】</B></C><BR><BR>");
|
// builder.append("<C><B>").append(pickupNumber).append("【退】</B></C><BR><BR>");
|
||||||
} else {
|
} else {
|
||||||
builder.append(getFormatLabel(pickupNumber, signLabelInfo.center, signLabelInfo.bold))
|
builder.append(getFormatLabel(pickupNumber, signLabelInfo.centerBold))
|
||||||
.append(signLabelInfo.br)
|
.append(signLabelInfo.br)
|
||||||
.append(signLabelInfo.br);
|
.append(signLabelInfo.br);
|
||||||
// builder.append("<C><B>").append(pickupNumber).append("</B></C><BR><BR>");
|
// builder.append("<C><B>").append(pickupNumber).append("</B></C><BR><BR>");
|
||||||
}
|
}
|
||||||
builder.append(getFormatLabel(StrUtil.format("时间: {}", date), signLabelInfo.l, signLabelInfo.s))
|
builder.append(getFormatLabel(StrUtil.format("时间: {}", date), signLabelInfo.l, signLabelInfo.center))
|
||||||
.append(signLabelInfo.br)
|
.append(signLabelInfo.br)
|
||||||
.append(signLabelInfo.br);
|
.append(signLabelInfo.br);
|
||||||
// builder.append("<S><L>时间: ").append(date).append(" </L></S><BR><BR><BR>");
|
// builder.append("<S><L>时间: ").append(date).append(" </L></S><BR><BR><BR>");
|
||||||
if (productName.length() > 4) {
|
if (productName.length() > 4) {
|
||||||
builder.append(getFormatLabel(StrUtil.format("{} x {}", productName, number.stripTrailingZeros().toPlainString()), signLabelInfo.l, signLabelInfo.f))
|
builder.append(getFormatLabel(StrUtil.format("{} x {}", productName, number.stripTrailingZeros().toPlainString()), signLabelInfo.l, signLabelInfo.f, signLabelInfo.center))
|
||||||
.append(signLabelInfo.br);
|
.append(signLabelInfo.br);
|
||||||
// builder.append("<CS:32>").append(productName).append(" x ").append(number).append("</CS><BR>");
|
// builder.append("<CS:32>").append(productName).append(" x ").append(number).append("</CS><BR>");
|
||||||
if (StrUtil.isNotBlank(skuName)) {
|
if (StrUtil.isNotBlank(skuName)) {
|
||||||
builder.append(getFormatLabel("(" + skuName + ")", signLabelInfo.l)).append(signLabelInfo.br);
|
builder.append(getFormatLabel("(" + skuName + ")", signLabelInfo.l, signLabelInfo.f, signLabelInfo.center)).append(signLabelInfo.br);
|
||||||
// builder.append("<CS:32>").append(skuName).append(" </CS><BR>");
|
// builder.append("<CS:32>").append(skuName).append(" </CS><BR>");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
builder.append(getFormatLabel(StrUtil.format("{} x {}", productName, number.stripTrailingZeros().toPlainString()), signLabelInfo.l, signLabelInfo.f))
|
builder.append(getFormatLabel(StrUtil.format("{} x {}", productName, number.stripTrailingZeros().toPlainString()), signLabelInfo.l, signLabelInfo.f, signLabelInfo.center))
|
||||||
.append(signLabelInfo.br);
|
.append(signLabelInfo.br);
|
||||||
// builder.append("<B>").append(productName).append(" x ").append(number).append("</B><BR>");
|
// builder.append("<B>").append(productName).append(" x ").append(number).append("</B><BR>");
|
||||||
if (StrUtil.isNotBlank(skuName)) {
|
if (StrUtil.isNotBlank(skuName)) {
|
||||||
builder.append(getFormatLabel("(" + skuName + ")", signLabelInfo.l, signLabelInfo.bold))
|
builder.append(getFormatLabel("(" + skuName + ")", signLabelInfo.l, signLabelInfo.f, signLabelInfo.center))
|
||||||
.append(signLabelInfo.br);
|
.append(signLabelInfo.br);
|
||||||
// builder.append("<B>").append(skuName).append(" </B><BR>");
|
// builder.append("<B>").append(skuName).append(" </B><BR>");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ public class YxyPrinter extends PrinterHandler implements PrinterImpl {
|
|||||||
.setS(new String[]{"<S>", "</S>"})
|
.setS(new String[]{"<S>", "</S>"})
|
||||||
.setQr(new String[]{"<QR>", "</QR>"})
|
.setQr(new String[]{"<QR>", "</QR>"})
|
||||||
.setCenter(new String[]{"<C>", "</C>"})
|
.setCenter(new String[]{"<C>", "</C>"})
|
||||||
|
.setCenterBold(new String[]{"<CB>", "</CB>"})
|
||||||
.setRs("RS")
|
.setRs("RS")
|
||||||
.setBold(new String[]{"<B>", "</B>"});
|
.setBold(new String[]{"<B>", "</B>"});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user