From f2ff6608840174781d98e9cc0943682e7c7337be Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期三, 30 七月 2025 13:50:26 +0800
Subject: [PATCH] PDA单据新增和列表添加二维码功能

---
 WebTM/views/WMS扫码模块/生产领料/Kf_MateOutBill_PDA.html |   48 +++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 45 insertions(+), 3 deletions(-)

diff --git "a/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\347\224\237\344\272\247\351\242\206\346\226\231/Kf_MateOutBill_PDA.html" "b/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\347\224\237\344\272\247\351\242\206\346\226\231/Kf_MateOutBill_PDA.html"
index 8374202..4e384cd 100644
--- "a/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\347\224\237\344\272\247\351\242\206\346\226\231/Kf_MateOutBill_PDA.html"
+++ "b/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\347\224\237\344\272\247\351\242\206\346\226\231/Kf_MateOutBill_PDA.html"
@@ -15,6 +15,7 @@
     <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
     <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
     <script src="../../../layuiadmin/PubCustom.js"></script>
+    <script src="../../../layuiadmin/qrcode/qrcode.min.js"></script>
     <style>
         .layui-col-xs8 {
             width: 55.666667%;
@@ -155,8 +156,13 @@
                                             <div class="layui-col-xs3">
                                                 <label class="layui-form-label" style="width:60px;padding-left:0px;">鍗曟嵁鍙�</label>
                                             </div>
-                                            <div class="layui-col-xs9">
+                                            <div class="layui-col-xs8">
                                                 <input type="text" name="HBillNo" id="HBillNo" lay-verify="HBillNo" autocomplete="off" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" disabled>
+                                            </div>
+                                            <div class="layui-col-xs2">
+                                                <button type="button" lay-submit="" lay-filter="generateQRCodeBtn" class="layui-btn" id="generateQRCodeBtn" style="width: 45px; margin-left: 10px; padding-left: 12px">
+                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-2px;"></i>
+                                                </button>
                                             </div>
                                         </div>
                                         <div class="layui-row">
@@ -1222,10 +1228,10 @@
                                                 parent.location.href = "../../WMS鎵爜妯″潡/鐢熶骇棰嗘枡/Kf_MateOutBillList_PDA.html";
                                             }
                                             else {
-                                                parent.location.href = "../../../views/index_Mobile.html";
+                                                /*parent.location.href = "../../../views/index_Mobile.html";*/
                                             }
                                         }//鍏抽棴
-                                    }
+                                        }
                                         , function () {
                                             location.replace('Kf_MateOutBill_PDA.html?OperationType=1&HInterID=0');
                                         });//鏂板
@@ -1406,6 +1412,42 @@
 
             //#endregion
 
+            //#region 浜岀淮鐮佺敓鎴�
+            form.on('submit(generateQRCodeBtn)', function () {
+                showQRCode($("#HBillNo").val(), "鍗曟嵁浜岀淮鐮�");
+            });
+            /**
+             * 鏄剧ず浜岀淮鐮佸脊绐�
+             * @param {string} content - 瑕佺敓鎴愪簩缁寸爜鐨勫唴瀹�
+             * @param {string} title - 寮圭獥鏍囬
+             */
+            function showQRCode(content, title) {
+                // 鏄剧ず寮圭獥
+                layer.open({
+                    type: 1,
+                    title: title || '浜岀淮鐮�',
+                    skin: 'layui-layer-demo', // 鑷畾涔夌毊鑲�
+                    area: ['300px', '360px'],
+                    closeBtn: 1,
+                    shadeClose: true,
+                    content: '<div style="text-align:center;padding:45px;">' +
+                        '<div id="qrcode" style="margin-left: auto;"></div>' +
+                        '<div style="">' + content + '</div></div>',
+                    success: function (layero, index) {
+                        // 鍦ㄥ脊绐楁垚鍔熸墦寮�鍚庣敓鎴愪簩缁寸爜
+                        new QRCode(document.getElementById("qrcode"), {
+                            text: content,
+                            width: 200,
+                            height: 200,
+                            colorDark: "#000000",
+                            colorLight: "#ffffff",
+                            correctLevel: QRCode.CorrectLevel.H
+                        });
+                    }
+                });
+            }
+            //#endregion
+
 
             //#region 鎵弿婧愬崟鏉$爜
 

--
Gitblit v1.9.1