Browse Source

修改打印

dq 6 years ago
parent
commit
d1c2867eac

+ 2 - 3
kmall-admin/src/main/webapp/js/shop/goods.js

@@ -548,9 +548,8 @@ var vm = new Vue({
                 content: jQuery("#qrcode"),
                 btn: ["打印"],
                 btn1: function (index) {
-                    $("#qrcImg").print({
-
-                    });
+                    $("#qrcImg").print({});
+                    $("#qrcImg").hide();
                     layer.close(index);
                 }
             });

+ 12 - 4
kmall-admin/src/main/webapp/js/shop/order.js

@@ -302,10 +302,18 @@ let vm = new Vue({
             vm.getMacro();
         },
         printDetail: function (rowId) {
-            openWindow({
-                type: 2,
-                title: '<i class="fa fa-print"></i>票据预览',
-                content: '../shop/orderPrint.html?orderId=' + rowId
+            confirm('确定连接打票机打印出票?', function () {
+                $.ajax({
+                    type: "POST",
+                    url: "../order/printMsg",
+                    contentType: "application/json",
+                    data: JSON.stringify(rowId),
+                    success: function (r) {
+                        if (r.ticket != null) {
+                            alert('打印小票完成');
+                        }
+                    }
+                });
             })
         },
         shippingBind: function (event) {