chengwl %!s(int64=4) %!d(string=hai) anos
pai
achega
19ca817837
Modificáronse 2 ficheiros con 94 adicións e 94 borrados
  1. 48 46
      public/script/common_wigsout copy.js
  2. 46 48
      public/script/common_wigsout.js

+ 48 - 46
public/script/common_wigsout copy.js

@@ -191,37 +191,44 @@ $(document).ready(function(){
 		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 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('系统错误,请联系开发人员!');
+			}
+		}
 
-		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();
-				}
-			},
-		});
+
+
+
+
+		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, 4, 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();
 	});
 	$('.print_all').click(function(){
 		$.ajax({
@@ -233,24 +240,19 @@ $(document).ready(function(){
 					alert('暂无可打印数据!');
 				}else{
 					var arr = JSON.parse(rs);
-					var html = '';
-					var bctype = "code128";
-					var settings = {
-							output: "css",
-							bgColor: "#ffffff",
-							color: "#000000",
-							barWidth: "3.5",
-							barHeight: "90",
-							fontSize: 0
-					};
+					LODOP.PRINT_INIT("");
 					for(x in arr){
-						$('.barcode>.box').barcode(arr[x].barcode, bctype, settings);
-						var barcode = $('.barcode').html();
-						html += '<div>'+barcode + arr[x].str+'</div>';
+						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();
 					}
-					$('.yp').html(html).show();
-					$('.np').hide();
-					window.print();
 					$('.barcode>.box').html('');
 					$('.yp').html('').hide();
 					$('.np').show();

+ 46 - 48
public/script/common_wigsout.js

@@ -191,44 +191,37 @@ $(document).ready(function(){
 		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 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(){
 		$.ajax({
@@ -240,19 +233,24 @@ $(document).ready(function(){
 					alert('暂无可打印数据!');
 				}else{
 					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){
-						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('');
 					$('.yp').html('').hide();
 					$('.np').show();