|
@@ -215,12 +215,21 @@ $(document).ready(function(){
|
|
|
}
|
|
|
|
|
|
|
|
|
- LODOP.ADD_PRINT_BARCODE(3, 10, 400, 32, "128Auto", order_barcode);
|
|
|
+ LODOP.ADD_PRINT_BARCODE(3, 2, 400, 35, "128Auto", order_barcode);
|
|
|
LODOP.SET_PRINT_STYLEA(0, "showBarText", 0)
|
|
|
var str=order_barcode+'*'+goods_info + '*' + transport + '*' + print_time;
|
|
|
- LODOP.ADD_PRINT_TEXT(35, 3, 1000, 35, str);
|
|
|
- LODOP.SET_PRINT_STYLEA(0, "FontSize", 12);
|
|
|
- LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
|
|
|
+ if(str.length>=160){
|
|
|
+ str1=str.slice(0,160);
|
|
|
+ str2=str.slice(160);
|
|
|
+ LODOP.ADD_PRINT_TEXT(47, "0mm",400,"45mm", str1);
|
|
|
+ LODOP.SET_PRINT_STYLEA(0, "FontSize", 13);
|
|
|
+ LODOP.NewPageA();
|
|
|
+ LODOP.ADD_PRINT_TEXT(47, "0mm",400,"45mm", str2);
|
|
|
+ LODOP.SET_PRINT_STYLEA(0, "FontSize", 13);
|
|
|
+ }else{
|
|
|
+ LODOP.ADD_PRINT_TEXT(47, "0mm",400,"45mm", str1);
|
|
|
+ LODOP.SET_PRINT_STYLEA(0, "FontSize", 13);
|
|
|
+ }
|
|
|
|
|
|
|
|
|
// LODOP.ADD_PRINT_BARCODE(3, 10, 32, 400, "128Auto", order_barcode);
|
|
@@ -232,8 +241,7 @@ $(document).ready(function(){
|
|
|
// LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
|
|
|
// LODOP.SET_PRINT_STYLEA(0, "Angle", 90)
|
|
|
// LODOP.SET_PRINT_PAGESIZE(3,450,70,"")//设置默认纸张
|
|
|
- LODOP.PREVIEW();
|
|
|
- // LODOP.PRINT();
|
|
|
+ LODOP.PRINT();
|
|
|
});
|
|
|
$('.print_all').click(function(){
|
|
|
$.ajax({
|
|
@@ -247,13 +255,21 @@ $(document).ready(function(){
|
|
|
var arr = JSON.parse(rs);
|
|
|
LODOP.PRINT_INIT("");
|
|
|
for(x in arr){
|
|
|
- LODOP.ADD_PRINT_BARCODE(3, 10, 32, 400, "128Auto", arr[x].barcode);
|
|
|
+ LODOP.ADD_PRINT_BARCODE(3, 2, 400, 35, "128Auto", arr[x].barcode);
|
|
|
LODOP.SET_PRINT_STYLEA(0, "showBarText", 0)
|
|
|
- LODOP.SET_PRINT_STYLEA(0, "Angle", 90)
|
|
|
- LODOP.ADD_PRINT_TEXT(400, 40, 500, 45, arr[x].str);
|
|
|
- LODOP.SET_PRINT_STYLEA(0, "FontSize", 12);
|
|
|
- LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
|
|
|
- LODOP.SET_PRINT_STYLEA(0, "Angle", 90)
|
|
|
+ str=arr[x].str;
|
|
|
+ if(str.length>=160){
|
|
|
+ str1=str.slice(0,160);
|
|
|
+ str2=str.slice(160);
|
|
|
+ LODOP.ADD_PRINT_TEXT(47, "0mm",400,"45mm", str1);
|
|
|
+ LODOP.SET_PRINT_STYLEA(0, "FontSize", 13);
|
|
|
+ LODOP.NewPageA();
|
|
|
+ LODOP.ADD_PRINT_TEXT(47, "0mm",400,"45mm", str2);
|
|
|
+ LODOP.SET_PRINT_STYLEA(0, "FontSize", 13);
|
|
|
+ }else{
|
|
|
+ LODOP.ADD_PRINT_TEXT(47, "0mm",400,"45mm", str1);
|
|
|
+ LODOP.SET_PRINT_STYLEA(0, "FontSize", 13);
|
|
|
+ }
|
|
|
// LODOP.SET_PRINT_PAGESIZE(3,450,70,"")//设置默认纸张
|
|
|
// LODOP.PRINTA();
|
|
|
LODOP.PRINT();
|