From 890eafcf31f5f8d519bb9e6f9c15303be5328e2d Mon Sep 17 00:00:00 2001
From: KKbes <1620284052@qq.com>
Date: 星期一, 07 八月 2023 10:48:54 +0800
Subject: [PATCH] review

---
 force-app/main/default/lwc/lexExistingInquiry/lexExistingInquiry.js |   15 +++------------
 1 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/force-app/main/default/lwc/lexExistingInquiry/lexExistingInquiry.js b/force-app/main/default/lwc/lexExistingInquiry/lexExistingInquiry.js
index bd43c23..71b4cd8 100644
--- a/force-app/main/default/lwc/lexExistingInquiry/lexExistingInquiry.js
+++ b/force-app/main/default/lwc/lexExistingInquiry/lexExistingInquiry.js
@@ -1,5 +1,4 @@
 //author : kk   
-//self  review  鏇存柊澶辫触杩斿洖鐨勯敊璇俊鎭病鏈変箣鍓峜lass鐨勫ソ銆傜粰鍑虹殑閮芥槸鎰忎箟涓嶆槑鐨勬姤閿�
 
 import { LightningElement, track, wire , api  } from 'lwc';
 
@@ -74,11 +73,9 @@
 
 
      connectedCallback(){
-        console.log(this.recordId);
         init({
             recordId: this.recordId
         }).then(result => {
-            console.log(result);
             if (result != null) {
                 this.Task = result;
                 this.ExistingInquiry().then(result=>{
@@ -86,9 +83,6 @@
                     this.dispatchEvent(new CloseActionScreenEvent());
                 });
             }
-        }).catch(error => {
-            console.log("error");
-            console.log(error);
         });
 
     }
@@ -112,13 +106,10 @@
                     await getQuoteIrai({QuoteIraiId : this.Task.QuoteIraiId__c
                     }).then(res=>{
                         this.NewTask=res;
-                    }).catch(err=>{
-                        console.log("err:",err.message);
                     });
-
                     if(this.NewTask.Lead__c){
                          // Lead浣滄垚骞舵洿
-                        await makeAndUpdateLead({ Lead_c : this.Opportunity.Lead__c, Id : this.NewTask.Id, 
+                        await makeAndUpdateLead({ Lead_c : this.Opportunity.Id, Id : this.NewTask.Lead__c, 
                                QuoteIraiId__c : this.Task.QuoteIraiId__c
                         }).then(res=>{
                             if(res !='success'){
@@ -135,7 +126,7 @@
                             return;
                         }
                         // 鍒ゆ柇鎶ヤ环濮旀墭
-                            if( this.Task.QuoteIraiId__c != '') {
+                            if( this.Task.QuoteIraiId__c != '' && this.Task.QuoteIraiId__c!=undefined) {
                                 // 鎶ヤ环濮旀墭浣滄垚
                                 await makeAndUpdateQuoteIrai({ QuoteIraiStatus : "宸叉湁璇环", Id : this.Task.QuoteIraiId__c 
                                 }).then(res=>{
@@ -196,4 +187,4 @@
     
 
 
-}
+}
\ No newline at end of file

--
Gitblit v1.9.1