From f3691832d9b0f4797a7249623193f495d74042ce Mon Sep 17 00:00:00 2001
From: twysparks <twysparks@163.com>
Date: 星期四, 18 五月 2023 13:20:36 +0800
Subject: [PATCH] tt

---
 force-app/main/default/lwc/lexSendNFM103/lexSendNFM103.js |   46 +++++++++++++++++++---------------------------
 1 files changed, 19 insertions(+), 27 deletions(-)

diff --git a/force-app/main/default/lwc/lexSendNFM103/lexSendNFM103.js b/force-app/main/default/lwc/lexSendNFM103/lexSendNFM103.js
index dcb0438..eea8f44 100644
--- a/force-app/main/default/lwc/lexSendNFM103/lexSendNFM103.js
+++ b/force-app/main/default/lwc/lexSendNFM103/lexSendNFM103.js
@@ -175,7 +175,6 @@
           return;
         }
       }
-
       if (
         this.numberofEffectiveContract == "鏃�" && this.newProductGuaranteTxt != "2: 澶氬勾淇濅慨" &&
         this.newProductGuaranteTxt != "2: 鏈嶅姟澶氬勾淇濅慨" && this.newProductGuaranteTxt != "8: 甯傚満澶氬勾淇濅慨" &&
@@ -185,7 +184,6 @@
           return;
         }
       }
-
       if ((this.maintenanceContract != undefined || this.VMMaintenanceContract != undefined) &&
         this.onSiteRepair == "RC淇悊" && this.FSEState == "灞变笢鐪�"
       ) {
@@ -193,7 +191,6 @@
           return;
         }
       }
-
       var today = Date.now();
       var dateReceiptQuestions = Date.parse(this.dateReceiptQuestions);
       var dates = (today - dateReceiptQuestions) / (24 * 60 * 60 * 1000);
@@ -204,7 +201,6 @@
         alert("鐢宠淇悊鏃禨AP淇悊鐢宠鏃ヨ秴杩囬棶棰樿仈缁滄敹鍒版棩1澶╋紝蹇呴』濉啓闂秴鏃舵姤鍛婄殑鐞嗙敱");
         return;
       }
-
       if (this.quickRepairSign == true && (this.numberofEffectiveContract == "鏈�" || this.newProductGuaranteTxt == "2: 澶氬勾淇濅慨" ||
           this.newProductGuaranteTxt == "2: 鏈嶅姟澶氬勾淇濅慨" || this.newProductGuaranteTxt == "8: 甯傚満澶氬勾淇濅慨") &&
         (this.onSiteRepair == "RC淇悊" || this.onSiteRepair == "鍔炰簨澶勪慨鐞�" || this.onSiteRepair == "鐜板満淇悊")) {
@@ -218,14 +214,12 @@
           }
         }
       }
-
       var returnsProductWay = this.returnsProductway;
       if (returnsProductWay == undefined) {
         if (!confirm("杩斿搧鏂瑰紡涓虹┖锛屾槸鍚︾户缁敵璇蜂慨鐞嗭紒")) {
           return;
         }
       }
-
       var DetailedAddress = this.detailedAddress;
       if (this.assetOwner != "Olympus") {
         if (DetailedAddress != undefined) {
@@ -238,7 +232,6 @@
           return;
         }
       }
-
       queryForEquipments({
         deliveredProductId: this.deliveredProductId,
       }).then(equipments => {
@@ -250,12 +243,10 @@
           }
         }
       });
-
       if (this.FSEApplyForRepairTime != undefined) {
         alert("宸蹭慨鐞嗙敵璇凤紝涓嶅啀淇悊鐢宠浜�");
         return;
       }
-
       var surplusCount = 0;
       if (this.URFReapir == false) {
         queryForUrfAsset({
@@ -270,7 +261,6 @@
             surplusCount = seriesMaxRepairCount - seriesRepairCount;
           }
         });
-
         queryForUrfSeriesInfo({
           URFLimitSerial: this.URFLimitSerial,
         }).then(urfSeriesInfo => {
@@ -278,7 +268,6 @@
           if (urfSeriesInfo != null && urfSeriesInfo.length > 0) {
             urfSeries = urfSeriesInfo[0].URFLimitSerial__c;
           }
-
           queryForRepairCount({
             maintenanceContractId: this.maintenanceContractId,
             status1: "1.鍙楃悊瀹屾瘯",
@@ -291,7 +280,6 @@
           });
         });
       }
-
       if (this.status != "鑽夋涓�" && this.status != "1.鍙楃悊瀹屾瘯(SAP寰呭彂閫�)" && this.status != "4.淇悊鍝佽繑閫侀樁娈�") {
         alert("涓嶆槸鑽夋涓笉鑳界敵璇�");
       } else {
@@ -308,25 +296,20 @@
           });
         }
       }
-
       if (this.ifDeadHurt == "鏈�") {
         if (!confirm("鏄惁纭AE瑕佹彁浜わ紵")) {
           return;
         }
       }
-
       if (this.dayLater30 == "鏄�") {
         alert("鍒涘缓鍚庤秴杩�30澶╋紝涓嶈兘鐢宠浜�");
         return;
       }
-
       var prompt11 = "鍚堝悓鍐呭ぇ淇鏁板凡鐢ㄥ畬锛屽綋鍓嶄慨鐞嗕负鍚堝悓澶栫殑淇悊锛屾槸鍚︾户缁紵";
       if (this.URFReapir == false && surplusCount == 0) {
         if (!confirm(prompt11)) {
           return;
         }
-
-
       }
       updateForRepair1({
         recordId: this.Id
@@ -359,7 +342,6 @@
                   }
                 }
               });
-
               queryForRds({
                 recordId: this.Id,
               }).then(rds => {
@@ -370,7 +352,6 @@
                   }
                 }
               });
-
             } else {
               alert("娌℃湁鎵惧埌 淇悊濮旀墭鑰�");
             }
@@ -388,14 +369,25 @@
       console.log(result);
       staticResource = JSON.parse(result);
 
-      AWSService.query(staticResource.queryUrl, this.AWSDataId, function (data) {
-        console.log(123);
-        console.log(data);
-        if (data && data.object) {
-          DetailedAddress = data.object.detailedAddress;
-        }
-        this.foo();
-      }, staticResource.token);
+      Promise.all([
+        loadScript(this, AWSService + '/AWSService.js'),
+        loadScript(this, jqueryurl),
+        loadScript(this, jq + "/dist/jquery.js"),
+        loadScript(this, con),
+        loadScript(this, apex),
+        loadScript(this, common)
+      ]).then(() => {
+        window.AWSService.query(staticResource.queryUrl,
+          this.AWSDataId,
+          function (data) {
+            console.log(data);
+            if (data && data.object) {
+               DetailedAddress = data.object.detailedAddress;
+            }
+            this.foo();
+          },
+          staticResource.token);
+      });
     })
   }
 

--
Gitblit v1.9.1