From 7454e4fe769b5148309b8a932fbf2bc03b41b376 Mon Sep 17 00:00:00 2001
From: liangxiaozhen <liangxiaozhen>
Date: 星期日, 06 八月 2023 19:06:33 +0800
Subject: [PATCH] G级页面简单修改

---
 force-app/main/default/lwc/lexTenderingNoStandardButton/lexTenderingNoStandardButton.js |   43 ++++++++++---------------------------------
 1 files changed, 10 insertions(+), 33 deletions(-)

diff --git a/force-app/main/default/lwc/lexTenderingNoStandardButton/lexTenderingNoStandardButton.js b/force-app/main/default/lwc/lexTenderingNoStandardButton/lexTenderingNoStandardButton.js
index 67e16ce..442877c 100644
--- a/force-app/main/default/lwc/lexTenderingNoStandardButton/lexTenderingNoStandardButton.js
+++ b/force-app/main/default/lwc/lexTenderingNoStandardButton/lexTenderingNoStandardButton.js
@@ -1,9 +1,7 @@
 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
@@ -22,29 +20,22 @@
          }
      }
     
-
+    //鎷涙爣椤圭洰涓嶅簲鏍囩敵璇�
     connectedCallback(){
         init({
             recordId: this.recordId
         }).then(result => {
+                console.log(result);
                 this.IsLoading = false;
                 this.id = result.Id;
                 this.opportunityNum = result.opportunityNum;
-                this.NoStandardButton();
+                if(this.opportunityNum > 0) {
+                    this.showToast('椤圭洰宸插叧鑱旇繃璇环锛岃鍒拌浠烽噷鍋氫笉搴旀爣鐢宠','error');
+                    return;
+                }
+                window.open ('/apex/Bidding?id='+this.id, '', 'height=350, width=600, top=200, left=350,location=no');
                 this.dispatchEvent(new CloseActionScreenEvent());
-        }).catch(error => {
-            console.log("error"+error);
-        }).finally(() => {
-        });        
-    }
-
-    //鎷涙爣椤圭洰涓嶅簲鏍囩敵璇�
-    NoStandardButton(){
-        if(Number(this.opportunityNum) > 0) {
-            this.showToast('椤圭洰宸插叧鑱旇繃璇环锛岃鍒拌浠烽噷鍋氫笉搴旀爣鐢宠','error');
-            return;
-        }
-        window.open ('/apex/Bidding?id='+this.id, '', 'height=350, width=600, top=200, left=350,location=no');
+        })      
     }
 
     showToast(msg,type) {
@@ -53,20 +44,6 @@
             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
+}
\ No newline at end of file

--
Gitblit v1.9.1