From 35910c355f74e736e2068a0ffb7f39ae9615d8e1 Mon Sep 17 00:00:00 2001
From: chenjingwu <chenjingwu@prec-tech.com>
Date: 星期五, 24 五月 2024 16:29:00 +0800
Subject: [PATCH] 1

---
 force-app/main/default/lwc/lexTenderingNoStandardButton/lexTenderingNoStandardButton.js |   27 +++++++++++++++++++++++++--
 1 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/force-app/main/default/lwc/lexTenderingNoStandardButton/lexTenderingNoStandardButton.js b/force-app/main/default/lwc/lexTenderingNoStandardButton/lexTenderingNoStandardButton.js
index b071b10..67e16ce 100644
--- a/force-app/main/default/lwc/lexTenderingNoStandardButton/lexTenderingNoStandardButton.js
+++ b/force-app/main/default/lwc/lexTenderingNoStandardButton/lexTenderingNoStandardButton.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 lexTenderingNoStandardButton extends LightningElement {
     @api recordId;//褰撳墠杩欐潯鏁版嵁鐨刬d
@@ -19,6 +21,8 @@
            }
          }
      }
+    
+
     connectedCallback(){
         init({
             recordId: this.recordId
@@ -28,8 +32,12 @@
                 this.opportunityNum = result.opportunityNum;
                 this.NoStandardButton();
                 this.dispatchEvent(new CloseActionScreenEvent());
-        })        
+        }).catch(error => {
+            console.log("error"+error);
+        }).finally(() => {
+        });        
     }
+
     //鎷涙爣椤圭洰涓嶅簲鏍囩敵璇�
     NoStandardButton(){
         if(Number(this.opportunityNum) > 0) {
@@ -38,12 +46,27 @@
         }
         window.open ('/apex/Bidding?id='+this.id, '', 'height=350, width=600, top=200, left=350,location=no');
     }
+
     showToast(msg,type) {
         const event = new ShowToastEvent({
             message: msg,
             variant: type
         });
         this.dispatchEvent(event);
-        this.dispatchEvent(new CloseActionScreenEvent());
     }
 }
+
+
+// function IfResponse(){
+
+//     // 鍏宠仈璇环涔嬪悗涓嶈兘鍦ㄦ嫑鏍囬噷鐢宠涓嶅簲鏍�
+//     if('{!Tender_information__c.OpportunityNum__c}' > 0) {
+//     alert('椤圭洰宸插叧鑱旇繃璇环锛岃鍒拌浠烽噷鍋氫笉搴旀爣鐢宠');
+//     return;
+//     }
+    
+    
+//     window.open ('/apex/Bidding?id={!Tender_information__c.Id}', '', 'height=350, width=600, top=200, left=350,location=no');
+    
+//     }
+//     IfResponse();
\ No newline at end of file

--
Gitblit v1.9.1