From 66095e6be55c703af7993aed2453374a397d05a3 Mon Sep 17 00:00:00 2001
From: chenjingwu <chenjingwu@prec-tech.com>
Date: 星期一, 15 四月 2024 10:12:13 +0800
Subject: [PATCH] 123

---
 force-app/main/default/lwc/lexTenderingIntentionButton/lexTenderingIntentionButton.js |   29 ++++++++++++++++++++++++++---
 1 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/force-app/main/default/lwc/lexTenderingIntentionButton/lexTenderingIntentionButton.js b/force-app/main/default/lwc/lexTenderingIntentionButton/lexTenderingIntentionButton.js
index f5f5d53..49140bd 100644
--- a/force-app/main/default/lwc/lexTenderingIntentionButton/lexTenderingIntentionButton.js
+++ b/force-app/main/default/lwc/lexTenderingIntentionButton/lexTenderingIntentionButton.js
@@ -1,7 +1,9 @@
 import { LightningElement,wire,track,api} from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
 import { CloseActionScreenEvent } from 'lightning/actions';
+import { NavigationMixin } from 'lightning/navigation';
 import  init  from '@salesforce/apex/TenderingButtonController.initTenderingController';
+import { updateRecord } from 'lightning/uiRecordApi';
 import { ShowToastEvent } from 'lightning/platformShowToastEvent';
 export default class lexTenderingIntentionButton extends LightningElement {
     @api recordId;//褰撳墠杩欐潯鏁版嵁鐨刬d
@@ -15,10 +17,12 @@
            if (urlValue) {
              let str = `${urlValue}`;
              this.recordId = str;
+             console.log(this.recordId,'id');
            }
          }
      }
     
+
     connectedCallback(){
         init({
             recordId: this.recordId
@@ -29,7 +33,11 @@
                 this.IntentionButton();
                 this.dispatchEvent(new CloseActionScreenEvent());
             }
-        })      
+        }).catch(error => {
+            console.log("error"+error);
+        }).finally(() => {
+            
+        });        
     }
 
     //鎷涙爣椤圭洰鏂板缓鎰忓悜
@@ -41,12 +49,27 @@
             window.open(url);
     }
 
+
+    updateRecordView() {
+        updateRecord({fields: { Id: this.recordId }});
+    }
+
     showToast(msg,type) {
+        console.log(msg,type);
         const event = new ShowToastEvent({
+            // title: title,
             message: msg,
             variant: type
         });
         this.dispatchEvent(event);
-        this.dispatchEvent(new CloseActionScreenEvent());
     }
-}
\ No newline at end of file
+}
+
+
+// var foo = function(){
+//     alert('濉啓澶卞崟鎶ュ憡璇风洿鎺ョ偣鍑绘嫑鏍囬〉闈€�愬け鍗曘�戞寜閽�');
+//     var url = '/apex/NewAndEditLead?' + '00N10000009HKS5=' + '{!Tender_information__c.Id}'
+//     + '&LeadSource=鎷涙爣缃�' + '&RecordTypeId=01210000000QiRf' + '&retURL=%2F' + '{!Tender_information__c.Id}' ;
+//     window.open(url);
+//     }
+//     foo();
\ No newline at end of file

--
Gitblit v1.9.1