Browse Source

提交数据

lvhao 1 week ago
parent
commit
78df0f934b
2 changed files with 73 additions and 1 deletions
  1. 1 1
      core/CoreApp/controllers/Amazonbarcode.php
  2. 72 0
      template/erp/amazonbarcode_see.html

File diff suppressed because it is too large
+ 1 - 1
core/CoreApp/controllers/Amazonbarcode.php


+ 72 - 0
template/erp/amazonbarcode_see.html

@@ -82,6 +82,11 @@ function dyfs(data)
 {
 	wprinter.amazonbarcode(data);//打印方式
 }
+function ttdyfs(data)
+{
+    alert("执行了ttdyfs");
+	wprinter.printcode(data);//打印方式
+}
 var sysprint = 1;
 var customon = 1;
 function custom(){
@@ -196,6 +201,73 @@ $(".wigprintk").on('click', "#amazonbarprinton", function() {
 
 });
 
+
+
+$(".datatext").on('click', ".ttbarprint", function() {
+
+    if ($("select[name='printer']").children("option:selected").val() == "") {
+        $(".ts p").html("请选择打印机!");
+        $(".ts").show();
+        setTimeout('$(".ts").fadeOut()', 1000);
+    } else {
+        var id = $(this).data("id");
+        var num = $(this).data("num");
+        $(".wigprintk div p:eq(0)").html('选择打印数量:<input value="'+num+'" name="sl" type="text" style="width:50px;height: 26px;color: #333;border: 1px #ccc solid;font-size: 13px;text-align: center;border-radius: 5px;">');
+        $(".wigprintk div p:eq(1)").html("<p><font id='ttbarprint' data-id='"+id+"'>确 定</font><font class='esc'>取 消</font></p>");
+        $(".wigprintk").show();
+    }
+
+});
+
+$(".wigprintk").on('click', "#ttbarprint", function() {
+    var sl = $(".wigprintk div p:eq(0) input[name='sl']").val();
+    let bfb = $(".wigprintk div p:eq(0) input[name='bfb']").val();
+    $(".wigprintk").hide();
+    $(".wigprintk div p:eq(0)").html("<i class='fa fa-2x fa-cog fa-spin'></i> &nbsp; 正在处理打印信息,请稍后...");
+    $(".wigprintk div p:eq(1)").html("");
+    $(".wigprintk").show();
+
+    var tf = $("select[name='print']").children("option:selected").val();
+    var list = $(this).data("id");
+    $.ajax({
+        url: printurl,
+        data: "s=" + list + "&n=" + 0 + "&sl=" + sl + "&bfb=" + bfb,
+        type: "POST",
+        dataType: "json",
+        timeout: 60001,
+        success: function(c) {
+            if (c.success) {
+                ttdyfs(c.rows);
+                if (c.rows['n'] > -1) {
+                    azsite(c.rows['n'],c.rows['data'], c.rows['number'], 1, 0);
+                } else {
+                        azsite(1, 1, c.rows['number'], 0, 0);
+                }
+            } else {
+                $(".wigprintk").hide();
+                layx.alert('错误', c.msg, function(id, button) {
+                    $(".search span").click();
+                }, { dialogIcon: 'error' });
+            }
+        },
+        error: function(textStatus) {
+            wprinter.sound("错误,请求数据超时!请重试")
+            $(".wigprintk").hide();
+            layx.alert('错误', '请求数据超时!请重试', function(id, button) {
+                $(".search span").click();
+            }, { dialogIcon: 'error' });
+        },
+    });
+
+});
+
+
+
+
+
+
+
+
 $(".datatext").on('click', ".amazonbarctmprint", function() {
 
         if ($("select[name='printer']").children("option:selected").val() == "") {