From 8475b9f98c8a4c95446f02be4bf2a64e359c359a Mon Sep 17 00:00:00 2001
From: liwentao <1376563863@qq.com>
Date: 星期五, 11 八月 2023 09:10:31 +0800
Subject: [PATCH] 与测试环境对比,部分代码已被人修改,删除其中的alert和部分硬编码,还原测试环境代码逻辑

---
 force-app/main/default/lwc/lexTenderingEnquiryButton/lexTenderingEnquiryButton.js |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/force-app/main/default/lwc/lexTenderingEnquiryButton/lexTenderingEnquiryButton.js b/force-app/main/default/lwc/lexTenderingEnquiryButton/lexTenderingEnquiryButton.js
index 24650e9..a16d066 100644
--- a/force-app/main/default/lwc/lexTenderingEnquiryButton/lexTenderingEnquiryButton.js
+++ b/force-app/main/default/lwc/lexTenderingEnquiryButton/lexTenderingEnquiryButton.js
@@ -25,19 +25,18 @@
         init({
             recordId: this.recordId
         }).then(result => {
-            if (result != null) {
-                this.IsLoading = false;
-                this.id = result.Id;
-                this.isRelateProject = result.isRelateProject;
-                this.EnquiryButton();
-                this.dispatchEvent(new CloseActionScreenEvent());
-            }
+            console.log(result);
+            this.IsLoading = false;
+            this.id = result.Id;
+            this.isRelateProject = result.isRelateProject;
+            this.EnquiryButton();
         })     
     }
     //鎷涙爣椤圭洰 鍙嶅簲璇环鐘舵��
     EnquiryButton(){
         if(this.isRelateProject == "鍚�"){
             this.showToast('鎷涙姇鏍囬」鐩笉鐩稿叧鍚庝笉鑳藉弽搴旇浠风姸鎬�!','error');
+            this.dispatchEvent(new CloseActionScreenEvent());
             return;
         }
         var listss = [];
@@ -45,18 +44,20 @@
         updateOpportunityInformation({TenderIdList : listss}).then(result=>{
             if(result != 'OK'){
                 this.showToast(result,'error');
+                this.dispatchEvent(new CloseActionScreenEvent());
             }else {
                 this.showToast('鍙嶆槧瀹屼簡','success');
+                this.dispatchEvent(new CloseActionScreenEvent());
             }
         })
     }
 
     showToast(msg,type) {
+        console.log(msg,type);
         const event = new ShowToastEvent({
             message: msg,
             variant: type
         });
         this.dispatchEvent(event);
-        this.dispatchEvent(new CloseActionScreenEvent());
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1