From 871ef080564fe5e7410c202a8f7d02dbd6084c7a Mon Sep 17 00:00:00 2001
From: llj <132905093+newwwwwwtree@users.noreply.github.com>
Date: 星期四, 05 二月 2026 18:08:46 +0800
Subject: [PATCH] 组托小卫修复

---
 WebTM/views/Baseset/基础资料/saomazutuo_xiaowei.html |   49 ++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 36 insertions(+), 13 deletions(-)

diff --git "a/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/saomazutuo_xiaowei.html" "b/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/saomazutuo_xiaowei.html"
index 7812acc..91931a0 100644
--- "a/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/saomazutuo_xiaowei.html"
+++ "b/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/saomazutuo_xiaowei.html"
@@ -497,23 +497,46 @@
                 }
                 hform.HBarCode_middle.push(sBarCode);
                 console.log(hform.HBarCode_middle)
-                // 濡傛灉宸叉湁鏉$爜鏁版嵁锛堜笉鏄涓�鏉★級
-                if (listData.length > 0) {
-                    // 鑾峰彇褰撳墠鏉$爜鐨勫悗9-10浣嶏紙浠庡悗寰�鍓嶆暟绗�9鍜岀8浣嶏級
-                    if (sBarCode.length >= 10) {
-                        var currentLast9to10 = sBarCode.substr(-10, 2); // 鑾峰彇鍊掓暟绗�9浣嶅紑濮嬬殑2浣嶅瓧绗�
-                        // 鑾峰彇涓婁竴鏉℃潯鐮佺殑瀵瑰簲浣嶇疆
-                        var lastBarCode = listData[listData.length - 1]['鏉$爜缂栧彿'];
-                        if (lastBarCode.length >= 10) {
-                            var lastLast9to10 = lastBarCode.substr(-10, 2);
-                            if (currentLast9to10 !== lastLast9to10) {
-                                layer.msg(`褰撳墠鏉$爜鍊掓暟10-11浣�(${currentLast9to10})涓庝笂涓�鏉℃潯鐮�(${lastLast9to10})涓嶅悓锛岃妫�鏌ワ紒`, { icon: 5 });
-                                $('#HBarCode').val('');
-                                return;
+                console.log(sBarCode.toString().charAt(sBarCode.length - 1))
+                if (sBarCode.toString().charAt(sBarCode.length - 1) != "W") {
+                    
+                    if (listData.length > 0) {
+                        // 鑾峰彇褰撳墠鏉$爜鐨勫悗9-10浣嶏紙浠庡悗寰�鍓嶆暟绗�9鍜岀8浣嶏級
+                        if (sBarCode.length >= 10) {
+                            var currentLast9to10 = sBarCode.substr(-14, 2); // 鑾峰彇鍊掓暟绗�9浣嶅紑濮嬬殑2浣嶅瓧绗�
+                            // 鑾峰彇涓婁竴鏉℃潯鐮佺殑瀵瑰簲浣嶇疆
+                            var lastBarCode = listData[listData.length - 1]['鏉$爜缂栧彿'];
+                            if (lastBarCode.length >= 10) {
+                                var lastLast9to10 = lastBarCode.substr(-14, 2);
+                                if (currentLast9to10 !== lastLast9to10) {
+                                    layer.msg(`褰撳墠鏉$爜鍊掓暟14-15浣�(${currentLast9to10})涓庝笂涓�鏉℃潯鐮�(${lastLast9to10})涓嶅悓锛岃妫�鏌ワ紒`, { icon: 5 });
+                                    $('#HBarCode').val('');
+                                    return;
+                                }
                             }
                         }
                     }
                 }
+                else {
+                    if (listData.length > 0) {
+                        // 鑾峰彇褰撳墠鏉$爜鐨勫悗9-10浣嶏紙浠庡悗寰�鍓嶆暟绗�9鍜岀8浣嶏級
+                        if (sBarCode.length >= 10) {
+                            var currentLast9to10 = sBarCode.substr(-10, 2); // 鑾峰彇鍊掓暟绗�9浣嶅紑濮嬬殑2浣嶅瓧绗�
+                            // 鑾峰彇涓婁竴鏉℃潯鐮佺殑瀵瑰簲浣嶇疆
+                            var lastBarCode = listData[listData.length - 1]['鏉$爜缂栧彿'];
+                            if (lastBarCode.length >= 10) {
+                                var lastLast9to10 = lastBarCode.substr(-10, 2);
+                                if (currentLast9to10 !== lastLast9to10) {
+                                    layer.msg(`褰撳墠鏉$爜鍊掓暟10-11浣�(${currentLast9to10})涓庝笂涓�鏉℃潯鐮�(${lastLast9to10})涓嶅悓锛岃妫�鏌ワ紒`, { icon: 5 });
+                                    $('#HBarCode').val('');
+                                    return;
+                                }
+                            }
+                        }
+                    }
+                }
+                // 濡傛灉宸叉湁鏉$爜鏁版嵁锛堜笉鏄涓�鏉★級
+                
                 FindMaterial(sBarCode).then(function (materialInfo) {
                     if (!materialInfo) {
                         layer.msg('鏈壘鍒扮墿鏂欎俊鎭�', { icon: 2 });

--
Gitblit v1.9.1