Browse Source

提交数据

lvhao 3 tháng trước cách đây
mục cha
commit
255beeb9ab
1 tập tin đã thay đổi với 38 bổ sung3 xóa
  1. 38 3
      template/erp/systemprint_fhd.html

+ 38 - 3
template/erp/systemprint_fhd.html

@@ -12,7 +12,7 @@
 </li>
 
 
-<li style="height: 56px;line-height: 56px;"><input value="" name="transferout" id="transferout" placeholder="点此处扫码" type="text" style="width:500px;height: 50px;line-height: 50px;"></li>
+<li style="height: 56px;line-height: 56px;"><input value="" name="scannumber" id="scannumber" placeholder="点此处扫描发货单" type="text" style="width:500px;height: 50px;line-height: 50px;"></li>
 
 <li style="display: none;"><span>确 定</span></li>
 </ul>
@@ -62,11 +62,46 @@ window.onload = function() {
 if(typeof $("select[name='printer']").length < 1) return;
 setTimeout(function(){ wprinter.printer()},1000);};
 $(document).ready(function() {
-    $("#transferout").focus();
+    $("#scannumber").focus();
 });
 
-
+$("#scannumber").on("change",function(){
+    $("#scannumber").blur();
+    let val = $(this).val()
+    
+    $.ajax({
+        url: "/systemprint/getorderinfo",
+        data: "number="+val ,
+        type: "POST",
+        dataType: "json",
+        success: function(c) {
+            $("#scannumber").focus();
+            if (c.code == 1) {
+                
+                    
+                wprinter.ydpdf(c.rows);
+                
+            } else {
+                $(".systemwindow").hide();
+                layx.alert('错误', c.msg, function(id, button) {
+                    
+                }, { dialogIcon: 'error' });
+            }
+        },
+        error: function(textStatus) {
+            $("#scannumber").focus();
+            wprinter.sound("错误,请求数据超时!请重试")
+            $(".systemwindow").hide();
+            layx.alert('错误', '请求数据超时!请重试', function(id, button) {
+              
+            }, { dialogIcon: 'error' });
+        },
+    });
+    //$("#scannumber").focus();
+    //$("#scannumber").blur();
+})
 
 </script>
 <script type="text/javascript" src="{$theme}js/laydate.js"></script>
+<script type="text/javascript" src="{$theme}js/print.js?v=20250207331"></script>
 {Template footer}