From e6068da47c1bef5517c9e5fdc8c726766867ad4e Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期五, 14 七月 2023 15:10:02 +0800
Subject: [PATCH] Merge branch 'master' into LEXUpgrade2023-Deloitte

---
 force-app/main/default/pages/InventoryResultRecord.page |   80 ++++++++++++++++++++-------------------
 1 files changed, 41 insertions(+), 39 deletions(-)

diff --git a/force-app/main/default/pages/InventoryResultRecord.page b/force-app/main/default/pages/InventoryResultRecord.page
index 518f597..4799443 100644
--- a/force-app/main/default/pages/InventoryResultRecord.page
+++ b/force-app/main/default/pages/InventoryResultRecord.page
@@ -5,8 +5,8 @@
 <apex:includeScript value="{!URLFOR($Resource.instascan)}"/>
 <apex:stylesheet value="{!URLFOR($Resource.jquery_confirm, 'jquery-confirm.min.css')}"/>
 <apex:includeScript value="{!URLFOR($Resource.jquery_confirm, 'jquery-confirm.min.js')}"/>
-<apex:includeScript value="/soap/ajax/46.0/connection.js"/>
-<apex:includeScript value="/soap/ajax/46.0/apex.js"/>
+<apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
+<apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
     <style>
         .overlay {
             position: absolute;
@@ -869,7 +869,6 @@
         <hidden>
             <input type="hidden" value="" id="tempcodeid" />
 
-            <!-- //姣忔杈撳叆鐨勭爜瀛樻斁鍒版敼ul涓�, 濡傛灉涓婃杈撳叆鐨勭爜鏄ぇ鐮佸苟涓旀湰娆¤緭鍏ョ殑鐮佹槸灏忕爜 浼氭浛鎹负澶х爜+灏忕爜+ ' XIAOMA'-->
             <ul id="Scancodehistory" style="list-style-type: none; text-align: center;padding: 0;width: 100%; height: 100px; overflow: auto">
             </ul>
             <input type="hidden" value="{!allHCCodelist}" id="allhccode" />
@@ -895,7 +894,7 @@
             var type = document.getElementById("allPage:allForm:searchBlock:maindetailId:assetCategory").value;
             if (type == '鑰楁潗') {
 
-                //鍙兘杈撳叆鏁板瓧鍜屽瓧姣� 鍒ゆ柇杈撳叆鐨刢ode鏄惁姝g‘
+                //鍙兘杈撳叆鏁板瓧鍜屽瓧姣�
                 var re;
                 re = /^[a-zA-Z0-9]*$/; 
                 // re = ^[0-9A-Za-z]{8,16}$;
@@ -911,37 +910,29 @@
 
                 // if (content.length == 3) {
                 var codearr = j$('#Scancodehistory')[0].getElementsByTagName('li');
-                //濡傛灉褰撳墠杈撳叆鐨勬槸3浣嶅皬鐮�
+                //濡傛灉浼犺繘鏉ョ殑鏁版嵁涓�3浣� 鍒欐嫾鎺ヤ笂涓�涓壂鐨勭爜if 
                 if (codearr != null && codearr.length > 0 &&content.length == 3) {
-                    //鑾峰彇涓婁竴涓緭鍏ョ殑琛�
                     var lastCode1 = codearr[codearr.length - 1];
-                    //鑾峰彇涓婁竴涓緭鍏ョ殑鐮�
                     var nowc = lastCode1.innerHTML; 
-
-                    //涓婃杈撳叆鐨勪篃鏄皬鐮� 鎴栬�� 涓婃杈撳叆鐨勬槸鐩�  鎴栬�呬笂娆¤緭鍏ョ殑鐮佸凡缁忓尮閰嶅ソ浜� 鎴栬�呬笂娆$殑鍊兼槸'fengedian'(涓�杩涙潵灏辫緭灏忕爜浼氳蛋鍒�)
+                    //涓婃杈撳叆鐨勪篃鏄皬鐮� 鎴栬�� 涓婃杈撳叆鐨勬槸鐩�  鎴栬�呬笂娆¤緭鍏ョ殑鐮佸凡缁忓尮閰嶅ソ浜� 
+                    //涓婃杈撳叆鐨勭爜鏄ぇ鐮� 
                     // if (nowc.substring(nowc.length - 8,nowc.length - 5) != '250' && nowc.substring(nowc.length - 7 ,nowc.length) != ' XIAOMA') {
-                    if (nowc.length == 3 || nowc.substring(nowc.length - 8,nowc.length - 5) == '250' || nowc.substring(nowc.length - 7 ,nowc.length) == ' XIAOMA' || nowc == 'fengedian' ) {
+                    if (nowc.length == 3 || nowc.substring(nowc.length - 8,nowc.length - 5) == '250' || nowc.substring(nowc.length - 7 ,nowc.length) == ' XIAOMA' ) {
                         alert('璇峰厛鎵弿澶х爜鍐嶆壂鎻忓皬鐮�')
                         j$( '#maqCode' ).val("");
-                        // j$( '#qrcode' ).val("");
                         return false;
                     }else{
-                        //鍒犳帀涓婃杈撶殑澶х爜 鍐嶅姞涓婂ぇ鐮�+灏忕爜+' XIAOMA'
                         codearr[codearr.length -1 ].remove();
                         content = nowc +content + ' XIAOMA';
                     }
                 }else{
-                    //鏈鎵殑鏄ぇ鐮佹垨鑰呯洅
-                    // var codearr = j$('#Scancodehistory')[0].getElementsByTagName('li');
+                    var codearr = j$('#Scancodehistory')[0].getElementsByTagName('li');
+                    //濡傛灉浼犺繘鏉ョ殑鏁版嵁涓�3浣� 鍒欐嫾鎺ヤ笂涓�涓壂鐨勭爜if 
                     if (codearr != null && codearr.length > 0) {
-                        //鑾峰彇涓婁竴涓緭鍏ョ殑琛�
                         var lastCode1 = codearr[codearr.length - 1];
-                        //鑾峰彇涓婁竴涓緭鍏ョ殑鐮�
                         var nowc = lastCode1.innerHTML; 
-                        //濡傛灉涓婁竴涓緭鍏ョ殑鐮佷笉鏄�"鐩�" 涔熶笉鏄畬鏁寸殑琚�(澶х爜鍔犲皬鐮佸姞' XIAOMA')涔熶笉鏄�'fengedian'
-                        //1. 涓婃鎵� 涓嶆槸鐩� 涔熶笉鏄� fengedian  鏀�"杩炵画鎵袱娆¤涓嶆彁閱�"
+                        //濡傛灉褰撳墠杈撳叆鐨勬潯鐮侀暱搴︿笉涓�3 骞朵笖涓婃杈撳叆鏉$爜涓哄ぇ鐮�
                         if (nowc.substring(nowc.length - 8,nowc.length - 5) != '250' && nowc.substring(nowc.length - 7 ,nowc.length) != ' XIAOMA'  && nowc != 'fengedian' ) {
-                        // if (nowc != 'fengedian' ) {
                             alert('璇峰厛鎵弿澶х爜鍐嶆壂鎻忓皬鐮�')
                             //鎻愮ず閿欒淇℃伅鐨勮瘽涔熻娓� 闃叉鍑虹幇鍘嗗彶鏁版嵁閬楃暀闂
                             j$("#salesdepartment_select1")[0].style.display = 'none';
@@ -949,21 +940,20 @@
                             j$(picklist1).empty();
                             codearr[codearr.length -1 ].remove();
                             j$( '#maqCode' ).val("");
-                            // j$( '#qrcode' ).val("");
                             return false;
                         }
                     }
                 }
                 // }
-                //2.涓嶈兘閲嶅杈撳叆  鍙垹 鈫撯啌鈫撯啌鈫撯啌鈫�
+                //2.涓嶈兘閲嶅杈撳叆
                 var codearr0 = j$('#Scancodehistory')[0].getElementsByTagName('li');
+                //濡傛灉浼犺繘鏉ョ殑鏁版嵁涓�3浣� 鍒欐嫾鎺ヤ笂涓�涓壂鐨勭爜if 
                 var hisarr = [];
                 if (codearr0 != null) {
                     for (var i = 0; i < codearr0.length; i++) {
                         hisarr.push(codearr0[i].innerHTML);
                     }
                 }
-                //2.涓嶈兘閲嶅杈撳叆  鍙垹 鈫戔啈鈫戔啈鈫戔啈
                 var uiObj0 = j$("#Scancodehistory");
                 var contentArr0 = [];
                 //
@@ -995,7 +985,7 @@
 
             // alert('894')
             // alert(content);
-            // console.error("==content=="+content+"=scanType=="+scanType);
+            console.error("==content=="+content+"=scanType=="+scanType);
             blockme();
             checkQRCode_new(content, scanType);
             //add  by rentx 20210823 start 鎵爜灞ュ巻涔熷瓨涓�涓媍ode 
@@ -1024,16 +1014,25 @@
             var contTemp = content;
             var tempTanSelect = '123';
             if (type == '鑰楁潗') {
+                //濡傛灉鎵殑鏄 鍒欑洿鎺ヨ繑鍥� 寰呮壂鍒版敼琚嬬殑灏忕爜鍚庡啀杩涜鏁伴噺鐨勭疮鍔�
+                // if (content.substring(2,3) == '0' && aatemp != ' XIAOMA') {
+                // if (content.substring(content.length - 8,content.length - 5) != '250' && aatemp != ' XIAOMA') {
+                //     j$( '#maqCode' ).val("");
+                //     unblockUI();
+                //     return;
+                // }
                 //鍒ゆ柇褰撳墠杈撳叆鐨刢ode鏄惁涓哄皬鐮� 濡傛灉鏄� 鍒欏幓鎺夊悗闈㈠姞鐨�12浣�
+                
                 if (aatemp == ' XIAOMA') {
+                    // alert(aatemp)
                     var tempstr = content;
+                    //璇存槑鎵殑鏄皬鐮� 杩欐椂鍊欏彧瑕佸皢鍘熸潵鐨勬彁鍙栧嚭鏉ュ氨鍙互浜�
+                    // alert('Content '+content );
+                    //鎵殑鏄皬鐮� 涓嶅脊 澶х爜寮�
                     tempTanSelect = '';
-                    //濡� "2417013800011140300250ANXIT10IH850963222 XIAOMA"
-                    // content = 2417013800011140300250ANXIT10IH850963
-                    // content = 2417013800011140300250ANXIT10IH850963222
-                    //澶х爜
+
                     content = tempstr.substring(0,tempstr.length - 10);
-                    //鍙栧緱鎷兼垚鐨勮鐨刢ode 澶х爜+灏忕爜
+                    //鍙栧緱鎷兼垚鐨勮鐨刢ode 
                     daicode = tempstr.substring(0,tempstr.length - 7);
                 }
             }
@@ -1044,7 +1043,11 @@
             var qrType , qrError, qrId , guigenum ;
             // QR
             var amoutInput = j$("tr.displayRow input[data-qrcode='"+content+"']:not([data-frozen='true'])");
-            // console.error("checkQRCode_new=="+amoutInput.length+"==amoutInput"+amoutInput);
+            console.error("checkQRCode_new=="+amoutInput.length+"==amoutInput"+amoutInput);
+            // alert("checkQRCode_new=="+amoutInput.length+"==amoutInput"+amoutInput);
+            // // alert(JSON.tostring(amoutInput));
+            // alert(amoutInput.toString);
+            // alert(JSON.stringify(amoutInput) );
             if (amoutInput.length > 0) {
                 console.error("QR==scanType=="+scanType);
                 if (scanType == 2) {
@@ -1140,6 +1143,11 @@
                             //璋冪敤iPad鐨勬帴鍙� 浼犻�掑弬鏁� dept , aid , showflag , num  iPad鏍规嵁showflag鍒ゆ柇鏄惁寮瑰嚭閫夋嫨妗� num涓洪粯璁ょ殑鍊� 
                             //showflag涓�1鏃� 寮瑰嚭 
                             var showflag = tempTanSelect != '' ? '1' : tempTanSelect;
+                            // var showflag = tempTanSelect != '' ? 1 : 0;
+                            // alert(deptStr.slice(0, -1) +' deptStr')
+                            // alert(aidStr.slice(0,-1) +' aidStr')
+                            // alert('showflag'+ showflag)
+                            // alert('contTemp   '+contTemp + '   '+contTemp.length);
                             // window.location.href="sfqr://scan";
                             window.location.href="sfqr://selectDept?dept="+deptStr.slice(0, -1) + "&aid="+aidStr.slice(0,-1)+"&showflag="+showflag+"&code="+contTemp;
                             // if (true) {}
@@ -1167,7 +1175,7 @@
                             if (nowCode != '' && nowCode != 'undefined' && nowCode != null) {
                                 // alert(tempTanSelect);
                                 //鏄爜鏋緭鍏� 
-                                //璇存槑鎵殑澶х爜 鎴栬�呯洅 闇�瑕佸睍绀鸿繖涓
+                                //璇存槑鎵殑澶х爜 闇�瑕佸睍绀鸿繖涓
                                 if (tempTanSelect != '') {
                                     j$(".model00").show();
                                     var picklist = j$("#salesdepartment_select1 select")[0];
@@ -1183,7 +1191,6 @@
                                         unblockUI();
                                         return;
                                     }else{
-                                        //鎵皬鐮佺殑鏃跺�欎細璧板埌杩欓噷 涓嶉渶瑕佸睍绀烘
                                         for(var i=0;i<amoutInput.length;i++) {
                                             if (amoutInput[i].dataset['salesdepartment'] == picklist.value){
                                                 amoutInput = j$(amoutInput[i]);
@@ -1230,16 +1237,14 @@
                     }
                     lastMainId = '';
                     qrType = '1';
-                    //鍙栧緱淇濇湁璁惧id
                     qrId = amoutInput.data("aid");
-                    //鍙栧緱澶囧搧瑙勬牸
                     guigenum = amoutInput.data('bpguige');
                 } else {
                     qrError = "涓嶅瓨鍦ㄦ淇濇湁璁惧";
 
                 }
             }
-            // console.error("3=="+qrType+"==qrError=="+qrError+"==qrId=="+qrId);
+            console.error("3=="+qrType+"==qrError=="+qrError+"==qrId=="+qrId);
             // checkQRDone(qrType, qrError, qrId);
             //濡傛灉鏄� 琚� 鐨勮瘽 榛樿鏄�1涓� 鐩墠鍙湁鑰楁潗鏈夋敼鍔�
             if (type == '鑰楁潗') {
@@ -1269,19 +1274,16 @@
                 }else if (qrType == '5') {
                     tempInput = j$("input[data-mid='"+qrsplit[0]+"'][data-aid='"+qrsplit[1]+"']:not([data-frozen='true'])");
                 }
-                //瀛樿緭鍏ョ殑code鍒板搴旂殑鏄庣粏
                 if (tempInput != null && tempInput != '' && tempInput != 'undefined') {
                     if (!tempInput) return;
                     //杩欓噷鍙缃甤ode鐨勫��
                     var aaa = tempInput.parent();
-                    //鍙栧緱鑰楁潗code鐨勮緭鍏ユ
                     var ccc = aaa[0].children[1].value;
-                    //濡傛灉鏄ぇ鐮�+灏忕爜+xiaoma  
+                    
                     if (aatemp == ' XIAOMA') {
-                        //濡傛灉鎵殑鏄鐨勫ぇ鐮佸姞灏忕爜鍔爔iaoma  绱姞瀛樿鐨勫ぇ鐮�+灏忕爜
+                        //鍙栧緱鎷兼垚鐨勮鐨刢ode 
                         aaa[0].children[1].value = ccc == '' ? daicode : ccc + ',' + daicode;
                     }else{
-                        //濡傛灉鍙栧緱涓嶆槸鍙互涓嶅瓨
                         if (contTemp.substring(contTemp.length - 8,contTemp.length - 5) == '250') {
                             aaa[0].children[1].value = ccc == '' ? daicode : ccc + ',' + content;
                         }

--
Gitblit v1.9.1