lvhao пре 5 дана
родитељ
комит
9fac476d78

+ 4 - 1
core/CoreApp/controllers/Systemprint.php

@@ -1591,11 +1591,14 @@ class Systemprint extends Start_Controller {
 								}
 							    if($this->$fullorder_name->save(array('waybill'=>$Hwaybill,'waybill2'=>$waybill2,'waybillid'=>$waybillid,'libraryconfirm'=>2,'librarynot'=>'','printtime'=>$time,'printnumber'=>$fullorder['printnumber'],'print'=>3,'oldwaybill'=>$oldwaybill,'oldprinttime'=>$oldprinttime),$va[$n]))
 				   		 	    {
-									if($fullorder['printcode'] == "HUALEI-FEDEX" || $fullorder['printcode'] == "HUALEI-FEDEX-9610" || $fullorder['printcode'] == "HUALEI-FEDEX-BBG" ||$fullorder['printcode'] == "HUALEI-MLXY" )
+									if($fullorder['printcode'] == "HUALEI-FEDEX" || $fullorder['printcode'] == "HUALEI-MLXY" )
 									{
 								        //$type = 5;
 										$type = 1;
 									}
+									else if($fullorder['printcode'] == "HUALEI-FEDEX-9610" || $fullorder['printcode'] == "HUALEI-FEDEX-BBG" ){
+										$type = 12;
+									}
 									else if($fullorder['printcode'] == "HUALEI-ARAMEX-G" || $fullorder['printcode'] == "HUALEI-ARAMEX-S" || $fullorder['printcode'] == "HUALEI-GES-EU")
 									{
 								        $type = 1;

+ 46 - 0
template/erp/js/print_yd.js

@@ -49,6 +49,52 @@ function pdffhd(data) {
     }
 };
 
+function pdffhdcenter(data) {
+    LODOP = getLodop();
+    LODOP.PRINT_INIT("");
+    LODOP.SET_PRINTER_INDEX( $("select[name='printer']").find("option:selected").val());
+    LODOP.SET_PRINT_MODE("PRINT_PAGE_PERCENT", data['text']['mode'] + "%");
+    for (i = 0; i < data['text']['pdfnum']; i++) {
+        LODOP.ADD_PRINT_PDF(150, 10, "100%", "100%", data['text']['yd']);
+        LODOP.NewPageA();
+    }
+
+
+    let str = "<!DOCTYPE html>" +
+        '<div style="font-size:16px;height: 100%;font-family: "宋体""><div style="width: 100%;padding-bottom: 10px;font-size: 18px;text-align: left;"><b>发货单:' +
+        data['text']['name'] + '</b></div><div style="width: 100%;padding-bottom: 10px;"><b>' + data['text']['express'] + '</b> - <font style="font-size:16px;font-weight:900">' + data['text']['country'] +
+        '</font></div><div style="width: 100%;padding-bottom: 10px;"><b>仓库:</b><b>' + data['text']['warehouse'] +
+        '</b></div><div style="width: 100%;padding-bottom: 10px;"><b>订单号:</b><font>' + data['text']['orderinfo'] +
+        '</font></div><div style="width: 100%;padding-bottom: 10px;"><div><b>订单编号:</b><font style="font-size: 18px;font-weight: bold;"><b>' +
+        data['text']['number'] +
+        '</b></font></div><div style="height:110px"></div><div style="width: 100%;padding-bottom: 10px;"><font>' +
+        data['text']['time'] + '</font>&nbsp;&nbsp;&nbsp;<b>已打印<font>' + data['text']['printnumber'] +
+        '</font>次</b></div></div><div style="width: 100%;padding-bottom: 10px;min-height:80px;"><b>仓库品名:</b><span style="font-size: 20px;padding-right:20px;"><b>' +
+        data['text']['shipremarks'] +
+        '</b></span></div><div style="width: 100%;padding-bottom: 10px;"><strong>总计<font>' + data['text']['ts'] +
+        '</font>条</strong></div>';
+    if (data['text']['is_jiaji'] == 1) {
+        str +=
+            '<div style="width: 100%;padding-bottom: 10px;"><strong style="color:red;font-size: 20px;">加急 !</strong></div>'
+    } else {
+        str += "</div>";
+    }
+    LODOP.ADD_PRINT_HTM(10, "3%", "97%", "100%", str);
+
+    LODOP.ADD_PRINT_BARCODE(165, 20, 325, 85, "128Auto", data['text']['number']);
+    LODOP.SET_PRINT_STYLEA(0, "ShowBarText", 0);
+    // LODOP.ADD_PRINT_BARCODE(5,240,140,140,"QRCode",data['text']['number']);
+    // LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0);
+    LODOP.SET_PRINT_MODE("CATCH_PRINT_STATUS", true);
+    if (LODOP.CVERSION) {
+        LODOP.On_Return = function(TaskID, Value) {
+            $("#job").html(Value);
+        };
+        LODOP.PRINT();
+        return;
+    }
+};
+
 function fhd(data) {
     LODOP = getLodop();
     LODOP.PRINT_INIT("");

+ 1 - 1
template/erp/systemprint.html

@@ -157,5 +157,5 @@ $(".ckpmcheck").on("click",function(){
 })
 </script>
 <script type="text/javascript" src="{$theme}js/laydate.js"></script>
-<script type="text/javascript" src="{$theme}js/print.js?v=202505301539"></script>
+<script type="text/javascript" src="{$theme}js/print.js?v=2025053015391"></script>
 {Template footer}

+ 3 - 1
template/erp/systemprintmc.html

@@ -135,7 +135,7 @@ $(this).find('td:eq(10)').css("font-size","12px");
 <script type="text/javascript" src="{$theme}lodop/LodopFuncs.js"></script>
 <script type="text/javascript" src="{$theme}lodop/dolodop.js"></script>
 <script type="text/javascript" src="{$theme}js/jquery-barcode.min.js"></script>
-<script type="text/javascript" src="{$theme}js/print_yd.js?202512041201"></script>
+<script type="text/javascript" src="{$theme}js/print_yd.js?20251204120"></script>
 <script>
 //获取打印机列表
 let lodop;
@@ -234,6 +234,8 @@ function ajax(num, list, tf) {
                   sbpdffhd(c.rows);
                 }else if(c.rows['type'] == 11){
                   pdffhd3pe(c.rows);
+                }else if(c.rows['type'] == 12){
+                    pdffhdcenter(c.rows);
                 }
                 
                 if (c.rows['n'] > -1) {