|
@@ -191,44 +191,37 @@ $(document).ready(function(){
|
|
var print_time = $(this).parent().parent('.list_block').find('.order_id').data('printtime');
|
|
var print_time = $(this).parent().parent('.list_block').find('.order_id').data('printtime');
|
|
var transport = $(this).parent().parent('.list_block').find('.order_id').data('transport');
|
|
var transport = $(this).parent().parent('.list_block').find('.order_id').data('transport');
|
|
var oid = $(this).parent().parent('.list_block').find('.order_id').html();
|
|
var oid = $(this).parent().parent('.list_block').find('.order_id').html();
|
|
- LODOP.PRINT_INIT("");
|
|
|
|
- if (LODOP.CVERSION) CLODOP.On_Return = function(TaskID, Value) {
|
|
|
|
- if(Value==1){
|
|
|
|
- $.ajax({
|
|
|
|
- type: 'post',
|
|
|
|
- url: 'application/main.php',
|
|
|
|
- data: 'c=wigsOut&m=updatePrint&oid=' + oid,
|
|
|
|
- success: function(rs){
|
|
|
|
- if(rs == -1){
|
|
|
|
- alert('系统错误,请联系开发人员!');
|
|
|
|
- }else{
|
|
|
|
- $('.barcode>.box').html('');
|
|
|
|
- $('.yp').html('').hide();
|
|
|
|
- $('.np').show();
|
|
|
|
- reloadNow();
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- });
|
|
|
|
- }else{
|
|
|
|
- alert('系统错误,请联系开发人员!');
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
|
|
- LODOP.ADD_PRINT_BARCODE(3, 10, 32, 400, "128Auto", order_barcode);
|
|
|
|
- LODOP.SET_PRINT_STYLEA(0, "showBarText", 0)
|
|
|
|
- LODOP.SET_PRINT_STYLEA(0, "Angle", 90)
|
|
|
|
- var str=order_barcode+'*'+goods_info + '*' + transport + '*' + print_time;
|
|
|
|
- LODOP.ADD_PRINT_TEXT(450, 40, 500, 45, str);
|
|
|
|
- LODOP.SET_PRINT_STYLEA(0, "FontSize", 12);
|
|
|
|
- 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();
|
|
|
|
|
|
+ var bctype = "code128";
|
|
|
|
+ var settings = {
|
|
|
|
+ output: "css",
|
|
|
|
+ bgColor: "#ffffff",
|
|
|
|
+ color: "#000000",
|
|
|
|
+ barWidth: "3.5",
|
|
|
|
+ barHeight: "80",
|
|
|
|
+ fontSize: 0
|
|
|
|
+ };
|
|
|
|
+ $('.barcode>.box').barcode(order_barcode, bctype, settings);
|
|
|
|
+ let barcode = $('.barcode').html();
|
|
|
|
+ let html_str = '<div class="str_box">'+order_barcode + '*' + goods_info + '*' + transport + '*' + print_time+'</div>';
|
|
|
|
+ $('.yp').append('<div>'+barcode+html_str+'</div>').show();
|
|
|
|
+ $('.np').hide();
|
|
|
|
+ window.print();
|
|
|
|
+ $.ajax({
|
|
|
|
+ type: 'post',
|
|
|
|
+ url: 'application/main.php',
|
|
|
|
+ data: 'c=wigsOut&m=updatePrint&oid=' + oid,
|
|
|
|
+ success: function(rs){
|
|
|
|
+ if(rs == -1){
|
|
|
|
+ alert('系统错误,请联系开发人员!');
|
|
|
|
+ }else{
|
|
|
|
+ $('.barcode>.box').html('');
|
|
|
|
+ $('.yp').html('').hide();
|
|
|
|
+ $('.np').show();
|
|
|
|
+ reloadNow();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ });
|
|
});
|
|
});
|
|
$('.print_all').click(function(){
|
|
$('.print_all').click(function(){
|
|
$.ajax({
|
|
$.ajax({
|
|
@@ -240,19 +233,24 @@ $(document).ready(function(){
|
|
alert('暂无可打印数据!');
|
|
alert('暂无可打印数据!');
|
|
}else{
|
|
}else{
|
|
var arr = JSON.parse(rs);
|
|
var arr = JSON.parse(rs);
|
|
- LODOP.PRINT_INIT("");
|
|
|
|
|
|
+ var html = '';
|
|
|
|
+ var bctype = "code128";
|
|
|
|
+ var settings = {
|
|
|
|
+ output: "css",
|
|
|
|
+ bgColor: "#ffffff",
|
|
|
|
+ color: "#000000",
|
|
|
|
+ barWidth: "3.5",
|
|
|
|
+ barHeight: "90",
|
|
|
|
+ fontSize: 0
|
|
|
|
+ };
|
|
for(x in arr){
|
|
for(x in arr){
|
|
- LODOP.ADD_PRINT_BARCODE(3, 10, 32, 400, "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)
|
|
|
|
- // LODOP.SET_PRINT_PAGESIZE(3,450,70,"")//设置默认纸张
|
|
|
|
- // LODOP.PRINTA();
|
|
|
|
- LODOP.PRINT();
|
|
|
|
|
|
+ $('.barcode>.box').barcode(arr[x].barcode, bctype, settings);
|
|
|
|
+ var barcode = $('.barcode').html();
|
|
|
|
+ html += '<div>'+barcode + arr[x].str+'</div>';
|
|
}
|
|
}
|
|
|
|
+ $('.yp').html(html).show();
|
|
|
|
+ $('.np').hide();
|
|
|
|
+ window.print();
|
|
$('.barcode>.box').html('');
|
|
$('.barcode>.box').html('');
|
|
$('.yp').html('').hide();
|
|
$('.yp').html('').hide();
|
|
$('.np').show();
|
|
$('.np').show();
|